]> git.ipfire.org Git - thirdparty/glibc.git/blame - nptl/ChangeLog
Update.
[thirdparty/glibc.git] / nptl / ChangeLog
CommitLineData
14c35863
UD
12004-03-18 Ulrich Drepper <drepper@redhat.com>
2
3 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
4 cpusetsize field, remove next.
5 * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
6 parameter for size of the CPU set.
7 (pthread_setaffinity_np): Likewise.
8 (pthread_attr_getaffinity_np): Likewise.
9 (pthread_attr_setaffinity_np): Likewise.
10 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
11 interface change, keep compatibility code.
12 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
13 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
14 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
15 * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np. Declare
16 __pthread_getaffinity_np.
17 * Versions: Add version for changed interfaces.
18 * tst-attr3.c: Adjust test for interface change.
19 * pthread_getattr_np.c: Query the kernel about the affinity mask with
20 increasing buffer sizes.
21 * pthread_attr_destroy.c: Remove unused list handling.
22 * pthread_attr_init.c: Likewise.
23
8e115d80
RM
242004-03-17 Roland McGrath <roland@redhat.com>
25
26 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
27 first argument to clock_getres so we ever enable kernel timers.
28
e3b22ad3
UD
292004-03-15 Ulrich Weigand <uweigand@de.ibm.com>
30
31 * init.c (nptl_version): Add __attribute_used__ to nptl_version.
32
841153fa
RH
332004-03-12 Richard Henderson <rth@redhat.com>
34
e3b22ad3
UD
35 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
36 oldvalue from CENABLE to CDISABLE.
841153fa 37
932dfea7
UD
382004-03-12 Ulrich Drepper <drepper@redhat.com>
39
40 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
41 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
42 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
43 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
44
9852f6dc
RH
452004-03-11 Richard Henderson <rth@redhat.com>
46
47 * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
48 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
49 * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
50
43513fb7
UD
512004-03-11 Jakub Jelinek <jakub@redhat.com>
52
53 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
54 instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
55 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
56
572004-03-11 Jakub Jelinek <jakub@redhat.com>
58
59 * forward.c (__pthread_cond_broadcast_2_0,
60 __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
61 __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
62 __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
63
8a3e10e0
UD
642004-03-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
65
66 * sysdeps/sh/tcb-offsets.sym: Add PID.
67 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
68 * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
69
6d3a2bec
UD
702004-03-10 Ulrich Drepper <drepper@redhat.com>
71
72 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
73 include <sysdep-cancel.h>, vfork is no cancellation point.
74 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
75 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
76 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
77
d3a4a571
UD
782004-03-10 Jakub Jelinek <jakub@redhat.com>
79
73b4ce64
UD
80 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
81 libc_hidden_def.
82 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
83 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
84 Likewise.
85 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
86 Likewise.
87 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
88 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
89 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
90 * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
91 of DO_CALL_VIA_BREAK. Work around a gas problem.
92
d682a515
UD
93 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
94 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
95 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
96 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
97 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
98 * sysdeps/powerpc/tcb-offsets.sym: Add PID.
99
100 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
101 a local register for saving old PID. Negate PID in parent upon exit.
102
d3a4a571
UD
103 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
104 tcb-offsets.h.
105 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
106 before syscall, set to the old value in the parent afterwards.
107 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
108 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
109 tcb-offsets.h.
110 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
111 before syscall, set to the old value in the parent afterwards.
112 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
113 * sysdeps/s390/tcb-offsets.sym: Add PID.
114
115 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
116 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
117 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
118 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
119 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
120 * sysdeps/sparc/tcb-offsets.sym: Add PID.
121
1222004-03-10 Andreas Schwab <schwab@suse.de>
123
124 * sysdeps/ia64/tcb-offsets.sym: Add PID.
125 * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
126 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
127
3f2fb223 1282004-03-09 Jakub Jelinek <jakub@redhat.com>
f4c024d1 129
3f2fb223
UD
130 * tst-cancel20.c (do_one_test): Clear in_sh_body first.
131 * tst-cancel21.c (do_one_test): Likewise.
132 Reported by Gordon Jin <gordon.jin@intel.com>.
f4c024d1 133
8b9d6054
UD
1342004-02-09 Jakub Jelinek <jakub@redhat.com>
135
136 * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
137 if non-zero and set to INT_MIN if zero.
138 * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
139 * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
140 (SAVE_PID, RESTORE_PID): Define.
141 (__vfork): Use it.
142 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
143 Use relative path to avoid including NPTL i386/vfork.S.
144 (SAVE_PID, RESTORE_PID): Define.
145 * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
146 (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
147 * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
148 tst-vfork2x.
149 (tests-reverse): Add tst-vfork1x and tst-vfork2x.
150 * tst-vfork1.c: New test.
151 * tst-vfork2.c: New test.
152 * tst-vfork1x.c: New test.
153 * tst-vfork2x.c: New test.
154
02287d05
UD
1552004-03-08 Ulrich Drepper <drepper@redhat.com>
156
c072ef6d 157 * sysdeps/i386/tcb-offsets.sym: Add PID.
6fadea9f 158 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
c072ef6d 159 * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
6fadea9f 160 * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
02287d05 161
d4acd24b
UD
1622004-03-08 Steven Munroe <sjmunroe@us.ibm.com>
163
164 * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
165
8acb4b81
UD
1662004-03-08 H.J. Lu <hongjiu.lu@intel.com>
167
168 * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
169 _rtld_global_ro.
170
4d1a02ef
UD
1712004-03-07 Ulrich Drepper <drepper@redhat.com>
172
001836c8 173 * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
8acb4b81 174 _rtld_global_ro.
001836c8 175
4d1a02ef
UD
176 * tst-once4.c: Remove unnecessary macro definition.
177
178 * tst-mutex7.c (do_test): Limit thread stack size.
179 * tst-once2.c (do_test): Likewise.
180 * tst-tls3.c (do_test): Likewise.
181 * tst-tls1.c (do_test): Likewise.
182 * tst-signal3.c (do_test): Likewise.
183 * tst-kill6.c (do_test): Likewise.
184 * tst-key4.c (do_test): Likewise.
185 * tst-join4.c (do_test): Likewise.
186 * tst-fork1.c (do_test): Likewise.
187 * tst-context1.c (do_test): Likewise.
188 * tst-cond2.c (do_test): Likewise.
189 * tst-cond10.c (do_test): Likewise.
190 * tst-clock2.c (do_test): Likewise.
191 * tst-cancel10.c (do_test): Likewise.
192 * tst-basic2.c (do_test): Likewise.
193 * tst-barrier4.c (do_test): Likewise.
194
aa420660
UD
1952004-03-05 Ulrich Drepper <drepper@redhat.com>
196
197 * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
198
cff08c81
UD
1992004-03-01 Ulrich Drepper <drepper@redhat.com>
200
201 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
202 (__pthread_cond_timedwait): Optimize wakeup test.
203 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
204 (__pthread_cond_wait): Likewise.
205 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
206 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
207 Likewise.
208
b7fe377c
UD
2092004-02-29 Ulrich Drepper <drepper@redhat.com>
210
211 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
212 (__lll_mutex_lock_wait): Optimize a bit more. Just one copy of
213 the atomic instruction needed.
214 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
215 (__lll_mutex_lock_wait): Likewise.
216
4c771a3b
UD
2172004-02-28 Ulrich Drepper <drepper@redhat.com>
218
219 * Makefile (tests): Add tst-cond14 and tst-cond15.
220 * tst-cond14.c: New file.
221 * tst-cond15.c: New file.
222
a2c33d5a
UD
2232004-02-27 Ulrich Drepper <drepper@redhat.com>
224
225 * sysdeps/pthread/createthread.c (create_thread): Remove use of
226 CLONE_STOPPED. We cannot use SIGCONT which means CLONE_STOPPED
227 needs to be implemented differently to be useful.
228
261eada2
UD
2292004-02-26 Ulrich Drepper <drepper@redhat.com>
230
14ffbc83
UD
231 * pthread_attr_setschedparam.c: Don't test priority against limits
232 here. Set ATTR_FLAG_SCHED_SET flag.
233 * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
234 * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
235 from parent thread to child. If attribute is used and scheduling
236 parameters are not inherited, copy parameters from attribute or
237 compute them. Check priority value.
238 * pthread_getschedparam.c: If the parameters aren't known yet get
239 them from the kernel.
240 * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
241 ATTR_FLAG_POLICY_SET flag for thread.
242 * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
243 and ATTR_FLAG_POLICY_SET.
244
245 * sysdeps/pthread/createthread.c: Use tgkill if possible.
246
261eada2
UD
247 * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
248 fail if stack address hasn't been set. Just return 0.
249
701d185c
UD
2502004-02-25 Ulrich Drepper <drepper@redhat.com>
251
25b8e63c
UD
252 * Makefile (tests-nolibpthread): Add tst-unload. Don't link with
253 libpthread for the files in this list.
254 (CFLAGS-tst-unload): Removed.
255 * tst-unload.c (do_test): Don't use complete path for
256 LIBPHREAD_SO.
257
701d185c
UD
258 * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
259 tst-_res1mod2.
260
a8fd5a02
UD
2612004-02-22 Ulrich Drepper <drepper@redhat.com>
262
263 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
264 (__lll_mutex_lock_wait): Rewrite so that only one locked memory
265 operation per round is needed.
266 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
267 (__lll_mutex_lock_wait): Likewise.
268
dd0b7b19
UD
2692004-02-20 Ulrich Drepper <drepper@redhat.com>
270
271 * tst-cancel9.c (cleanup): Don't print to stderr.
272
5990e1fe
UD
2732004-02-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
274
275 * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
276
33ab3b66
UD
2772004-02-20 Jakub Jelinek <jakub@redhat.com>
278
1be3130e
UD
279 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
280 (__syscall_error_handler2): Call CDISABLE.
281 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
282 (__syscall_error_handler2): Call CDISABLE.
283
8ba5025a
UD
284 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
285 Release lock before the loop, don't reacquire it.
8ba5025a 286
33ab3b66
UD
287 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
288
11986c68
UD
2892004-02-19 Andreas Schwab <schwab@suse.de>
290
291 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
292 Fix last change.
293
dc391246
UD
2942004-02-18 Ulrich Drepper <drepper@redhat.com>
295
37c054c7
UD
296 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
297 (pthread_barrier_wait): After wakeup, release lock only when the
298 last thread stopped using the barrier object.
299 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
300 (pthread_barrier_wait): Likewise.
301 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
302 Likewise.
303 * Makefile (tests): Add tst-barrier4.
304 * tst-barrier4.c: New file.
dc391246
UD
305
306 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
307 (__pthread_cond_timedwait): Perform timeout test while holding
308 internal lock to prevent wakeup race.
309 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
310 * sysdeps/pthread/pthread_cond_timedwait.c
311 (__pthread_cond_timedwait): Likewise.
312 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
313 (__pthread_cond_timedwait): Likewise.
314
4a08113c
UD
3152004-02-18 Jakub Jelinek <jakub@redhat.com>
316
317 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
318 (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
319 * Makefile (tests): Add tst-rwlock13.
320 * tst-rwlock13.c: New test.
321
71b1675e
UD
3222004-02-16 Ulrich Drepper <drepper@redhat.com>
323
324 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
325 (__condvar_tw_cleanup): Little optimization.
326 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
327
cd9fdc72
UD
3282004-02-16 Steven Munroe <sjmunroe@us.ibm.com>
329
330 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
331 libpthread as "lib" parameter to SHLIB_COMPAT.
332 (__novmx_siglongjmp): Fix typo in function name.
333 (__novmx_longjmp): Fix typo in function name.
334
82038750
UD
3352004-02-13 Ulrich Drepper <drepper@redhat.com>
336
b078c591
UD
337 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
338 __builtin_expect.
339
82038750
UD
340 * sysdeps/generic/pt-longjmp.c: Moved to...
341 * sysdeps/pthread/pt-longjmp.c: ...here. New file.
342
e2982bf0
UD
3432004-01-29 Steven Munroe <sjmunroe@us.ibm.com>
344
345 * Makefile (libpthread-routines): Add pt-cleanup.
346 * pt-longjmp.c: Removed.
347 * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
348 * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
349 * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
350 Version longjmp, siglongjmp for GLIBC_2.3.4.
351 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
352
3730d95c
UD
3532004-02-13 Ulrich Drepper <drepper@redhat.com>
354
219304ec
UD
355 * sysdeps/pthread/pthread_cond_timedwait.c
356 (__pthread_cond_timedwait): Optimize. Drop internal lock earlier.
357 Reuse code. Add __builtin_expects.
358
3730d95c
UD
359 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
360 (__pthread_cond_timedwait): Get internal lock in case timeout has
361 passed before the futex syscall.
362 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
363
5673ccc1
UD
3642004-01-20 Ulrich Drepper <drepper@redhat.com>
365
debddf64
UD
366 * allocatestack.c: Pretty printing.
367
5673ccc1
UD
368 * sysdeps/pthread/createthread.c (create_thread): Don't add
369 CLONE_DETACHED bit if it is not necessary.
370
6bae8725
UD
3712004-01-16 Ulrich Drepper <drepper@redhat.com>
372
373 * pthread_getattr_np.c: Include ldsodefs.h.
374
ff151400
RH
3752004-01-16 Richard Henderson <rth@redhat.com>
376
6bae8725
UD
377 * allocatestack.c: Don't declare __libc_stack_end.
378 * init.c (__pthread_initialize_minimal_internal): Likewise.
379 * pthread_getattr_np.c (pthread_getattr_np): Likewise.
ff151400 380
ba683832
RH
3812004-01-15 Richard Henderson <rth@redhat.com>
382
383 * sysdeps/alpha/tls.h (tcbhead_t): Add private.
384 (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
385 TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
386 GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
387 (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
388 (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
389 (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
390 * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
391
630d93a7
UD
3922004-01-14 Ulrich Drepper <drepper@redhat.com>
393
219304ec 394 * init.c (pthread_functions): Make array const.
630d93a7 395
d1fc817e
UD
3962004-01-13 Ulrich Drepper <drepper@redhat.com>
397
398 * allocatestack.c (__make_stacks_executable): Change interface.
399 Check parameters. Pass parameter on to libc counterpart.
400 * pthreadP.h: Change declaration.
401
dc927809
RH
4022004-01-13 Richard Henderson <rth@redhat.com>
403
10677727
UD
404 * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
405 prototype form.
406 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
407 Likewise.
408
d1fc817e
UD
409 * sysdeps/alpha/Makefile: New file.
410 * sysdeps/alpha/tcb-offsets.sym: New file.
411 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
412 Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
dc927809 413
d1fc817e
UD
414 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
415 on powerpc version.
dc927809 416
249a3d0c
UD
4172004-01-08 Jakub Jelinek <jakub@redhat.com>
418
419 * Makefile (tests): Add tst-backtrace1.
420 * tst-backtrace1.c: New test.
421
763c0490
RM
4222003-12-11 Ulrich Weigand <uweigand@de.ibm.com>
423
424 * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
425 register as second parameter to the REGISTER macro.
426 * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
427 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
428 * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
429 * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
430 * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
431 of thread register as second parameter to REGISTER macro in 64 case.
432
c7baafd5
UD
4332004-01-03 Ulrich Drepper <drepper@redhat.com>
434
435 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
436 (CFLAGS-getpid.o): Defined.
437 (CFLAGS-getpid.os): Defined.
438
25ac0258
UD
4392003-12-31 Ulrich Drepper <drepper@redhat.com>
440
441 * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
442 returned for main thread does not overlap with any other VMA.
443 Patch by Jakub Jelinek.
444
795985e4
UD
4452003-12-29 Jakub Jelinek <jakub@redhat.com>
446
447 * tst-raise1.c: Include stdio.h.
448
cb5b9388
UD
4492003-12-23 Jakub Jelinek <jakub@redhat.com>
450
451 * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
452 setting with __ASSUME_TGKILL || defined __NR_tgkill.
453 If pid is 0, set it to selftid.
454 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
455 Don't set self->pid but self->tid. If self->pid == 0 and self->tid
456 != 0, return self->tid without doing a syscall.
457 * descr.h (struct pthread): Move pid field after tid.
458
459 * Makefile (tests): Add tst-raise1.
460 * tst-raise1.c: New file.
461
432aaf5b
RM
4622003-12-23 Roland McGrath <roland@redhat.com>
463
464 * tst-oddstacklimit.c: New file.
465 * Makefile (tests): Add it.
466 (tst-oddstacklimit-ENV): New variable.
467
468 * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
469 value up to page size for __default_stacksize.
470
33ebea17
UD
4712003-12-21 Ulrich Drepper <drepper@redhat.com>
472
473 * Makefile (tests): Add tst-eintr5.
474 * tst-eintr5.c: New file.
475
476 * eintr.c (eintr_source): Prevent sending signal to self.
477
478 * tst-eintr2.c (tf1): Improve error message.
479
bbe35eb5
UD
4802003-12-20 Ulrich Drepper <drepper@redhat.com>
481
482 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
483 * sysdeps/unix/sysv/linux/getpid.c: New file.
c0ecb80a
UD
484 * pthread_cancel.c: Add comment explaining use of PID field.
485 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
486 * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
487 * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
488 temporarily to signal the field must not be relied on and updated
489 by getpid().
490 * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
491 temporarily negative.
492 * sysdeps/unix/sysv/linux/raise.c: Likewise.
bbe35eb5 493
4efdd8d3
UD
4942003-12-19 Ulrich Drepper <drepper@redhat.com>
495
496 * eintr.c (setup_eintr): Add new parameter. Pass to thread function.
497 (eintr_source): If ARG != NULL, use pthread_kill.
498 * tst-eintr1.c: Adjust for this change.
499 * tst-eintr2.c: Likewise.
500 * Makefile (tests): Add tst-eintr3 and tst-eintr4.
501 * tst-eintr3.c: New file.
502 * tst-eintr4.c: New file.
503
5042003-12-19 Jakub Jelinek <jakub@redhat.com>
505
506 * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
507 if CANCELSTATE_BITMASK is set.
508 * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
509 Likewise.
510
511 * Makefile (tests): Add tst-cancel22 and tst-cancel23.
512 (tests-reverse): Add tst-cancel23.
513 * tst-cancel22.c: New test.
514 * tst-cancel23.c: New test.
515
675620f7
UD
5162003-12-18 Ulrich Drepper <drepper@redhat.com>
517
518 * tst-eintr1.c: Better error messages.
519
520 * Makefile (tests): Add tst-eintr2.
521 * tst-eintr2.c: New file.
522
5232003-12-18 Jakub Jelinek <jakub@redhat.com>
524
525 * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
526 (CFLAGS-tst-cancelx21.c): Set.
527 * tst-cancel21.c: New test.
528 * tst-cancelx21.c: New test.
529
530 * unwind.c (FRAME_LEFT): Add adj argument. Subtract it from each
531 comparison operand.
532 (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
533 _JMPBUF_CFA_UNWINDS. Adjust FRAME_LEFT invocations.
534 * pt-longjmp.c: Include jmpbuf-unwind.h.
535 (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
536 _JMPBUF_UNWINDS. Adjust compared pointers.
537 * init.c (__pthread_initialize_minimal_internal): Initialize
538 pd->stackblock_size.
539 * sysdeps/pthread/jmpbuf-unwind.h: Removed.
540 * sysdeps/alpha/jmpbuf-unwind.h: New file.
541 * sysdeps/i386/jmpbuf-unwind.h: New file.
542 * sysdeps/powerpc/jmpbuf-unwind.h: New file.
543 * sysdeps/s390/jmpbuf-unwind.h: New file.
544 * sysdeps/sh/jmpbuf-unwind.h: New file.
545 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
546 * sysdeps/x86_64/jmpbuf-unwind.h: New file.
2e5e031d 547 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
675620f7
UD
548 (_JMPBUF_CFA_UNWINDS): Remove.
549 (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
550
5512003-12-12 Jakub Jelinek <jakub@redhat.com>
552
553 * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
554 (CFLAGS-tst-cancelx20.c): Set.
555 * tst-cancel20.c: New test.
556 * tst-cancelx20.c: New test.
557
2d951ab6
UD
5582003-12-17 Ulrich Drepper <drepper@redhat.com>
559
560 * init.c (__pthread_initialize_minimal_internal): Don't treat
561 architectures with separate register stack special here when
562 computing default stack size.
563
f8a3a2e7
RM
5642003-12-17 Roland McGrath <roland@redhat.com>
565
566 * Makefile (tst-cancelx7-ARGS): New variable.
567 Reportd by Greg Schafer <gschafer@zip.com.au>.
568
e796f92f
UD
5692003-12-17 Jakub Jelinek <jakub@redhat.com>
570
571 * Makefile (tests): Add tst-stack3. Depend on $(objpfx)tst-stack3-mem.
572 (generated): Add tst-stack3.mtrace and tst-stack3-mem.
573 (tst-stack3-ENV): Set.
574 ($(objpfx)tst-stack3-mem): New.
575 * tst-stack3.c: New test.
576
092eb73c
UD
5772003-12-10 David Mosberger <davidm@hpl.hp.com>
578
579 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
580 Add unwind directives. Drop unused .regstk directive.
581 (_fini_EPILOG_BEGINS): Add unwind directives.
582
ff48874d
UD
5832003-12-11 Ulrich Drepper <drepper@redhat.com>
584
585 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
586 Assume parameter is a pointer.
587 (lll_futex_wake): Likewise.
20945457
UD
588 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
589 Likewise.
590 (lll_futex_wake): Likewise.
ff48874d
UD
591 Reported by Boris Hu.
592 * sysdeps/unix/sysv/linux/unregister-atfork.c
593 (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
594
595 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
596
1d9d0b80
UD
5972003-12-10 Ulrich Drepper <drepper@redhat.com>
598
599 * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
600 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
601 __rtld_lock_initialize for ld.so lock.
602 Patch in part by Adam Li <adam.li@intel.com>.
603
c776b3d7
UD
6042003-12-02 David Mosberger <davidm@hpl.hp.com>
605
606 * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
607 in $(gnulib). Also, remove stale comment.
608
6092003-11-12 David Mosberger <davidm@hpl.hp.com>
610
611 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
612 advantage of new syscall stub and optimize accordingly.
613
614 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
615 from SYS_futex, to match expectations of
616 sysdep.h:DO_INLINE_SYSCALL.
617 (lll_futex_clobbers): Remove.
618 (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
619 (lll_futex_wake): Likewise.
620 (lll_futex_requeue): Likewise.
621 (__lll_mutex_trylock): Rewrite to a macro, so we can include this
622 file before DO_INLINE_SYSCALL is defined (proposed by Jakub
623 Jelinek).
624 (__lll_mutex_lock): Likewise.
625 (__lll_mutex_cond_lock): Likewise.
626 (__lll_mutex_timed_lock): Likewise.
627 (__lll_mutex_unlock): Likewise.
628 (__lll_mutex_unlock_force): Likewise.
629
630 * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
631 comes before the include of <sysdep.h>.
632 (THREAD_SELF_SYSINFO): New macro.
633 (THREAD_SYSINFO): Likewise.
634 (INIT_SYSINFO): New macro.
635 (TLS_INIT_TP): Call INIT_SYSINFO.
636
637 * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
638
639 * sysdeps/pthread/createthread.c (create_thread): Use
640 THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
641 * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
642 THREAD_SELF_SYSINFO instead of open code.
643 * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
644 (THREAD_SYSINFO): Likewise.
645
646 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
647
648 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
649
57d20ee7
UD
6502003-12-06 Ulrich Drepper <drepper@redhat.com>
651
652 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
653 instead of .init. Patch by David Mosberger.
654
67aeab2a
AJ
6552003-11-30 Thorsten Kukuk <kukuk@suse.de>
656
657 * sysdeps/pthread/configure.in: Remove broken declaration in C
658 cleanup handling check.
659
8ca203e6
AJ
6602003-11-30 Andreas Jaeger <aj@suse.de>
661
662 * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
663 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
664 Likewise.
665
46bf9de7
UD
6662003-11-27 Jakub Jelinek <jakub@redhat.com>
667
668 * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
669 * pthread_attr_destroy.c: Include shlib-compat.h.
670 (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
671 is set in iattr->flags.
672 * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
673
1d9b73ab
UD
6742003-11-21 Jakub Jelinek <jakub@redhat.com>
675
676 * Makefile (distribute): Add tst-cleanup4aux.c.
677
678 * tst-cond12.c (prepare): Add prototype. Move after test-skeleton.c
679 include.
680
53f9084e
UD
6812003-11-21 Ulrich Drepper <drepper@redhat.com>
682
1d9b73ab
UD
683 * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
684 pthread_cond_signal.
685
e42a990e
UD
686 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
687 store mutex address if the current value is ~0l.
688 * sysdeps/pthread/pthread_cond_timedwait.c
689 (__pthread_cond_timedwait): Likewise.
690 * sysdeps/pthread/pthread_cond_broadcast.c
691 (__pthread_cond_broadcast): Don't use requeue for pshared
692 condvars.
693
694 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
695 (__pthread_cond_wait): Don't store mutex address if the current
696 value is ~0l.
697 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
698 (__pthread_cond_timedwait): Likewise.
699 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
700 (__pthread_cond_broadcast): Don't use requeue for pshared
701 condvars.
702
703 * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
704 element with ~0l for pshared condvars, with NULL otherwise.
705
706 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
707 (__pthread_cond_wait): Don't store mutex address if the current
708 value is ~0l.
709 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
710 (__pthread_cond_timedwait): Likewise.
711 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
712 (__pthread_cond_broadcast): Don't use requeue for pshared
713 condvars.
714
bf68b236 715 * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
53f9084e 716 * tst-cond12.c: New file.
bf68b236 717 * tst-cond13.c: New file.
53f9084e 718
9780c971
UD
7192003-11-17 Ulrich Drepper <drepper@redhat.com>
720
721 * sysdeps/pthread/configure.in: Make missing forced unwind support
722 fatal.
723
74e12fbc
UD
7242003-11-11 Ulrich Drepper <drepper@redhat.com>
725
726 * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
727
c685b2b0
UD
7282003-11-06 Ulrich Drepper <drepper@redhat.com>
729
730 * Makefile: Add magic to clean up correctly.
731
44e94149
UD
7322003-11-05 Jakub Jelinek <jakub@redhat.com>
733
734 * unwind.c (FRAME_LEFT): Define.
735 (unwind_stop): Handle old style cleanups here.
736 (__pthread_unwind): Handle old style cleanups only if
737 !HAVE_FORCED_UNWIND.
738 * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
739 (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
740 ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
741 ($(objpfx)tst-cleanupx4): Likewise.
742 * tst-cleanup4.c: New test.
743 * tst-cleanup4aux.c: New.
744 * tst-cleanupx4.c: New test.
745
c28422b5
UD
7462003-11-04 Ulrich Drepper <drepper@redhat.com>
747
748 * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
749 lll_mutex_*lock macros to skip atomic operations on some archs.
750
27176677
UD
7512003-11-03 Ulrich Drepper <drepper@redhat.com>
752
753 * sysdeps/pthread/tst-timer.c (main): Initialize
754 sigev2.sigev_value as well.
755
026395a2
RM
7562003-10-15 Roland McGrath <roland@redhat.com>
757
758 * sysdeps/pthread/configure.in: Barf if visibility attribute support
759 is missing.
760 * sysdeps/pthread/configure: Regenerated.
761
fa3cbe3d
UD
7622003-10-09 Kaz Kojima <kkojima@rr.iij4u.or.jp>
763
764 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
765 locking macros. No distinction between normal and mutex locking
766 anymore.
767 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
768 Merge bits from lowlevelmutex.S we still need.
769 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
770 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
771 * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
772 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
773 new mutex implementation.
774 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
775 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
776 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
777 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
778 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
779 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
780 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
781 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
782 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
783 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
784 symbol for entry point to avoid cancellation.
785
e700a908
UD
7862003-10-07 Jakub Jelinek <jakub@redhat.com>
787
788 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
789 changes.
790 (SAVE_OLDTYPE_0): Fix a typo.
791
c70a86b6
UD
7922003-10-03 Ulrich Drepper <drepper@redhat.com>
793
794 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
795 Check __sigsetjmp return value. Reported by Daniel Jacobowitz.
796
134abcb5
UD
7972003-10-02 Ulrich Drepper <drepper@redhat.com>
798
799 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
800 correct offset.
801
b77ca0e8
UD
8022003-10-02 Jakub Jelinek <jakub@redhat.com>
803
804 * Makefile (tests): Add tst-cancel19.
805 * tst-cancel19.c: New test.
806
4d961dc7
UD
8072003-10-02 Ulrich Drepper <drepper@redhat.com>
808
809 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
810 restoring of the old cancellation type.
811
1d5b20ad 8122003-09-30 Jakub Jelinek <jakub@redhat.com>
94ae6d75 813
1d5b20ad
UD
814 * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
815
4106a403
RM
8162003-09-27 Wolfram Gloger <wg@malloc.de>
817
4d961dc7 818 * sysdeps/pthread/malloc-machine.h: New file
94ae6d75 819
fca9d8e4
RM
8202003-09-24 Roland McGrath <roland@redhat.com>
821
822 * allocatestack.c (__make_stacks_executable): Don't ignore return
823 value from _dl_make_stack_executable.
824
c9c60884
UD
8252003-09-24 Ulrich Drepper <drepper@redhat.com>
826
69c9fa04
UD
827 * allocatestack.c (__make_stacks_executable): Also change
828 permission of the currently unused stacks.
829
279f1143
UD
830 * allocatestack.c (change_stack_perm): Split out from
831 __make_stacks_executable.
832 (allocate_stack): If the required permission changed between the time
833 we started preparing the stack and queueing it, change the permission.
834 (__make_stacks_executable): Call change_stack_perm.
835
c9c60884
UD
836 * Makefile: Build tst-execstack-mod locally.
837 * tst-execstack-mod.c: New file.
838
54ee14b3
UD
8392003-09-23 Jakub Jelinek <jakub@redhat.com>
840
841 * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
842
8432003-09-23 Roland McGrath <roland@redhat.com>
844
845 * tst-execstack.c: New file.
846 * Makefile (tests): Add it.
847 ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
848 (LDFLAGS-tst-execstack): New variable.
849
850 * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
851 whether to use PROT_EXEC for stack mmap.
852 (__make_stacks_executable): New function.
853 * pthreadP.h: Declare it.
854 * init.c (__pthread_initialize_minimal_internal): Set
855 GL(dl_make_stack_executable_hook) to that.
856
365b1602
UD
8572003-09-22 Ulrich Drepper <drepper@redhat.com>
858
859 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
860 recommendation from AMD re avoidance of lock prefix.
861
39358e8b
UD
8622003-09-22 Jakub Jelinek <jakub@redhat.com>
863
864 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
865 lll_futex_timed_wait instead of lll_futex_wait.
866 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
867 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
868 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
869 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
870 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
871 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
872 * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
873 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
874 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
875 Completely revamp the locking macros. No distinction between
876 normal and mutex locking anymore.
877 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
878 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
879 __lll_lock_timedwait): Fix prototypes.
880 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
881 __lll_lock_timedwait): Likewise.
882 (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
883 macros, add __builtin_expect.
884 (lll_mutex_timedlock): Likewise. Fix return value.
885 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
886 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
887 * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
888 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
889 * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
890 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
891 * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
892 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
893
9d08fbbb
UD
8942003-09-22 Ulrich Drepper <drepper@redhat.com>
895
c0df57e1
UD
896 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
897 (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
898 operation if possible.
899
9d08fbbb
UD
900 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
901 like jumping over the lock prefix.
902
71451de2
UD
9032003-09-21 Ulrich Drepper <drepper@redhat.com>
904
905 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
906 locking macros. No distinction between normal and mutex locking
907 anymore.
3a226d33 908 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
bc1989aa
UD
909 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
910 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
71451de2
UD
911 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
912 locking. Merge bits from lowlevelmutex.S we still need.
3a226d33 913 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
bc1989aa 914 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
71451de2 915 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
3a226d33 916 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
71451de2
UD
917 * Makefile (routines): Remove libc-lowlevelmutex.
918 (libpthread-rountines): Remove lowlevelmutex.
3a226d33
UD
919 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
920 for new mutex implementation.
921 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
922 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
923 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
924 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
925 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
926 Likewise.
927 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
928 Likewise.
929 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
930 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
931 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
932 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
933 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
934 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
935 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
936 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
937 Likewise.
938 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
939 Likewise.
940 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
941 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
942 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
943 Don't use requeue.
944 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
bc1989aa 945 * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
71451de2 946
8f31c0ef
UD
9472003-09-20 Ulrich Drepper <drepper@redhat.com>
948
56a4aa98
UD
949 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
950 in parameters of asm with output parameters.
951
8f31c0ef
UD
952 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
953 type of DECR parameter to int.
954 * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
955
8b8074da
UD
9562003-09-18 Jakub Jelinek <jakub@redhat.com>
957
958 * tst-attr3.c (tf, do_test): Print stack start/end/size and
959 guardsize for each thread.
960
65af7e61
UD
9612003-09-17 Jakub Jelinek <jakub@redhat.com>
962
9ba96eda
UD
963 * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
964 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
965 (pthread_attr_setaffinity_np): Handle cpuset == NULL.
966
06f6ca90
UD
967 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
968 (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
969 NULL.
970 * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
971 * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
972 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
973 (pthread_getaffinity_np): Add hidden_def.
974
975 * Makefile (tests): Add tst-attr3.
976 * tst-attr3.c: New test.
977
65af7e61
UD
978 * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
979
3402852c
UD
9802003-09-15 Jakub Jelinek <jakub@redhat.com>
981
982 * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
983 CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
984
a4db3439
UD
9852003-09-17 Jakub Jelinek <jakub@redhat.com>
986
987 * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
988 * tst-align.c: Include tst-stack-align.h.
989 (tf, do_test): Use TEST_STACK_ALIGN macro.
990
9912003-09-17 Ulrich Drepper <drepper@redhat.com>
992
993 * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
994 variable.
995
92ce4676
UD
9962003-09-16 Ulrich Drepper <drepper@redhat.com>
997
998 * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
999 stack-related values for the initial thread.
1000
e07bb02a
UD
10012003-09-15 Jakub Jelinek <jakub@redhat.com>
1002
1003 * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
1004
d087b5dc
UD
10052003-09-11 Ulrich Drepper <drepper@redhat.com>
1006
1007 * pthread_mutex_lock.c: Minor code rearrangements.
1008
7f08f55a
RM
10092003-09-05 Roland McGrath <roland@redhat.com>
1010
1011 * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
1012 Instead, include ../nptl_db/db_info.c to do its magic.
1013 * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
1014 (__pthread_pthread_key_2ndlevel_size): Likewise.
1015 * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
1016 * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
1017 * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
1018 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
1019 * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
1020 * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
1021 * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
1022 * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
1023 * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
1024 * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
1025 * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
1026 * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
1027 * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
1028 * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
1029 * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
1030 * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
1031 * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
1032
806e4a4a
UD
10332003-09-08 Ulrich Drepper <drepper@redhat.com>
1034
1035 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
1036 of pthread_t to be compatible with LT.
1037 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
1038 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
1039 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1040 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1041 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
1042 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
1043 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
1044
17f83e56
UD
10452003-09-04 Ulrich Drepper <drepper@redhat.com>
1046
1047 * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
1048
58e8ec84
UD
10492003-09-04 Jakub Jelinek <jakub@redhat.com>
1050
1051 * unwind-forcedunwind.c: Move to...
1052 * sysdeps/pthread/unwind-forcedunwind.c: ...here.
1053 (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
1054 * sysdeps/pthread/jmpbuf-unwind.h: New file.
1055 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
1056 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
1057 * unwind.c: Include jmpbuf-unwind.h.
1058 (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
1059
abf1cf21
JJ
10602003-09-02 Jakub Jelinek <jakub@redhat.com>
1061
4a244f0d
UD
1062 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
1063 * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
1064 pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
1065 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
1066 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
1067 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
1068 * sysdeps/unix/sysv/linux/sparc/Versions: New file.
1069 * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
1070 (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
1071 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
1072 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
1073 function.
1074 (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
1075 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
1076 * Makefile (tests): Add tst-stack2.
1077 * tst-stack2.c: New test.
1078 * tst-stack1.c: Include limits.h and sys/param.h.
1079 (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
1080
e29ef647
UD
1081 * pthread_condattr_setpshared.c: Include errno.h.
1082 (pthread_condattr_setpshared): Return EINVAL if pshared
1083 is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
1084
5777d565
UD
1085 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
1086 defined symbol for entry point to avoid cancellation.
1087 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
1088 Likewise.
1089 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
1090 Likewise.
1091 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
1092 Likewise.
1093 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
1094 Likewise.
1095 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
1096 Likewise.
1097 * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
1098 __close_nocancel, __read_nocancel, __write_nocancel,
1099 __waitpid_nocancel): Add attribute_hidden. If not in libc.so,
1100 libpthread.so or librt.so, define to corresponding function
1101 without _nocancel suffix.
1102 * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
1103 * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
1104 * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
1105
abf1cf21
JJ
1106 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
1107
8348dcc8
UD
11082003-09-02 Ulrich Drepper <drepper@redhat.com>
1109
1110 * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
1e03e0af 1111 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
8348dcc8
UD
1112
1113 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
1114 in subsections has a symbol associated with it.
1115
1116 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
1117 defined symbol for entry point to avoid cancellation.
1118 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
1119
c874a32e
UD
11202003-09-01 Jakub Jelinek <jakub@redhat.com>
1121
1122 * Makefile (tests): Add tst-tls5.
1123 (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
1124 ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
1125 ($(objpfx)tst-tls5): New.
1126 ($(objpfx)tst-tls6.out): Likewise.
1127 (tests): Depend on $(objpfx)tst-tls6.out.
1128 * tst-tls3.c: Include stdint.h and pthreaddef.h.
1129 (do_test): Check pthread_self () return value alignment.
1130 * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
1131 (tf): Check pthread_self () return value alignment.
1132 * tst-tls5.c: New test.
1133 * tst-tls5.h: New.
1134 * tst-tls5mod.c: New.
1135 * tst-tls5moda.c: New.
1136 * tst-tls5modb.c: New.
1137 * tst-tls5modc.c: New.
1138 * tst-tls5modd.c: New.
1139 * tst-tls5mode.c: New.
1140 * tst-tls5modf.c: New.
1141 * tst-tls6.sh: New test.
1142
c503d3dc
UD
1143 * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
1144 ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
1145 * init.c (pthread_functions): Initialize them.
1146 * forward.c (pthread_cond_timedwait@GLIBC_2.0,
1147 pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
1148 * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
1149 pthread_cond_timedwait@@GLIBC_2.3.2.
1150
48614753
JJ
11512003-09-01 Jakub Jelinek <jakub@redhat.com>
1152
56a1b877
JJ
1153 * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
1154 * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
1155 * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
1156 * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
1157 * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
1158 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
1159
1160 * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
1161
48614753
JJ
1162 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
1163 _POSIX_THREAD_PRIORITY_SCHEDULING.
1164 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
1165
28c97261
UD
11662003-08-31 Ulrich Drepper <drepper@redhat.com>
1167
eef80cf8
UD
1168 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
1169 nested function, use static inline function from libio.h.
1170 Code by Richard Henderson.
1171
28c97261
UD
1172 * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
1173 weak.
1174
cd2fbe58
UD
11752003-08-30 Jakub Jelinek <jakub@redhat.com>
1176
1177 * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
1178 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
1179 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
1180 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
1181 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
1182 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
1183 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
1184 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
1185 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
1186 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
1187 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
1188 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
1189 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
1190 * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
1191 * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
1192 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
1193 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
1194 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
1195 * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
1196 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
1197 * sysdeps/sparc/sparc32/pthreaddef.h: New file.
1198 * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
1199 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
1200 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
1201 * sysdeps/sparc/sparc64/pthreaddef.h: New file.
1202 * sysdeps/sparc/tls.h: New file.
1203 * sysdeps/sparc/tcb-offsets.sym: New file.
1204 * sysdeps/sparc/Makefile: New file.
1205 * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
1206 * init.c [__sparc__] (__NR_set_tid_address): Define.
1207
feda52c0
UD
12082003-08-29 Jakub Jelinek <jakub@redhat.com>
1209
1210 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
1211 _IO_release_lock): Define.
1212
7c868816
JJ
12132003-08-29 Jakub Jelinek <jakuB@redhat.com>
1214
0261d33f 1215 * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
7c868816
JJ
1216 sigemptyset before sigaddset. Reported by jreiser@BitWagon.com.
1217
68b9e1ae
UD
12182003-08-27 Ulrich Drepper <drepper@redhat.com>
1219
1220 * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
1221 (__pthread_cleanup_class): Add missing return types of member
1222 functions.
1223
13b3edfc
UD
12242003-08-26 Steven Munroe <sjmunroe@us.ibm.com>
1225
1226 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1227 (lll_mutex_unlock_force): Add memory barrier between store and futex
1228 syscall.
1229
bb606fbe
UD
12302003-08-25 Ulrich Drepper <drepper@redhat.com>
1231
1232 * tst-cancel4.c (do_test): Also unlink tempfname and remove
1233 tempmsg in first loop.
1234
ee4e5a3d
UD
12352003-08-18 Ulrich Drepper <drepper@redhat.com>
1236
1237 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1238 _POSIX_THREAD_PRIORITY_SCHEDULING.
1239 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1240
334fcf2a
UD
12412003-08-07 Jakub Jelinek <jakub@redhat.com>
1242
1243 * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
1244 (__rtld_lock_default_lock_recursive,
1245 __rtld_lock_default_unlock_recursive): Define.
1246 [_LIBC && SHARED] (__rtld_lock_lock_recursive,
1247 __rtld_lock_unlock_recursive): Define using
1248 GL(_dl_rtld_*lock_recursive).
1249 * init.c (__pthread_initialize_minimal_internal): Initialize
1250 _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
1251 Lock GL(_dl_load_lock) the same number of times as
1252 GL(_dl_load_lock) using non-mt implementation was nested.
1253
1254 * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
1255 * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
1256
a30fb2df
UD
12572003-08-06 Jakub Jelinek <jakub@redhat.com>
1258
1259 * tst-cancel17.c (do_test): Make len2 maximum of page size and
1260 PIPE_BUF.
1261
ce0d30a0
JJ
12622003-08-07 Jakub Jelinek <jakub@redhat.com>
1263
1264 * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
1265
9c988b83
UD
12662003-08-03 Jakub Jelinek <jakub@redhat.com>
1267
1268 * sysdeps/pthread/createthread.c (do_clone): Move error handling
1269 to first syscall error check. Move syscall error check for tkill
1270 into __ASSUME_CLONE_STOPPED #ifdef.
1271
5c5252bd
UD
12722003-08-02 Ulrich Drepper <drepper@redhat.com>
1273
f1205aa7
UD
1274 * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
1275 is not defined, do explicit synchronization.
1276 (create_thread): Do not lock pd->lock here. If __ASSUME_CLONE_STOPPED
1277 is not defined also unlock pd->lock for non-debugging case in case
1278 it is necessary.
1279 * pthread_create.c (start_thread): Always get and release pd->lock
1280 if __ASSUME_CLONE_STOPPED is not defined.
1281 (start_thread_debug): Removed. Adjust users.
1282 * allocatestack.c (allocate_stack): Always initialize lock if
1283 __ASSUME_CLONE_STOPPED is not defined.
1284 * Makefile (tests): Add tst-sched1.
1285 * tst-sched1.c: New file.
1286
5c5252bd
UD
1287 * sysdeps/pthread/createthread.c (do_clone): Only use
1288 sched_setschduler and pass correct parameters.
1289
973d66e4
UD
12902003-07-31 Jakub Jelinek <jakub@redhat.com>
1291
1292 * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
1293 pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
1294 PTHREAD_STACK_MIN in comments.
1295
d347a4ab
UD
12962003-07-31 Jakub Jelinek <jakub@redhat.com>
1297
1298 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
1299 Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
1300 argument.
1301 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
1302 * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
1303 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
1304 (__pthread_cleanup_upto): Fix prototype.
1305 (_longjmp_unwind): Adjust caller.
1306 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
1307 Change second argument to const struct pointer.
1308 * tst-sem8.c (main): Remove unused s2 and s3 variables.
1309 * tst-sem9.c (main): Likewise.
1310 * unwind.c: Include string.h for strlen prototype.
1311
1b26e9a5
UD
13122003-07-31 Ulrich Drepper <drepper@redhat.com>
1313
1314 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
1315 (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
1316 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
1317 Define HAVE_CMOV.
1318 Patch by Nicholas Miell <nmiell@attbi.com>.
1319
adc12574
UD
13202003-07-30 Jakub Jelinek <jakub@redhat.com>
1321
1322 * init.c (__pthread_initialize_minimal_internal): Initialize
1323 GL(dl_init_static_tls).
1324 * pthreadP.h (__pthread_init_static_tls): New prototype.
1325 * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
1326 New functions.
1327 * Makefile (tests): Add tst-tls4.
1328 (modules-names): Add tst-tls4moda and tst-tls4modb.
1329 ($(objpfx)tst-tls4): Link against libdl and libpthread.
1330 ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
1331 tst-tls4modb.so.
1332 * tst-tls4.c: New file.
1333 * tst-tls4moda.c: New file.
1334 * tst-tls4modb.c: New file.
1335
a7f6c66e
RM
13362003-06-19 Daniel Jacobowitz <drow@mvista.com>
1337
1338 * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
1339 before __timer_dealloc.
1340 * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
1341 Don't call list_unlink.
1342
172ce013
RM
13432003-07-29 Roland McGrath <roland@redhat.com>
1344
1345 * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
1346
7b787f85
UD
13472003-07-25 Jakub Jelinek <jakub@redhat.com>
1348
1349 * tst-cancel17.c (do_test): Check if aio_cancel failed.
1350 Don't reuse struct aiocb A if it failed.
1351 Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
1352 not just one byte, as that does not block.
1353
0e9d6240
UD
13542003-07-22 Jakub Jelinek <jakub@redhat.com>
1355
9d79e037
UD
1356 * sysdeps/pthread/unwind-resume.c: New file.
1357 * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
1358 unwind-resume in csu subdir.
1359 (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
1360 exceptions.
1361 (librt-sysdep_routines, librt-shared-only-routines): Add
1362 rt-unwind-resume.
1363 * sysdeps/pthread/rt-unwind-resume.c: New file.
1364 * unwind-forcedunwind.c: New file.
1365 * Makefile (libpthread-routines): Add unwind-forcedunwind.
1366 (libpthread-shared-only-routines): Likewise.
1367 (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
1368 * pthreadP.h (pthread_cancel_init): New prototype.
1369 * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
1370
1371 * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
1372 attr argument const struct pthread_attr *.
1373
0e9d6240
UD
1374 * res.c (__res_state): Return __resp.
1375 * descr.h: Include resolv.h.
1376 (struct pthread): Add res field.
1377 * pthread_create.c: Include resolv.h.
1378 (start_thread): Initialize __resp.
1379 * Makefile (tests): Add tst-_res1.
1380 (module-names): Add tst-_res1mod1, tst-_res1mod2.
1381 ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
1382 ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
1383 libpthread.
1384 * tst-_res1.c: New file.
1385 * tst-_res1mod1.c: New file.
1386 * tst-_res1mod2.c: New file.
1387
1a379ea0
UD
13882003-07-21 Ulrich Drepper <drepper@redhat.com>
1389
7e939b21
UD
1390 * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
1391
1a379ea0
UD
1392 * Makefile: Define various *-no-z-defs variables for test DSOs
1393 which has undefined symbols.
1394
ca86a763
UD
13952003-07-21 Steven Munroe <sjmunroe@us.ibm.com>
1396
1397 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
1398 Retry if the stwcx fails to store once_control.
1399
80f536db
UD
14002003-07-20 Ulrich Drepper <drepper@redhat.com>
1401
1402 * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
1403 pthread_attr_setaffinity.
1404 * Versions [libpthread] (GLIBC_2.3.3): Likewise.
1405 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
1406 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
1407 * pthread_attr_destroy.c: Free cpuset element if allocated.
1408 * pthread_create.c: Pass iattr as additional parameter to
1409 create_thread.
1410 * sysdeps/pthread/createthread.c: If attribute is provided and
1411 a new thread is created with affinity set or scheduling parameters,
1412 start thread with CLONE_STOPPED.
1413 * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
1414 pthread_attr_setaffinity.
1415 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
1416 cpuset element.
1417
73299943
UD
14182003-07-15 Ulrich Drepper <drepper@redhat.com>
1419
1420 * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
1421
da35d15e
UD
14222003-07-14 Ulrich Drepper <drepper@redhat.com>
1423
1424 * sysdeps/pthread/configure.in: Require CFI directives also for
1425 ppc and s390.
1426
75540d8a
UD
14272003-07-15 Jakub Jelinek <jakub@redhat.com>
1428
1429 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
1430 Add cfi directives.
1431
4a17085f
UD
14322003-07-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1433
1434 * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
1435 CLEANUP_JMP_BUF.
1436 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
1437 registers as variables. Call __pthread_mutex_unlock_usercnt.
1438 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
1439 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
1440 not self pointer in __writer. Compare with TID to determine
1441 deadlocks.
1442 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1443 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
1444 Likewise.
1445 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
1446 Likewise.
1447 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
1448 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
1449 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
1450 macros also when compiling librt.
1451
6080ecdf
UD
14522003-07-11 Jakub Jelinek <jakub@redhat.com>
1453
1454 * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
1455 -fasynchronous-unwind-tables.
1456 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
1457 (PSEUDO): Add cfi directives.
1458 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
1459 Likewise.
1460 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
1461 Likewise.
1462
da0c02ee
UD
14632003-07-08 Jakub Jelinek <jakub@redhat.com>
1464
1465 * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
1466 __pthread_unregister_cancel): Add prototypes and hidden_proto.
1467 * unwind.c (__pthread_unwind_next): Add hidden_def.
1468 * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
1469 Likewise.
1470 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
1471 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
1472 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1473 Likewise.
1474 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
1475 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1476 Likewise.
1477 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
1478 HIDDEN_JUMPTARGET to call __pthread_register_cancel,
1479 __pthread_unregister_cancel and __pthread_unwind_next.
1480
57a5ea02
UD
14812003-07-04 Jakub Jelinek <jakub@redhat.com>
1482
1483 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
1484 different symbol for the cancellation syscall wrapper and
1485 non-cancellation syscall wrapper.
1486 (PSEUDO_END): Define.
1487
d810b358
UD
14882003-07-05 Richard Henderson <rth@redhat.com>
1489
1490 * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
1491 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
1492 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
1493 return actual return value from the syscall, not 0.
1494
db54f488
UD
14952003-07-07 Ulrich Drepper <drepper@redhat.com>
1496
1497 * descr.h (struct pthread): Add pid field.
1498 * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
1499 (__reclaim_stacks): Likewise.
1500 * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
1501 also check for PID of the signal source.
1502 (__pthread_initialize_minimal_internal): Also initialize pid field
1503 of initial thread's descriptor.
1504 * pthread_cancel.c: Use tgkill instead of tkill if possible.
1505 * sysdeps/unix/sysv/linux/fork.c: Likewise.
1506 * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
1507 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
1508 * sysdeps/unix/sysv/linux/raise.c: Likewise.
1509
5e497a41
UD
15102003-07-05 Ulrich Drepper <drepper@redhat.com>
1511
1512 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
1513 Fix use of parameter.
1514 (__libc_cleanup_pop): Likewise.
1515
86a0c4fa
UD
15162003-07-04 Ulrich Drepper <drepper@redhat.com>
1517
1518 * init.c (sigcancel_handler): Change parameters to match handler
1519 for SA_SIGACTION. Check signal number and code to recognize
1520 invalid invocations.
1521
bdbecaa3
RM
15222003-07-03 Roland McGrath <roland@redhat.com>
1523
1524 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
1525 Apply sizeof (struct pthread) bias to r13 value.
1526
56421b23
UD
15272003-07-03 Ulrich Drepper <drepper@redhat.com>
1528
fbd90f6c
UD
1529 * sysdeps/pthread/configure.in: Require CFI directives.
1530
56421b23
UD
1531 * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
1532 definition.
1533 * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
1534 libpthread compilation.
1535 * unwind.c (__pthread_unwind): Add hidden_def.
1536 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
1537
ca2b4cd7
UD
15382003-07-01 Ulrich Drepper <drepper@redhat.com>
1539
1540 * libc-cancellation.c (__libc_cleanup_routine): Define.
1541 * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
1542 (__pthread_cleanup_pop): Define.
1543
f036e569
UD
15442003-07-01 Richard Henderson <rth@redhat.com>
1545
1546 * sysdeps/alpha/elf/pt-initfini.c: New file.
1547 * sysdeps/alpha/pthread_spin_lock.S: New file.
1548 * sysdeps/alpha/pthread_spin_trylock.S: New file.
1549 * sysdeps/alpha/pthreaddef.h: New file.
1550 * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
1551 * sysdeps/alpha/tls.h: New file.
1552 * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
1553 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
1554 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
1555 * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
1556 * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
1557 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
1558 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
1559 * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
1560 * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
1561 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
1562
3b985826
UD
15632003-07-01 Ulrich Drepper <drepper@redhat.com>
1564
1565 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
1566 cleanup support and unwind info.
1567
3a4d1e1e
UD
15682003-06-30 Ulrich Drepper <drepper@redhat.com>
1569
1570 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
1571 Use correct cleanup handler registration. Add unwind info.
96c814d3
UD
1572 * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
1573 * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
3a4d1e1e
UD
1574 * tst-once3.c: Add cleanup handler and check it is called.
1575 * tst-once4.c: Likewise.
1576 * tst-oncex3.c: New file.
1577 * tst-oncex4.c: New file.
1578 * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
1579
e479cc8e
UD
15802003-06-29 Ulrich Drepper <drepper@redhat.com>
1581
1582 * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
1583
7d7ff54c
UD
15842003-06-27 Ulrich Drepper <drepper@redhat.com>
1585
483e95d0
UD
1586 * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
1587 (tf_msgsnd): Likewise.
1588
7d7ff54c
UD
1589 * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
1590 premature returns a bit more.
1591
7539c7ec
UD
15922003-06-26 Ulrich Drepper <drepper@redhat.com>
1593
1594 * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
1595 definition to the front.
1596
1597 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
1598 the cleanup functions to make the names unique. Fix dwarf opcode
1599 un unwind table.
1600 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
1601 functions to make the names unique. Fix CFA offset for two blocks.
1602
0af6a1d9
UD
16032003-06-25 Ulrich Drepper <drepper@redhat.com>
1604
1605 * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
1606 missing closing braces.
1607 Patch by Christophe Saout <christophe@saout.de>.
1608
eef4a9f3
RM
16092003-06-24 Roland McGrath <roland@redhat.com>
1610
1611 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
1612
4165d44d
UD
16132003-06-24 Ulrich Drepper <drepper@redhat.com>
1614
7f8f7b9d
UD
1615 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
1616 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
1617
4165d44d
UD
1618 * pthreadP.h: Declare __find_thread_by_id.
1619 * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
1620 * pthread_clock_gettime.c: Allow using other thread's clock.
1621 * pthread_clock_settime.c: Likewise.
1622 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
1623 * Makefile: Add rules to build and run tst-clock2.
1624 * tst-clock2.c: New file.
1625
67b78ef9
UD
16262003-06-23 Ulrich Drepper <drepper@redhat.com>
1627
1628 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
1629 to use exception-based cleanup handler.
1630 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1631
1632 * tst-cond8.c (ch): Announce that we are done.
1633
1634 * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
1635
1636 * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
1637 Also test aio_suspend with timeout value.
1638
61623643
UD
16392003-06-22 Ulrich Drepper <drepper@redhat.com>
1640
3a4f2043
UD
1641 * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
1642 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
1643 attribute_hidden.
1644
61623643
UD
1645 * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
1646 (__pthread_mutex_lock_internal): Likewise.
1647 (__pthread_mutex_unlock_internal): Likewise.
1648 (__pthread_mutex_unlock_usercnt): Declare.
1649 * pthread_mutex_destroy.c: Always fail if used in any way.
1650 * pthread_mutex_init.c: Update comment.
1651 * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
1652 * pthread_mutex_timedlock.c: Adjust __nusers.
1653 * pthread_mutex_trylock.c: Adjust __nusers.
1654 * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
1655 and public interfaces are wrapper with pass additional parameter.
1656 __pthread_mutex_unlock_usercnt does not adjust __nusers if second
1657 parameter zero.
1658 * tst-mutex8.c: New file.
1659 * Makefile (tests): Add tst-mutex8.
1660 * sysdeps/pthread/pthread_cond_timedwait.c: Call
1661 __pthread_mutex_unlock_usercnt.
1662 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
1663 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1664 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1665 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1666 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1667 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
1668 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
1669 Add __nusers.
1670 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
1671 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1672 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1673 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
1674 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1675
1676 * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
1677 * pthread_mutex_timedlock.c: Likewise.
1678 * pthread_mutex_trylock.c: Adjust __nusers.
1679 * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
1680 * tst-mutex9.c: New file.
1681 * Makefile (tests): Add tst-mutex9.
1682 * sysdeps/i386/tls.h: Remove THREAD_ID definition.
1683 * sysdeps/ia64/tls.h: Likewise.
1684 * sysdeps/powerpc/tls.h: Likewise.
1685 * sysdeps/s390/tls.h: Likewise.
1686 * sysdeps/sh/tls.h: Likewise.
1687 * sysdeps/x86_64/tls.h: Likewise.
1688 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
1689 Change type of __owner.
1690 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
1691 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1692 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1693 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
1694 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1695
9bdabb94
UD
16962003-06-19 Jakub Jelinek <jakub@redhat.com>
1697
1698 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
1699 * sysdeps/unix/sysv/linux/sem_post.c: ...here.
1700
1701 * sysdeps/unix/sysv/linux/sem_post.c: Move to...
1702 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here. Pass nr + 1
1703 instead of nr to lll_futex_wake. Only set errno and return -1
1704 if err < 0.
1705
1706 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
1707 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
1708 return actual return value from the syscall, not 0.
1709
f6c93bd9
UD
17102003-06-18 Ulrich Drepper <drepper@redhat.com>
1711
ca343e73
UD
1712 * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
1713 find a random value.
1714 (tf_msgrcv): Likewise. Also don't report msgrcv returns if
1715 errno==EIDRM.
1716
50441a98
UD
1717 * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
1718 compat_timer_settime.
1719 * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
1720 compat_timer_gettime.
1721 * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
9bdabb94 1722 compat_timer_getoverrun.
50441a98
UD
1723 * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
1724 compat_timer_delete.
1725
f6c93bd9
UD
1726 * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
1727 error-checking mutex detect busy mutexes.
1728
047aec8f
UD
17292003-06-17 Ulrich Drepper <drepper@redhat.com>
1730
1d53508d
UD
1731 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
1732 Add ax to clobber list.
1733 (lll_mutex_cond_lock): Likewise.
1734 (lll_mutex_unlock): Likewise.
1735 (lll_lock): Likewise.
1736 (lll_unlock): Likewise.
1737
f23b30e2
UD
1738 * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
1739 * tst-cancel18.c: New file.
1740 * tst-cancelx18.c: New file.
1741
1742 * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
1743 and tcdrain.
1744
1745 * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
1746 * tst-cancel17.c: New file.
1747 * tst-cancelx17.c: New file.
1748
1749 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
1750 * sysdeps/unix/sysv/linux/sigwait.c: New file.
1751 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
1752
047aec8f
UD
1753 * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
1754
bbde8527
UD
17552003-06-16 Jakub Jelinek <jakub@redhat.com>
1756
1757 * sysdeps/pthread/createthread.c (create_thread): Set
1758 header.multiple_threads unconditionally.
1759 * allocatestack.c (allocate_stack): Likewise.
1760 * descr.h (struct pthread): Add header.multiple_threads
1761 unconditionally.
1762 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
1763 Define for librt. #error if neither libpthread, libc nor librt.
1764 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
1765 Likewise.
1766 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
1767 CDISABLE): Likewise.
1768 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
1769 CDISABLE): Likewise.
1770 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
1771 CDISABLE): Likewise.
1772 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
1773 CDISABLE): Likewise. Access header.multiple_threads outside of
1774 libc and libpthread.
1775 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
1776 Likewise.
1777 * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
1778 * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
1779
26676450
UD
17802003-06-17 Ulrich Drepper <drepper@redhat.com>
1781
1782 * tst-cancel4.c: Add tests for the socket and signal functions, pause.
1783 Also test early cancellation before the thread reaches the cancellation
1784 point.
1785
1786 * Makefile: Compile forward.c with exceptions.
1787
1788 * sysdeps/unix/sysv/linux/sleep.c: New file.
1789
301a6724
UD
17902003-06-16 Ulrich Drepper <drepper@redhat.com>
1791
0e0deb03
UD
1792 * Makefile: Add CFLAGS definition to compile function wrappers
1793 duplicated from libc with exceptions.
1794 * tst-cancel4.c: Also check cancellation handlers.
1795
301a6724
UD
1796 * Makefile: Add rules to build and run tst-cancel16 and
1797 tst-cancelx16. Add missing CFLAGS definitions.
1798 * tst-cancel16.c: New file.
1799 * tst-cancelx16.c: New file.
1800
7a114794
UD
18012003-06-15 Ulrich Drepper <drepper@redhat.com>
1802
452aea84
UD
1803 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
1804 (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
1805 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
1806 (DL_SYSINFO_IMPLEMENTATION): Likewise.
1807
7a114794
UD
1808 * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
1809 (LIBC_CANCEL_RESET): Likewise.
1810 Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
1811 * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
1812 librt-cancellation.
1813 (CFLAGS-libcrt-cancellation.c): Define.
1814 * sysdeps/pthread/librt-cancellation.c: New file.
1815 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
1816 macros also when compiling librt.
1817 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1818 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
1819 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
1820 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
1821 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
1822 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
1823 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
1824
1825 * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
1826 compat_timer_create.
1827
8ba1d429
UD
18282003-06-14 Ulrich Drepper <drepper@redhat.com>
1829
cc8fb6f3
UD
1830 * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
1831
8ba1d429
UD
1832 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
1833 __register_atfork.
1834 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
1835 Add libc_hidden_def.
1836
d4f100e2
RM
18372003-06-13 Roland McGrath <roland@redhat.com>
1838
1839 * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
1840 constant from <sys/reg.h> to ps_get_thread_area, not register contents.
1841
dd9423a6
UD
18422003-06-11 Ulrich Drepper <drepper@redhat.com>
1843
1844 * allocatestack.c (queue_stack): Always inline.
1845 * ptreadhP.h (__do_cancel): Likewise.
1846
ed24330d
JJ
18472003-06-10 Jakub Jelinek <jakub@redhat.com>
1848
1849 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
1850 a typo.
1851
06120d79
UD
18522003-06-10 Ulrich Drepper <drepper@redhat.com>
1853
1854 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
1855 (__pthread_cond_signal): Remove incorrect second addition for
1856 cond_lock!=0.
1857
b1720346
UD
18582003-06-09 Ulrich Drepper <drepper@redhat.com>
1859
5b318f85
UD
1860 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
1861 (__pthread_cond_signal): Use correct futex pointer in
1862 __lll_mutex_lock_wait call.
1863
b1720346
UD
1864 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
1865 (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
1866
3e36c37d
UD
18672003-06-08 Ulrich Drepper <drepper@redhat.com>
1868
ecf7955d
UD
1869 * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
1870 cancelable.
ed24330d 1871 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
ecf7955d
UD
1872 Likewise.
1873
3e36c37d
UD
1874 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
1875 hand-written CFI generation code. Since ENTRY/END also initiated
1876 CFI frames this caused two CFI sets to be generated.
1877
7726edc2
UD
18782003-06-07 Ulrich Drepper <drepper@redhat.com>
1879
1880 * cleanup_routine.c: New file.
1881 * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
1882 * sysdeps/pthread/pthread.h: Add support for fully exception-based
1883 cleanup handling.
1884 * Makefile (libpthread-routines): Add cleanup_routine.
1885 Add more CFLAGS variables to compile with exceptions. Add comments
1886 why which file needs unwind tables.
1887 (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
1888 tests.
1889 * tst-cancelx1.c: New file.
1890 * tst-cancelx2.c: New file.
1891 * tst-cancelx3.c: New file.
1892 * tst-cancelx4.c: New file.
1893 * tst-cancelx5.c: New file.
1894 * tst-cancelx6.c: New file.
1895 * tst-cancelx7.c: New file.
1896 * tst-cancelx8.c: New file.
1897 * tst-cancelx9.c: New file.
1898 * tst-cancelx10.c: New file.
1899 * tst-cancelx11.c: New file.
1900 * tst-cancelx12.c: New file.
1901 * tst-cancelx13.c: New file.
1902 * tst-cancelx14.c: New file.
1903 * tst-cancelx15.c: New file.
1904 * tst-cleanupx0.c: New file.
1905 * tst-cleanupx0.expect: New file.
1906 * tst-cleanupx1.c: New file.
1907 * tst-cleanupx2.c: New file.
1908 * tst-cleanupx3.c: New file.
1909
1910 * tst-cleanup0.c: Make standard compliant.
1911 * tst-cleanup1.c: Likewise.
1912
1913 * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
1914 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
1915 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1916 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1917 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1918 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1919 * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
1920 CLEANUP_JMP_BUF.
1921 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
1922 * tst-cancel12.c: New file.
1923 * tst-cancel13.c: New file.
1924 * tst-cancel14.c: New file.
1925 * tst-cancel15.c: New file.
1926 * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
1927 and tst-cancel15.
1928
1929 * tst-cancel1.c: Add some comments.
1930
1931 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
1932 timeout correctly.
1933
7a8a8e21
UD
19342003-06-06 Ulrich Drepper <drepper@redhat.com>
1935
1936 * Makefile (CFLAGS-pthread_cancel.c): Define.
1937
4ad0bbf4
UD
19382003-06-05 Ulrich Drepper <drepper@redhat.com>
1939
1940 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
1941 Change type of __writer element to int.
1942 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
1943 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1944 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1945 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1946 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1947 * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
1948 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
1949 * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
1950 Compare with TID to determine deadlocks.
1951 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
1952 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
1953 * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
1954 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
1955 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1956 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1957 Likewise.
1958 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1959 Likewise.
1960 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1961 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
1962 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1963 Likewise.
1964 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1965 Likewise.
1966 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1967 * Makefile (tests): Add tst-rwlock12.
1968 * tst-rwlock12.c: New file.
1969
332faa96
JJ
19702003-06-05 Jakub Jelinek <jakub@redhat.com>
1971
1972 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
1973 __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
1974 Remove bogus hidden_proto.
1975 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
1976 Likewise.
1977 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
1978 lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
1979 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
1980 ___lll_mutex_timedlock): Likewise.
1981
29d9e2fd
UD
19822003-06-04 Ulrich Drepper <drepper@redhat.com>
1983
1984 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
1985 (__pthread_cond_signal): Add some code to eventually handle
1986 cond_lock!=0.
1987
6f1acb30
UD
19882003-06-01 Ulrich Drepper <drepper@redhat.com>
1989
1990 * Makefile (tests): Add tst-exec4.
1991 (tst-exec4-ARGS): Define.
1992 * tst-exec4.c: New file.
1993
49b65043
UD
19942003-05-31 Ulrich Drepper <drepper@redhat.com>
1995
31195be2
UD
1996 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
1997 Also fail if tv_nsec < 0.
1998 (__lll_timedwait_tid): Likewise.
1999 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
2000 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
2001 Likewise.
2002 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
2003 Likewise.
2004 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
2005 Likewise.
2006 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
2007 Likewise.
80b54217
UD
2008 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
2009 Likewise.
2010 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
2011 Likewise.
31195be2 2012
dcfc8224
UD
2013 * Makefile (tests): Add tst-sem8 and tst-sem9.
2014 * tst-sem8.c: New file.
2015 * tst-sem9.c: New file.
2016 * sem_open.c: Fix creation of in_use record if the file exists but
2017 no internal record.
2018
49b65043
UD
2019 * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
2020 definitions.
2021
2022 * sysdeps/pthread/timer_create.c (timer_create): In case
2023 evp==NULL, assign timer ID to sival_ptr.
2024
2025 * descr.h (struct pthread_unwind_buf): Change type of prev element to
2026 struct pthread_unwind_buf *.
2027 (struct pthread): Likewise for cleanup_jmp_buf element.
2028
2029 * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
2030 * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
2031 * unwind.c (__pthread_unwind_next): Likewise.
2032
50794a45
UD
20332003-05-30 Ulrich Drepper <drepper@redhat.com>
2034
5d4f57bd
UD
2035 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
2036 (lll_futex_timed_wait): Use int for futex value parameter.
2037 (lll_futex_wake): Likewise.
2038 (lll_futex_requeue): Likewise.
2039
2040 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
2041 Replace one memory operation with one register operation.
2042
2043 * tst-join4.c (do_test): Fix error message.
2044
7ab7ea33
UD
2045 * tst-rwlock6.c (do_test): Use correct format specifier.
2046
2047 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
2048 (__lll_mutex_lock_wait): Replace one memory operation with one
2049 register operation.
2050 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
2051 (__lll_mutex_lock_wait): Likewise.
2052
50794a45
UD
2053 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
2054 (__lll_mutex_cond_lock): Add one to value parameter of
2055 __lll_lock_wait to reflect reality in the futex syscall.
2056 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
2057 (lll_mutex_cond_lock): Likewise.
2058
5a70784e
JJ
20592003-05-30 Jakub Jelinek <jakub@redhat.com>
2060
2061 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
2062 New function.
2063 (lll_mutex_cond_lock): Define.
2064
e7c5ac68
UD
20652003-05-29 Ulrich Drepper <drepper@redhat.com>
2066
586d1748
UD
2067 * Makefile (tests): Add tst-signal6.
2068 * tst-signal6.c: New file.
2069
b8ba4a27
UD
2070 * sysdeps/unix/sysv/linux/s390/lowlevellock.h
2071 (__lll_mutex_unlock_force): New function
2072 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
2073
65d46efe
UD
2074 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
2075 (__lll_mutex_unlock_force): New function.
2076 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
2077
2078 * tst-rwlock7.c (do_test): Use correct format specifier.
2079
e7c5ac68
UD
2080 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
2081 Find break parameter in correct asm argument.
2082
284bdc42
UD
20832003-05-27 Jakub Jelinek <jakub@redhat.com>
2084
2085 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
2086 Remove out4.
2087 (lll_futex_requeue): Fix __o3 constraint, return negative errno if
2088 error occured.
2089 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
2090 Add __mutex.
2091 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
2092 lll_futex_requeue, lll_mutex_unlock_force): Define.
2093
e7c5ac68
UD
20942003-05-30 Jakub Jelinek <jakub@redhat.com>
2095
2096 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
2097 (pthread_cond_t): Add __mutex.
2098 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
2099 lll_futex_requeue, lll_mutex_unlock_force): Define.
2100
ea2630c6
UD
21012003-05-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2102
2103 * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
2104 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
2105 Add __mutex field.
2106 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
2107 Define.
2108 (lll_futex_wait, lll_futex_wake): Define.
2109 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
2110 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
2111 FUTEX_REQUEUE instead of FUTEX_WAIT.
2112 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
2113 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
2114 mutex which was used in condvar structure. Call
2115 __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
2116 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
2117
2118 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
2119 include tcb-offsets.h. Read wakeup value in locked region.
2120 Use the value of gbr register as THREAD_ID.
2121 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
2122 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
2123 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
2124
2125 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
2126 macros.
2127
5a77f150
UD
21282003-05-28 Ulrich Drepper <drepper@redhat.com>
2129
2130 * sysdeps/pthread/pthread_cond_broadcast.c
2131 (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
2132
7661d9f7
UD
21332003-05-26 Ulrich Drepper <drepper@redhat.com>
2134
2135 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
2136 typo in register name.
2137 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
2138 correctly. Actually use requeue. Little optimization.
2139 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
2140 mutex address early. Handle cancellation state as 32-bit value.
2141 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2142 Remove unnecessary label.
2143
69431c9a
UD
21442003-05-25 Ulrich Drepper <drepper@redhat.com>
2145
2146 * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
2147 instead of FUTEX_WAIT.
2148 * sysdeps/pthread/pthread_cond_signal.c: Likewise.
2149 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
2150 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
2151 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
2152 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
2153 * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
2154 used in condvar structure. Call __pthread_mutex_cond_lock instead
2155 of __pthread_mutex_lock_internal.
2156 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2157 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2158 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
2159 (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
2160 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2161 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2162 * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
2163 Add pthread_mutex_cond_lock.
2164 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
2165 * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
2166 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
2167 lll_mutex_cond_lock.
2168 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2169 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
248a3490 2170 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
69431c9a 2171 Add __mutex field.
248a3490 2172 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
69431c9a
UD
2173 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2174
2175 * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
2176 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
2177
2178 * pthreadP.h: Declare __pthread_mutex_cond_lock.
2179 * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
2180 Use it instead of lll_mutex_lock. If __pthread_mutex_lock is a
2181 macro don't define aliases.
2182
2183 * cancellation.c: Remove __pthread_enable_asynccancel_2.
2184 * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
2185 * sysdeps/pthread/pthread_cond_timedwait.c: Use
2186 __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
2187 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2188 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2189 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
2190 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2191 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2192
fddfebbd
UD
21932003-05-17 Ulrich Drepper <drepper@redhat.com>
2194
2195 * sem_open.c: Fix one endless loop. Implement correct semantics
2196 wrt opening the same semaphore more then once.
2197 * sem_close.c: Adjust for sem_open change.
2198 * semaphoreP.h: Include <semaphore.h>. Define struct inuse_sem.
2199 Declare __sem_mappings, __sem_mappings_lock, __sem_search.
2200 * Makefile (tests): Add tst-sem7.
2201 * tst-sem7.c: New file.
2202
1eefffb0
RM
22032003-05-16 Roland McGrath <roland@redhat.com>
2204
2205 * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
2206 uninitialized variable braino.
2207
6e66dc78
UD
22082003-05-16 Ulrich Drepper <drepper@redhat.com>
2209
23ae6451
UD
2210 * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
2211 test for syscall availability.
2212
2213 * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
2214 __no_posix_timers to -1 if the syscalls don't exist.
2215
7ac5b8e2
UD
2216 * pthread_join.c (pthread_join): Set tid field of the joined
2217 thread to -1. This isn't necessary but helps to recognize some
2218 error conditions with almost no cost.
2219
2220 * allocatestack.c (FREE_P): Also negative values indicate an
2221 unused stack.
2222
6e66dc78
UD
2223 * unwind.c: Include <unistd.h>.
2224
855dba3c
UD
22252003-05-14 Ulrich Drepper <drepper@redhat.com>
2226
2227 * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
2228
81f3ac4c
UD
22292003-05-14 Jakub Jelinek <jakub@redhat.com>
2230
2231 * Makefile (crti-objs, crtn-objs): New variables.
2232 (omit-deps, extra-objs): Add crtn.
2233 ($(objpfx)libpthread.so): Depend on both crti and crtn
2234 and links to them in multidir.
2235 ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
2236
7158eae4
UD
22372003-05-12 Steven Munroe <sjmunroe@us.ibm.com>
2238
2239 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
2240 (lll_mutex_unlock): Use atomic_exchange_rel.
2241
edf205d5
UD
22422003-05-11 Ulrich Drepper <drepper@redhat.com>
2243
2244 * cond-perf.c (cons): Add missing locking around setting of alldone.
2245
a3f979a7
UD
22462003-05-10 Ulrich Drepper <drepper@redhat.com>
2247
2248 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
2249 related macros.
2250 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
2251
880867a4
UD
22522003-05-09 Ulrich Drepper <drepper@redhat.com>
2253
949ec764
UD
2254 * tst-sem6.c: New file.
2255 * Makefile (tests): Add tst-sem6.
2256
2257 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
2258 Use atomic_exchange_rel instead of atomic_exchange.
2259 * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
2260 Likewise.
2261
2262 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
2263 code for lll_futex_wait and lll_futex_wake in static apps. Use
2264 vsyscall is possible.
2265
2266 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
2267 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
2268 * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
2269 pthread_setaffinity_np.
2270 * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
2271 and pthread_setaffinity_np.
2272 * Makefile (libpthread-routines): Add pthread_getaffinity and
2273 pthread_setaffinity.
2274
880867a4
UD
2275 * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
2276 use it in case mmap to allocate the stack fails.
2277 * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
2278 ARCH_MAP_FLAGS here.
2279 * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
2280 ARCH_RETRY_MMAP.
2281
92d83c72
UD
22822003-05-08 Ulrich Drepper <drepper@redhat.com>
2283
2284 * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
2285 handler implementation. It is now lockless in fork().
2286 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
2287 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
2288 * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>. Don't
2289 declare the __fork_*_lists.
2290 (struct fork_handler): Include pointers to all three functions.
2291 Add next, refcntr and need_signal elements.
2292 (__fork_handlers): New declaration.
2293 (__register_atfork_malloc): Remove declaration.
2294 (HAVE_register_atfork_malloc): Remove definition.
2295 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
2296 __pthread_child_handler variable.
2297 (__libc_pthread_init): Use __register_atfork instead of explicitly
2298 adding to the list.
2299 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
2300 and lll_futex_wake.
2301 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2302
2303 * unwind.c (unwind_cleanup): Print error message and then abort. This
2304 function must never be reached.
2305
2306 * cond-perf.c: New file.
2307
be4d8038
UD
23082003-05-05 Ulrich Drepper <drepper@redhat.com>
2309
2310 * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
2311
c6696b79
RM
23122003-05-04 Roland McGrath <roland@redhat.com>
2313
2314 * Makefile ($(objpfx)../libc.so): New target.
2315
7da168bf
UD
23162003-05-02 Ulrich Drepper <drepper@redhat.com>
2317
2318 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
2319 (pthread_condattr_t): Size is only an int, don't use long for
2320 alignment.
2321 (pthread_mutexattr_t): Likewise.
7da168bf
UD
2322 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2323 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2324 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2325
9a7178d6
UD
23262003-05-01 Ulrich Drepper <drepper@redhat.com>
2327
2328 * sysdeps/i386/tls.h: Define THREAD_ID.
2329 * sysdeps/ia64/tls.h: Likewise.
2330 * sysdeps/powerpc/tls.h: Likewise.
2331 * sysdeps/s390/tls.h: Likewise.
2332 * sysdeps/sh/tls.h: Likewise.
2333 * sysdeps/x86_64/tls.h: Likewise.
2334 * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
2335 record ownership.
2336 * pthread_mutex_timedlock.c: Likewise.
2337 * pthread_mutex_trylock.c: Likewise.
2338 * pthread_mutex_unlock.c: Likewise.
2339 * pthread_rwlock_trywrlock.c: Likewise.
2340 * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
2341 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
2342 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
2343 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
2344
2345 * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
2346 flag.
2347
a234e27d
UD
23482003-04-29 Jakub Jelinek <jakub@redhat.com>
2349
2350 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
2351 (__SIZEOF_PTHREAD_COND_T): Define to 48.
2352 (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
2353 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
2354 Make __align long long instead of long.
2355 (pthread_rwlock_t): Formatting.
2356 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
2357 (pthread_rwlock_t): Formatting.
2358 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
2359 (pthread_cond_t): Make __align long long instead of long.
2360 (pthread_rwlock_t): Move __flags field to the same position as in
2361 linuxthreads.
2362
f025c136
UD
23632003-04-30 Ulrich Drepper <drepper@redhat.com>
2364
2365 * tst-rwlock6.c (do_test): Use correct printf format specifiers.
2366 * tst-rwlock7.c (do_test): Likewise.
2367
7531ab9e
RM
23682003-04-26 Roland McGrath <roland@redhat.com>
2369
2370 * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
2371
299601a1
UD
23722003-04-22 Jakub Jelinek <jakub@redhat.com>
2373
299601a1
UD
2374 * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
2375 sizeof (struct pthread).
2376 (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
468777e1 2377 1 struct pthread.
299601a1
UD
2378 * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
2379 to 0.
2380 (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
2381 struct pthread.
2382 (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
2383 to 32-bit bytes.
2384 (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
2385 tcbp.
2386 (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
2387 unneccessarily.
2388 (NO_TLS_OFFSET): Define.
299601a1
UD
2389 * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
2390 add TLS_TCB_SIZE unnecessarily.
299601a1 2391
950094f8
RM
23922003-04-22 Roland McGrath <roland@redhat.com>
2393
2394 * Makeconfig (shared-thread-library): Reverse link order to work
2395 around linker bug.
2396
dc2f6455
UD
23972003-04-22 Ulrich Drepper <drepper@redhat.com>
2398
2399 * semaphore.h: Fix typo in comment.
2400
e7608d77
UD
24012003-04-21 Ulrich Drepper <drepper@redhat.com>
2402
6a87ee19
UD
2403 * sysdeps/pthread/sigfillset.c: New file.
2404
e7608d77
UD
2405 * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
2406 * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
2407 * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
2408 * sysdeps/pthread/sigaction.c: Likewise.
2409 * sysdeps/pthread/sigprocmask.c: New file.
2410 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
2411 __SIGRTMIN+1.
2412 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2413 Block SIGTIMER. Also handle SI_TKILL events and terminate thread
2414 in this case.
2415
0b3df49e
UD
24162003-04-19 Ulrich Drepper <drepper@redhat.com>
2417
58a7a325
UD
2418 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
2419 (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
2420
0b3df49e
UD
2421 * sysdeps/unix/sysv/linux/unregister-atfork.c
2422 (__unregister_atfork): Don't free memory not allocated dynamically.
2423
2424 * semaphore.h: Remove __THROW marker from cancellation points.
2425 * nptl/sysdeps/pthread/pthread.h: Likewise.
2426
7d74651e
UD
24272003-04-18 Ulrich Drepper <drepper@redhat.com>
2428
76a67697
UD
2429 * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
2430 pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
7d74651e
UD
2431 __THROW.
2432
dd9d6538
JJ
24332003-04-16 Jakub Jelinek <jakub@redhat.com>
2434
2435 * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
2436
4ab6f47c
RM
24372003-04-15 Roland McGrath <roland@redhat.com>
2438
2439 * forward.c (__pthread_unwind): Tweak to avoid warning.
2440
162434a6
UD
24412003-04-15 Ulrich Drepper <drepper@redhat.com>
2442
2443 * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
2444
35909161
UD
24452003-04-14 Ulrich Drepper <drepper@redhat.com>
2446
18ddd3aa 2447 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
35909161
UD
2448 overflow CFA advance instructions.
2449 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2450
18a8e730
UD
24512003-04-14 Jakub Jelinek <jakub@redhat.com>
2452
bd4f43b4
UD
2453 * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
2454 * sysdeps/i386/pthread_spin_lock.c: Likewise.
2455 * sysdeps/x86_64/tls.h: Likewise. Define LOCK_PREFIX if not already
2456 defined.
2457
18a8e730
UD
2458 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
2459 DW_CFA_advance_loc2 for .Laddl-.Lsubl.
2460 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
2461 DW_CFA_advance_loc for .Laddl-.Lsubl.
2462
08c765fa
UD
24632003-04-13 Ulrich Drepper <drepper@redhat.com>
2464
18a8e730
UD
2465 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
2466 position-independent unwind data for static libraries.
2467 Add missing unwind info. Add comments.
2468
ad2be852
UD
2469 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
2470 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2471 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
08c765fa
UD
2472 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2473
177d1ad3
UD
24742003-04-12 Ulrich Drepper <drepper@redhat.com>
2475
08c765fa
UD
2476 * Makefile: Make sure all cancellation points are compiled with
2477 exception and asynchronous unwind tables.
2478
177d1ad3
UD
2479 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
2480 which mishandles loading of global object addresses in PIC.
2481 (THREAD_SETMEM_NC): Likewise.
2482
09d65ff3
UD
24832003-04-11 Ulrich Drepper <drepper@redhat.com>
2484
2485 * pthread.h: Define new data structure for cleanup buffer. Declare
2486 new cleanup handler interfaces.
2487 * descr.h: Include <unwind.h> if necessary. Define pthread_unwind_buf.
2488 (struct pthread): Add cleanup_jmp_buf pointer. Define
2489 HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
2490 * pthreadP.h: Declare __pthread_unwind. Define __do_cancel to use
2491 it. Declare old cleanup handler installation functions.
2492 * cleanup.c: Rewrite. Install handler for unwind-based cleanup
2493 handling.
2494 * cleanup_defer.c: Likewise.
2495 * cleanup_compat.c: New file. Old cleanup code.
2496 * cleanup_def_compat.c: New file. Old cleanup code.
2497 * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
2498 if own thread descriptor.
2499 * unwind.c: New file.
2500 * forward.c: Add __pthread_unwind.
2501 * init.c (pthread_functions): Add __pthread_unwind.
2502 * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
2503 Add ptr___pthread_unwind.
2504 * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
2505 and unwind function.
2506 * Makefile (libpthread-routines): Add cleanup_compat,
2507 cleanup_def_compat, and unwind. Define CFLAGS to enable unwind
2508 table generation if necessary.
2509 * version.c: Record whether unwind support is compiled in.
2510 * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
2511 * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
2512 handler interfaces.
2513 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
2514 complication to generate unwind information for syscall wrappers.
68107ec0 2515 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
09d65ff3
UD
2516 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
2517 __cleanup_fct_attribute.
2518
2519 * Makefile: Add rules to build and run tst-cleanup0.
2520 * tst-cleanup0.c: New file.
2521 * tst-cleanup0.expect: New file.
2522
2523 * pthread_create.c (deallocate_tsd): Don't take parameter. Adjust
2524 caller. Optimize to avoid often unecessary local variable.
2525
0dc44b51
RM
25262003-04-11 Roland McGrath <roland@redhat.com>
2527
2528 * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
2529 sets variable `multidir'; include that.
2530 (generated): Add it.
2531 ($(objpfx)$(multidir)/crti.o): New target.
2532 [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
2533
84a80719
UD
25342003-04-11 Ulrich Drepper <drepper@redhat.com>
2535
2536 * tst-attr2.c (do_test): Add cast to avoid warning.
2537 * tst-mutex4.c (do_test): Likewise.
2538
88ff4759
UD
25392003-04-10 Ulrich Drepper <drepper@redhat.com>
2540
2541 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
2542 in child.
2543
b2041097
UD
25442003-04-09 Ulrich Drepper <drepper@redhat.com>
2545
2546 * Makefile (tests): Add tst-detach1.
2547 * tst-detach1.c: New file.
2548
f9657e88
UD
25492003-04-08 Ulrich Drepper <drepper@redhat.com>
2550
9afe4964
UD
2551 * sysdeps/pthread/pthread.h: Remove duplicate
2552 pthread_cleanup_{push,pop} definitions.
2553
f9657e88
UD
2554 * tst-barrier2.c: Eliminate warnings.
2555 * tst-cancel4.c: Likewise.
2556 * tst-cond4.c: Likewise.
2557 * tst-cond6.c: Likewise.
2558 * tst-detach1.c: Likewise.
2559 * tst-rwlock4.c: Likewise.
2560 * tst-rwlock6.c: Likewise.
2561 * tst-rwlock7.c: Likewise.
2562 * tst-sem3.c: Likewise.
2563 * tst-spin2.c: Likewise.
2564 * tst-umask1.c: Likewise.
2565
69b35e86
UD
25662003-04-07 Ulrich Drepper <drepper@redhat.com>
2567
2568 * pthread_detach.c (pthread_detach): Fix test for invalid TID.
2569
c70ad7d7
UD
25702003-04-06 Ulrich Drepper <drepper@redhat.com>
2571
2572 * descr.h (struct pthread): Move cancelhandling member to the front.
2573
54e0138f
UD
25742003-04-05 Ulrich Drepper <drepper@redhat.com>
2575
2576 * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
2577 malloc_parent, and malloc_child statically.
2578 (__register_atfork_malloc): New function.
2579 (free_mem): Don't free any of the malloc_* variables on the list.
2580 * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
2581 Define HAVE_register_atfork_malloc.
2582
b22d701b
UD
25832003-04-04 Ulrich Drepper <drepper@redhat.com>
2584
2585 * sysdeps/pthread/createthread.c (create_thread): Add some more
2586 comments explaining when to set multiple_threads and when not.
2587
2588 * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
2589 THREAD_ATOMIC_BIT_SET if not already defined.
2590 * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
2591 THREAD_ATOMIC_BIT_SET:
2592 * sysdeps/x86_64/tls.h: Likewise.
2593 * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
2594 THREAD_ATOMIC_CMPXCHG_VAL.
2595 (_pthread_cleanup_pop_restore): Likewise.
2596 * cancellation.c (__pthread_enable_asynccancel): Likewise.
2597 (__pthread_enable_asynccancel_2): Likewise.
2598 (__pthread_disable_asynccancel): Likewise.
2599 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
2600 (__libc_disable_asynccancel): Likewise.
2601 * init.c (sigcancel_handler): Likewise.
2602 * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
2603 * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
2604
86246935
UD
26052003-04-03 Ulrich Drepper <drepper@redhat.com>
2606
2607 * init.c (sigcancel_handler): Don't set EXITING_BIT here.
2608 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
2609 * pthreadP.h (__do_cancel): Set EXITING_BIT here.
2610 * Makefile (tests): Add tst-cancel11.
2611 * tst-cancel11.c: New file.
2612
6b4686a5
UD
26132003-04-01 Ulrich Drepper <drepper@redhat.com>
2614
2615 * pthread_create.c (deallocate_tsd): Clear/free memory after the last
2616 round, not the first. Use specific_used flag instead of local
2617 found_nonzero variable. Use THREAD_[SG]ETMEM where possible.
2618 (__free_tcb): Don't call deallocate_tsd here.
2619 (start_thread): Call deallocate_tsd here.
2620 * pthread_setspecific.c: Set specific_used flag really only when
2621 needed.
0d73a73b 2622 * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
6b4686a5 2623 * tst-tsd3.c: New file.
0d73a73b 2624 * tst-tsd4.c: New file.
6b4686a5 2625
42b2395d
UD
26262003-03-31 Ulrich Drepper <drepper@redhat.com>
2627
211d90c5
UD
2628 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
2629 Use atomic_exchange_and_add instead of __lll_add.
2630 (__lll_mutex_timedlock): Likewise.
2631 Patch by Ian Wienand.
2632
26332003-03-24 Steven Munroe <sjmunroe@us.ibm.com>
2634
2635 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
2636 (SINGLE_THREAD_P): Fix typo.
2637 * tst-cancel-wrappers.sh: Handle '.'ed symbols.
2638
26392003-03-31 Ulrich Drepper <drepper@redhat.com>
2640
2641 * Makefile (tests): Add tst-align.
2642 * tst-align.c: New file.
2643 * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
211d90c5 2644
42b2395d
UD
2645 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
2646 function correctly.
2647
211d90c5
UD
2648 * tst-tsd2.c: Add casts to avoid warnings.
2649
163b180f
UD
26502003-03-30 Ulrich Drepper <drepper@redhat.com>
2651
2652 * descr.h (struct pthread): Move most often used elements to the front.
2653
ea473bad
UD
26542003-03-29 Ulrich Drepper <drepper@redhat.com>
2655
2656 * Makefile (libpthread-routines): Add pthread_atfork.
2657 (libpthread-static-only-routines): Add pthread_atfork.
2658
dd731d53
UD
26592003-03-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2660
2661 * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
2662 of TLS_DTV_AT_TP.
2663 (INSTALL_DTV): Add parens.
2664 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
2665 Use passed descr instead of THREAD_SELF.
2666 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
2667 (__lll_mutex_timedlock_wait): Correct expected value after
2668 spurious wakeup.
2669 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
2670 Release lock before waking up the waiters.
2671 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
2672 criteria. Reorderstruct passed to cleanup handler. Fix
2673 handling of cancellation and failung pthread_mutex_unlock call.
2674 Use __pthread_enable_asynccancel_2 instead of
2675 __pthread_enable_asynccancel.
2676 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2677 Return result of lock re-get if it fails.
2678 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
2679 for __pthread_cleanup_push.
2680 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
2681 completely broken rwlock implementation.
2682 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
2683 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
2684 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
2685 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
2686 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
2687 * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value. Use
2688 versioned_symbol macro.
2689 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
2690 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
2691
c75d02f0
UD
26922003-03-27 Ulrich Drepper <drepper@redhat.com>
2693
5f5004df
UD
2694 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
2695 __timer_helper_thread. Declare __start_helper_thread, __helper_once,
2696 and __helper_tid.
2697 (struct timer): Remove th and bar field.
2698 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
2699 debugging code. Create only one helper thread.
2700 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
2701 helper thread.
2702 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2703 Renamed. Define statically. Use thread info from siginfo.
2704 (__helper_once): New variable.
2705 (__helper_tid): New variable.
2706 (__reset_helper_control): New function.
2707 (__start_helper_thread): New function.
2708
18d009ca
UD
2709 * pthread_create.c (start_thread): Don't use setjmp inside
2710 __builtin_expect to work around gcc bug.
2711
c75d02f0
UD
2712 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
2713 timer_delete syscall fails, but not with ENOSYS, set
2714 __no_posix_timers.
2715
2716 * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
2717 (timer_settime): Fix typo.
28cf3058
UD
2718 * sysdeps/unix/sysv/linux/timer_getoverr.c
2719 [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
c75d02f0 2720
049ac259
JJ
27212003-03-27 Jakub Jelinek <jakub@redhat.com>
2722
2723 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
2724 offset of cleanupbuf.__prev.
2725
f93d39dd
JJ
27262003-03-26 Jakub Jelinek <jakub@redhat.com>
2727
2728 * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
2729 of included file.
2730
f064e4c5
UD
27312003-03-26 Ulrich Drepper <drepper@redhat.com>
2732
2733 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
2734 NULL provide default definition to syscall.
2735
83e886a3
RM
27362003-03-25 Roland McGrath <roland@redhat.com>
2737
2738 * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
2739 (timer_id2ptr): Fix typo.
2740
09402f5b
UD
27412003-03-25 Ulrich Drepper <drepper@redhat.com>
2742
2743 * pthreadP.h: Define SIGCANCEL and SIGTIMER.
2744 * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
2745 * sysdeps/ia64/pthreaddef.h: Likewise.
2746 * sysdeps/powerpc/pthreaddef.h: Likewise.
2747 * sysdeps/s390/pthreaddef.h: Likewise.
2748 * sysdeps/sh/pthreaddef.h: Likewise.
2749 * sysdeps/x86_64/pthreaddef.h: Likewise.
2750 * init.c (__pthread_initialize_minimal): Block SIGTIMER.
2751 * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
2752 being changed.
2753 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
2754 SIGTIMER is not unblocked.
2755 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
2756 RT signal taken.
2757 * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
2758 be send.
2759 * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
2760 pass pointer through as ID.
2761 * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
2762 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
2763 * sysdeps/unix/sysv/linux/timer_create.c: New file.
2764 * sysdeps/unix/sysv/linux/timer_delete.c: New file.
2765 * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
2766 * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
2767 * sysdeps/unix/sysv/linux/timer_routines.c: New file.
2768 * sysdeps/unix/sysv/linux/timer_settime.c: New file.
2769 * sysdeps/unix/sysv/linux/ia64/Versions: New file.
2770 * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
2771 * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
2772 * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
2773 * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
2774 * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
2775 * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
2776 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
2777 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
2778 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
2779 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
2780 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
2781 * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
2782 * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
2783 * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
2784 * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
2785 * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
2786 * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
2787 * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
2788 * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
2789 * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
2790 * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
2791 * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
2792 * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
2793 * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
2794
2795 * pthreadP.h: Remove FRAME_LEFT definition.
2796 * cleanup.c (_pthread_cleanup_push): Don't check for reference to
2797 already left frame. Programs which have this problem are not POSIX
2798 compliant.
2799 * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
2800
5e826ab5
UD
28012003-03-24 Ulrich Drepper <drepper@redhat.com>
2802
2803 * sysdeps/pthread/tst-timer.c: Check return values of the
2804 functions we test.
2805
b910f788
RM
28062003-03-23 Roland McGrath <roland@redhat.com>
2807
3045a1fe
RM
2808 * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
2809 * tst-tls3mod.c: Likewise.
2810 * tst-tls1.c: Likewise.
2811 * tst-tls2.c: Likewise.
2812
85047fe3
RM
2813 * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
2814 undefined behavior.
2815
b910f788
RM
2816 * tst-join5.c (tf1, tf2): Add a cast.
2817
2818 * Makeconfig (includes): Append -I$(..)nptl to this variable.
2819
2820 * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
2821 Don't test anything.
2822 * tst-cond4.c: Likewise.
2823 * tst-cond6.c: Likewise.
2824 * tst-flock2.c: Likewise.
2825 * tst-mutex4.c: Likewise.
2826 * tst-rwlock4.c: Likewise.
2827 * tst-signal1.c: Likewise.
2828 * tst-spin2.c: Likewise.
2829 * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
2830
2831 * tst-mutex4.c: Use test-skeleton.c.
2832 * tst-spin2.c: Likewise.
2833 * tst-sysconf.c: Likewise.
2834 * tst-barrier2.c: Likewise.
2835 * tst-cond4.c: Likewise.
2836 * tst-cond6.c: Likewise.
2837 * tst-rwlock4.c: Likewise.
2838 * tst-unload.c: Likewise.
2839 * tst-flock2.c (do_test): Use return instead of exit.
2840
4baa087a
RM
28412003-03-22 Jakub Jelinek <jakub@redhat.com>
2842
2843 * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
2844
5a3ab2fc
UD
28452003-03-21 Ulrich Drepper <drepper@redhat.com>
2846
9f07eae2
UD
2847 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
2848 (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
2849 instead of __lll_compare_and_swap.
2850 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
2851 Likewise.
2852 Removed definition if __lll_compare_and_swap.
2853
5a3ab2fc
UD
2854 * cancellation.c: Adjust for new form of compare&exchange macros.
2855 * cleanup_defer.c: Likewise.
2856 * init.c: Likewise.
2857 * libc-cancellation.c: Likewise.
2858 * old_pthread_cond_broadcast.c: Likewise.
2859 * old_pthread_cond_signal.c: Likewise.
2860 * old_pthread_cond_timedwait.c: Likewise.
2861 * old_pthread_cond_wait.c: Likewise.
2862 * pthread_cancel.c: Likewise.
2863 * pthread_create.c: Likewise.
2864 * pthread_detach.c: Likewise.
2865 * pthread_join.c: Likewise.
2866 * pthread_key_delete.c: Likewise.
2867 * pthread_setcancelstate.c: Likewise.
2868 * pthread_setcanceltype.c: Likewise.
2869 * pthread_timedjoin.c: Likewise.
2870 * pthread_tryjoin.c: Likewise.
2871 * sysdeps/pthread/createthread.c: Likewise.
2872
b1aea098
UD
28732003-03-20 Ulrich Drepper <drepper@redhat.com>
2874
2875 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
4baa087a 2876 Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
b1aea098
UD
2877 definitions. Replace uses with calls to atomic_* functions.
2878 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2879 * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
2880 __lll_test_and_set calls with atomic_exchange_and_add and
2881 atomic_exchange calls respectively.
2882 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
2883 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
2884 * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
2885 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
2886 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
2887 * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
2888 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
2889
2890 * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
2891 returns the old value.
2892
100a7100
RM
28932003-03-20 Martin Schwidefsky <sky@mschwid3.boeblingen.de.ibm.com>
2894
2895 * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
2896 int for variable OLDVAL and correct inline assembler contraint.
2897 * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
2898 type int for variable OLD.
2899
2900 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
2901 only for s390-32.
2902 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
2903 (SINGLE_THREAD_P): Use global variable __local_multiple_threads
2904 instead of multiple_threads field in the TCB.
2905
95767b36
UD
29062003-03-19 Ulrich Drepper <drepper@redhat.com>
2907
4009bf40
UD
2908 * sysdeps/i386/i686/bits/atomic.h: Removed.
2909 * sysdeps/i386/i586/bits/atomic.h: Removed.
2910 * sysdeps/i386/i486/bits/atomic.h: Removed. Moved to glibc.
2911 * sysdeps/x86_64/bits/atomic.h: Removed. Moved to glibc.
2912 * sysdeps/s390/bits/atomic.h: Removed. Moved to glibc.
2913 * sysdeps/sh/bits/atomic.h: Removed. Moved to glibc.
2914 * sysdeps/ia64/bits/atomic.h: Removed. Moved to glibc.
2915 * sysdeps/powerpc/bits/atomic.h: Removed. Moved to glibc.
2916 * atomic.h: Removed. Moved to glibc.
2917
560a784f
UD
2918 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
2919 support for clock selection.
2920
95767b36
UD
2921 * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
2922 signalling waiters.
2923
043ad426
RM
29242003-03-18 Roland McGrath <roland@redhat.com>
2925
94659495
RM
2926 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
2927 Add __lll_rel_instr first. Add memory clobber.
2928 (lll_mutex_unlock): Use __lll_test_and_set.
2929 From Paul Mackerras <paulus@samba.org>.
2930
2931 * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
2932 unconditionally.
2933 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
2934 (SINGLE_THREAD_P): Add `header.' prefix.
2935 From Paul Mackerras <paulus@samba.org>.
2936
043ad426
RM
2937 * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
2938 pthread_timedjoin_np to ...
2939 (libpthread: GLIBC_2.3.3): ... here.
2940 (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
2941
2942 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
2943 Avoid shadowing VAL variable.
2944
2945 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
2946 New macro.
2947
86a9ee5e
UD
29482003-03-18 Ulrich Drepper <drepper@redhat.com>
2949
ac9e0aa1
UD
2950 * Makefile (tests): Add tst-cond11.
2951 * tst-cond11.c: New file.
2952
a14b373c
UD
2953 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
2954 struct passed to cleanup handler to eliminate one more
2955 instruction.
2956 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2957
24a49f38
UD
2958 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
2959 (pthrad_cond_t): Replace __unused field with __clock.
2960
2961 * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
2962 waken all waiters in cleanup handler.
2963 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2964 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2965
86a9ee5e
UD
2966 * pthread_condattr_getclock.c: New file.
2967 * pthread_condattr_setclock.c: New file.
2968 * sysdeps/pthread/pthread.h: Declare these new functions.
2969 * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
2970 * Makefile (libpthread-routines): Add the new functions.
2971 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
2972 Renamed field to value. Document use of the bits.
2973 * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
2974 change.
2975 * pthread_condattr_setpshared.c: Likewise.
d5cb8389 2976 * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
86a9ee5e
UD
2977 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
2978 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
2979 Add __clock field.
2980 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2981 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2982 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2983 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
2984 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
2985 Implement clock selection.
2986 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
2987 * pthread-errnos.sym: Add ENOSYS.
2988 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2989 _POSIX_CLOCK_SELECTION.
2990 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2991
2992 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
2993 invalid .size directive.
2994
98054a05
RM
29952003-03-17 Roland McGrath <roland@redhat.com>
2996
2997 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
2998 Formatting tweaks.
2999
001bea71
UD
30002003-03-17 Ulrich Drepper <drepper@redhat.com>
3001
4773086e
UD
3002 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
3003 Use __lll_add instead of spelling it out. Use protected symbol names.
3004 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
3005 Use __lll_add.
3006 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
3007 Renamed from lll_compare_and_swap. Use new name where necessary.
3008 (__lll_add): Defined.
3009 (__lll_dec_if_positive): Defined.
3010 (__lll_test_and_set): Defined.
3011 * sysdeps/ia64/pthread_spin_init.c: Removed.
3012 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
3013 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
3014 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
3015 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
3016 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
3017 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
3018 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
001bea71
UD
3019 * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
3020 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
3021 __sync_lock_release_si.
3022 Patch by Jakub Jelinek.
3023
3024 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
3025 Fix timeout handling.
3026 (__lll_timedwait_tid): Likewise.
3027 (lll_unlock_wake_cb): Wake up other waiters if necessary.
3028 Patch by Jakub Jelinek.
3029
3030 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
3031
de4471dd
RM
30322003-03-17 Roland McGrath <roland@redhat.com>
3033
3034 PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
3035 * sysdeps/pthread/pthread_spin_init.c: New file.
3036 * sysdeps/pthread/pthread_spin_unlock.c: New file.
3037 * sysdeps/powerpc/Makefile: New file.
3038 * sysdeps/powerpc/pthread_spin_lock.c: New file.
3039 * sysdeps/powerpc/pthread_spin_trylock.c: New file.
3040 * sysdeps/powerpc/pthreaddef.h: New file.
3041 * sysdeps/powerpc/tcb-offsets.sym: New file.
3042 * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
3043 * sysdeps/powerpc/tls.h: New file.
3044 * sysdeps/powerpc/bits/atomic.h: New file.
3045 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
3046 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
3047 * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
98054a05 3048
de4471dd
RM
3049 * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
3050 * sysdeps/unix/sysv/linux/sem_post.c: New file.
3051 * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
3052 * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
3053 * sysdeps/unix/sysv/linux/sem_wait.c: New file.
3054 * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
3055 * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
3056 * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
3057 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
3058 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
3059 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
3060 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
3061 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
3062 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
3063 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
3064
3065 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
3066 not gettimeofday.
3067 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
3068 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
3069 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
3070 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
3071 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
3072
5778033f
UD
30732003-03-17 Ulrich Drepper <drepper@redhat.com>
3074
3075 * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
3076 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
3077 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3078 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3079 Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
3080
796038f8
RM
30812003-03-16 Roland McGrath <roland@redhat.com>
3082
3083 * tst-fork4.c: Include <string.h>.
3084 * tst-signal2.c: Likewise.
3085 * tst-mutex5.c (do_test): exit -> return.
3086 * tst-mutex2.c: Include <stdlib.h>.
3087
51d0678c
UD
30882003-03-16 Ulrich Drepper <drepper@redhat.com>
3089
5778033f
UD
3090 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
3091 (__lll_mutex_timedlock_wait): Correct expected value after
3092 spurious wakeup. Otherwise we would never wait again.
3093
b6e2f87a
UD
3094 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
3095 zone versus inline asm stupidity. Use correct instructions.
3096
51d0678c
UD
3097 * tst-rwlock6.c: Add some more status output.
3098
8112cc70
RM
30992003-03-15 Roland McGrath <roland@redhat.com>
3100
3101 * sysdeps/pthread/configure.in: New file.
3102 * sysdeps/pthread/configure: New file (generated).
3103
49773c19
UD
31042003-03-15 Ulrich Drepper <drepper@redhat.com>
3105
3106 * allocatestack.c (allocate_stack): Store the exact stack size of
3107 user allocated stacks.
3108
eec0ca9f
JJ
31092003-03-15 Jakub Jelinek <jakub@redhat.com>
3110
3111 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
3112 (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
3113 * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
3114 * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
3115 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
3116 Use `header.' prefix.
3117 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
3118
a87731e2
UD
31192003-03-15 Ulrich Drepper <drepper@redhat.com>
3120
3121 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
3122 __builtin_frame_address, use stack pointer.
3123
3124 * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
3125 instead of __builtin_frame_pointer.
3126
e22a221d
UD
31272003-03-14 Ulrich Drepper <drepper@redhat.com>
3128
92ed3daf
UD
3129 * tst-basic1.c (do_test): Add cast to avoid warning.
3130 * tst-basic2.c (do_test): Likewise.
3131
9b89567d
UD
3132 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
3133 amount of stack correction.
3134
e22a221d
UD
3135 * tst-fork4.c: Use test-skeleton.c.
3136
2e49caba
RM
31372003-03-14 Roland McGrath <roland@redhat.com>
3138
3139 * init.c: Fix typo "#eli" for "#else".
3140
415ef7d8
RM
31412003-03-14 Steven Munroe <sjmunroe@us.ibm.com>
3142
3143 * allocatestack.c (__stack_user): Use hidden_data_def.
3144 * pthread_create.c (__pthread_keys): Likewise.
3145
3146 * init.c [__powerpc__] (__NR_set_tid_address): Define it.
3147
52287505
RM
31482003-03-14 Roland McGrath <roland@redhat.com>
3149
415ef7d8
RM
3150 * tst-fork4.c: New file.
3151 * Makefile (tests): Add it.
3152
52287505
RM
3153 * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
3154 we always define the padding space.
3155 [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
3156 stopped supporting its own extensions fully.
3157 [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
3158 struct also called `header', so `header.multiple_threads' is the field
3159 name to use on all machines.
3160 * allocatestack.c (allocate_stack): Use `header.' prefix.
3161 * sysdeps/pthread/createthread.c (create_thread): Likewise.
3162 * pthread_create.c (__pthread_create_2_1): Likewise.
3163 * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
3164 (THREAD_SELF): Likewise.
3165 * sysdeps/x86_64/tls.h: Likewise.
3166 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
3167 (SINGLE_THREAD_P): Likewise.
3168 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
3169 (SINGLE_THREAD_P): Likewise.
3170 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
3171 (SINGLE_THREAD_P): Likewise.
3172
3173 * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
3174 value directly.
3175
c44bf9aa
UD
31762003-03-14 Ulrich Drepper <drepper@redhat.com>
3177
e22a221d
UD
3178 * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
3179 * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
3180
0eb18281
UD
3181 * pthread_create.c (start_thread): setjmp is expected to return 0.
3182
c44bf9aa
UD
3183 * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
3184 (THREAD_GETMEM_NC): Likewise.
3185
564cd8b6
UD
31862003-03-13 Ulrich Drepper <drepper@redhat.com>
3187
3188 * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
3189 and the size of the stack which must be allocated is a multiple,
3190 allocate one more page.
3191 * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
3192 MULTI_PAGE_ALIASING.
3193
6461e577
RM
31942003-03-13 Roland McGrath <roland@redhat.com>
3195
3196 * pthread_create.c (start_thread): Set EXITING_BIT after the
3197 event-reporting (and destructors), not before.
3198
b5ec5617
UD
31992003-03-13 Jakub Jelinek <jakub@redhat.com>
3200
6461e577
RM
3201 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
3202 lll_futex_wake): Declare register variables as long int instead of
3203 unsigned long int. Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
3204 Make syscall arguments clobbered by the syscall.
3205 (lll_futex_wait): Define using lll_futex_timed_wait.
3206
3207 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
3208 to void *.
3209
3210 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
3211 PPID if [! NDEBUG].
3212
3213 * allocatestack.c (nptl_ncreated): Only declare if
3214 COLORING_INCREMENT != 0.
3215
3216 * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
3217 (__libc_enable_asynccancel_2): Remove prototype.
3218
b5ec5617
UD
3219 * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
3220 ctid to match kernel.
3221
d0369fb8
UD
32222003-03-12 Ulrich Drepper <drepper@redhat.com>
3223
7588880f
UD
3224 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
3225 libc_multiple_threads.
3226 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
3227 __libc_multiple_threads to...
3228 * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here. New file.
3229
3230 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
3231 versioning.
3232 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
3233 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3234
3235 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
3236 (__pthread_once_internal): Define.
3237
3238 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
3239 macros instead of .symver directly.
3240 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
3241 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
3242
d0369fb8
UD
3243 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
3244 * sysdeps/x86_64/tcb-offsets.sym: New file.
3245 * sysdeps/x86_64/Makefile: New file.
3246
3247 * sysdeps/i386/tcb-offsets.sym: Add SELF.
3248 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
3249 to access own pthread_t in TCB.
3250 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3251 Likewise.
3252 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3253 Likewise.
3254 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
3255
0bb2ac85
RM
32562003-03-12 Roland McGrath <roland@redhat.com>
3257
3258 * pthread-errnos.sym: New file.
3259 * Makefile (gen-as-const-headers): New variable, list that file.
3260 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
3261 header <pthread-errnos.h> instead of defining errno values here.
3262 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
3263 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
3264 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
3265 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
3266 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3267 Likewise.
3268 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3269 Likewise.
3270 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
3271 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3272 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
3273 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
3274 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3275 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
3276 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3277 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3278 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3279 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
3280 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
3281 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
3282 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
3283 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
3284 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
3285 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
3286 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
3287 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
3288 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
3289 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
3290 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
3291 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
3292 * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
3293 * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
3294 * sysdeps/sh/pthread_spin_trylock.S: Likewise.
3295 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3296 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3297
3298 * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
3299 CLONE_CHILD_SETTID worked.
3300
35e148cb
UD
33012003-03-12 Ulrich Drepper <drepper@redhat.com>
3302
d0369fb8
UD
3303 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
3304 file.
3305 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
3306 file.
3307
3308 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
3309 (pthread_cond_t): Add padding.
3310
da49194d
UD
3311 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
3312 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
3313 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
3314
35e148cb
UD
3315 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
3316 (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
3317 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
3318 (__pthread_rwlock_timedrdlock): Likewise.
3319 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
3320 (__pthread_rwlock_wrlock): Likewise.
3321 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
3322 (__pthread_rwlock_rdlock): Likewise.
3323
3324 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
3325
3326 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
3327 result of lock re-get if it fails.
3328
3e976b96
UD
33292003-03-11 Ulrich Drepper <drepper@redhat.com>
3330
5a03acfe
UD
3331 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
3332 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3333 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
3334 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
3335 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3336 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
3337 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3338 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3339 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
3340 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3341
3342 * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
3343 THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
3344
3345 * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
3346 Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
3347 * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
3348 (create_thread): Likewise.
3349 Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
3350 * init.c (__pthread_initialize_minimal_internal): Initialize
3351 __libc_multiple_threads_ptr if necessary.
3352 * pthreadP.h: Adjust prototype for __libc_pthread_init. Declare
3353 __pthread_multiple_threads and __libc_multiple_threads_ptr.
3354 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
3355 __libc_multiple_threads.
3356 (__libc_pthread_init): Return pointer to __libc_pthread_init if
3357 necessary.
3358
3359 * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
3360 (THREAD_SETMEM_NC): Likewise.
3361
3362 * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
3363 * sysdeps/x86_64/pthread_spin_trylock.S: New file.
3364 * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
3365 * sysdeps/x86_64/pthread_spin_unlock.S: New file.
3366
3367 * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
3368 Eliminate one entire instruction.
3369
32a589b1
UD
3370 * cancellation.c (__pthread_enable_asynccancel_2): New function.
3371 * pthreadP.h: Declare __pthread_enable_asynccancel_2.
3372 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
3373 (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
3374 instead of __pthread_enable_asynccancel.
3375 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
3376 (__pthread_cond_wait): Likewise.
3377 * sysdeps/pthread/pthread_cond_timedwait.c
3378 (__pthread_cond_timedwait): Likewise.
3379 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
3380
3e976b96
UD
3381 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
3382 (__condvar_cleanup): Wake up all waiters in case we got signaled
3383 after being woken up but before disabling asynchronous
3384 cancellation.
3385 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
3386 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
3387 (__condvar_cleanup): Likewise.
3388
3389 * init.c (__NR_set_tid_address): If already defined, don't redefine.
3390 Make it an error if architecture has no #if case. Add x86-64.
3391
3392 * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
3393 pt-initfini.s generation.
3394
3395 * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
3396 (TLS_INIT_TP): Fix typo.
3397
6c477888
UD
33982003-03-11 Jakub Jelinek <jakub@redhat.com>
3399
3400 * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
3401 3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
3402
3403 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
3404 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
3405 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
3406 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
3407 * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
3408 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
3409 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
3410 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
3411
ea694823
UD
34122003-03-11 Ulrich Drepper <drepper@redhat.com>
3413
6c477888
UD
3414 * sysdeps/pthread/pthread_cond_timedwait.c
3415 (__pthread_cond_timedwait): Return the result of the final
3416 locking. If it succeeds, the regular function return value.
3417
3418 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
3419 Return result of the final locking.
3420 * version.c (__nptl_main): Work around problems with the strange
3421 INTERNAL_SYSCALL macro on ppc32.
3422 * init.c (__pthread_initialize_minimal_internal): Unblock
3423 SIGCANCEL in case the parent blocked it.
3424 Reported by Paul Mackerras <paulus@samba.org>.
3425
ea694823
UD
3426 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
3427 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
3428 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
3429
b33e6163
RM
34302003-03-11 Jakub Jelinek <jakub@redhat.com>
3431
3432 * sysdeps/pthread/pthread_cond_timedwait.c
3433 (__pthread_cond_timedwait): Unlock and fail if
3434 __pthread_mutex_unlock_internal failed.
3435
3436 * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
3437 (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
3438 Use ARCH_CLONE.
3439 * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
3440 [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
3441 STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
3442 ALLOCATE_STACK): New macros.
3443 (TLS_TPADJ): New macro.
3444 (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
3445 (allocate_stack): Handle TLS_DTV_AT_TP and
3446 NEED_SEPARATE_REGISTER_STACK. Use TLS_TPADJ.
3447 * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
3448 Don't set PD->self.
3449 * init.c [__ia64__] (__NR_set_tid_address): Define.
3450
3451 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
3452 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
3453 * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
3454 * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
3455 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
3456 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
3457 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
3458 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
3459 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
3460 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
3461 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
3462 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
3463 * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
3464 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
3465 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
3466 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
3467 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
3468 * sysdeps/ia64/bits/atomic.h: New file.
3469 * sysdeps/ia64/Makefile: New file.
3470 * sysdeps/ia64/pthread_spin_init.c: New file.
3471 * sysdeps/ia64/pthread_spin_lock.c: New file.
3472 * sysdeps/ia64/pthread_spin_trylock.c: New file.
3473 * sysdeps/ia64/pthread_spin_unlock.c: New file.
3474 * sysdeps/ia64/pthreaddef.h: New file.
3475 * sysdeps/ia64/tcb-offsets.sym: New file.
3476 * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
3477 * sysdeps/ia64/tls.h: New file.
3478
3479 * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
3480 to syscall instead of no arguments.
3481
2b30b2e5
UD
34822003-03-10 Ulrich Drepper <drepper@redhat.com>
3483
db5f2fc9
UD
3484 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
3485 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
3486 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
3487 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
3488
3489 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
3490 unused code.
3491
6a4263e3
UD
3492 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
3493
3de7c2a9
UD
3494 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
3495 lowlevelbarrier.sym.
3496 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
3497 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
3498 Include lowlevelbarrier.h and don't define offsets locally.
6a4263e3 3499 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
3de7c2a9 3500
2a544d82
UD
3501 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3502 (__lll_mutex_lock_wait): Reverse order of first two parameters.
3503 (__lll_mutex_timedlock_wait): Likewise.
3504 (lll_mutex_lock): Adjust asm for that.
3505 (lll_mutex_timedlock): Likewise. Mark cx, cc, r10 as clobbered.
3506 (lll_lock): Adjust asm for operand order change.
3507 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
3508 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
3509
ec06436c
UD
3510 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
3511 Reverse order of parameters.
3512 (__lll_timedwait_tid): Remove regparms attribute.
3513 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
3514 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
3515
3273832c
UD
3516 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
3517 (__lll_timedwait_tid): Remove one unnecessary instruction.
3518
51f32ab8
UD
3519 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
3520 __lll_mutex_timedlock_wait only for NOT_IN_libc.
3521 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
3522 lowlevelmutex.S.
3523
3524 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
3525 lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
3526 for NOT_IN_libc.
3527 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
3528 lowlevellock.S.
3529
fad48d9e
UD
3530 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
3531 LOCK is already defined. Don't define __lll_mutex_timedlock_wait
3532 for libc.so.
3533 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
3534 define LOCK here (if UP is not defined). The actual code is in
3535 lowlevelmutex.S.
3536
9356d063
UD
3537 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
3538 LOCK is already defined. Don't define lll_unlock_wake_cb and
3539 __lll_timedwait_tid for libc.so.
3540 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
3541 define LOCK here (if UP is not defined). The actual code is in
3542 lowlevellock.S.
3543
ebf0cbc5 3544 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
106f6f9d
UD
3545 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
3546 * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
3547 instead of lowlevelsem.h.
3548 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
3549 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
3550 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
0be8ee21 3551
c915e5ad
UD
3552 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
3553 lowlevelrwlock.sym.
3554 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
3555 * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
146fa1ee 3556 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
c915e5ad 3557
4c3c2e8a
UD
3558 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
3559 register loading.
3560 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
3561 last changed. D'oh.
3562
2b30b2e5
UD
3563 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
3564
3565 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
3566 of __libc_locking_needed.
3567 (lll_trylock): Initialize %eax to zero.
3568
2b30b2e5
UD
3569 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
3570 pthread_cond_t definition.
3571
e48f9638
RM
35722003-03-10 Roland McGrath <roland@redhat.com>
3573
3574 * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
3575 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
3576 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
3577 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
3578 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
3579
3580 * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
3581 Instead of setting PD->multiple_threads, set globals
3582 __pthread_multiple_threads and __libc_multiple_threads.
3583 * sysdeps/pthread/createthread.c (create_thread): Likewise.
3584 * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
3585 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
3586
3587 * descr.h (struct pthread): Conditionalize first member on
3588 [!TLS_DTV_AT_TP]. Replace the `header' member with an anonymous union
3589 containing an anonymous tcbhead_t. Move `list' member out.
3590 [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
3591 * allocatestack.c: Remove use of `header.data.' prefix.
3592 * pthread_create.c: Likewise.
3593 * init.c (__pthread_initialize_minimal_internal): Likewise.
3594 * sysdeps/pthread/createthread.c (create_thread): Likewise.
3595 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
3596 (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
3597 * sysdeps/x86_64/tls.h: Likewise.
3598 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
3599 (SINGLE_THREAD_P): Likewise.
3600 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
3601 (SINGLE_THREAD_P): Likewise.
3602 * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
3603 * sysdeps/s390/tls.h (tcbhead_t): Likewise.
3604
c37cae9e
UD
36052003-03-09 Ulrich Drepper <drepper@redhat.com>
3606
d38c777e
RM
3607 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
3608
7b44a5e0 3609 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
2b30b2e5 3610 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
7b44a5e0 3611
c2e5e085
UD
3612 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
3613 leftovers from the ia32 code.
3614
3615 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
3616 memory load.
3617 (clear_once_control): Don't load %esi.
3618
3619 * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
3620 handling.
3621
3622 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
3623
cd4b2a55
UD
3624 * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
3625 * sysdeps/unix/sysv/linux/createthread.c: ...here.
3626
c37cae9e
UD
3627 * Makefile (tests): Add tst-cond10.
3628 * tst-cond10.c: New file.
3629
d130a341
UD
36302003-03-08 Ulrich Drepper <drepper@redhat.com>
3631
ccf1d573
UD
3632 * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
3633 * tst-signal3.c (do_test): Likewise.
3634 * tst-sem5.c (do_test): Likewise.
3635 * tst-kill6.c (do_test): Likewise.
3636 * tst-tls3.c (do_test): Likewise. Include <errno.h>.
3637
3638 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
3639 of inc/dec.
3640 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
3641 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
3642 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
3643 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
3644 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
3645 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
3646 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3647 Likewise.
3648 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3649 Likewise.
3650 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
3651 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3652 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3653 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
3654 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
3655 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
3656 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
3657 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
3658
d130a341
UD
3659 * allocatestack.c (allocate_stack): If mprotect() fails free the
3660 TLS memory.
3661
bc6389ad
UD
36622003-03-07 Ulrich Drepper <drepper@redhat.com>
3663
41d4d223
UD
3664 * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
3665
3666 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
3667 lll_wake_tid. This was used only to work around kernel limits in
3668 the early days.
3669 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3670 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
3671 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
3672 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
3673
bc6389ad
UD
3674 * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
3675 (__pthread_initialize_minimal_internal): Change initialization of
3676 __static_tls_align_m1 appropriately.
3677 * pthreadP.h (__static_tls_align_m1): Renamed from
3678 __static_tls_align.
3679 * allocatestack.c (allocate_stack): Use __static_tls_align_m1
3680 instead of __static_tls_align-1.
3681
cc775edf
UD
36822003-03-04 Ulrich Drepper <drepper@redhat.com>
3683
0de28d5c 3684 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
6245b6ae 3685
518b5308
UD
3686 * pthread_create.c: Define __pthread_keys using nocommon
3687 attribute, not by placing it explicitly in bss.
3688 Remove DEFINE_DEALLOC definition. Not needed anymore.
3689
3690 * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
3691 Use it in mmap call to allocate stacks.
3692
3693 * sysdeps/pthread/createthread.c (create_thread): Fix comment.
3694
cc775edf
UD
3695 * pthread_create.c (start_thread): Use THREAD_SETMEM to store
3696 result of the thread function.
3697
4f6f0a8f
UD
36982003-03-03 Ulrich Drepper <drepper@redhat.com>
3699
f04a2721
UD
3700 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed. The generic
3701 version is just fine.
3702
4f6f0a8f
UD
3703 * sysdeps/unix/sysv/linux/libc_pthread_init.c
3704 (__pthread_child_handler): Renamed from pthread_child_handler,
3705 exported, and marked hidden. Change all users.
3706 * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
3707 free __pthread_child_handler from child list.
3708
7ce5c164
UD
37092003-03-03 Martin Schwidefsky <schwidefsky@de.ibm.com>
3710
3711 * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
3712
3713 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
3714 Fix handling of cancellation and failing pthread_mutex_unlock call.
3715 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
3716 (__pthread_cond_wait): Likewise.
3717
3718 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
3719 (pthread_rwlock_timedrdlock): Fix clobber of result variable by
3720 lll_futex_timed_wait call.
3721 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
3722 (pthread_rwlock_timedwrlock): Likewise.
3723
3724 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
3725 Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
3726 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
3727
3728 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
3729 check of lll_futex_wake return value.
3730
ea6a015b
RM
37312003-03-03 Roland McGrath <roland@redhat.com>
3732
3733 * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
3734
3735 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3736 Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
3737 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
3738
4adacf57
UD
37392003-03-02 Ulrich Drepper <drepper@redhat.com>
3740
1be3d664
UD
3741 * sysdeps/pthread/timer_create.c (timer_create): Return correct
3742 error for CPU clocks.
3743
885bafa1
UD
3744 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
3745 _POSIX_MONOTONIC_CLOCK.
3746 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3747
4adacf57
UD
3748 * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
3749 recent kernels.
3750
86bfff4d
UD
37512003-03-01 Ulrich Drepper <drepper@redhat.com>
3752
3753 * descr.h (struct pthread): Move cleanup field to the front.
3754
d1149385
RM
37552003-03-01 Roland McGrath <roland@redhat.com>
3756
3757 * sem_open.c (sem_open): Braino fix.
3758
bd8bb78b
UD
37592003-03-01 Ulrich Drepper <drepper@redhat.com>
3760
748bec08
UD
3761 * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
3762 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
3763 __pthread_cleanup_pop functionality.
3764 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3765
bd8bb78b
UD
3766 * descr.h (struct pthread): Move tid field to the front now that
3767 it is often used.
3768
3769 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
3770 (__lll_mutex_timedlock_wait): Remove.
3771 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
3772 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
3773 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
3774 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
3775 (lll_unlock_wake_cb): Don't save and restore %esi.
3776 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
3777 %esi.
3778 (__lll_timedwait_tid): Add alignment.
3779 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
3780 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
3781 %esi.
3782 (__lll_timedwait_tid): Removed.
3783 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
3784 (__pthread_cond_broadcast): Don't save, load, and restore %esi.
3785 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
3786 (pthread_barrier_wait): Don't save, load, and restore %esi for
3787 last thread.
3788 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
3789 (__pthread_cond_signal): Don't save, load, and restore %esi.
3790 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
3791 (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
3792 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
3793 Don't save, load, and restore %esi.
3794
d2637c70
UD
37952003-02-27 Ulrich Drepper <drepper@redhat.com>
3796
567fb22a
UD
3797 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
3798 Release lock before waking up the waiters.
3799
427f5fa1
UD
3800 * tst-exit1.c (do_test): Don't start more than one thread in parallel.
3801
a2d83cfb
UD
3802 * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
3803 (reader_thread): Likewise.
3804
d2637c70
UD
3805 * sysdeps/pthread/pthread_rwlock_unlock.c
3806 (__pthread_rwlock_unlock): Release internal lock early. Don't try
3807 to wake up readers if there are none.
3808
3809 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
3810 Release internal lock before wake threads.
3811
b1531183
UD
38122003-02-26 Ulrich Drepper <drepper@redhat.com>
3813
dbf6131c
UD
3814 * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
3815 * tst-rwlock8.c: Initialize lock with INIT. Allow INIT to be
3816 predefined.
3817 * tst-rwlock9.c: Likewise.
3818 * tst-rwlock10.c: New file.
3819 * tst-rwlock11.c: New file.
3820
695799fe
UD
3821 * Makefile (tests): Add tst-dlsym1.
3822 * tst-dlsym1.c: New file.
3823
b1531183
UD
3824 * init.c (__pthread_initialize_minimal_internal): Set
3825 GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
3826 * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
3827
3724f268
UD
38282003-02-24 Ulrich Drepper <drepper@redhat.com>
3829
3857ca78
UD
3830 * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
3831
80d80779
UD
3832 * tst-cond2.c: Fix sychronization with child.
3833
86371308
UD
3834 * tst-rwlock8.c (reader_thread): Remove unused variable.
3835
ffeb4481
UD
3836 * Makefile: Add rules to build and run tst-tls3.
3837 * tst-tls3.c: New file.
3838 * tst-tls3mod.c: New file.
3839
3724f268
UD
3840 * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
3841 * tst-rwlock8.c: New file.
3842 * tst-rwlock9.c: New file.
3843 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
3844 complete broken rwlock implementation.
3845 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3846 Likewise.
3847 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3848 Likewise.
3849 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
3850 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
18a53579
UD
3851 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
3852 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
3853 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
3854 * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
3855 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
3724f268 3856
8915cc40
RM
38572003-02-23 Roland McGrath <roland@redhat.com>
3858
3859 * Makefile (nptl-version): Change regexp so case sensitivity is ok.
3860
fd1a0d0c
UD
38612003-02-23 Ulrich Drepper <drepper@redhat.com>
3862
ecf28959
UD
3863 * Makefile (tests): Add tst-context1.
3864 * tst-context1.c: New file.
3865
5e47b76b
UD
3866 * Makefile (tests): Add tst-tls1 and tst-tls2.
3867 * tst-tls1.c: New file.
3868 * tst-tls2.c: New file.
3869
5a6bbb41
UD
3870 * libc-cancellation.c (__libc_enable_asynccancel): Correct test
3871 for failed cmpxchg.
3872
fd1a0d0c
UD
3873 * pthread_create.c (start_thread): Set EXITING_BIT early.
3874
3875 * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
3876 (THREAD_GETMEM_NC): Likewise.
3877
757f9fcb
UD
38782003-02-22 Ulrich Drepper <drepper@redhat.com>
3879
b1b8e747
UD
3880 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
3881 off 3 more bytes by using offset-less instructions when possible.
3882
c780aa21 3883 * Makefile: Add dependency for $(objpfx)version.d.
757f9fcb
UD
3884
3885 * eintr.c (eintr_source): Add unnecessary return but the compiler
3886 insists.
3887
3888 * tst-kill3.c: Include <unistd.h>.
3889
5148559c
RM
38902003-02-21 Roland McGrath <roland@redhat.com>
3891
3892 * pthread_create.c (start_thread): Call __libc_thread_freeres.
3893
ab2d98e3
UD
38942003-02-21 Ulrich Drepper <drepper@redhat.com>
3895
71028edd
UD
3896 * Makefile (tests): Add tst-eintr1.
3897 (distribute): Add eintr.c.
3898 * tst-eintr1.c: New file.
3899 * eintr.c: New file.
3900
e814f748
UD
3901 * pthread_cancel.c (pthread_cancel): Use tkill directly.
3902
3903 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
3904 Disallow sending SIGCANCEL.
3905
ab2d98e3 3906 * Makefile (tests): Remove tst-basic7. Add tst-kill1, tst-kill2,
9c03686d 3907 tst-kill3, tst-kill4, tst-kill5, tst-kill6.
e814f748
UD
3908 * tst-kill1.c: New file.
3909 * tst-kill2.c: New file.
3910 * tst-kill3.c: New file.
3911 * tst-kill5.c: New file.
9c03686d 3912 * tst-kill6.c: New file.
e814f748
UD
3913 * tst-basic7.c: Renamed to...
3914 * tst-kill4.c: ...this.
ab2d98e3 3915
59fed0e2
RM
39162003-02-21 Roland McGrath <roland@redhat.com>
3917
3918 * Makefile (install-lib-ldscripts): New variable.
3919
49dc759f
UD
39202003-02-21 Ulrich Drepper <drepper@redhat.com>
3921
8c2e9a29
UD
3922 * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
3923 * pthread_cancel.c: Use INVALID_TD_P.
3924 * pthread_detach.c: Likewise.
3925 * pthread_getschedparam.c: Likewise.
3926 * pthread_setschedparam.c: Likewise.
3927 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
3928 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
3929 * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
3930 * pthread_timedjoin.c: Likewise.
3931
3932 * tst-basic7.c: Include <signal.h>.
3933
49dc759f
UD
3934 * pthread_join.c (pthread_join): Limited checking for invalid
3935 descriptors.
3936 * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
3937
df5803bf
UD
39382003-02-20 Ulrich Drepper <drepper@redhat.com>
3939
c5acd3d7
UD
3940 * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
3941 beginning of the loop. Clear the entire first block of TSD.
df5803bf
UD
3942 * Makefile (tests): Add tst-key4.
3943 * tst-key4.c: New file.
3944
729924a0
UD
39452003-02-18 Ulrich Drepper <drepper@redhat.com>
3946
2f7dc594
UD
3947 * Makefile (tests): Add tst-basic7.
3948 * tst-basic7.c: New file.
3949
ba25bb0f
UD
3950 * pthread_create.c (deallocate_tsd): Mark as internal_function.
3951 Add some more __builtin_expect.
3952
12fd3c5f 3953 * pthreadP.h: Define dummy version of DEBUGGING_P.
729924a0 3954
5430d926
UD
39552003-02-17 Ulrich Drepper <drepper@redhat.com>
3956
b0db7fbe
UD
3957 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
3958 _POSIX_THREAD_PRIORITY_SCHEDULING.
3959 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
3960 _XOPEN_REALTIME_THREADS.
3961 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
3962
3963 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
3964 kernel returns EINVAL for PID <= 0, work around it.
3965
ecfda9bd
UD
3966 * Makefile (tests): Add tst-signal5.
3967 * tst-signal5.c: New file.
3968
7d78ab99
UD
3969 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
3970 and LOGIN_NAME_MAX.
3971
371a2972
UD
3972 * tst-cancel1.c (tf): Block all signals.
3973
5430d926
UD
3974 * Makefile (tests): Add tst-basic6.
3975 * tst-basic6.c: New file.
3976
3977 * tst-basic1.c: Add test for process ID.
3978
3979 * Makefile (tests): Add tst-cancel10.
3980 * tst-cancel10.c: New file.
3981
3982 * Makefile (tests): Add tst-signal4.
3983 * tst-signal4.c: New file.
3984
3985 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
3986 __sigismember instead of sigismember. Add __builtin_expect.
3987
1564916a
UD
39882003-02-16 Ulrich Drepper <drepper@redhat.com>
3989
179ff175
UD
3990 * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
3991 pthread_setcancelstate, and pthread_rwlock_setpshared.
3992
e4335f9a
UD
3993 * tst-cancel7.c (do_test): Make sure the pid file exists before
3994 canceling the thread.
3995
0a37669a
UD
3996 * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
3997 pthread_rwlock_timedrdlock tests.
3998 * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
3999 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
4000 Check for invalid tv_nsec field.
4001 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
4002 Likewise.
4003
4004 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
4005 recursive mutex of overflow.
4006
4007 * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
4008
e4335f9a 4009 * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
1564916a
UD
4010 going into an endless loop.
4011 * Makefile (tests): Add tst-cancel9.
4012 * tst-cancel9.c: New file.
4013
4014 * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
4015
b270b548
UD
40162003-02-15 Ulrich Drepper <drepper@redhat.com>
4017
1c82b97f
UD
4018 * tst-mutex5.c (do_test): Add more timedlock tests.
4019
b2f05465 4020 * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
c3bb9ee1
UD
4021 * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
4022
e798b60f
UD
4023 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
4024 use INLINE_SYSCALL. Error number is returned, not -1.
4025
90491dc4
UD
4026 * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
4027 and __deallocate_stack with internal_function.
4028 * pthread_create.c: Adjust definitions appropriately.
4029 * allocatestack.c: Likewise.
4030
4031 * pthread_join.c: Add one more __builtin_expect.
4032 * pthread_timedjoin.c: Likewise.
4033
4034 * pthread_getspecific.c (__pthread_getspecific): Clear data->data
4035 not data of sequence number does not match.
4036 Add one __builtin_expect.
4037
c6247c9d
UD
4038 * Makefile (tests): Add tst-clock1.
4039 * tst-clock1.c: New file.
4040
b270b548
UD
4041 * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
4042 negative arguments.
4043 * Makefile (tests): Add tst-basic5.
4044 * tst-basic5.c: New file.
4045
700bf7af
UD
40462003-02-14 Ulrich Drepper <drepper@redhat.com>
4047
757de559
UD
4048 * Makefile (tests): Add tst-basic4.
4049 * tst-basic4.c: New file.
4050
47202270
UD
4051 * pthreadP.h: Add declaraction for __nptl_nthreads.
4052 * pthread_create.c: Define __nptl_nthreads
4053 (start_thread): Increment __nptl_nthreads at beginning. Decrement
b270b548 4054 after thread is done. If then zero, call exit(0).
47202270
UD
4055 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
4056 Add ptr_nthreads. Define HAVE_PTR_NTHREADS.
4057 * init.c (pthread_functions): Initialize ptr_nthreads.
4058 * allocatestack.c (nptl_nthreads): Remove definition and all uses.
4059 (__reclaim_stacks): Decrement __nptl_nthreads.
4060 * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
4061 Define.
4062 * Makefile (tests): Add tst-basic3.
4063 * tst-basic3.c: New file.
4064
e320ef46
UD
4065 * descr.h: Define CANCELING_BIT and CANCELING_BITMASK. Introduce
4066 after CANCELTYPE_BIT, move the other bits up. Update CANCEL_RESTMASK.
4067 * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
4068 * pthread_cancel.c (pthread_cancel): Likewise. Also set CANCELING_BIT
4069 if asynchronous canceling is enabled.
4070 * pthread_join.c (pthread_join): When recognizing circular joins,
4071 take into account the other thread might be already canceled.
4072 * Makefile (tests): Add tst-join5.
4073 * tst-join5.c: New file.
4074
700bf7af
UD
4075 * Makefile (tests): Add tst-join4.
4076 * tst-join4.c: New file.
4077
40782003-02-13 Ulrich Drepper <drepper@redhat.com>
4079
4080 * tst-cond4.c (main): Add test of pthread_attr_getpshared.
4081
dac0f772
UD
40822003-02-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
4083
4084 * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
4085 THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
4086 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
4087 warning.
4088 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
4089 to avoid warning.
4090 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
4091 error if lll_futex_wake failed.
4092
e8cda341
UD
40932003-02-13 Ulrich Drepper <drepper@redhat.com>
4094
a7720b5e
UD
4095 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
4096 handling of cancellation and failung pthread_mutex_unlock call.
4097 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4098 * Makefile (tests): Add tst-cond8 and tst-cond9.
4099 * tst-cond8.c: New file.
4100 * tst-cond9.c: New file.
4101
a1ea4c06
UD
4102 * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
4103
4104 * sysdeps/pthread/pthread.h: Add missing initializers. Protect
4105 non-standard initializers with __USE_GNU.
4106
e8cda341
UD
4107 * Makefile (tests): Add tst-cleanup3.
4108 * tst-cleanup3.c: New file.
4109
2067577c
UD
41102003-02-12 Ulrich Drepper <drepper@redhat.com>
4111
89e78a95
UD
4112 * Makefile (tests): Add tst-attr1 and tst-attr2.
4113 * tst-attr1.c: New file.
4114 * tst-attr2.c: New file.
4115
dfdd294a
UD
4116 * Makefile: Add rules to build and run tst-atfork2 test.
4117 * tst-atfork2.c: New file.
4118 * tst-atfork2mod.c: New file.
4119
4120 * sysdeps/unix/sysv/linux/unregister-atfork.c
4121 (__unregister_atfork): Free the memory allocated for the handlers
4122 after removing them from the lists.
4123
4124 * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
4125 cleanup function.
4126
4127 * tst-atfork1.c (do_test): Wait for the child we forked.
4128 Report error in child.
4129
4130 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
4131
2067577c
UD
4132 * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
4133
2a8a8a84
UD
41342003-02-10 Ulrich Drepper <drepper@redhat.com>
4135
d9dd121e
UD
4136 * Makefile (tests): Add tst-cancel8.
4137 * tst-cancel8.c: New file.
4138
2a8a8a84
UD
4139 * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
4140 clearing of control variable.
defd1870 4141 * Makefile (tests): Add tst-once3 and tst-once4.
2a8a8a84 4142 * tst-once3.c: New file.
defd1870 4143 * tst-once4.c: New file.
2a8a8a84 4144
a54e8d33
UD
41452003-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
4146
4147 * sysdeps/sh/Makefile: New file.
4148 * sysdeps/sh/bits/atomic.h: New file.
4149 * sysdeps/sh/pthread_spin_init.c: New file.
4150 * sysdeps/sh/pthread_spin_lock.c: New file.
4151 * sysdeps/sh/pthread_spin_trylock.S: New file.
4152 * sysdeps/sh/pthread_spin_unlock.S: New file.
4153 * sysdeps/sh/pthreaddef.h: New file.
4154 * sysdeps/sh/tcb-offsets.sym: New file.
4155 * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
4156 * sysdeps/sh/tls.h: New file.
4157 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
4158 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
4159 * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
4160 * sysdeps/unix/sysv/linux/sh/fork.c: New file.
4161 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
4162 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
4163 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
4164 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
4165 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
4166 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
4167 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
4168 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
4169 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
4170 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
4171 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
4172 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
4173 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
4174 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
4175 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
4176 * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
4177 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
4178 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
4179 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
4180 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
4181 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
4182 * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
4183 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
4184 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
4185 * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
4186 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
4187
696e556e
UD
41882003-02-08 Ulrich Drepper <drepper@redhat.com>
4189
4190 * tst-cond2.c: Rearrange code to not rely on behavior undefined
4191 according to POSIX.
4192
4193 * tst-basic2.c (do_test): Lock mutex before creating the thread.
4194
fef710d6
UD
41952003-02-07 Ulrich Drepper <drepper@redhat.com>
4196
c6180643
UD
4197 * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
4198 (TLS_GET_FS): New #define.
4199 (TLS_SET_FS): New #define.
4200 Correct value of __NR_set_thread_area.
4201
fef710d6
UD
4202 * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
4203
11090a99
UD
42042003-02-06 Ulrich Drepper <drepper@redhat.com>
4205
65c68990
UD
4206 * Makefile (tests): Add tst-popen1.
4207 * tst-popen1.c: New file.
4208
11090a99
UD
4209 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
4210 but inactive generalization.
4211 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4212 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
4213 Minor optimization, remove one instruction.
4214 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
4215
a88c9263
UD
42162003-02-04 Martin Schwidefsky <schwidefsky@de.ibm.com>
4217
4218 * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
4219
42202003-01-31 Martin Schwidefsky <schwidefsky@de.ibm.com>
4221
4222 * init.c (__NR_set_tid_address): Add #ifdef for s390.
4223 * sysdeps/pthread/pthread_barrier_wait.c: New file.
4224 * sysdeps/pthread/pthread_cond_broadcast.c: New file.
4225 * sysdeps/pthread/pthread_cond_signal.c: New file.
4226 * sysdeps/pthread/pthread_cond_timedwait.c: New file.
4227 * sysdeps/pthread/pthread_cond_wait.c: New file.
4228 * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
4229 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
4230 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
4231 * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
4232 * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
4233 * sysdeps/s390/Makefile: New file.
4234 * sysdeps/s390/bits/atomic.h: New file.
4235 * sysdeps/s390/pthread_spin_init.c: New file.
4236 * sysdeps/s390/pthread_spin_lock.c: New file.
4237 * sysdeps/s390/pthread_spin_trylock.c: New file.
4238 * sysdeps/s390/pthread_spin_unlock.c: New file.
4239 * sysdeps/s390/pthreaddef.h: New file.
4240 * sysdeps/s390/tcb-offsets.sym: New file.
4241 * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
4242 * sysdeps/s390/tls.h: New file.
4243 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
4244 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
4245 * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
4246 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
4247 * sysdeps/unix/sysv/linux/s390/fork.c: New file.
4248 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
4249 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
4250 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
4251 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
4252 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
4253 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
4254 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
4255 * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
4256 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
4257 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
4258 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
4259 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
4260 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
4261 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
4262 * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
4263 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
4264 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
4265 * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
4266
6f1cff95
UD
42672003-02-04 Ulrich Drepper <drepper@redhat.com>
4268
ec609a8e
UD
4269 * atomic.h: Add a couple more default implementations.
4270 (atomic_compare_and_exchange_acq): Use
d45e8740
UD
4271 __arch_compare_and_exchange_32_acq in return value definition. It
4272 always exists.
4273 (atomic_bit_set): Renamed from atomic_set_bit.
0289bef9 4274 Add missing atomic_ prefixes.
e3ec8904 4275
6f1cff95
UD
4276 * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
4277 thread library is available, use correct value to mark initialized
4278 once variable.
4279
4f088329
UD
42802003-02-03 Ulrich Drepper <drepper@redhat.com>
4281
6f1cff95
UD
4282 * allocatestack.c (allocate_stack): Use __getpagesize instead of
4283 __sysconf to determine pagesize.
4284
3e4fc359 4285 * pthread_create.c: Include <atomic.h>.
4f088329
UD
4286 * allocatestack.c (allocate_stack): Implement coloring of the
4287 allocated stack memory. Rename pagesize to pagesize_m1. It's the
4288 size minus one. Adjust users.
3e4fc359 4289 * sysdeps/i386/i686/Makefile: New file.
4f088329 4290
2f42e8be
UD
42912003-02-02 Ulrich Drepper <drepper@redhat.com>
4292
4301f7e2
UD
4293 * allocatestack.c: Improve comment throughout the file.
4294
2f42e8be 4295 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
a37818b3 4296 (__lll_lock_wait): Add branch prediction.
2f42e8be
UD
4297 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
4298 (__lll_lock_wait): Likewise.
4299 (lll_unlock_wake_cb): Removed.
4300
4a7d6545
UD
43012003-01-31 Ulrich Drepper <drepper@redhat.com>
4302
4303 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
4304 _POSIX_THREAD_PRIORITY_SCHEDULING.
4305
886d5973
UD
43062003-01-30 Jakub Jelinek <jakub@redhat.com>
4307
4308 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
4309 Fix return type of ptr___pthread_getspecific.
4310
e474ca78
UD
43112003-01-29 Ulrich Drepper <drepper@redhat.com>
4312
4313 * Makefile (tests): Add tst-umask1.
4314 (tst-umask1-ARGS): Define.
4315 * tst-umask1.c: New file.
4316
e6ebd2e4
UD
43172003-01-28 Ulrich Drepper <drepper@redhat.com>
4318
6cf26f41
UD
4319 * Makefile (libpthread-routines): Remove lowlevelrwlock. Add
4320 pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
4321 pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
4322 pthread_rwlock_unlock.
4323 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
4324 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
4325 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
4326 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
4327 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
4328 New file.
4329 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
4330 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
4331 New file.
4332 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
4333 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
4334 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
4335 New file.
4336 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
4337 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
4338 New file.
4339 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
4340 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
4341 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
4342 New file.
4343 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
4344 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
4345 New file.
4346 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
4347
1d087a7e
UD
4348 * Makefile (libpthread-routines): Remove lowlevelcond and
4349 lowlevelsem. Add sem_wait, sem_trywait, sem_timedwait, sem_post,
4350 pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
4351 and pthread_cond_broadcast.
4a99d160
UD
4352 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
4353 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
4354 * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
4355 * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
4356 * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
4357 * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
4358 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
4359 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
4360 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
4361 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
4362 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
4363 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
4364 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
4365 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
4366 * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
4367 * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
4368 * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
4369 * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
4370 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
4371 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
4372 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
4373 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
4374 * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
4375 * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
4376 * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
4377 * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
4378 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
4379 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
4380 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
4381 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
4382 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
1d087a7e 4383
e6ebd2e4
UD
4384 * sysdeps/unix/sysv/linux/i386/createthread.c: Define
4385 PREPARE_CREATE and TLS_VALUE with x86-specific bits. All the rest
4386 of the code is moved to ...
4387 * sysdeps/pthread/createthread.c: ...here. New file.
4388
a15698cb
UD
43892003-01-27 Ulrich Drepper <drepper@redhat.com>
4390
0566b130
UD
4391 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
4392 (__new_sem_post): Clear %eax before returning.
4393 Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
4394
e6fb8846
UD
4395 * Makefile (tests): Add tst-cleanup2.
4396 * tst-cleanup2.c: New file.
4397
a15698cb
UD
4398 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
4399 Interpret first parameter correctly.
4400
8824b0a1
UD
44012003-01-17 Ulrich Drepper <drepper@redhat.com>
4402
4403 * Makefile (headers): Add bits/semaphore.h.
4404
850dcfca
UD
44052003-01-16 Jakub Jelinek <jakub@redhat.com>
4406
4407 * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
4408 if not SHARED.
4409
574b892e
UD
44102003-01-14 Ulrich Drepper <drepper@redhat.com>
4411
a8d87c92
UD
4412 * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
4413 must be used and mapping failed.
4414 Reported by Luke Elliott <luke.elliott@activfinancial.com>.
4415
574b892e
UD
4416 * Makefile (CFLAGS-pthread_self.os): Define this, not
4417 CFLAGS-pthread_self.c.
4418
fb48047a
UD
44192003-01-13 Ulrich Drepper <drepper@redhat.com>
4420
47805511
UD
4421 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
4422 lll_unlock_wake_cb.
4423
fb48047a
UD
4424 * Makefile (libpthread-routines): Add version. Add rules to build
4425 version.os and banner.h.
4426 * version.c: New file.
4427
115bb61d
UD
44282003-01-13 Jakub Jelinek <jakub@redhat.com>
4429
4430 * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
4431 the alias unconditional.
4432 * pthread_mutex_unlock.c (__pthread_mutex_unlock_internal): Likewise.
4433
44342003-01-13 Ulrich Drepper <drepper@redhat.com>
4435
4436 * Makefile (CFLAGS-pthread_self.c): New definition.
4437
6aca81bb
UD
44382003-01-06 Jakub Jelinek <jakub@redhat.com>
4439
4440 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
4441 INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
4442 * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
4443 * init.c (__pthread_initialize_minimal_internal): Likewise.
4444
e9c7764e
UD
44452003-01-07 Jakub Jelinek <jakub@redhat.com>
4446
b5facfda
UD
4447 * pthreadP.h (__pthread_cond_timedwait): Add prototype.
4448
e9c7764e
UD
4449 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
4450 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
4451 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
4452 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
4453 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
4454 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
4455
bef1e42f
UD
44562003-01-06 Jakub Jelinek <jakub@redhat.com>
4457
4458 * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
4459 * pt-system.c (LIBC_CANCEL_HANDLED): Add.
4460 * tst-cancel-wrappers.sh: Remove all exceptions.
4461
bbd17455
UD
44622003-01-05 Ulrich Drepper <drepper@redhat.com>
4463
a73ab6df
UD
4464 * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
4465 features. Reported by Marijn Ros <marijn@mad.scientist.com>.
4466
bbd17455
UD
4467 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
4468 Use __libc_pthread_functions array if SHARED.
4469
4470 * pthreadP.h: Move pthread_cond_2_0_t definition to...
4471 * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
4472
4473 * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
4474 (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
4475 __libc_key_create, __libc_getspecific, __libc_setspecific): Use
4476 __libc_ptf_call instead of __libc_maybe_call.
4477 (PTF): New #define.
4478 (__libc_cleanup_region_start): Wrap function name with PTF call.
4479 (__libc_cleanup_region_end): Likewise.
4480 (__libc_cleanup_end): Likewise.
4481
4482 * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
4483 * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
4484 * pthread_key_create.c: Add __pthread_key_create_internal alias.
4485 * pthreadP.h: Add prototypes.
4486
4487 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
4488 __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
4489 __pthread_rwlock_unlock aliases.
4490 * pthreadP.h: Add prototypes for new aliases.
4491
4492 * pthreadP.h (struct pthead_functions): Moved to...
4493 * sysdeps/pthread/pthread-functions.h: ...here. New file.
4494 * init.c (pthread_functions): Add initializers for new elements.
4495
4496 * cleanup_defer.c: Add __pthread_cleanup_push_defer and
4497 __pthread_cleanup_pop_restore aliases.
4498 * pthreadP.h: Add prototypes.
4499
4500 * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
4501 and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
4502 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
4503 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
4504 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
4505 * pthreadP.h: Adjust prototypes and callers.
4506
d27a78be
UD
45072003-01-04 Ulrich Drepper <drepper@redhat.com>
4508
b74121ae
UD
4509 * Makefile (tests): Add tst-cancel7.
4510 (tst-cancel7-ARGS): New variable.
bbd17455 4511 * tst-cancel7.c: New file.
b74121ae 4512
29bc410c
UD
4513 * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
4514 around gcc defficiencies.
4515 * old_pthread_cond_signal.c: Likewise.
4516 * old_pthread_cond_timedwait.c: Likewise.
4517 * old_pthread_cond_wait.c: Likewise.
4518
d27a78be
UD
4519 * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
4520
733f25e6
UD
45212003-01-03 Ulrich Drepper <drepper@redhat.com>
4522
7edb2ae3
UD
4523 * Makefile (tests): Add tst-cond7.
4524 * tst-cond7.c: New file.
4525
b1151300
UD
4526 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
4527 (condvar_cleanup): Get condvar address from the right place.
4528
733f25e6
UD
4529 * atomic.h: Correct definitions of atomic_full_barrier,
4530 atomic_read_barrier, atomic_write_barrier.
4531
4532 * old_pthread_cond_broadcast.c: Make memory allocate and initialization
4533 race-free.
4534 * old_pthread_cond_signal.c: Likewise.
4535 * old_pthread_cond_timedwait.c: Likewise.
4536 * old_pthread_cond_wait.c: Likewise.
4537
686b7223
UD
45382003-01-03 Jakub Jelinek <jakub@redhat.com>
4539
4540 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
4541
0e07706e
UD
45422003-01-03 Ulrich Drepper <drepper@redhat.com>
4543
997256dd
UD
4544 * pthreadP.h (pthread_cond_2_0_t): New type.
4545 (struct pthread_functions): Use new type for 2.0 condvar callbacks.
4546 Use new type for the 2.0 condvar function prototypes.
4547 * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
4548 * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
4549 parameter.
4550 * old_pthread_cond_destroy.c: Likewise.
4551 * old_pthread_cond_broadcast.c: Likewise. Lock appropriately.
4552 * old_pthread_cond_signal.c: Likewise.
4553 * old_pthread_cond_timedwait.c: Likewise.
4554 * old_pthread_cond_wait.c: Likewise.
4555
842d2817
UD
4556 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
4557 (__pthread_cond_wait): Don't save cancellation mode and seq value
4558 in same location.
4559
0e07706e
UD
4560 * herrno.c (__h_errno_location): Don't define as weak.
4561
bf293afe
UD
45622003-01-02 Jakub Jelinek <jakub@redhat.com>
4563
4564 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
4565 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
4566 and pthread_cond_wait.
4567 * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
4568 Renamed to...
4569 (__pthread_cond_broadcast_2_0): ... this.
4570 * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
4571 Renamed to...
4572 (__pthread_cond_destroy_2_0): ... this.
4573 * old_pthread_cond_init.c (__old_pthread_cond_init):
4574 Renamed to...
4575 (__pthread_cond_init_2_0): ... this.
4576 * old_pthread_cond_signal.c (__old_pthread_cond_signal):
4577 Renamed to...
4578 (__pthread_cond_signal_2_0): ... this.
4579 * old_pthread_cond_wait.c (__old_pthread_cond_wait):
4580 Renamed to...
4581 (__pthread_cond_wait_2_0): ... this.
4582 * pthread_cond_destroy.c: Include shlib-compat.h.
4583 (pthread_cond_destroy): Change strong_alias into versioned_symbol.
4584 * pthread_cond_init.c: Include shlib-compat.h.
4585 (pthread_cond_init): Change strong_alias into versioned_symbol.
4586 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
4587 fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
4588 fields.
4589 (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
4590 __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
4591 __pthread_cond_wait_2_0): New prototypes.
4592 (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
4593 __old_pthread_cond_init, __old_pthread_cond_signal,
4594 __old_pthread_cond_wait): Removed.
4595 * init.c: Include shlib-compat.h.
4596 (pthread_functions): Guard ptr___pthread_attr_init_2_0
4597 initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
4598 Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
4599 ptr___pthread_cond_*_2_0 fields.
4600 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
4601 pthread_cond_*@GLIBC_2.0 compatibility symbols.
4602
4603 * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
4604 LIBC_SIGACTION was not yet defined.
4605 [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
4606 [!defined LIBC_SIGACTION] (__sigaction): New function and
4607 libc_hidden_weak.
4608 [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
4609 [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
4610
46112003-01-02 Jakub Jelinek <jakub@redhat.com>
4612
4613 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
4614
05df18c3
UD
46152003-01-02 Ulrich Drepper <drepper@redhat.com>
4616
4617 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4618 New, larger type definition.
4619 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
4620 implementation.
4621 * Versions [libpthread]: Add definitions for new pthread_cond_*
4622 interfaces for version GLIBC_2.3.2.
4623 * pthread_cond_init.c: Update initialization for new type definition.
4624 * Makefile (libpthread-routines): Remove pthread_cond_wait,
4625 pthread_cond_timedwait, pthread_cond_signal, and
4626 pthread_cond_broadcast. Add old_pthread_cond_init,
4627 old_pthread_cond_destroy, old_pthread_cond_wait,
4628 old_pthread_cond_timedwait, old_pthread_cond_signal, and
4629 old_pthread_cond_broadcast.
4630 * old_pthread_cond_broadcast.c: New file.
4631 * old_pthread_cond_destroy.c: New file.
4632 * old_pthread_cond_init.c: New file.
4633 * old_pthread_cond_signal.c: New file.
4634 * old_pthread_cond_timedwait.c: New file.
4635 * old_pthread_cond_wait.c: New file.
4636 * pthreadP.h: Add prototypes for the compatibility interfaces.
4637
4638 * pthread_cond_destroy.c: Don't include <errno.h>.
4639
fd8979e4
UD
46402003-01-01 Ulrich Drepper <drepper@redhat.com>
4641
4642 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
4643 unnecessary zero offset when addressing MUTEX.
4644
6d6ee629
UD
46452002-12-31 Ulrich Drepper <drepper@redhat.com>
4646
4647 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
4648 __register_atfork.
4649 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
4650 for __register_atfork.
4651
a4baf360
UD
46522002-12-31 Jakub Jelinek <jakub@redhat.com>
4653
4654 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
4655 instead of ASSEMBLER test macro.
4656
4657 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
4658 __libc_current_sigrtmax): Add libc_hidden_def.
4659
4660 * sysdeps/pthread/list.h: Remove assert.h include.
4661
e9395a94
UD
46622002-12-31 Ulrich Drepper <drepper@redhat.com>
4663
4664 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
4665 __pthread_initialize_minimal_internal not
4666 __pthread_initialize_minimal.
4667
89d6e444
UD
46682002-12-30 Ulrich Drepper <drepper@redhat.com>
4669
416d2de6
UD
4670 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
4671 __pthread_initialize_minimal as hidden.
4672
89d6e444
UD
4673 * init.c (__pthread_initialize_minimal_internal): Don't mark as
4674 constructor.
4675
46762002-12-31 Jakub Jelinek <jakub@redhat.com>
4677
4678 * Makefile ($(inst_libdir)/libpthread.so): Depend on
4679 $(common-objpfx)format.lds, include that into the output script.
4680 Fix comment.
4681 (extra-B-pthread.so): Change linuxthreads/ into nptl/.
4682
8cac677c
UD
46832002-12-28 Andreas Jaeger <aj@suse.de>
4684
4685 * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
4686 nsec resolution changes.
4687 (xstat64_conv): Likewise.
4688 (xstat32_conv): Likewise.
4689 * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
4690 struct kernel_stat.
4691 * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
4692 structs stat and stat64.
4693 * time/time.h (__timespec_defined): Define for __USE_MISC.
89d6e444 4694 * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
8cac677c 4695
49e9f864
UD
46962002-12-30 Jakub Jelinek <jakub@redhat.com>
4697
4698 * forward.c (FORWARD2): Renamed from FORWARD3. Remove unused export
4699 argument.
4700 (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
4701 (pthread_exit): Use strong_alias to avoid warnings.
4702 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
4703 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
4704 ptr___pthread_attr_init_2_*.
4705 * init.c (pthread_functions): Adjust.
4706
bab09b26
UD
47072002-12-29 Ulrich Drepper <drepper@redhat.com>
4708
598d7a42
UD
4709 * forward.c: Make all functions available by default again. It
4710 caused too much trouble.
4711
bab09b26
UD
4712 * pt-siglongjmp.c: Removed.
4713
3b7ed871
UD
47142002-12-28 Jakub Jelinek <jakub@redhat.com>
4715
4716 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
4717 (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
4718 * sysdeps/i386/Makefile: New file.
4719 * sysdeps/i386/tcb-offsets.sym: New file.
4720 * sysdeps/pthread/tcb-offsets.h: New file.
4721 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
4722 Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
4723
4724 * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
4725 __register_atfork...
4726 (GLIBC_2.3.2): ...here.
4727
47282002-12-28 Ulrich Drepper <drepper@redhat.com>
4729
4730 * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
4731 pthread_attr_setstackaddr with __attribute_deprecated__.
4732
270d9d47
UD
47332002-12-27 Jakub Jelinek <jakub@redhat.com>
4734
4735 * pt-system.c (system): Remove cancellation handling.
4736 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
4737 cancellation routines.
4738
131fd126
UD
47392002-12-28 Ulrich Drepper <drepper@redhat.com>
4740
afb2e954
UD
4741 * descr.h: Include <dl-sysdep.h>.
4742 (struct pthread): Move header.data.list to the back of the struct.
131fd126
UD
4743 * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
4744 (MULTIPLE_THREADS_OFFSET): Adjust offset.
4745 (SYSINFO_OFFSEET): Likewise.
4746
47472002-12-27 Jakub Jelinek <jakub@redhat.com>
4748
4749 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
4750 Define.
4751 (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
4752 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
4753 DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
4754 (USE_DL_SYSINFO): Undef.
4755
47562002-12-22 Jakub Jelinek <jakub@redhat.com>
4757
4758 * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
4759 $(common-objpfx)libc.so.
4760 * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
4761 it is bigger than pipe buffer size even on arches with bigger
4762 page size.
4763 (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
4764
a218c9cf
UD
47652002-12-25 Ulrich Drepper <drepper@redhat.com>
4766
4767 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
4768 correct errno access for case that USE___THREAD is not defined.
4769
015a2dc9
UD
47702002-12-24 Ulrich Drepper <drepper@redhat.com>
4771
4772 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
4773 Patch by Marijn Ros <marijn@mad.scientist.com>.
4774
5220f9ac
RM
47752002-12-22 Roland McGrath <roland@redhat.com>
4776
4777 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
4778
1561bf63
UD
47792002-12-20 Ulrich Drepper <drepper@redhat.com>
4780
4781 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
4782
3325198e
UD
47832002-12-19 Ulrich Drepper <drepper@redhat.com>
4784
057c823f
UD
4785 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
4786 NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
4787 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
4788
097eca29
UD
4789 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
4790 of int $0x80.
4791 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
4792 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
4793 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
4794 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
4795 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
4796 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
4797 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
4798 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
4799
4800 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
4801 sysenter.
4802 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
4803
4804 * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
4805
5f5843e3
UD
4806 * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
4807 in new TCB.
4808 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
4809 that sysinfo is properly initialized.
4810 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
4811 to 1 only for ld.so.
4812
3325198e
UD
4813 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
4814 RTLD_CORRECT_DYNAMIC_WEAK.
4815
74e8f2dc
UD
48162002-12-19 Jakub Jelinek <jakub@redhat.com>
4817
4818 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
4819 Use return 0 as 6th argument to FORWARD4.
4820 * pthread_equal.c: Include pthreadP.h instead of pthread.h.
4821
df45b31e
UD
48222002-12-18 Ulrich Drepper <drepper@redhat.com>
4823
4824 * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
4825 * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
4826 Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
4827 (INIT_SYSINFO): New #define.
4828 (TLS_TP_INIT): Use INIT_SYSINFO.
4829 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
4830 At test to make sure SYSINFO_OFFSET value is correct.
4831 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
4832
3d539579
UD
48332002-12-18 Jakub Jelinek <jakub@redhat.com>
4834
4835 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
4836 * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
4837 * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
4838 [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
4839 __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
4840 __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
4841 __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
4842
d7913e0e
UD
48432002-12-18 Ulrich Drepper <drepper@redhat.com>
4844
f051627f
UD
4845 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
4846 macro instead of using int $0x80 directly.
4847
d7913e0e
UD
4848 * sysdeps/pthread/bits/stdio-lock.h: New file.
4849 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
4850 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
4851 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
4852 * Makefile (routines): Add libc-lowlevelmutex.
4853
4854 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
4855 __i686.get_pc_thunk.dx.
4856
f077a4a9
UD
48572002-12-17 Jakub Jelinek <jakub@redhat.com>
4858
4859 * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
4860 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
4861 ($(objpfx)tst-cancel-wrappers.out): New rule.
4862 * tst-cancel-wrappers.sh: New test.
4863 * tst-locale1.c: Include signal.h.
4864 (uselocale): Test static linking of __libc_current_sigrt*.
4865
48662002-12-17 Ulrich Drepper <drepper@redhat.com>
4867
4868 * Makefile (tests): Add tst-cancel6.
4869 * tst-cancel6.c: New file
4870
bd499a3b
UD
48712002-12-17 Jakub Jelinek <jakub@redhat.com>
4872
4873 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
4874 Define meaningfully for assembler as well.
4875 * pthreadP.h (struct pthread_functions): Remove
4876 ptr_pthread_attr_init field. Add ptr_pthread_attr_init_2_0
4877 and ptr_pthread_attr_init_2_1 fields.
4878 * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
4879 and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
4880 * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
4881 (FORWARD3): Define using FORWARD4.
4882 (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
4883 versions.
4884 * pt-system.c: Remove duplicate stdlib.h include.
4885
0a1063f4
UD
48862002-12-16 Ulrich Drepper <drepper@redhat.com>
4887
87d60668
UD
4888 * sem_init.c: Define sem_init@GLIBC_2.0.
4889 * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
4890 * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
4891
0a1063f4
UD
4892 * flockfile.c: Moved to...
4893 * sysdeps/pthread/flockfile.c: ...here. New file.
4894 * funlockfile.c: Moved to...
4895 * sysdeps/pthread/funlockfile.c: ...here. New file.
4896 * ftrylockfile.c: Moved to...
4897 * sysdeps/pthread/ftrylockfile.c: ...here. New file.
4898
9634cf9d
UD
48992002-12-16 Jakub Jelinek <jakub@redhat.com>
4900
4901 * libc-cancellation.c: Guard both function with
4902 #if !defined NOT_IN_libc.
4903 * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
4904 automatically provided pthread wrappers.
4905 * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
4906 CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
4907 nor in libpthread.
4908 * pt-open.c: Removed.
4909 * pt-fcntl.c: Removed.
4910 * pt-fsync.c: Removed.
4911 * pt-lseek.c: Removed.
4912 * pt-msgrcv.c: Removed.
4913 * pt-msgsnd.c: Removed.
4914 * pt-msync.c: Removed.
4915 * pt-nanosleep.c: Removed.
4916 * pt-open64.c: Removed.
4917 * pt-pause.c: Removed.
4918 * pt-pread.c: Removed.
4919 * pt-pread64.c: Removed.
4920 * pt-pwrite.c: Removed.
4921 * pt-pwrite64.c: Removed.
4922 * pt-read.c: Removed.
4923 * pt-recv.c: Removed.
4924 * pt-recvfrom.c: Removed.
4925 * pt-recvmsg.c: Removed.
4926 * pt-send.c: Removed.
4927 * pt-sendto.c: Removed.
4928 * pt-sigtimedwait.c: Removed.
4929 * pt-sigwait.c: Removed.
4930 * pt-wait.c: Removed.
4931 * pt-waitpid.c: Removed.
4932 * pt-write.c: Removed.
4933 * pt-accept.c: Removed.
4934 * pt-close.c: Removed.
4935 * pt-connect.c: Removed.
4936 * pt-lseek64.c: Removed.
4937 * pt-sendmsg.c: Removed.
4938 * pt-tcdrain.c: Removed.
4939
6ee8d334
UD
49402002-12-15 Ulrich Drepper <drepper@redhat.com>
4941
81fa9371
UD
4942 * init.c (__pthread_initialize_minimal_internal): Renamed from
4943 __pthread_initialize_minimal. Make old name an alias. This
4944 converts a normal relocation into a relative relocation.
4945
f3015aa5
UD
4946 * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
4947
4cbc1950
UD
4948 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
4949 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
4950 * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
4951 pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
4952 pt-sigwaitinfo, pt-waitid, and pt-writev.
4953 * pt-creat.c: Removed.
4954 * pt-poll.c: Removed.
4955 * pt-pselect.c: Removed.
4956 * pt-readv.c: Removed.
4957 * pt-select.c: Removed.
4958 * pt-sigpause.c: Removed.
4959 * pt-sigsuspend.c: Removed.
4960 * pt-sigwaitinfo.c: Removed.
4961 * pt-waitid.c: Removed.
4962 * pt-writev.c: Removed.
4963
8454830b
UD
4964 * init.c (pthread_functions): New variable.
4965 (__pthread_initialize_minimal): Pass pointer to pthread_functions
4966 (or NULL) to __libc_pthread_init.
4967 * forward.c: Rewrite to use __libc:pthread_functions array to get
4968 function addresses.
4969 * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
4970 prototype.
4971 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
4972 Take new parameter. Copy content of variable pointed to by it
4973 to __libc_pthread_init.
4974
4975 * pthreadP.h (struct pthread_functions): New type.
4976 (__libc_pthread_init): Declare.
4977
4978 * pthread_attr_destroy.c: Add namespace protected alias.
4979 * pthread_attr_getdetachstate.c: Likewise.
4980 * pthread_attr_getinheritsched.c: Likewise.
4981 * pthread_attr_getschedparam.c: Likewise.
4982 * pthread_attr_getschedpolicy.c: Likewise.
4983 * pthread_attr_getscope.c: Likewise.
4984 * pthread_attr_setdetachstate.c: Likewise.
4985 * pthread_attr_setinheritsched.c: Likewise.
4986 * pthread_attr_setschedparam.c: Likewise.
4987 * pthread_attr_setschedpolicy.c: Likewise.
4988 * pthread_attr_setscope.c: Likewise.
4989 * pthread_cond_broadcast.c: Likewise.
4990 * pthread_cond_destroy.c: Likewise.
4991 * pthread_cond_init.c: Likewise.
4992 * pthread_cond_signal.c: Likewise.
4993 * pthread_cond_wait.c: Likewise.
4994 * pthread_condattr_destroy.c: Likewise.
4995 * pthread_condattr_init.c: Likewise.
4996 * pthread_equal.c: Likewise.
4997 * pthread_exit.c: Likewise.
4998 * pthread_getschedparam.c: Likewise.
4999 * pthread_self.c: Likewise.
5000 * pthread_setcancelstate.c: Likewise.
5001 * pthread_setschedparam.c: Likewise.
5002 * pthread_mutex_destroy.c: Likewise.
5003 * pthread_mutex_init.c: Likewise.
5004 * pthreadP.h: Add prototypes for the aliases.
5005
0d5f4929
UD
5006 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
5007 multiple_threads member in correct TCB to 1.
5008
6ee8d334
UD
5009 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
5010 SINGLE_THREAD_P. If in libc or libpthread examine multiple_thread
5011 member of thread decriptor, otherwise return unconditionally 1.
5012
2fb6444d
UD
50132002-12-14 Ulrich Drepper <drepper@redhat.com>
5014
5015 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
5016 regular Linux version. Remove file.
5017 * sysdeps/unix/sysv/linux/connect.S: Likewise. Remove file.
5018 * sysdeps/unix/sysv/linux/llseek.c: Likewise. Remove file.
5019 * sysdeps/unix/sysv/linux/msgrcv.c: Likewise. Remove file.
5020 * sysdeps/unix/sysv/linux/msgsnd.c: Likewise. Remove file.
5021 * sysdeps/unix/sysv/linux/open64.c: Likewise. Remove file.
5022 * sysdeps/unix/sysv/linux/poll.c: Likewise. Remove file.
5023 * sysdeps/unix/sysv/linux/pread.c: Likewise. Remove file.
5024 * sysdeps/unix/sysv/linux/pread64.c: Likewise. Remove file.
5025 * sysdeps/unix/sysv/linux/pselect.c: Likewise. Remove file.
5026 * sysdeps/unix/sysv/linux/pwrite.c: Likewise. Remove file.
5027 * sysdeps/unix/sysv/linux/pwrite64.c: Likewise. Remove file.
5028 * sysdeps/unix/sysv/linux/readv.c: Likewise. Remove file.
5029 * sysdeps/unix/sysv/linux/recv.S: Likewise. Remove file.
5030 * sysdeps/unix/sysv/linux/recvfrom.S: Likewise. Remove file.
5031 * sysdeps/unix/sysv/linux/recvmsg.S: Likewise. Remove file.
5032 * sysdeps/unix/sysv/linux/send.S: Likewise. Remove file.
5033 * sysdeps/unix/sysv/linux/sendmsg.S: Likewise. Remove file.
5034 * sysdeps/unix/sysv/linux/sendto.S: Likewise. Remove file.
5035 * sysdeps/unix/sysv/linux/sigpause.c: Likewise. Remove file.
5036 * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise. Remove file.
5037 * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise. Remove file.
5038 * sysdeps/unix/sysv/linux/sigwait.c: Likewise. Remove file.
5039 * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise. Remove file.
5040 * sysdeps/unix/sysv/linux/system.c: Likewise. Remove file.
5041 * sysdeps/unix/sysv/linux/tcdrain.c: Likewise. Remove file.
5042 * sysdeps/unix/sysv/linux/wait.c: Likewise. Remove file.
5043 * sysdeps/unix/sysv/linux/waitid.c: Likewise. Remove file.
5044 * sysdeps/unix/sysv/linux/waitpid.c: Likewise. Remove file.
5045 * sysdeps/unix/sysv/linux/writev.c: Likewise. Remove file.
5046 * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise. Remove file.
5047
86b2dc40
UD
50482002-12-14 Jakub Jelinek <jakub@redhat.com>
5049
5050 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
5051 * sysdeps/unix/sysv/linux/open.c: Removed.
5052 * sysdeps/unix/sysv/linux/fsync.c: Removed.
5053 * sysdeps/unix/sysv/linux/lseek.c: Removed.
5054 * sysdeps/unix/sysv/linux/msync.c: Removed.
5055 * sysdeps/unix/sysv/linux/read.c: Removed.
5056 * sysdeps/unix/sysv/linux/close.c: Removed.
5057 * sysdeps/unix/sysv/linux/creat.c: Removed.
5058 * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
5059 * sysdeps/unix/sysv/linux/pause.c: Removed.
5060 * sysdeps/unix/sysv/linux/select.c: Removed.
5061 * sysdeps/unix/sysv/linux/write.c: Removed.
5062
9d263d72
UD
50632002-12-14 Ulrich Drepper <drepper@redhat.com>
5064
5065 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
5066 element in TCB to see whether locking is needed.
5067
5068 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
5069 MULTIPLE_THREADS_OFFSET value is correct.
5070
5071 * sysdeps/unix/sysv/linux/close.c: New file.
5072 * sysdeps/unix/sysv/linux/connect.S: New file.
5073 * sysdeps/unix/sysv/linux/creat.c: New file.
5074 * sysdeps/unix/sysv/linux/fsync.c: New file.
5075 * sysdeps/unix/sysv/linux/llseek.c: New file.
5076 * sysdeps/unix/sysv/linux/lseek.c: New file.
5077 * sysdeps/unix/sysv/linux/msgrcv.c: New file.
5078 * sysdeps/unix/sysv/linux/msgsnd.c: New file.
5079 * sysdeps/unix/sysv/linux/msync.c: New file.
5080 * sysdeps/unix/sysv/linux/nanosleep.c: New file.
5081 * sysdeps/unix/sysv/linux/open.c: New file.
5082 * sysdeps/unix/sysv/linux/open64.c: New file.
5083 * sysdeps/unix/sysv/linux/pause.c: New file.
5084 * sysdeps/unix/sysv/linux/poll.c: New file.
5085 * sysdeps/unix/sysv/linux/pread.c: New file.
5086 * sysdeps/unix/sysv/linux/pread64.c: New file.
5087 * sysdeps/unix/sysv/linux/pselect.c: New file.
5088 * sysdeps/unix/sysv/linux/pwrite.c: New file.
5089 * sysdeps/unix/sysv/linux/pwrite64.c: New file.
5090 * sysdeps/unix/sysv/linux/readv.c: New file.
5091 * sysdeps/unix/sysv/linux/recv.S: New file.
5092 * sysdeps/unix/sysv/linux/recvfrom.S: New file.
5093 * sysdeps/unix/sysv/linux/recvmsg.S: New file.
5094 * sysdeps/unix/sysv/linux/select.c: New file.
5095 * sysdeps/unix/sysv/linux/send.S: New file.
5096 * sysdeps/unix/sysv/linux/sendmsg.S: New file.
5097 * sysdeps/unix/sysv/linux/sendto.S: New file.
5098 * sysdeps/unix/sysv/linux/sigpause.c: New file.
5099 * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
5100 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
5101 * sysdeps/unix/sysv/linux/sigwait.c: New file.
5102 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
5103 * sysdeps/unix/sysv/linux/system.c: New file.
5104 * sysdeps/unix/sysv/linux/tcdrain.c: New file.
5105 * sysdeps/unix/sysv/linux/wait.c: New file.
5106 * sysdeps/unix/sysv/linux/waitid.c: New file.
5107 * sysdeps/unix/sysv/linux/waitpid.c: New file.
5108 * sysdeps/unix/sysv/linux/writev.c: New file.
5109 * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
5110
5111 * pt-readv.c: Fix comment.
5112
51132002-12-14 Jakub Jelinek <jakub@redhat.com>
5114
5115 * tst-cleanup1.c: Include stdlib.h.
5116
5117 * tst-cancel5.c: New test.
5118 * Makefile (tests): Add tst-cancel5.
5119 (tst-cancel5): Link against libc.so libpthread.so in that order.
5120
9ae0909b
UD
51212002-12-13 Ulrich Drepper <drepper@redhat.com>
5122
b7bdd9c4
UD
5123 * forward.c (test_loaded): Prevent recursive calls.
5124
9ae0909b
UD
5125 * Makefile (routines): Add libc-cancellation.
5126 * libc-cancellation.c: New file.
5127 * descr.h (struct pthread): Add multiple_threads field.
5128 * allocatestack.c (allocate_stack): Initialize multiple_header field of
5129 new thread descriptor to 1.
5130 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
5131 Initialize multiple_thread field after successful thread creation.
5132 * cancellation.c (__do_cancel): Move to pthreadP.h.
5133 (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
5134 (__pthread_disable_asynccancel): Add internal_function attribute.
5135 * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
5136 * pthread_setcancelstate.c: Likewise.
5137 * pthread_setcanceltype.c: Likewise.
5138 * pthread_exit.c: Likewise.
5139 * pthreadP.h (CANCELLATION_P): Likewise.
5140 (__do_cancel): Define as static inline.
5141 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
5142 (__libc_enable_asynccancel, __libc_disable_asynccancel): New
5143 declarations.
5144 * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
5145 fields. Define MULTIPLE_THREADS_OFFSET.
5146 * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
5147 declaration.
5148 * sysdeps/unix/sysv/linux/accept.S: New file.
5149 * sysdeps/unix/sysv/linux/read.c: New file.
5150 * sysdeps/unix/sysv/linux/write.c: New file.
5151 * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
5152 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
5153 initialization of __libc_locking_needed.
5154 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
5155 __libc_locking_needed, use multiple_threads field in TCB.
5156 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
5157
22f20674
UD
51582002-12-12 Ulrich Drepper <drepper@redhat.com>
5159
2ad2e1e7
UD
5160 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
5161 version.
5162 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
5163
22f20674
UD
5164 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
5165 access to __libc_locking_needed for PIC.
5166
aa80bf86
UD
51672002-12-12 Jakub Jelinek <jakub@redhat.com>
5168
5169 * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
5170 declare for libc.so.
5171 (__libc_lock_init, __libc_lock_init_recursive): Change into comma
5172 expression.
5173 (__libc_lock_lock): Put into statement expression.
5174 (__libc_lock_unlock): Remove trailing semicolon.
5175 * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
5176
24021373
RM
51772002-12-12 Roland McGrath <roland@redhat.com>
5178
5179 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
5180 "m" constraint to refer to __libc_locking_needed. Declare it here.
5181
14e7aece
UD
51822002-12-12 Ulrich Drepper <drepper@redhat.com>
5183
5184 * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
5185 * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
5186 Initialize __libc_locking_needed.
5187 * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
5188 instead of __register_pthread_fork_handler.
5189 * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
5190 * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
5191 fork-gen with libc_pthread_init.
5192 * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
5193 of __register_pthread_fork_handler.
5194 * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
5195 of __register_pthread_fork_handler.
5196 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
5197 __libc_locking_needed to determine whether lock prefix can be avoided.
5198 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
5199
85631c8e
UD
52002002-12-11 Ulrich Drepper <drepper@redhat.com>
5201
da63009e
UD
5202 * Makefile (tests): Add tst-cleanup1.
5203 * tst-cleanup1.c: New file.
5204 * cancellation.c (__cleanup_thread): Removed.
5205 (__do_cancel): Remove call to __cleanup_thread.
5206 * pthreadP.h: Remove __cleanup_thread prorotype.
5207
000160a2
UD
5208 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
5209 Remember function and argument even if cancellation handler
5210 function is not available.
5211 (__libc_cleanup_region_end): Execute registered function directly if
5212 pthread functions are not available.
5213 (__libc_cleanup_end): Likewise.
5214
85631c8e
UD
5215 * init.c (__pthread_initialize_minimal): Fix initialization in
5216 static lib by preventing gcc from being too clever.
5217
dce8f2b6
UD
52182002-12-10 Ulrich Drepper <drepper@redhat.com>
5219
34a075be
UD
5220 * init.c (__pthread_initialize_minimal): Remove unneccesary
5221 sigaddset call.
5222
dce8f2b6
UD
5223 * Makefile (tests): We can run tst-locale2 now.
5224
e5e45b53
UD
52252002-12-09 Ulrich Drepper <drepper@redhat.com>
5226
5227 * Versions: Remove duplicated sigwait entry.
5228
bdb04f92
UD
52292002-12-08 Ulrich Drepper <drepper@redhat.com>
5230
1e506629
UD
5231 * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
5232 inside libpthread.
5233
a3957dd5
UD
5234 * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
5235
bdb04f92
UD
5236 * pthreadP.h: Declare __pthread_enable_asynccancel and
5237 __pthread_disable_asynccancel.
5238 (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
5239 (CANCEL_RESET): Use __pthread_disable_asynccancel.
5240 * cancellation.c (__pthread_enable_asynccancel): New function.
5241 (__pthread_disable_asynccancel): New function.
5242 * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
5243 * pt-close.c: Likewise.
5244 * pt-connect.c: Likewise.
5245 * pt-creat.c: Likewise.
5246 * pt-fcntl.c: Likewise.
5247 * pt-fsync.c: Likewise.
5248 * pt-lseek.c: Likewise.
5249 * pt-lseek64.c: Likewise.
5250 * pt-msgrcv.c: Likewise.
5251 * pt-msgsnd.c: Likewise.
5252 * pt-msync.c: Likewise.
5253 * pt-nanosleep.c: Likewise.
5254 * pt-open.c: Likewise.
5255 * pt-open64.c: Likewise.
5256 * pt-pause.c: Likewise.
5257 * pt-poll.c: Likewise.
5258 * pt-pread.c: Likewise.
5259 * pt-pread64.c: Likewise.
5260 * pt-pselect.c: Likewise.
5261 * pt-pwrite.c: Likewise.
5262 * pt-pwrite64.c: Likewise.
5263 * pt-read.c: Likewise.
5264 * pt-readv.c: Likewise.
5265 * pt-recv.c: Likewise.
5266 * pt-recvfrom.c: Likewise.
5267 * pt-recvmsg.c: Likewise.
5268 * pt-select.c: Likewise.
5269 * pt-send.c: Likewise.
5270 * pt-sendmsg.c: Likewise.
5271 * pt-sendto.c: Likewise.
5272 * pt-sigpause.c: Likewise.
5273 * pt-sigsuspend.c: Likewise.
5274 * pt-sigtimedwait.c: Likewise.
5275 * pt-sigwait.c: Likewise.
5276 * pt-sigwaitinfo.c: Likewise.
5277 * pt-system.c: Likewise.
5278 * pt-tcdrain.c: Likewise.
5279 * pt-wait.c: Likewise.
5280 * pt-waitid.c: Likewise.
5281 * pt-waitpid.c: Likewise.
5282 * pt-write.c: Likewise.
5283 * pt-writev.c: Likewise.
a3957dd5
UD
5284 * pthread_join.c: Likewise.
5285 * pthread_timedjoin.c: Likewise.
bdb04f92
UD
5286
5287 * pt-sigpause.c (sigsuspend): Call __sigsuspend.
5288 (__xpg_sigpause): New function.
5289 * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
5290
6ccb3834
UD
52912002-12-07 Ulrich Drepper <drepper@redhat.com>
5292
09efc3ba
UD
5293 * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
5294
5295 * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
5296 _GI_pthread_cleanup_pop to pthreadP.h.
5297
5298 * ftrylockfile.c: Use _IO_lock_trylock instead of
5299 pthread_mutex_trylock.
5300
5301 * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
5302 (CANCEL_RESET): Likewise.
5303 (__pthread_setcanceltype_): Declare.
5304 (__pthread_mutex_lock_internal): Declare.
5305 (__pthread_mutex_unlock_internal): Declare.
5306 (__pthread_once_internal): Declare.
5307 (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
5308 (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
5309
5310 * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
5311 and pthread_mutex_unlock.
5312 * pthread_cond_wait.c: Likewise.
5313 * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
5314 * pthread_mutex_unlock.c: Likewise.
5315
5316 * pthread_setcanceltype.c: Add additional alias
5317 __pthread_setcanceltype.
5318
5319 * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
5320 * sem_open.c (sem_open): Likewise.
5321 Use __libc_open, __libc_write, and __libc_close instead of
5322 open, write, and close respectively.
5323
5324 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
5325 Rewrite as statement expression since it must return a value.
5326
5327 * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
5328 * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
5329 __pthread_kill.
5330
5331 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
5332 alias __pthread_once_internal.
5333
6ccb3834
UD
5334 * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
5335
d3c9f895
UD
53362002-12-06 Ulrich Drepper <drepper@redhat.com>
5337
4614167a
UD
5338 * Makefile (tests): Add tst-stdio1 and tst-stdio2.
5339 * tst-stdio1.c: New file.
5340 * tst-stdio2.c: New file.
5341
a4548cea
UD
5342 * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
5343
d3c9f895
UD
5344 * Makefile (tests): Comment out tst-locale2 for now.
5345 (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
5346
5347 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
5348 -D_IO_MTSAFE_IO.
5349 * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
5350 Use _IO_lock_init instead of explicit assignment.
5351
5352 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
5353 Define __libc_lock_* and __libc_lock_recursive macros with
5354 lowlevellock macros, not pthread mutexes.
5355
5356 * flockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_lock instead
5357 of pthread_mutex_lock.
5358 * funlockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_unlock
5359 instead of pthread_mutex_unlock.
5360
fde89ad0
RM
53612002-12-06 Roland McGrath <roland@redhat.com>
5362
5363 * allocatestack.c (__stack_user): Use uninitialized defn.
5364 * init.c (__pthread_initialize_minimal): Initialize it here.
5365
11767d47
RM
53662002-12-05 Roland McGrath <roland@redhat.com>
5367
fde89ad0
RM
5368 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
5369 string.
5370 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
5371
11767d47
RM
5372 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
5373 missing & here too.
5374
440d8bc2
UD
53752002-12-05 Ulrich Drepper <drepper@redhat.com>
5376
5377 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
5378 lowlevellock.
5379 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
5380 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
5381 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
5382 * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
5383 for __libc_lock_* macros.
5384 * Makefile (routines): Add libc-lowlevellock.
5385
53862002-10-09 Roland McGrath <roland@redhat.com>
5387
5388 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
5389 Under [__PIC__], call the function via the pointer fetched for
5390 comparison rather than a call by name that uses the PLT.
5391 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
5392 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
5393 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
5394 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
5395 (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
5396
d5ed0118
RM
53972002-12-04 Roland McGrath <roland@redhat.com>
5398
5399 * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
5400
5401 * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
5402 * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
5403
5404 * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
5405
eaa4099f
UD
54062002-12-04 Ulrich Drepper <drepper@redhat.com>
5407
5408 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
5409 a completely opaque, non-integer type.
5410 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5411
33b5d0cc
UD
54122002-12-05 Jakub Jelinek <jakub@redhat.com>
5413
5414 * sysdeps/i386/tls.h: Include stdlib.h.
5415 * sysdeps/x86_64/tls.h: Likewise.
5416
7a5cdb30
UD
54172002-12-04 Ulrich Drepper <drepper@redhat.com>
5418
c4a6d859
UD
5419 * Makefile (tests): Add tst-locale2.
5420 (tests-static): Likewise.
5421 * tst-locale2.c: New file.
5422
7a5cdb30
UD
5423 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
5424 volatile and add memory clobbers to lock operations.
5425
d82d5d12
UD
54262002-12-03 Ulrich Drepper <drepper@redhat.com>
5427
69cae3cf
UD
5428 * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
5429 * sysdeps/i386/i486/bits/atomic.h: New file.
5430 * sysdeps/i386/i586/bits/atomic.h: New file.
5431 * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
5432 include i486 version.
5433 * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
5434 * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
c97c64de 5435 Patch by Marijn Ros <marijn@mad.scientist.com>.
69cae3cf 5436
e4044c01
UD
5437 * allocatestack.c (get_cached_stack): Don't crash if we first
5438 found a stack with a larger size then needed.
5439 Reported by Hui Huang <hui.huang@sun.com>.
5440
d82d5d12
UD
5441 * Makefile (tests): Add tst-sysconf.
5442 * tst-sysconf.c: New file.
5443
5444 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
5445 PTHREAD_THREADS_MAX.
5446
fa9a4ff0
RM
54472002-12-02 Roland McGrath <roland@redhat.com>
5448
5449 * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
5450 Declare using hidden_proto instead of attribute_hidden, so there are
5451 non-.hidden static symbols for gdb to find.
5452 (__pthread_keys): Likewise.
5453 * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
5454 * allocatestack.c (__stack_user): Likewise.
5455 * pthread_create.c (__pthread_keys): Likewise.
5456 (__nptl_threads_events, __nptl_last_event): Make these static instead
5457 of hidden.
5458 * pthread_key_create.c (__pthread_pthread_keys_max,
5459 __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
5460
91949a33
UD
54612002-12-02 Ulrich Drepper <drepper@redhat.com>
5462
c22b52fa
UD
5463 * Makefile (tests): Add tst-locale1. If buid-static is yes link
5464 statically.
5465 * tst-locale1.c: New file.
5466
beb6aa41
UD
5467 * pthread_cond_timedwait.c: Include <stdlib.h>.
5468
91949a33
UD
5469 * Makefile (tests): Add tst-fork2 and tst-fork3.
5470 * tst-fork2.c: New file.
5471 * tst-fork3.c: New file.
5472
654dff90
UD
54732002-11-28 Ulrich Drepper <drepper@redhat.com>
5474
cb0e76b4
UD
5475 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
5476
5477 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
5478 require it to 200112L.
5479
5480 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
5481 instruction only if HAVE_CMOV is defined.
5482 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
5483
975aa229
UD
5484 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
5485
654dff90
UD
5486 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
5487
5488 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
5489
5490 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
5491
a3931336
UD
54922002-11-27 Ulrich Drepper <drepper@redhat.com>
5493
c10c099c
UD
5494 * sysdeps/x86_64/bits/atomic.h: New file.
5495
5496 * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
5497 16-bit operations.
5498
dca99d27
UD
5499 * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
5500 possible since gettid cannot fail.
5501
f78deea6
UD
5502 * sysdeps/x86_64/pthreaddef.h: New file.
5503
5504 * sysdeps/i386/pthreaddef.h (gettid): Removed.
5505
5506 * sysdeps/x86_64/pthread_spin_init.c: New file.
5507 * sysdeps/x86_64/pthread_spin_lock.c: New file.
5508 * sysdeps/x86_64/pthread_spin_trylock.c: New file.
5509 * sysdeps/x86_64/pthread_spin_unlock.c: New file.
5510
5511 * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
5512 Add missing lock prefix. Minute optimization.
5513
5514 * tst-spin2.c (main): Also check successful trylock call.
5515
5516 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
5517 syscall. Fix typo in case INTERNAL_SYSCALL is not used.
5518
5519 * sysdeps/i386/pthread_spin_destroy.c: Moved to...
5520 * sysdeps/pthread/pthread_spin_destroy.c: ...here. New file.
5521
5522 * sysdeps/i386/pthread_sigmask.c: Removed. Use the generic code.
5523 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
5524 value in case of an error. Add support for INTERNAL_SYSCALL.
b54e18eb
UD
5525
5526 * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
5527 value in case of an error.
5528
a3931336
UD
5529 * sysdeps/x86_64/tls.h: New file.
5530
76a50749
UD
55312002-11-26 Ulrich Drepper <drepper@redhat.com>
5532
117c452c
UD
5533 * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface. It now
5534 takes the array member name and the index as parameters.
5535 (THREAD_SETMEM_NC): Likewise.
5536 * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
5537 * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
5538 interfaces.
5539
5540 * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
5541 to decide which code to use.
5542 (THREAD_SETMEM_NC): Likewise.
5543
76a50749
UD
5544 * allocatestack.c (queue_stack): Don't remove stack from list here.
5545 Do it in the caller. Correct condition to prematurely terminate
5546 loop to free stacks.
5547 (__deallocate_stack): Remove stack from list here.
5548
55492002-11-26 Ulrich Drepper <drepper@redhat.com>
5550
5551 * Makefile (tests): Add tst-stack1.
5552 * tst-stack1.c: New file.
5553
5554 * allocatestack.c (allocate_stack): Initialize the TCB on a user
5555 provided stack.
5556
5557 * pthread_attr_getstack.c: Return bottom of the thread area.
5558
55592002-11-25 Ulrich Drepper <drepper@redhat.com>
5560
5561 * Makefile (libpthread-routines): Add pt-allocrtsig and
5562 pthread_kill_other_threads.
5563 * pt-allocrtsig.c: New file.
5564 * pthread_kill_other_threads.c: New file.
5565 * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
5566 all three functions.
5567 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
5568 allocrtsig.
5569 * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
5570 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
5571 and __libc_allocate_rtsig_private.
5572 * Versions (libpthread): Export pthread_kill_other_threads_np,
5573 __libc_current_sigrtmin, and __libc_current_sigrtmax.
5574
55752002-11-24 Ulrich Drepper <drepper@redhat.com>
5576
5577 * allocatestack.c (allocate_stack): stackaddr in attribute points to
5578 the end of the stack. Adjust computations.
5579 When mprotect call fails dequeue stack and free it.
5580 * pthread_attr_setstack.c: Store top of the stack in stackaddr
5581 attribute.
5582 * pthread_getattr_np.c: Likewise.
5583
5584 * descr.h (IS_DETACHED): Add some more parenthesis to prevent
5585 surprises.
5586
55872002-11-23 Ulrich Drepper <drepper@redhat.com>
5588
5589 * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
5590 attribute definitions. Patch by Luca Barbieri <ldb@ldb.ods.org>.
5591
55922002-11-22 Ulrich Drepper <drepper@redhat.com>
5593
5594 * pthread_getspecific.c: Optimize access to first 2nd-level array.
5595 * pthread_setspecific.c: Likewise.
5596
55972002-11-21 Ulrich Drepper <drepper@redhat.com>
5598
5599 * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
5600 definitions. Get them from the official place.
5601 * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
5602
5603 * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
5604 Use new CLONE_ flags in clone() calls.
5605
5606 * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
5607 * sysdeps/unix/sysv/linux/i386/fork.c: New file.
5608
5609 * Versions: Add pthread_* functions for libc.
5610 * forward.c: New file.
5611
5612 * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
5613 errno-loc.
5614 * herrno.c: New file.
5615 * res.c: New file.
5616
5617 * Makefile (libpthread-routines): Remove sem_post, sem_wait,
5618 sem_trywait, and sem_timedwait. Add herrno and res.
5619 * sem_init.c: Don't initialize lock and waiters members.
5620 * sem_open.c: Likewise.
5621 * sem_post.c: Removed.
5622 * sem_wait.c: Removed.
5623 * sem_trywait.c: Removed.
5624 * sem_timedwait.c: Removed.
5625 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
5626 Includes full implementations of sem_post, sem_wait, sem_trywait,
5627 and sem_timedwait.
5628 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
5629 for new implementation.
5630 * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
5631 and waiters fields.
5632
5633 * tst-sem3.c: Improve error message.
5634 * tst-signal3.c: Likewise.
5635
5636 * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
5637 to tell the kernel about the termination futex and to initialize tid
5638 member. Don't initialize main_thread.
5639 * descr.h (struct pthread): Remove main_thread member.
5640 * cancelllation.c (__do_cancel): Remove code handling main thread.
5641 The main thread is not special anymore.
5642
5643 * allocatestack.c (__reclaim_stacks): Mark stacks as unused. Add
5644 size of the stacks to stack_cache_actsize.
5645
5646 * pt-readv.c: Add missing "defined".
5647 * pt-sigwait.c: Likewise.
5648 * pt-writev.c: Likewise.
5649
56502002-11-09 Ulrich Drepper <drepper@redhat.com>
5651
5652 * Versions: Export __connect from libpthread.
5653 Patch by Luca Barbieri <ldb@ldb.ods.org>.
5654
5655 * Makefile (libpthread-routines): Add pt-raise.
5656 * sysdeps/unix/sysv/linux/raise.c: New file.
5657 * sysdeps/unix/sysv/linux/pt-raise.c: New file.
5658 * sysdeps/generic/pt-raise.c: New file.
5659
5660 * pthread_cond_init.c: Initialize all data elements of the condvar
5661 structure. Patch by Luca Barbieri <ldb@ldb.ods.org>.
5662
5663 * pthread_attr_init.c: Actually implement 2.0 compatibility version.
5664 * pthread_create.c: Likewise.
5665
5666 * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
5667 * tst-key1.c: New file.
5668 * tst-key2.c: New file.
5669 * tst-key3.c: New file.
5670
5671 * Versions: Export pthread_detach for version GLIBC_2.0.
5672 Reported by Saurabh Desai <sdesai@austin.ibm.com>.
5673
56742002-11-08 Ulrich Drepper <drepper@redhat.com>
5675
5676 * pthread_key_create.c: Terminate search after an unused key was found.
5677 Patch by Luca Barbieri <ldb@ldb.ods.org>.
5678
5679 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
5680 Patch by Luca Barbieri <ldb@ldb.ods.org>.
5681
56822002-10-10 Ulrich Drepper <drepper@redhat.com>
5683
5684 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
5685 dynamic lookup for errno in PIC.
5686
5687 * allocatestack.c (get_cached_stack): Rearrange code slightly to
5688 release the stack lock as soon as possible.
5689 Call _dl_allocate_tls_init for TCB from the cache to re-initialize
5690 the static TLS block.
5691 (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
5692
5693 * cancellation.c: Renamed from cancelation.c.
5694 * Makefile: Adjust accordingly.
5695 * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
5696 * cleanup_defer.c: Use CANCELLATION_P.
5697 * pthread_testcancel.c: Likewise.
5698 * descr.h: Fix spelling in comments.
5699 * init.c: Likewise.
5700 * pthread_getattr_np.c: Likewise.
5701 * pthread_getschedparam.c: Likewise.
5702 * pthread_setschedparam.c: Likewise.
5703 * Versions: Likewise.
5704
5705 * pt-pselect.c: New file.
5706 * Makefile (libpthread-routines): Add pt-pselect.
5707 * Versions: Add pselect.
5708
5709 * tst-cancel4.c: New file.
5710 * Makefile (tests): Add tst-cancel4.
5711
57122002-10-09 Ulrich Drepper <drepper@redhat.com>
5713
5714 * pthread_mutex_lock.c: Always record lock ownership.
5715 * pthread_mutex_timedlock.c: Likewise.
5716 * pthread_mutex_trylock.c: Likewise.
5717
5718 * pt-readv.c: New file.
5719 * pt-writev.c: New file.
5720 * pt-creat.c: New file.
5721 * pt-msgrcv.c: New file.
5722 * pt-msgsnd.c: New file.
5723 * pt-poll.c: New file.
5724 * pt-select.c: New file.
5725 * pt-sigpause.c: New file.
5726 * pt-sigsuspend.c: New file.
5727 * pt-sigwait.c: New file.
5728 * pt-sigwaitinfo.c: New file.
5729 * pt-waitid.c: New file.
5730 * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
5731 pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
5732 pt-sigwait, pt-sigwaitinfo, and pt-waitid.
5733 * Versions: Add all the new functions.
5734
5735 * tst-exit1.c: New file.
5736 * Makefile (tests): Add tst-exit1.
5737
5738 * sem_timedwait.c: Minor optimization for more optimal fastpath.
5739
57402002-10-08 Ulrich Drepper <drepper@redhat.com>
5741
5742 * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
5743
5744 * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
5745 call. pthread_join is an official cancellation point.
5746 * pthread_timedjoin.c: Likewise.
5747
5748 * pthread_cond_wait.c: Revert order in which internal lock are dropped
5749 and the condvar's mutex are retrieved.
5750 * pthread_cond_timedwait.c: Likewise.
5751 Reported by dice@saros.East.Sun.COM.
5752
57532002-10-07 Ulrich Drepper <drepper@redhat.com>
5754
5755 * pthreadP.h: Cut out all type definitions and move them...
5756 * sysdeps/unix/sysv/linux/internaltypes.h: ...here. New file.
5757 * pthreadP.h: Include <internaltypes.h>.
5758
5759 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
5760 performance tweaks.
5761
5762 * sem_trywait.c: Shuffle #includes around to get right order.
5763 * sem_timedwait.c: Likewise.
5764 * sem_post.c: Likewise.
5765 * sem_wait.c: Likewise.
5766
5767 * nptl 0.3 released.
5768
5769 * Makefile (tests): Add tst-signal3.
5770 * tst-signal3.c: New file.
5771
57722002-10-05 Ulrich Drepper <drepper@redhat.com>
5773
5774 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
5775 the asms modify the sem object.
5776 (__lll_sem_timedwait): Now takes struct sem* as first parameter.
5777
5778 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
5779 the actual members.
5780 * pthreadP.h (struct sem): New type. Actual semaphore type.
5781 * semaphoreP.h: Include pthreadP.h.
5782 * sem_getvalue.c: Adjust to sem_t change.
5783 * sem_init.c: Likewise.
5784 * sem_open.c: Likewise.
5785 * sem_post.c: Likewise.
5786 * sem_timedwait.c: Likewise.
5787 * sem_trywait.c: Likewise.
5788 * sem_wait.c: Likewise.
5789
57902002-10-04 Ulrich Drepper <drepper@redhat.com>
5791
5792 * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
5793 * tst-basic2.c: New file.
5794 * tst-exec1.c: New file.
5795 * tst-exec2.c: New file.
5796 * tst-exec3.c: New file.
5797
5798 * tst-fork1.c: Remove extra */.
5799
5800 * nptl 0.2 released. The API for IA-32 is complete.