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