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