]> sourceware.org Git - glibc.git/blame - nptl/ChangeLog
Update.
[glibc.git] / nptl / ChangeLog
CommitLineData
abf1cf21
JJ
12003-09-02 Jakub Jelinek <jakub@redhat.com>
2
e29ef647
UD
3 * pthread_condattr_setpshared.c: Include errno.h.
4 (pthread_condattr_setpshared): Return EINVAL if pshared
5 is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
6
5777d565
UD
7 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
8 defined symbol for entry point to avoid cancellation.
9 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
10 Likewise.
11 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
12 Likewise.
13 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
14 Likewise.
15 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
16 Likewise.
17 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
18 Likewise.
19 * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
20 __close_nocancel, __read_nocancel, __write_nocancel,
21 __waitpid_nocancel): Add attribute_hidden. If not in libc.so,
22 libpthread.so or librt.so, define to corresponding function
23 without _nocancel suffix.
24 * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
25 * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
26 * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
27
763d0f40 28
abf1cf21
JJ
29 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
30
8348dcc8
UD
312003-09-02 Ulrich Drepper <drepper@redhat.com>
32
33 * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
1e03e0af 34 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
8348dcc8
UD
35
36 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
37 in subsections has a symbol associated with it.
38
39 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
40 defined symbol for entry point to avoid cancellation.
41 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
42
c874a32e
UD
432003-09-01 Jakub Jelinek <jakub@redhat.com>
44
45 * Makefile (tests): Add tst-tls5.
46 (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
47 ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
48 ($(objpfx)tst-tls5): New.
49 ($(objpfx)tst-tls6.out): Likewise.
50 (tests): Depend on $(objpfx)tst-tls6.out.
51 * tst-tls3.c: Include stdint.h and pthreaddef.h.
52 (do_test): Check pthread_self () return value alignment.
53 * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
54 (tf): Check pthread_self () return value alignment.
55 * tst-tls5.c: New test.
56 * tst-tls5.h: New.
57 * tst-tls5mod.c: New.
58 * tst-tls5moda.c: New.
59 * tst-tls5modb.c: New.
60 * tst-tls5modc.c: New.
61 * tst-tls5modd.c: New.
62 * tst-tls5mode.c: New.
63 * tst-tls5modf.c: New.
64 * tst-tls6.sh: New test.
65
c503d3dc
UD
66 * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
67 ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
68 * init.c (pthread_functions): Initialize them.
69 * forward.c (pthread_cond_timedwait@GLIBC_2.0,
70 pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
71 * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
72 pthread_cond_timedwait@@GLIBC_2.3.2.
73
48614753
JJ
742003-09-01 Jakub Jelinek <jakub@redhat.com>
75
56a1b877
JJ
76 * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
77 * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
78 * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
79 * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
80 * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
81 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
82
83 * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
84
48614753
JJ
85 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
86 _POSIX_THREAD_PRIORITY_SCHEDULING.
87 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
88
28c97261
UD
892003-08-31 Ulrich Drepper <drepper@redhat.com>
90
eef80cf8
UD
91 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
92 nested function, use static inline function from libio.h.
93 Code by Richard Henderson.
94
28c97261
UD
95 * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
96 weak.
97
cd2fbe58
UD
982003-08-30 Jakub Jelinek <jakub@redhat.com>
99
100 * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
101 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
102 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
103 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
104 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
105 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
106 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
107 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
108 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
109 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
110 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
111 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
112 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
113 * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
114 * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
115 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
116 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
117 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
118 * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
119 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
120 * sysdeps/sparc/sparc32/pthreaddef.h: New file.
121 * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
122 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
123 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
124 * sysdeps/sparc/sparc64/pthreaddef.h: New file.
125 * sysdeps/sparc/tls.h: New file.
126 * sysdeps/sparc/tcb-offsets.sym: New file.
127 * sysdeps/sparc/Makefile: New file.
128 * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
129 * init.c [__sparc__] (__NR_set_tid_address): Define.
130
feda52c0
UD
1312003-08-29 Jakub Jelinek <jakub@redhat.com>
132
133 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
134 _IO_release_lock): Define.
135
7c868816
JJ
1362003-08-29 Jakub Jelinek <jakuB@redhat.com>
137
0261d33f 138 * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
7c868816
JJ
139 sigemptyset before sigaddset. Reported by jreiser@BitWagon.com.
140
68b9e1ae
UD
1412003-08-27 Ulrich Drepper <drepper@redhat.com>
142
143 * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
144 (__pthread_cleanup_class): Add missing return types of member
145 functions.
146
13b3edfc
UD
1472003-08-26 Steven Munroe <sjmunroe@us.ibm.com>
148
149 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
150 (lll_mutex_unlock_force): Add memory barrier between store and futex
151 syscall.
152
bb606fbe
UD
1532003-08-25 Ulrich Drepper <drepper@redhat.com>
154
155 * tst-cancel4.c (do_test): Also unlink tempfname and remove
156 tempmsg in first loop.
157
ee4e5a3d
UD
1582003-08-18 Ulrich Drepper <drepper@redhat.com>
159
160 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
161 _POSIX_THREAD_PRIORITY_SCHEDULING.
162 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
163
334fcf2a
UD
1642003-08-07 Jakub Jelinek <jakub@redhat.com>
165
166 * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
167 (__rtld_lock_default_lock_recursive,
168 __rtld_lock_default_unlock_recursive): Define.
169 [_LIBC && SHARED] (__rtld_lock_lock_recursive,
170 __rtld_lock_unlock_recursive): Define using
171 GL(_dl_rtld_*lock_recursive).
172 * init.c (__pthread_initialize_minimal_internal): Initialize
173 _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
174 Lock GL(_dl_load_lock) the same number of times as
175 GL(_dl_load_lock) using non-mt implementation was nested.
176
177 * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
178 * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
179
a30fb2df
UD
1802003-08-06 Jakub Jelinek <jakub@redhat.com>
181
182 * tst-cancel17.c (do_test): Make len2 maximum of page size and
183 PIPE_BUF.
184
ce0d30a0
JJ
1852003-08-07 Jakub Jelinek <jakub@redhat.com>
186
187 * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
188
9c988b83
UD
1892003-08-03 Jakub Jelinek <jakub@redhat.com>
190
191 * sysdeps/pthread/createthread.c (do_clone): Move error handling
192 to first syscall error check. Move syscall error check for tkill
193 into __ASSUME_CLONE_STOPPED #ifdef.
194
5c5252bd
UD
1952003-08-02 Ulrich Drepper <drepper@redhat.com>
196
f1205aa7
UD
197 * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
198 is not defined, do explicit synchronization.
199 (create_thread): Do not lock pd->lock here. If __ASSUME_CLONE_STOPPED
200 is not defined also unlock pd->lock for non-debugging case in case
201 it is necessary.
202 * pthread_create.c (start_thread): Always get and release pd->lock
203 if __ASSUME_CLONE_STOPPED is not defined.
204 (start_thread_debug): Removed. Adjust users.
205 * allocatestack.c (allocate_stack): Always initialize lock if
206 __ASSUME_CLONE_STOPPED is not defined.
207 * Makefile (tests): Add tst-sched1.
208 * tst-sched1.c: New file.
209
5c5252bd
UD
210 * sysdeps/pthread/createthread.c (do_clone): Only use
211 sched_setschduler and pass correct parameters.
212
973d66e4
UD
2132003-07-31 Jakub Jelinek <jakub@redhat.com>
214
215 * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
216 pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
217 PTHREAD_STACK_MIN in comments.
218
d347a4ab
UD
2192003-07-31 Jakub Jelinek <jakub@redhat.com>
220
221 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
222 Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
223 argument.
224 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
225 * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
226 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
227 (__pthread_cleanup_upto): Fix prototype.
228 (_longjmp_unwind): Adjust caller.
229 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
230 Change second argument to const struct pointer.
231 * tst-sem8.c (main): Remove unused s2 and s3 variables.
232 * tst-sem9.c (main): Likewise.
233 * unwind.c: Include string.h for strlen prototype.
234
1b26e9a5
UD
2352003-07-31 Ulrich Drepper <drepper@redhat.com>
236
237 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
238 (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
239 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
240 Define HAVE_CMOV.
241 Patch by Nicholas Miell <nmiell@attbi.com>.
242
adc12574
UD
2432003-07-30 Jakub Jelinek <jakub@redhat.com>
244
245 * init.c (__pthread_initialize_minimal_internal): Initialize
246 GL(dl_init_static_tls).
247 * pthreadP.h (__pthread_init_static_tls): New prototype.
248 * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
249 New functions.
250 * Makefile (tests): Add tst-tls4.
251 (modules-names): Add tst-tls4moda and tst-tls4modb.
252 ($(objpfx)tst-tls4): Link against libdl and libpthread.
253 ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
254 tst-tls4modb.so.
255 * tst-tls4.c: New file.
256 * tst-tls4moda.c: New file.
257 * tst-tls4modb.c: New file.
258
a7f6c66e
RM
2592003-06-19 Daniel Jacobowitz <drow@mvista.com>
260
261 * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
262 before __timer_dealloc.
263 * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
264 Don't call list_unlink.
265
172ce013
RM
2662003-07-29 Roland McGrath <roland@redhat.com>
267
268 * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
269
7b787f85
UD
2702003-07-25 Jakub Jelinek <jakub@redhat.com>
271
272 * tst-cancel17.c (do_test): Check if aio_cancel failed.
273 Don't reuse struct aiocb A if it failed.
274 Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
275 not just one byte, as that does not block.
276
0e9d6240
UD
2772003-07-22 Jakub Jelinek <jakub@redhat.com>
278
9d79e037
UD
279 * sysdeps/pthread/unwind-resume.c: New file.
280 * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
281 unwind-resume in csu subdir.
282 (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
283 exceptions.
284 (librt-sysdep_routines, librt-shared-only-routines): Add
285 rt-unwind-resume.
286 * sysdeps/pthread/rt-unwind-resume.c: New file.
287 * unwind-forcedunwind.c: New file.
288 * Makefile (libpthread-routines): Add unwind-forcedunwind.
289 (libpthread-shared-only-routines): Likewise.
290 (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
291 * pthreadP.h (pthread_cancel_init): New prototype.
292 * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
293
294 * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
295 attr argument const struct pthread_attr *.
296
0e9d6240
UD
297 * res.c (__res_state): Return __resp.
298 * descr.h: Include resolv.h.
299 (struct pthread): Add res field.
300 * pthread_create.c: Include resolv.h.
301 (start_thread): Initialize __resp.
302 * Makefile (tests): Add tst-_res1.
303 (module-names): Add tst-_res1mod1, tst-_res1mod2.
304 ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
305 ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
306 libpthread.
307 * tst-_res1.c: New file.
308 * tst-_res1mod1.c: New file.
309 * tst-_res1mod2.c: New file.
310
1a379ea0
UD
3112003-07-21 Ulrich Drepper <drepper@redhat.com>
312
7e939b21
UD
313 * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
314
1a379ea0
UD
315 * Makefile: Define various *-no-z-defs variables for test DSOs
316 which has undefined symbols.
317
ca86a763
UD
3182003-07-21 Steven Munroe <sjmunroe@us.ibm.com>
319
320 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
321 Retry if the stwcx fails to store once_control.
322
80f536db
UD
3232003-07-20 Ulrich Drepper <drepper@redhat.com>
324
325 * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
326 pthread_attr_setaffinity.
327 * Versions [libpthread] (GLIBC_2.3.3): Likewise.
328 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
329 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
330 * pthread_attr_destroy.c: Free cpuset element if allocated.
331 * pthread_create.c: Pass iattr as additional parameter to
332 create_thread.
333 * sysdeps/pthread/createthread.c: If attribute is provided and
334 a new thread is created with affinity set or scheduling parameters,
335 start thread with CLONE_STOPPED.
336 * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
337 pthread_attr_setaffinity.
338 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
339 cpuset element.
340
73299943
UD
3412003-07-15 Ulrich Drepper <drepper@redhat.com>
342
343 * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
344
da35d15e
UD
3452003-07-14 Ulrich Drepper <drepper@redhat.com>
346
347 * sysdeps/pthread/configure.in: Require CFI directives also for
348 ppc and s390.
349
75540d8a
UD
3502003-07-15 Jakub Jelinek <jakub@redhat.com>
351
352 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
353 Add cfi directives.
354
4a17085f
UD
3552003-07-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
356
357 * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
358 CLEANUP_JMP_BUF.
359 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
360 registers as variables. Call __pthread_mutex_unlock_usercnt.
361 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
362 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
363 not self pointer in __writer. Compare with TID to determine
364 deadlocks.
365 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
366 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
367 Likewise.
368 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
369 Likewise.
370 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
371 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
372 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
373 macros also when compiling librt.
374
6080ecdf
UD
3752003-07-11 Jakub Jelinek <jakub@redhat.com>
376
377 * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
378 -fasynchronous-unwind-tables.
379 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
380 (PSEUDO): Add cfi directives.
381 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
382 Likewise.
383 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
384 Likewise.
385
da0c02ee
UD
3862003-07-08 Jakub Jelinek <jakub@redhat.com>
387
388 * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
389 __pthread_unregister_cancel): Add prototypes and hidden_proto.
390 * unwind.c (__pthread_unwind_next): Add hidden_def.
391 * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
392 Likewise.
393 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
394 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
395 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
396 Likewise.
397 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
398 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
399 Likewise.
400 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
401 HIDDEN_JUMPTARGET to call __pthread_register_cancel,
402 __pthread_unregister_cancel and __pthread_unwind_next.
403
57a5ea02
UD
4042003-07-04 Jakub Jelinek <jakub@redhat.com>
405
406 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
407 different symbol for the cancellation syscall wrapper and
408 non-cancellation syscall wrapper.
409 (PSEUDO_END): Define.
410
d810b358
UD
4112003-07-05 Richard Henderson <rth@redhat.com>
412
413 * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
414 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
415 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
416 return actual return value from the syscall, not 0.
417
db54f488
UD
4182003-07-07 Ulrich Drepper <drepper@redhat.com>
419
420 * descr.h (struct pthread): Add pid field.
421 * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
422 (__reclaim_stacks): Likewise.
423 * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
424 also check for PID of the signal source.
425 (__pthread_initialize_minimal_internal): Also initialize pid field
426 of initial thread's descriptor.
427 * pthread_cancel.c: Use tgkill instead of tkill if possible.
428 * sysdeps/unix/sysv/linux/fork.c: Likewise.
429 * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
430 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
431 * sysdeps/unix/sysv/linux/raise.c: Likewise.
432
5e497a41
UD
4332003-07-05 Ulrich Drepper <drepper@redhat.com>
434
435 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
436 Fix use of parameter.
437 (__libc_cleanup_pop): Likewise.
438
86a0c4fa
UD
4392003-07-04 Ulrich Drepper <drepper@redhat.com>
440
441 * init.c (sigcancel_handler): Change parameters to match handler
442 for SA_SIGACTION. Check signal number and code to recognize
443 invalid invocations.
444
bdbecaa3
RM
4452003-07-03 Roland McGrath <roland@redhat.com>
446
447 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
448 Apply sizeof (struct pthread) bias to r13 value.
449
56421b23
UD
4502003-07-03 Ulrich Drepper <drepper@redhat.com>
451
fbd90f6c
UD
452 * sysdeps/pthread/configure.in: Require CFI directives.
453
56421b23
UD
454 * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
455 definition.
456 * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
457 libpthread compilation.
458 * unwind.c (__pthread_unwind): Add hidden_def.
459 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
460
ca2b4cd7
UD
4612003-07-01 Ulrich Drepper <drepper@redhat.com>
462
463 * libc-cancellation.c (__libc_cleanup_routine): Define.
464 * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
465 (__pthread_cleanup_pop): Define.
466
f036e569
UD
4672003-07-01 Richard Henderson <rth@redhat.com>
468
469 * sysdeps/alpha/elf/pt-initfini.c: New file.
470 * sysdeps/alpha/pthread_spin_lock.S: New file.
471 * sysdeps/alpha/pthread_spin_trylock.S: New file.
472 * sysdeps/alpha/pthreaddef.h: New file.
473 * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
474 * sysdeps/alpha/tls.h: New file.
475 * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
476 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
477 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
478 * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
479 * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
480 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
481 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
482 * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
483 * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
484 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
485
3b985826
UD
4862003-07-01 Ulrich Drepper <drepper@redhat.com>
487
488 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
489 cleanup support and unwind info.
490
3a4d1e1e
UD
4912003-06-30 Ulrich Drepper <drepper@redhat.com>
492
493 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
494 Use correct cleanup handler registration. Add unwind info.
96c814d3
UD
495 * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
496 * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
3a4d1e1e
UD
497 * tst-once3.c: Add cleanup handler and check it is called.
498 * tst-once4.c: Likewise.
499 * tst-oncex3.c: New file.
500 * tst-oncex4.c: New file.
501 * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
502
e479cc8e
UD
5032003-06-29 Ulrich Drepper <drepper@redhat.com>
504
505 * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
506
7d7ff54c
UD
5072003-06-27 Ulrich Drepper <drepper@redhat.com>
508
483e95d0
UD
509 * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
510 (tf_msgsnd): Likewise.
511
7d7ff54c
UD
512 * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
513 premature returns a bit more.
514
7539c7ec
UD
5152003-06-26 Ulrich Drepper <drepper@redhat.com>
516
517 * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
518 definition to the front.
519
520 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
521 the cleanup functions to make the names unique. Fix dwarf opcode
522 un unwind table.
523 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
524 functions to make the names unique. Fix CFA offset for two blocks.
525
0af6a1d9
UD
5262003-06-25 Ulrich Drepper <drepper@redhat.com>
527
528 * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
529 missing closing braces.
530 Patch by Christophe Saout <christophe@saout.de>.
531
eef4a9f3
RM
5322003-06-24 Roland McGrath <roland@redhat.com>
533
534 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
535
4165d44d
UD
5362003-06-24 Ulrich Drepper <drepper@redhat.com>
537
7f8f7b9d
UD
538 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
539 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
540
4165d44d
UD
541 * pthreadP.h: Declare __find_thread_by_id.
542 * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
543 * pthread_clock_gettime.c: Allow using other thread's clock.
544 * pthread_clock_settime.c: Likewise.
545 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
546 * Makefile: Add rules to build and run tst-clock2.
547 * tst-clock2.c: New file.
548
67b78ef9
UD
5492003-06-23 Ulrich Drepper <drepper@redhat.com>
550
551 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
552 to use exception-based cleanup handler.
553 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
554
555 * tst-cond8.c (ch): Announce that we are done.
556
557 * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
558
559 * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
560 Also test aio_suspend with timeout value.
561
61623643
UD
5622003-06-22 Ulrich Drepper <drepper@redhat.com>
563
3a4f2043
UD
564 * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
565 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
566 attribute_hidden.
567
61623643
UD
568 * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
569 (__pthread_mutex_lock_internal): Likewise.
570 (__pthread_mutex_unlock_internal): Likewise.
571 (__pthread_mutex_unlock_usercnt): Declare.
572 * pthread_mutex_destroy.c: Always fail if used in any way.
573 * pthread_mutex_init.c: Update comment.
574 * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
575 * pthread_mutex_timedlock.c: Adjust __nusers.
576 * pthread_mutex_trylock.c: Adjust __nusers.
577 * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
578 and public interfaces are wrapper with pass additional parameter.
579 __pthread_mutex_unlock_usercnt does not adjust __nusers if second
580 parameter zero.
581 * tst-mutex8.c: New file.
582 * Makefile (tests): Add tst-mutex8.
583 * sysdeps/pthread/pthread_cond_timedwait.c: Call
584 __pthread_mutex_unlock_usercnt.
585 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
586 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
587 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
588 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
589 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
590 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
591 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
592 Add __nusers.
593 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
594 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
595 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
596 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
597 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
598
599 * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
600 * pthread_mutex_timedlock.c: Likewise.
601 * pthread_mutex_trylock.c: Adjust __nusers.
602 * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
603 * tst-mutex9.c: New file.
604 * Makefile (tests): Add tst-mutex9.
605 * sysdeps/i386/tls.h: Remove THREAD_ID definition.
606 * sysdeps/ia64/tls.h: Likewise.
607 * sysdeps/powerpc/tls.h: Likewise.
608 * sysdeps/s390/tls.h: Likewise.
609 * sysdeps/sh/tls.h: Likewise.
610 * sysdeps/x86_64/tls.h: Likewise.
611 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
612 Change type of __owner.
613 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
614 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
615 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
616 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
617 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
618
9bdabb94
UD
6192003-06-19 Jakub Jelinek <jakub@redhat.com>
620
621 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
622 * sysdeps/unix/sysv/linux/sem_post.c: ...here.
623
624 * sysdeps/unix/sysv/linux/sem_post.c: Move to...
625 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here. Pass nr + 1
626 instead of nr to lll_futex_wake. Only set errno and return -1
627 if err < 0.
628
629 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
630 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
631 return actual return value from the syscall, not 0.
632
f6c93bd9
UD
6332003-06-18 Ulrich Drepper <drepper@redhat.com>
634
ca343e73
UD
635 * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
636 find a random value.
637 (tf_msgrcv): Likewise. Also don't report msgrcv returns if
638 errno==EIDRM.
639
50441a98
UD
640 * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
641 compat_timer_settime.
642 * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
643 compat_timer_gettime.
644 * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
9bdabb94 645 compat_timer_getoverrun.
50441a98
UD
646 * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
647 compat_timer_delete.
648
f6c93bd9
UD
649 * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
650 error-checking mutex detect busy mutexes.
651
047aec8f
UD
6522003-06-17 Ulrich Drepper <drepper@redhat.com>
653
1d53508d
UD
654 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
655 Add ax to clobber list.
656 (lll_mutex_cond_lock): Likewise.
657 (lll_mutex_unlock): Likewise.
658 (lll_lock): Likewise.
659 (lll_unlock): Likewise.
660
f23b30e2
UD
661 * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
662 * tst-cancel18.c: New file.
663 * tst-cancelx18.c: New file.
664
665 * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
666 and tcdrain.
667
668 * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
669 * tst-cancel17.c: New file.
670 * tst-cancelx17.c: New file.
671
672 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
673 * sysdeps/unix/sysv/linux/sigwait.c: New file.
674 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
675
047aec8f
UD
676 * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
677
bbde8527
UD
6782003-06-16 Jakub Jelinek <jakub@redhat.com>
679
680 * sysdeps/pthread/createthread.c (create_thread): Set
681 header.multiple_threads unconditionally.
682 * allocatestack.c (allocate_stack): Likewise.
683 * descr.h (struct pthread): Add header.multiple_threads
684 unconditionally.
685 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
686 Define for librt. #error if neither libpthread, libc nor librt.
687 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
688 Likewise.
689 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
690 CDISABLE): Likewise.
691 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
692 CDISABLE): Likewise.
693 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
694 CDISABLE): Likewise.
695 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
696 CDISABLE): Likewise. Access header.multiple_threads outside of
697 libc and libpthread.
698 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
699 Likewise.
700 * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
701 * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
702
26676450
UD
7032003-06-17 Ulrich Drepper <drepper@redhat.com>
704
705 * tst-cancel4.c: Add tests for the socket and signal functions, pause.
706 Also test early cancellation before the thread reaches the cancellation
707 point.
708
709 * Makefile: Compile forward.c with exceptions.
710
711 * sysdeps/unix/sysv/linux/sleep.c: New file.
712
301a6724
UD
7132003-06-16 Ulrich Drepper <drepper@redhat.com>
714
0e0deb03
UD
715 * Makefile: Add CFLAGS definition to compile function wrappers
716 duplicated from libc with exceptions.
717 * tst-cancel4.c: Also check cancellation handlers.
718
301a6724
UD
719 * Makefile: Add rules to build and run tst-cancel16 and
720 tst-cancelx16. Add missing CFLAGS definitions.
721 * tst-cancel16.c: New file.
722 * tst-cancelx16.c: New file.
723
7a114794
UD
7242003-06-15 Ulrich Drepper <drepper@redhat.com>
725
452aea84
UD
726 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
727 (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
728 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
729 (DL_SYSINFO_IMPLEMENTATION): Likewise.
730
7a114794
UD
731 * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
732 (LIBC_CANCEL_RESET): Likewise.
733 Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
734 * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
735 librt-cancellation.
736 (CFLAGS-libcrt-cancellation.c): Define.
737 * sysdeps/pthread/librt-cancellation.c: New file.
738 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
739 macros also when compiling librt.
740 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
741 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
742 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
743 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
744 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
745 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
746 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
747
748 * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
749 compat_timer_create.
750
8ba1d429
UD
7512003-06-14 Ulrich Drepper <drepper@redhat.com>
752
cc8fb6f3
UD
753 * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
754
8ba1d429
UD
755 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
756 __register_atfork.
757 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
758 Add libc_hidden_def.
759
d4f100e2
RM
7602003-06-13 Roland McGrath <roland@redhat.com>
761
762 * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
763 constant from <sys/reg.h> to ps_get_thread_area, not register contents.
764
dd9423a6
UD
7652003-06-11 Ulrich Drepper <drepper@redhat.com>
766
767 * allocatestack.c (queue_stack): Always inline.
768 * ptreadhP.h (__do_cancel): Likewise.
769
ed24330d
JJ
7702003-06-10 Jakub Jelinek <jakub@redhat.com>
771
772 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
773 a typo.
774
06120d79
UD
7752003-06-10 Ulrich Drepper <drepper@redhat.com>
776
777 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
778 (__pthread_cond_signal): Remove incorrect second addition for
779 cond_lock!=0.
780
b1720346
UD
7812003-06-09 Ulrich Drepper <drepper@redhat.com>
782
5b318f85
UD
783 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
784 (__pthread_cond_signal): Use correct futex pointer in
785 __lll_mutex_lock_wait call.
786
b1720346
UD
787 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
788 (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
789
3e36c37d
UD
7902003-06-08 Ulrich Drepper <drepper@redhat.com>
791
ecf7955d
UD
792 * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
793 cancelable.
ed24330d 794 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
ecf7955d
UD
795 Likewise.
796
3e36c37d
UD
797 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
798 hand-written CFI generation code. Since ENTRY/END also initiated
799 CFI frames this caused two CFI sets to be generated.
800
7726edc2
UD
8012003-06-07 Ulrich Drepper <drepper@redhat.com>
802
803 * cleanup_routine.c: New file.
804 * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
805 * sysdeps/pthread/pthread.h: Add support for fully exception-based
806 cleanup handling.
807 * Makefile (libpthread-routines): Add cleanup_routine.
808 Add more CFLAGS variables to compile with exceptions. Add comments
809 why which file needs unwind tables.
810 (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
811 tests.
812 * tst-cancelx1.c: New file.
813 * tst-cancelx2.c: New file.
814 * tst-cancelx3.c: New file.
815 * tst-cancelx4.c: New file.
816 * tst-cancelx5.c: New file.
817 * tst-cancelx6.c: New file.
818 * tst-cancelx7.c: New file.
819 * tst-cancelx8.c: New file.
820 * tst-cancelx9.c: New file.
821 * tst-cancelx10.c: New file.
822 * tst-cancelx11.c: New file.
823 * tst-cancelx12.c: New file.
824 * tst-cancelx13.c: New file.
825 * tst-cancelx14.c: New file.
826 * tst-cancelx15.c: New file.
827 * tst-cleanupx0.c: New file.
828 * tst-cleanupx0.expect: New file.
829 * tst-cleanupx1.c: New file.
830 * tst-cleanupx2.c: New file.
831 * tst-cleanupx3.c: New file.
832
833 * tst-cleanup0.c: Make standard compliant.
834 * tst-cleanup1.c: Likewise.
835
836 * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
837 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
838 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
839 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
840 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
841 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
842 * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
843 CLEANUP_JMP_BUF.
844 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
845 * tst-cancel12.c: New file.
846 * tst-cancel13.c: New file.
847 * tst-cancel14.c: New file.
848 * tst-cancel15.c: New file.
849 * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
850 and tst-cancel15.
851
852 * tst-cancel1.c: Add some comments.
853
854 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
855 timeout correctly.
856
7a8a8e21
UD
8572003-06-06 Ulrich Drepper <drepper@redhat.com>
858
859 * Makefile (CFLAGS-pthread_cancel.c): Define.
860
4ad0bbf4
UD
8612003-06-05 Ulrich Drepper <drepper@redhat.com>
862
863 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
864 Change type of __writer element to int.
865 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
866 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
867 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
868 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
869 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
870 * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
871 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
872 * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
873 Compare with TID to determine deadlocks.
874 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
875 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
876 * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
877 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
878 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
879 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
880 Likewise.
881 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
882 Likewise.
883 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
884 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
885 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
886 Likewise.
887 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
888 Likewise.
889 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
890 * Makefile (tests): Add tst-rwlock12.
891 * tst-rwlock12.c: New file.
892
332faa96
JJ
8932003-06-05 Jakub Jelinek <jakub@redhat.com>
894
895 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
896 __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
897 Remove bogus hidden_proto.
898 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
899 Likewise.
900 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
901 lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
902 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
903 ___lll_mutex_timedlock): Likewise.
904
29d9e2fd
UD
9052003-06-04 Ulrich Drepper <drepper@redhat.com>
906
907 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
908 (__pthread_cond_signal): Add some code to eventually handle
909 cond_lock!=0.
910
6f1acb30
UD
9112003-06-01 Ulrich Drepper <drepper@redhat.com>
912
913 * Makefile (tests): Add tst-exec4.
914 (tst-exec4-ARGS): Define.
915 * tst-exec4.c: New file.
916
49b65043
UD
9172003-05-31 Ulrich Drepper <drepper@redhat.com>
918
31195be2
UD
919 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
920 Also fail if tv_nsec < 0.
921 (__lll_timedwait_tid): Likewise.
922 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
923 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
924 Likewise.
925 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
926 Likewise.
927 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
928 Likewise.
929 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
930 Likewise.
80b54217
UD
931 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
932 Likewise.
933 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
934 Likewise.
31195be2 935
dcfc8224
UD
936 * Makefile (tests): Add tst-sem8 and tst-sem9.
937 * tst-sem8.c: New file.
938 * tst-sem9.c: New file.
939 * sem_open.c: Fix creation of in_use record if the file exists but
940 no internal record.
941
49b65043
UD
942 * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
943 definitions.
944
945 * sysdeps/pthread/timer_create.c (timer_create): In case
946 evp==NULL, assign timer ID to sival_ptr.
947
948 * descr.h (struct pthread_unwind_buf): Change type of prev element to
949 struct pthread_unwind_buf *.
950 (struct pthread): Likewise for cleanup_jmp_buf element.
951
952 * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
953 * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
954 * unwind.c (__pthread_unwind_next): Likewise.
955
50794a45
UD
9562003-05-30 Ulrich Drepper <drepper@redhat.com>
957
5d4f57bd
UD
958 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
959 (lll_futex_timed_wait): Use int for futex value parameter.
960 (lll_futex_wake): Likewise.
961 (lll_futex_requeue): Likewise.
962
963 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
964 Replace one memory operation with one register operation.
965
966 * tst-join4.c (do_test): Fix error message.
967
7ab7ea33
UD
968 * tst-rwlock6.c (do_test): Use correct format specifier.
969
970 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
971 (__lll_mutex_lock_wait): Replace one memory operation with one
972 register operation.
973 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
974 (__lll_mutex_lock_wait): Likewise.
975
50794a45
UD
976 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
977 (__lll_mutex_cond_lock): Add one to value parameter of
978 __lll_lock_wait to reflect reality in the futex syscall.
979 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
980 (lll_mutex_cond_lock): Likewise.
981
5a70784e
JJ
9822003-05-30 Jakub Jelinek <jakub@redhat.com>
983
984 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
985 New function.
986 (lll_mutex_cond_lock): Define.
987
e7c5ac68
UD
9882003-05-29 Ulrich Drepper <drepper@redhat.com>
989
586d1748
UD
990 * Makefile (tests): Add tst-signal6.
991 * tst-signal6.c: New file.
992
b8ba4a27
UD
993 * sysdeps/unix/sysv/linux/s390/lowlevellock.h
994 (__lll_mutex_unlock_force): New function
995 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
996
65d46efe
UD
997 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
998 (__lll_mutex_unlock_force): New function.
999 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
1000
1001 * tst-rwlock7.c (do_test): Use correct format specifier.
1002
e7c5ac68
UD
1003 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
1004 Find break parameter in correct asm argument.
1005
284bdc42
UD
10062003-05-27 Jakub Jelinek <jakub@redhat.com>
1007
1008 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
1009 Remove out4.
1010 (lll_futex_requeue): Fix __o3 constraint, return negative errno if
1011 error occured.
1012 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
1013 Add __mutex.
1014 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
1015 lll_futex_requeue, lll_mutex_unlock_force): Define.
1016
e7c5ac68
UD
10172003-05-30 Jakub Jelinek <jakub@redhat.com>
1018
1019 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
1020 (pthread_cond_t): Add __mutex.
1021 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
1022 lll_futex_requeue, lll_mutex_unlock_force): Define.
1023
ea2630c6
UD
10242003-05-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1025
1026 * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
1027 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
1028 Add __mutex field.
1029 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
1030 Define.
1031 (lll_futex_wait, lll_futex_wake): Define.
1032 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
1033 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
1034 FUTEX_REQUEUE instead of FUTEX_WAIT.
1035 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
1036 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
1037 mutex which was used in condvar structure. Call
1038 __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
1039 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
1040
1041 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
1042 include tcb-offsets.h. Read wakeup value in locked region.
1043 Use the value of gbr register as THREAD_ID.
1044 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1045 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
1046 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
1047
1048 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
1049 macros.
1050
5a77f150
UD
10512003-05-28 Ulrich Drepper <drepper@redhat.com>
1052
1053 * sysdeps/pthread/pthread_cond_broadcast.c
1054 (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
1055
7661d9f7
UD
10562003-05-26 Ulrich Drepper <drepper@redhat.com>
1057
1058 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
1059 typo in register name.
1060 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
1061 correctly. Actually use requeue. Little optimization.
1062 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
1063 mutex address early. Handle cancellation state as 32-bit value.
1064 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1065 Remove unnecessary label.
1066
69431c9a
UD
10672003-05-25 Ulrich Drepper <drepper@redhat.com>
1068
1069 * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
1070 instead of FUTEX_WAIT.
1071 * sysdeps/pthread/pthread_cond_signal.c: Likewise.
1072 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
1073 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
1074 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
1075 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
1076 * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
1077 used in condvar structure. Call __pthread_mutex_cond_lock instead
1078 of __pthread_mutex_lock_internal.
1079 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1080 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1081 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
1082 (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
1083 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1084 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1085 * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
1086 Add pthread_mutex_cond_lock.
1087 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
1088 * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
1089 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
1090 lll_mutex_cond_lock.
1091 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1092 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
248a3490 1093 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
69431c9a 1094 Add __mutex field.
248a3490 1095 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
69431c9a
UD
1096 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1097
1098 * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
1099 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
1100
1101 * pthreadP.h: Declare __pthread_mutex_cond_lock.
1102 * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
1103 Use it instead of lll_mutex_lock. If __pthread_mutex_lock is a
1104 macro don't define aliases.
1105
1106 * cancellation.c: Remove __pthread_enable_asynccancel_2.
1107 * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
1108 * sysdeps/pthread/pthread_cond_timedwait.c: Use
1109 __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
1110 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1111 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1112 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
1113 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1114 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1115
fddfebbd
UD
11162003-05-17 Ulrich Drepper <drepper@redhat.com>
1117
1118 * sem_open.c: Fix one endless loop. Implement correct semantics
1119 wrt opening the same semaphore more then once.
1120 * sem_close.c: Adjust for sem_open change.
1121 * semaphoreP.h: Include <semaphore.h>. Define struct inuse_sem.
1122 Declare __sem_mappings, __sem_mappings_lock, __sem_search.
1123 * Makefile (tests): Add tst-sem7.
1124 * tst-sem7.c: New file.
1125
1eefffb0
RM
11262003-05-16 Roland McGrath <roland@redhat.com>
1127
1128 * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
1129 uninitialized variable braino.
1130
6e66dc78
UD
11312003-05-16 Ulrich Drepper <drepper@redhat.com>
1132
23ae6451
UD
1133 * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
1134 test for syscall availability.
1135
1136 * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
1137 __no_posix_timers to -1 if the syscalls don't exist.
1138
7ac5b8e2
UD
1139 * pthread_join.c (pthread_join): Set tid field of the joined
1140 thread to -1. This isn't necessary but helps to recognize some
1141 error conditions with almost no cost.
1142
1143 * allocatestack.c (FREE_P): Also negative values indicate an
1144 unused stack.
1145
6e66dc78
UD
1146 * unwind.c: Include <unistd.h>.
1147
855dba3c
UD
11482003-05-14 Ulrich Drepper <drepper@redhat.com>
1149
1150 * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
1151
81f3ac4c
UD
11522003-05-14 Jakub Jelinek <jakub@redhat.com>
1153
1154 * Makefile (crti-objs, crtn-objs): New variables.
1155 (omit-deps, extra-objs): Add crtn.
1156 ($(objpfx)libpthread.so): Depend on both crti and crtn
1157 and links to them in multidir.
1158 ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
1159
7158eae4
UD
11602003-05-12 Steven Munroe <sjmunroe@us.ibm.com>
1161
1162 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1163 (lll_mutex_unlock): Use atomic_exchange_rel.
1164
edf205d5
UD
11652003-05-11 Ulrich Drepper <drepper@redhat.com>
1166
1167 * cond-perf.c (cons): Add missing locking around setting of alldone.
1168
a3f979a7
UD
11692003-05-10 Ulrich Drepper <drepper@redhat.com>
1170
1171 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
1172 related macros.
1173 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
1174
880867a4
UD
11752003-05-09 Ulrich Drepper <drepper@redhat.com>
1176
949ec764
UD
1177 * tst-sem6.c: New file.
1178 * Makefile (tests): Add tst-sem6.
1179
1180 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
1181 Use atomic_exchange_rel instead of atomic_exchange.
1182 * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
1183 Likewise.
1184
1185 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
1186 code for lll_futex_wait and lll_futex_wake in static apps. Use
1187 vsyscall is possible.
1188
1189 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
1190 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
1191 * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
1192 pthread_setaffinity_np.
1193 * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
1194 and pthread_setaffinity_np.
1195 * Makefile (libpthread-routines): Add pthread_getaffinity and
1196 pthread_setaffinity.
1197
880867a4
UD
1198 * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
1199 use it in case mmap to allocate the stack fails.
1200 * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
1201 ARCH_MAP_FLAGS here.
1202 * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
1203 ARCH_RETRY_MMAP.
1204
92d83c72
UD
12052003-05-08 Ulrich Drepper <drepper@redhat.com>
1206
1207 * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
1208 handler implementation. It is now lockless in fork().
1209 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
1210 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
1211 * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>. Don't
1212 declare the __fork_*_lists.
1213 (struct fork_handler): Include pointers to all three functions.
1214 Add next, refcntr and need_signal elements.
1215 (__fork_handlers): New declaration.
1216 (__register_atfork_malloc): Remove declaration.
1217 (HAVE_register_atfork_malloc): Remove definition.
1218 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
1219 __pthread_child_handler variable.
1220 (__libc_pthread_init): Use __register_atfork instead of explicitly
1221 adding to the list.
1222 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
1223 and lll_futex_wake.
1224 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1225
1226 * unwind.c (unwind_cleanup): Print error message and then abort. This
1227 function must never be reached.
1228
1229 * cond-perf.c: New file.
1230
be4d8038
UD
12312003-05-05 Ulrich Drepper <drepper@redhat.com>
1232
1233 * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
1234
c6696b79
RM
12352003-05-04 Roland McGrath <roland@redhat.com>
1236
1237 * Makefile ($(objpfx)../libc.so): New target.
1238
7da168bf
UD
12392003-05-02 Ulrich Drepper <drepper@redhat.com>
1240
1241 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
1242 (pthread_condattr_t): Size is only an int, don't use long for
1243 alignment.
1244 (pthread_mutexattr_t): Likewise.
7da168bf
UD
1245 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
1246 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1247 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1248
9a7178d6
UD
12492003-05-01 Ulrich Drepper <drepper@redhat.com>
1250
1251 * sysdeps/i386/tls.h: Define THREAD_ID.
1252 * sysdeps/ia64/tls.h: Likewise.
1253 * sysdeps/powerpc/tls.h: Likewise.
1254 * sysdeps/s390/tls.h: Likewise.
1255 * sysdeps/sh/tls.h: Likewise.
1256 * sysdeps/x86_64/tls.h: Likewise.
1257 * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
1258 record ownership.
1259 * pthread_mutex_timedlock.c: Likewise.
1260 * pthread_mutex_trylock.c: Likewise.
1261 * pthread_mutex_unlock.c: Likewise.
1262 * pthread_rwlock_trywrlock.c: Likewise.
1263 * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
1264 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
1265 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
1266 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
1267
1268 * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
1269 flag.
1270
a234e27d
UD
12712003-04-29 Jakub Jelinek <jakub@redhat.com>
1272
1273 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
1274 (__SIZEOF_PTHREAD_COND_T): Define to 48.
1275 (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
1276 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
1277 Make __align long long instead of long.
1278 (pthread_rwlock_t): Formatting.
1279 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
1280 (pthread_rwlock_t): Formatting.
1281 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
1282 (pthread_cond_t): Make __align long long instead of long.
1283 (pthread_rwlock_t): Move __flags field to the same position as in
1284 linuxthreads.
1285
f025c136
UD
12862003-04-30 Ulrich Drepper <drepper@redhat.com>
1287
1288 * tst-rwlock6.c (do_test): Use correct printf format specifiers.
1289 * tst-rwlock7.c (do_test): Likewise.
1290
7531ab9e
RM
12912003-04-26 Roland McGrath <roland@redhat.com>
1292
1293 * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
1294
299601a1
UD
12952003-04-22 Jakub Jelinek <jakub@redhat.com>
1296
299601a1
UD
1297 * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
1298 sizeof (struct pthread).
1299 (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
468777e1 1300 1 struct pthread.
299601a1
UD
1301 * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
1302 to 0.
1303 (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
1304 struct pthread.
1305 (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
1306 to 32-bit bytes.
1307 (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
1308 tcbp.
1309 (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
1310 unneccessarily.
1311 (NO_TLS_OFFSET): Define.
299601a1
UD
1312 * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
1313 add TLS_TCB_SIZE unnecessarily.
299601a1 1314
950094f8
RM
13152003-04-22 Roland McGrath <roland@redhat.com>
1316
1317 * Makeconfig (shared-thread-library): Reverse link order to work
1318 around linker bug.
1319
dc2f6455
UD
13202003-04-22 Ulrich Drepper <drepper@redhat.com>
1321
1322 * semaphore.h: Fix typo in comment.
1323
e7608d77
UD
13242003-04-21 Ulrich Drepper <drepper@redhat.com>
1325
6a87ee19
UD
1326 * sysdeps/pthread/sigfillset.c: New file.
1327
e7608d77
UD
1328 * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
1329 * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
1330 * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
1331 * sysdeps/pthread/sigaction.c: Likewise.
1332 * sysdeps/pthread/sigprocmask.c: New file.
1333 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
1334 __SIGRTMIN+1.
1335 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
1336 Block SIGTIMER. Also handle SI_TKILL events and terminate thread
1337 in this case.
1338
0b3df49e
UD
13392003-04-19 Ulrich Drepper <drepper@redhat.com>
1340
58a7a325
UD
1341 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
1342 (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
1343
0b3df49e
UD
1344 * sysdeps/unix/sysv/linux/unregister-atfork.c
1345 (__unregister_atfork): Don't free memory not allocated dynamically.
1346
1347 * semaphore.h: Remove __THROW marker from cancellation points.
1348 * nptl/sysdeps/pthread/pthread.h: Likewise.
1349
7d74651e
UD
13502003-04-18 Ulrich Drepper <drepper@redhat.com>
1351
76a67697
UD
1352 * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
1353 pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
7d74651e
UD
1354 __THROW.
1355
dd9d6538
JJ
13562003-04-16 Jakub Jelinek <jakub@redhat.com>
1357
1358 * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
1359
4ab6f47c
RM
13602003-04-15 Roland McGrath <roland@redhat.com>
1361
1362 * forward.c (__pthread_unwind): Tweak to avoid warning.
1363
162434a6
UD
13642003-04-15 Ulrich Drepper <drepper@redhat.com>
1365
1366 * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
1367
35909161
UD
13682003-04-14 Ulrich Drepper <drepper@redhat.com>
1369
18ddd3aa 1370 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
35909161
UD
1371 overflow CFA advance instructions.
1372 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1373
18a8e730
UD
13742003-04-14 Jakub Jelinek <jakub@redhat.com>
1375
bd4f43b4
UD
1376 * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
1377 * sysdeps/i386/pthread_spin_lock.c: Likewise.
1378 * sysdeps/x86_64/tls.h: Likewise. Define LOCK_PREFIX if not already
1379 defined.
1380
18a8e730
UD
1381 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
1382 DW_CFA_advance_loc2 for .Laddl-.Lsubl.
1383 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
1384 DW_CFA_advance_loc for .Laddl-.Lsubl.
1385
08c765fa
UD
13862003-04-13 Ulrich Drepper <drepper@redhat.com>
1387
18a8e730
UD
1388 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
1389 position-independent unwind data for static libraries.
1390 Add missing unwind info. Add comments.
1391
ad2be852
UD
1392 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
1393 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1394 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
08c765fa
UD
1395 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1396
177d1ad3
UD
13972003-04-12 Ulrich Drepper <drepper@redhat.com>
1398
08c765fa
UD
1399 * Makefile: Make sure all cancellation points are compiled with
1400 exception and asynchronous unwind tables.
1401
177d1ad3
UD
1402 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
1403 which mishandles loading of global object addresses in PIC.
1404 (THREAD_SETMEM_NC): Likewise.
1405
09d65ff3
UD
14062003-04-11 Ulrich Drepper <drepper@redhat.com>
1407
1408 * pthread.h: Define new data structure for cleanup buffer. Declare
1409 new cleanup handler interfaces.
1410 * descr.h: Include <unwind.h> if necessary. Define pthread_unwind_buf.
1411 (struct pthread): Add cleanup_jmp_buf pointer. Define
1412 HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
1413 * pthreadP.h: Declare __pthread_unwind. Define __do_cancel to use
1414 it. Declare old cleanup handler installation functions.
1415 * cleanup.c: Rewrite. Install handler for unwind-based cleanup
1416 handling.
1417 * cleanup_defer.c: Likewise.
1418 * cleanup_compat.c: New file. Old cleanup code.
1419 * cleanup_def_compat.c: New file. Old cleanup code.
1420 * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
1421 if own thread descriptor.
1422 * unwind.c: New file.
1423 * forward.c: Add __pthread_unwind.
1424 * init.c (pthread_functions): Add __pthread_unwind.
1425 * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
1426 Add ptr___pthread_unwind.
1427 * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
1428 and unwind function.
1429 * Makefile (libpthread-routines): Add cleanup_compat,
1430 cleanup_def_compat, and unwind. Define CFLAGS to enable unwind
1431 table generation if necessary.
1432 * version.c: Record whether unwind support is compiled in.
1433 * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
1434 * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
1435 handler interfaces.
1436 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
1437 complication to generate unwind information for syscall wrappers.
68107ec0 1438 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
09d65ff3
UD
1439 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
1440 __cleanup_fct_attribute.
1441
1442 * Makefile: Add rules to build and run tst-cleanup0.
1443 * tst-cleanup0.c: New file.
1444 * tst-cleanup0.expect: New file.
1445
1446 * pthread_create.c (deallocate_tsd): Don't take parameter. Adjust
1447 caller. Optimize to avoid often unecessary local variable.
1448
0dc44b51
RM
14492003-04-11 Roland McGrath <roland@redhat.com>
1450
1451 * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
1452 sets variable `multidir'; include that.
1453 (generated): Add it.
1454 ($(objpfx)$(multidir)/crti.o): New target.
1455 [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
1456
84a80719
UD
14572003-04-11 Ulrich Drepper <drepper@redhat.com>
1458
1459 * tst-attr2.c (do_test): Add cast to avoid warning.
1460 * tst-mutex4.c (do_test): Likewise.
1461
88ff4759
UD
14622003-04-10 Ulrich Drepper <drepper@redhat.com>
1463
1464 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
1465 in child.
1466
b2041097
UD
14672003-04-09 Ulrich Drepper <drepper@redhat.com>
1468
1469 * Makefile (tests): Add tst-detach1.
1470 * tst-detach1.c: New file.
1471
f9657e88
UD
14722003-04-08 Ulrich Drepper <drepper@redhat.com>
1473
9afe4964
UD
1474 * sysdeps/pthread/pthread.h: Remove duplicate
1475 pthread_cleanup_{push,pop} definitions.
1476
f9657e88
UD
1477 * tst-barrier2.c: Eliminate warnings.
1478 * tst-cancel4.c: Likewise.
1479 * tst-cond4.c: Likewise.
1480 * tst-cond6.c: Likewise.
1481 * tst-detach1.c: Likewise.
1482 * tst-rwlock4.c: Likewise.
1483 * tst-rwlock6.c: Likewise.
1484 * tst-rwlock7.c: Likewise.
1485 * tst-sem3.c: Likewise.
1486 * tst-spin2.c: Likewise.
1487 * tst-umask1.c: Likewise.
1488
69b35e86
UD
14892003-04-07 Ulrich Drepper <drepper@redhat.com>
1490
1491 * pthread_detach.c (pthread_detach): Fix test for invalid TID.
1492
c70ad7d7
UD
14932003-04-06 Ulrich Drepper <drepper@redhat.com>
1494
1495 * descr.h (struct pthread): Move cancelhandling member to the front.
1496
54e0138f
UD
14972003-04-05 Ulrich Drepper <drepper@redhat.com>
1498
1499 * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
1500 malloc_parent, and malloc_child statically.
1501 (__register_atfork_malloc): New function.
1502 (free_mem): Don't free any of the malloc_* variables on the list.
1503 * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
1504 Define HAVE_register_atfork_malloc.
1505
b22d701b
UD
15062003-04-04 Ulrich Drepper <drepper@redhat.com>
1507
1508 * sysdeps/pthread/createthread.c (create_thread): Add some more
1509 comments explaining when to set multiple_threads and when not.
1510
1511 * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
1512 THREAD_ATOMIC_BIT_SET if not already defined.
1513 * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
1514 THREAD_ATOMIC_BIT_SET:
1515 * sysdeps/x86_64/tls.h: Likewise.
1516 * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
1517 THREAD_ATOMIC_CMPXCHG_VAL.
1518 (_pthread_cleanup_pop_restore): Likewise.
1519 * cancellation.c (__pthread_enable_asynccancel): Likewise.
1520 (__pthread_enable_asynccancel_2): Likewise.
1521 (__pthread_disable_asynccancel): Likewise.
1522 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
1523 (__libc_disable_asynccancel): Likewise.
1524 * init.c (sigcancel_handler): Likewise.
1525 * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
1526 * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
1527
86246935
UD
15282003-04-03 Ulrich Drepper <drepper@redhat.com>
1529
1530 * init.c (sigcancel_handler): Don't set EXITING_BIT here.
1531 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
1532 * pthreadP.h (__do_cancel): Set EXITING_BIT here.
1533 * Makefile (tests): Add tst-cancel11.
1534 * tst-cancel11.c: New file.
1535
6b4686a5
UD
15362003-04-01 Ulrich Drepper <drepper@redhat.com>
1537
1538 * pthread_create.c (deallocate_tsd): Clear/free memory after the last
1539 round, not the first. Use specific_used flag instead of local
1540 found_nonzero variable. Use THREAD_[SG]ETMEM where possible.
1541 (__free_tcb): Don't call deallocate_tsd here.
1542 (start_thread): Call deallocate_tsd here.
1543 * pthread_setspecific.c: Set specific_used flag really only when
1544 needed.
0d73a73b 1545 * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
6b4686a5 1546 * tst-tsd3.c: New file.
0d73a73b 1547 * tst-tsd4.c: New file.
6b4686a5 1548
42b2395d
UD
15492003-03-31 Ulrich Drepper <drepper@redhat.com>
1550
211d90c5
UD
1551 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
1552 Use atomic_exchange_and_add instead of __lll_add.
1553 (__lll_mutex_timedlock): Likewise.
1554 Patch by Ian Wienand.
1555
15562003-03-24 Steven Munroe <sjmunroe@us.ibm.com>
1557
1558 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
1559 (SINGLE_THREAD_P): Fix typo.
1560 * tst-cancel-wrappers.sh: Handle '.'ed symbols.
1561
15622003-03-31 Ulrich Drepper <drepper@redhat.com>
1563
1564 * Makefile (tests): Add tst-align.
1565 * tst-align.c: New file.
1566 * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
211d90c5 1567
42b2395d
UD
1568 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
1569 function correctly.
1570
211d90c5
UD
1571 * tst-tsd2.c: Add casts to avoid warnings.
1572
163b180f
UD
15732003-03-30 Ulrich Drepper <drepper@redhat.com>
1574
1575 * descr.h (struct pthread): Move most often used elements to the front.
1576
ea473bad
UD
15772003-03-29 Ulrich Drepper <drepper@redhat.com>
1578
1579 * Makefile (libpthread-routines): Add pthread_atfork.
1580 (libpthread-static-only-routines): Add pthread_atfork.
1581
dd731d53
UD
15822003-03-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1583
1584 * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
1585 of TLS_DTV_AT_TP.
1586 (INSTALL_DTV): Add parens.
1587 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
1588 Use passed descr instead of THREAD_SELF.
1589 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
1590 (__lll_mutex_timedlock_wait): Correct expected value after
1591 spurious wakeup.
1592 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
1593 Release lock before waking up the waiters.
1594 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
1595 criteria. Reorderstruct passed to cleanup handler. Fix
1596 handling of cancellation and failung pthread_mutex_unlock call.
1597 Use __pthread_enable_asynccancel_2 instead of
1598 __pthread_enable_asynccancel.
1599 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
1600 Return result of lock re-get if it fails.
1601 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
1602 for __pthread_cleanup_push.
1603 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
1604 completely broken rwlock implementation.
1605 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1606 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
1607 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
1608 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
1609 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1610 * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value. Use
1611 versioned_symbol macro.
1612 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
1613 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
1614
c75d02f0
UD
16152003-03-27 Ulrich Drepper <drepper@redhat.com>
1616
5f5004df
UD
1617 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
1618 __timer_helper_thread. Declare __start_helper_thread, __helper_once,
1619 and __helper_tid.
1620 (struct timer): Remove th and bar field.
1621 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
1622 debugging code. Create only one helper thread.
1623 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
1624 helper thread.
1625 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
1626 Renamed. Define statically. Use thread info from siginfo.
1627 (__helper_once): New variable.
1628 (__helper_tid): New variable.
1629 (__reset_helper_control): New function.
1630 (__start_helper_thread): New function.
1631
18d009ca
UD
1632 * pthread_create.c (start_thread): Don't use setjmp inside
1633 __builtin_expect to work around gcc bug.
1634
c75d02f0
UD
1635 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
1636 timer_delete syscall fails, but not with ENOSYS, set
1637 __no_posix_timers.
1638
1639 * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
1640 (timer_settime): Fix typo.
28cf3058
UD
1641 * sysdeps/unix/sysv/linux/timer_getoverr.c
1642 [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
c75d02f0 1643
049ac259
JJ
16442003-03-27 Jakub Jelinek <jakub@redhat.com>
1645
1646 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
1647 offset of cleanupbuf.__prev.
1648
f93d39dd
JJ
16492003-03-26 Jakub Jelinek <jakub@redhat.com>
1650
1651 * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
1652 of included file.
1653
f064e4c5
UD
16542003-03-26 Ulrich Drepper <drepper@redhat.com>
1655
1656 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
1657 NULL provide default definition to syscall.
1658
83e886a3
RM
16592003-03-25 Roland McGrath <roland@redhat.com>
1660
1661 * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
1662 (timer_id2ptr): Fix typo.
1663
09402f5b
UD
16642003-03-25 Ulrich Drepper <drepper@redhat.com>
1665
1666 * pthreadP.h: Define SIGCANCEL and SIGTIMER.
1667 * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
1668 * sysdeps/ia64/pthreaddef.h: Likewise.
1669 * sysdeps/powerpc/pthreaddef.h: Likewise.
1670 * sysdeps/s390/pthreaddef.h: Likewise.
1671 * sysdeps/sh/pthreaddef.h: Likewise.
1672 * sysdeps/x86_64/pthreaddef.h: Likewise.
1673 * init.c (__pthread_initialize_minimal): Block SIGTIMER.
1674 * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
1675 being changed.
1676 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
1677 SIGTIMER is not unblocked.
1678 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
1679 RT signal taken.
1680 * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
1681 be send.
1682 * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
1683 pass pointer through as ID.
1684 * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
1685 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
1686 * sysdeps/unix/sysv/linux/timer_create.c: New file.
1687 * sysdeps/unix/sysv/linux/timer_delete.c: New file.
1688 * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
1689 * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
1690 * sysdeps/unix/sysv/linux/timer_routines.c: New file.
1691 * sysdeps/unix/sysv/linux/timer_settime.c: New file.
1692 * sysdeps/unix/sysv/linux/ia64/Versions: New file.
1693 * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
1694 * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
1695 * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
1696 * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
1697 * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
1698 * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
1699 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
1700 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
1701 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
1702 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
1703 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
1704 * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
1705 * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
1706 * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
1707 * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
1708 * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
1709 * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
1710 * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
1711 * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
1712 * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
1713 * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
1714 * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
1715 * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
1716 * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
1717
1718 * pthreadP.h: Remove FRAME_LEFT definition.
1719 * cleanup.c (_pthread_cleanup_push): Don't check for reference to
1720 already left frame. Programs which have this problem are not POSIX
1721 compliant.
1722 * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
1723
5e826ab5
UD
17242003-03-24 Ulrich Drepper <drepper@redhat.com>
1725
1726 * sysdeps/pthread/tst-timer.c: Check return values of the
1727 functions we test.
1728
b910f788
RM
17292003-03-23 Roland McGrath <roland@redhat.com>
1730
3045a1fe
RM
1731 * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
1732 * tst-tls3mod.c: Likewise.
1733 * tst-tls1.c: Likewise.
1734 * tst-tls2.c: Likewise.
1735
85047fe3
RM
1736 * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
1737 undefined behavior.
1738
b910f788
RM
1739 * tst-join5.c (tf1, tf2): Add a cast.
1740
1741 * Makeconfig (includes): Append -I$(..)nptl to this variable.
1742
1743 * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
1744 Don't test anything.
1745 * tst-cond4.c: Likewise.
1746 * tst-cond6.c: Likewise.
1747 * tst-flock2.c: Likewise.
1748 * tst-mutex4.c: Likewise.
1749 * tst-rwlock4.c: Likewise.
1750 * tst-signal1.c: Likewise.
1751 * tst-spin2.c: Likewise.
1752 * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
1753
1754 * tst-mutex4.c: Use test-skeleton.c.
1755 * tst-spin2.c: Likewise.
1756 * tst-sysconf.c: Likewise.
1757 * tst-barrier2.c: Likewise.
1758 * tst-cond4.c: Likewise.
1759 * tst-cond6.c: Likewise.
1760 * tst-rwlock4.c: Likewise.
1761 * tst-unload.c: Likewise.
1762 * tst-flock2.c (do_test): Use return instead of exit.
1763
4baa087a
RM
17642003-03-22 Jakub Jelinek <jakub@redhat.com>
1765
1766 * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
1767
5a3ab2fc
UD
17682003-03-21 Ulrich Drepper <drepper@redhat.com>
1769
9f07eae2
UD
1770 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
1771 (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
1772 instead of __lll_compare_and_swap.
1773 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
1774 Likewise.
1775 Removed definition if __lll_compare_and_swap.
1776
5a3ab2fc
UD
1777 * cancellation.c: Adjust for new form of compare&exchange macros.
1778 * cleanup_defer.c: Likewise.
1779 * init.c: Likewise.
1780 * libc-cancellation.c: Likewise.
1781 * old_pthread_cond_broadcast.c: Likewise.
1782 * old_pthread_cond_signal.c: Likewise.
1783 * old_pthread_cond_timedwait.c: Likewise.
1784 * old_pthread_cond_wait.c: Likewise.
1785 * pthread_cancel.c: Likewise.
1786 * pthread_create.c: Likewise.
1787 * pthread_detach.c: Likewise.
1788 * pthread_join.c: Likewise.
1789 * pthread_key_delete.c: Likewise.
1790 * pthread_setcancelstate.c: Likewise.
1791 * pthread_setcanceltype.c: Likewise.
1792 * pthread_timedjoin.c: Likewise.
1793 * pthread_tryjoin.c: Likewise.
1794 * sysdeps/pthread/createthread.c: Likewise.
1795
b1aea098
UD
17962003-03-20 Ulrich Drepper <drepper@redhat.com>
1797
1798 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
4baa087a 1799 Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
b1aea098
UD
1800 definitions. Replace uses with calls to atomic_* functions.
1801 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1802 * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
1803 __lll_test_and_set calls with atomic_exchange_and_add and
1804 atomic_exchange calls respectively.
1805 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
1806 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
1807 * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
1808 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
1809 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
1810 * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
1811 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
1812
1813 * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
1814 returns the old value.
1815
100a7100
RM
18162003-03-20 Martin Schwidefsky <sky@mschwid3.boeblingen.de.ibm.com>
1817
1818 * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
1819 int for variable OLDVAL and correct inline assembler contraint.
1820 * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
1821 type int for variable OLD.
1822
1823 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
1824 only for s390-32.
1825 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
1826 (SINGLE_THREAD_P): Use global variable __local_multiple_threads
1827 instead of multiple_threads field in the TCB.
1828
95767b36
UD
18292003-03-19 Ulrich Drepper <drepper@redhat.com>
1830
4009bf40
UD
1831 * sysdeps/i386/i686/bits/atomic.h: Removed.
1832 * sysdeps/i386/i586/bits/atomic.h: Removed.
1833 * sysdeps/i386/i486/bits/atomic.h: Removed. Moved to glibc.
1834 * sysdeps/x86_64/bits/atomic.h: Removed. Moved to glibc.
1835 * sysdeps/s390/bits/atomic.h: Removed. Moved to glibc.
1836 * sysdeps/sh/bits/atomic.h: Removed. Moved to glibc.
1837 * sysdeps/ia64/bits/atomic.h: Removed. Moved to glibc.
1838 * sysdeps/powerpc/bits/atomic.h: Removed. Moved to glibc.
1839 * atomic.h: Removed. Moved to glibc.
1840
560a784f
UD
1841 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
1842 support for clock selection.
1843
95767b36
UD
1844 * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
1845 signalling waiters.
1846
043ad426
RM
18472003-03-18 Roland McGrath <roland@redhat.com>
1848
94659495
RM
1849 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
1850 Add __lll_rel_instr first. Add memory clobber.
1851 (lll_mutex_unlock): Use __lll_test_and_set.
1852 From Paul Mackerras <paulus@samba.org>.
1853
1854 * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
1855 unconditionally.
1856 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
1857 (SINGLE_THREAD_P): Add `header.' prefix.
1858 From Paul Mackerras <paulus@samba.org>.
1859
043ad426
RM
1860 * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
1861 pthread_timedjoin_np to ...
1862 (libpthread: GLIBC_2.3.3): ... here.
1863 (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
1864
1865 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
1866 Avoid shadowing VAL variable.
1867
1868 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
1869 New macro.
1870
86a9ee5e
UD
18712003-03-18 Ulrich Drepper <drepper@redhat.com>
1872
ac9e0aa1
UD
1873 * Makefile (tests): Add tst-cond11.
1874 * tst-cond11.c: New file.
1875
a14b373c
UD
1876 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
1877 struct passed to cleanup handler to eliminate one more
1878 instruction.
1879 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1880
24a49f38
UD
1881 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
1882 (pthrad_cond_t): Replace __unused field with __clock.
1883
1884 * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
1885 waken all waiters in cleanup handler.
1886 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1887 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1888
86a9ee5e
UD
1889 * pthread_condattr_getclock.c: New file.
1890 * pthread_condattr_setclock.c: New file.
1891 * sysdeps/pthread/pthread.h: Declare these new functions.
1892 * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
1893 * Makefile (libpthread-routines): Add the new functions.
1894 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
1895 Renamed field to value. Document use of the bits.
1896 * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
1897 change.
1898 * pthread_condattr_setpshared.c: Likewise.
d5cb8389 1899 * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
86a9ee5e
UD
1900 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
1901 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
1902 Add __clock field.
1903 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
1904 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1905 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1906 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
1907 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1908 Implement clock selection.
1909 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
1910 * pthread-errnos.sym: Add ENOSYS.
1911 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1912 _POSIX_CLOCK_SELECTION.
1913 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1914
1915 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
1916 invalid .size directive.
1917
98054a05
RM
19182003-03-17 Roland McGrath <roland@redhat.com>
1919
1920 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
1921 Formatting tweaks.
1922
001bea71
UD
19232003-03-17 Ulrich Drepper <drepper@redhat.com>
1924
4773086e
UD
1925 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
1926 Use __lll_add instead of spelling it out. Use protected symbol names.
1927 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
1928 Use __lll_add.
1929 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
1930 Renamed from lll_compare_and_swap. Use new name where necessary.
1931 (__lll_add): Defined.
1932 (__lll_dec_if_positive): Defined.
1933 (__lll_test_and_set): Defined.
1934 * sysdeps/ia64/pthread_spin_init.c: Removed.
1935 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
1936 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
1937 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
1938 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
1939 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
1940 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
1941 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
001bea71
UD
1942 * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
1943 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
1944 __sync_lock_release_si.
1945 Patch by Jakub Jelinek.
1946
1947 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
1948 Fix timeout handling.
1949 (__lll_timedwait_tid): Likewise.
1950 (lll_unlock_wake_cb): Wake up other waiters if necessary.
1951 Patch by Jakub Jelinek.
1952
1953 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
1954
de4471dd
RM
19552003-03-17 Roland McGrath <roland@redhat.com>
1956
1957 PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
1958 * sysdeps/pthread/pthread_spin_init.c: New file.
1959 * sysdeps/pthread/pthread_spin_unlock.c: New file.
1960 * sysdeps/powerpc/Makefile: New file.
1961 * sysdeps/powerpc/pthread_spin_lock.c: New file.
1962 * sysdeps/powerpc/pthread_spin_trylock.c: New file.
1963 * sysdeps/powerpc/pthreaddef.h: New file.
1964 * sysdeps/powerpc/tcb-offsets.sym: New file.
1965 * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
1966 * sysdeps/powerpc/tls.h: New file.
1967 * sysdeps/powerpc/bits/atomic.h: New file.
1968 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
1969 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
1970 * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
98054a05 1971
de4471dd
RM
1972 * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
1973 * sysdeps/unix/sysv/linux/sem_post.c: New file.
1974 * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
1975 * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
1976 * sysdeps/unix/sysv/linux/sem_wait.c: New file.
1977 * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
1978 * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
1979 * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
1980 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
1981 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
1982 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
1983 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
1984 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
1985 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
1986 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
1987
1988 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
1989 not gettimeofday.
1990 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
1991 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
1992 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
1993 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
1994 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
1995
5778033f
UD
19962003-03-17 Ulrich Drepper <drepper@redhat.com>
1997
1998 * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
1999 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
2000 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2001 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2002 Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
2003
796038f8
RM
20042003-03-16 Roland McGrath <roland@redhat.com>
2005
2006 * tst-fork4.c: Include <string.h>.
2007 * tst-signal2.c: Likewise.
2008 * tst-mutex5.c (do_test): exit -> return.
2009 * tst-mutex2.c: Include <stdlib.h>.
2010
51d0678c
UD
20112003-03-16 Ulrich Drepper <drepper@redhat.com>
2012
5778033f
UD
2013 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
2014 (__lll_mutex_timedlock_wait): Correct expected value after
2015 spurious wakeup. Otherwise we would never wait again.
2016
b6e2f87a
UD
2017 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
2018 zone versus inline asm stupidity. Use correct instructions.
2019
51d0678c
UD
2020 * tst-rwlock6.c: Add some more status output.
2021
8112cc70
RM
20222003-03-15 Roland McGrath <roland@redhat.com>
2023
2024 * sysdeps/pthread/configure.in: New file.
2025 * sysdeps/pthread/configure: New file (generated).
2026
49773c19
UD
20272003-03-15 Ulrich Drepper <drepper@redhat.com>
2028
2029 * allocatestack.c (allocate_stack): Store the exact stack size of
2030 user allocated stacks.
2031
eec0ca9f
JJ
20322003-03-15 Jakub Jelinek <jakub@redhat.com>
2033
2034 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
2035 (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
2036 * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
2037 * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
2038 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
2039 Use `header.' prefix.
2040 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
2041
a87731e2
UD
20422003-03-15 Ulrich Drepper <drepper@redhat.com>
2043
2044 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
2045 __builtin_frame_address, use stack pointer.
2046
2047 * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
2048 instead of __builtin_frame_pointer.
2049
e22a221d
UD
20502003-03-14 Ulrich Drepper <drepper@redhat.com>
2051
92ed3daf
UD
2052 * tst-basic1.c (do_test): Add cast to avoid warning.
2053 * tst-basic2.c (do_test): Likewise.
2054
9b89567d
UD
2055 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
2056 amount of stack correction.
2057
e22a221d
UD
2058 * tst-fork4.c: Use test-skeleton.c.
2059
2e49caba
RM
20602003-03-14 Roland McGrath <roland@redhat.com>
2061
2062 * init.c: Fix typo "#eli" for "#else".
2063
415ef7d8
RM
20642003-03-14 Steven Munroe <sjmunroe@us.ibm.com>
2065
2066 * allocatestack.c (__stack_user): Use hidden_data_def.
2067 * pthread_create.c (__pthread_keys): Likewise.
2068
2069 * init.c [__powerpc__] (__NR_set_tid_address): Define it.
2070
52287505
RM
20712003-03-14 Roland McGrath <roland@redhat.com>
2072
415ef7d8
RM
2073 * tst-fork4.c: New file.
2074 * Makefile (tests): Add it.
2075
52287505
RM
2076 * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
2077 we always define the padding space.
2078 [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
2079 stopped supporting its own extensions fully.
2080 [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
2081 struct also called `header', so `header.multiple_threads' is the field
2082 name to use on all machines.
2083 * allocatestack.c (allocate_stack): Use `header.' prefix.
2084 * sysdeps/pthread/createthread.c (create_thread): Likewise.
2085 * pthread_create.c (__pthread_create_2_1): Likewise.
2086 * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
2087 (THREAD_SELF): Likewise.
2088 * sysdeps/x86_64/tls.h: Likewise.
2089 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
2090 (SINGLE_THREAD_P): Likewise.
2091 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
2092 (SINGLE_THREAD_P): Likewise.
2093 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
2094 (SINGLE_THREAD_P): Likewise.
2095
2096 * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
2097 value directly.
2098
c44bf9aa
UD
20992003-03-14 Ulrich Drepper <drepper@redhat.com>
2100
e22a221d
UD
2101 * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
2102 * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
2103
0eb18281
UD
2104 * pthread_create.c (start_thread): setjmp is expected to return 0.
2105
c44bf9aa
UD
2106 * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
2107 (THREAD_GETMEM_NC): Likewise.
2108
564cd8b6
UD
21092003-03-13 Ulrich Drepper <drepper@redhat.com>
2110
2111 * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
2112 and the size of the stack which must be allocated is a multiple,
2113 allocate one more page.
2114 * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
2115 MULTI_PAGE_ALIASING.
2116
6461e577
RM
21172003-03-13 Roland McGrath <roland@redhat.com>
2118
2119 * pthread_create.c (start_thread): Set EXITING_BIT after the
2120 event-reporting (and destructors), not before.
2121
b5ec5617
UD
21222003-03-13 Jakub Jelinek <jakub@redhat.com>
2123
6461e577
RM
2124 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
2125 lll_futex_wake): Declare register variables as long int instead of
2126 unsigned long int. Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
2127 Make syscall arguments clobbered by the syscall.
2128 (lll_futex_wait): Define using lll_futex_timed_wait.
2129
2130 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
2131 to void *.
2132
2133 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
2134 PPID if [! NDEBUG].
2135
2136 * allocatestack.c (nptl_ncreated): Only declare if
2137 COLORING_INCREMENT != 0.
2138
2139 * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
2140 (__libc_enable_asynccancel_2): Remove prototype.
2141
b5ec5617
UD
2142 * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
2143 ctid to match kernel.
2144
d0369fb8
UD
21452003-03-12 Ulrich Drepper <drepper@redhat.com>
2146
7588880f
UD
2147 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
2148 libc_multiple_threads.
2149 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
2150 __libc_multiple_threads to...
2151 * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here. New file.
2152
2153 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
2154 versioning.
2155 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
2156 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
2157
2158 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
2159 (__pthread_once_internal): Define.
2160
2161 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
2162 macros instead of .symver directly.
2163 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
2164 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2165
d0369fb8
UD
2166 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
2167 * sysdeps/x86_64/tcb-offsets.sym: New file.
2168 * sysdeps/x86_64/Makefile: New file.
2169
2170 * sysdeps/i386/tcb-offsets.sym: Add SELF.
2171 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
2172 to access own pthread_t in TCB.
2173 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2174 Likewise.
2175 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2176 Likewise.
2177 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2178
0bb2ac85
RM
21792003-03-12 Roland McGrath <roland@redhat.com>
2180
2181 * pthread-errnos.sym: New file.
2182 * Makefile (gen-as-const-headers): New variable, list that file.
2183 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
2184 header <pthread-errnos.h> instead of defining errno values here.
2185 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
2186 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2187 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
2188 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2189 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2190 Likewise.
2191 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2192 Likewise.
2193 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2194 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2195 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
2196 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2197 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
2198 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
2199 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
2200 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
2201 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2202 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
2203 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
2204 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
2205 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
2206 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
2207 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
2208 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
2209 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
2210 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
2211 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2212 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
2213 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
2214 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
2215 * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
2216 * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
2217 * sysdeps/sh/pthread_spin_trylock.S: Likewise.
2218 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
2219 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
2220
2221 * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
2222 CLONE_CHILD_SETTID worked.
2223
35e148cb
UD
22242003-03-12 Ulrich Drepper <drepper@redhat.com>
2225
d0369fb8
UD
2226 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
2227 file.
2228 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
2229 file.
2230
2231 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
2232 (pthread_cond_t): Add padding.
2233
da49194d
UD
2234 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
2235 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
2236 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
2237
35e148cb
UD
2238 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
2239 (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
2240 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
2241 (__pthread_rwlock_timedrdlock): Likewise.
2242 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
2243 (__pthread_rwlock_wrlock): Likewise.
2244 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
2245 (__pthread_rwlock_rdlock): Likewise.
2246
2247 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
2248
2249 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
2250 result of lock re-get if it fails.
2251
3e976b96
UD
22522003-03-11 Ulrich Drepper <drepper@redhat.com>
2253
5a03acfe
UD
2254 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
2255 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2256 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
2257 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
2258 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2259 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
2260 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
2261 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
2262 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
2263 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
2264
2265 * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
2266 THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
2267
2268 * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
2269 Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
2270 * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
2271 (create_thread): Likewise.
2272 Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
2273 * init.c (__pthread_initialize_minimal_internal): Initialize
2274 __libc_multiple_threads_ptr if necessary.
2275 * pthreadP.h: Adjust prototype for __libc_pthread_init. Declare
2276 __pthread_multiple_threads and __libc_multiple_threads_ptr.
2277 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
2278 __libc_multiple_threads.
2279 (__libc_pthread_init): Return pointer to __libc_pthread_init if
2280 necessary.
2281
2282 * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
2283 (THREAD_SETMEM_NC): Likewise.
2284
2285 * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
2286 * sysdeps/x86_64/pthread_spin_trylock.S: New file.
2287 * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
2288 * sysdeps/x86_64/pthread_spin_unlock.S: New file.
2289
2290 * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
2291 Eliminate one entire instruction.
2292
32a589b1
UD
2293 * cancellation.c (__pthread_enable_asynccancel_2): New function.
2294 * pthreadP.h: Declare __pthread_enable_asynccancel_2.
2295 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2296 (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
2297 instead of __pthread_enable_asynccancel.
2298 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
2299 (__pthread_cond_wait): Likewise.
2300 * sysdeps/pthread/pthread_cond_timedwait.c
2301 (__pthread_cond_timedwait): Likewise.
2302 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
2303
3e976b96
UD
2304 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
2305 (__condvar_cleanup): Wake up all waiters in case we got signaled
2306 after being woken up but before disabling asynchronous
2307 cancellation.
2308 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
2309 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2310 (__condvar_cleanup): Likewise.
2311
2312 * init.c (__NR_set_tid_address): If already defined, don't redefine.
2313 Make it an error if architecture has no #if case. Add x86-64.
2314
2315 * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
2316 pt-initfini.s generation.
2317
2318 * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
2319 (TLS_INIT_TP): Fix typo.
2320
6c477888
UD
23212003-03-11 Jakub Jelinek <jakub@redhat.com>
2322
2323 * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
2324 3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
2325
2326 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
2327 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
2328 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
2329 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
2330 * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
2331 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
2332 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
2333 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
2334
ea694823
UD
23352003-03-11 Ulrich Drepper <drepper@redhat.com>
2336
6c477888
UD
2337 * sysdeps/pthread/pthread_cond_timedwait.c
2338 (__pthread_cond_timedwait): Return the result of the final
2339 locking. If it succeeds, the regular function return value.
2340
2341 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
2342 Return result of the final locking.
2343 * version.c (__nptl_main): Work around problems with the strange
2344 INTERNAL_SYSCALL macro on ppc32.
2345 * init.c (__pthread_initialize_minimal_internal): Unblock
2346 SIGCANCEL in case the parent blocked it.
2347 Reported by Paul Mackerras <paulus@samba.org>.
2348
ea694823
UD
2349 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
2350 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
2351 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
2352
b33e6163
RM
23532003-03-11 Jakub Jelinek <jakub@redhat.com>
2354
2355 * sysdeps/pthread/pthread_cond_timedwait.c
2356 (__pthread_cond_timedwait): Unlock and fail if
2357 __pthread_mutex_unlock_internal failed.
2358
2359 * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
2360 (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
2361 Use ARCH_CLONE.
2362 * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
2363 [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
2364 STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
2365 ALLOCATE_STACK): New macros.
2366 (TLS_TPADJ): New macro.
2367 (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
2368 (allocate_stack): Handle TLS_DTV_AT_TP and
2369 NEED_SEPARATE_REGISTER_STACK. Use TLS_TPADJ.
2370 * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
2371 Don't set PD->self.
2372 * init.c [__ia64__] (__NR_set_tid_address): Define.
2373
2374 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
2375 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
2376 * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
2377 * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
2378 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
2379 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
2380 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
2381 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
2382 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
2383 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
2384 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
2385 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
2386 * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
2387 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
2388 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
2389 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
2390 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
2391 * sysdeps/ia64/bits/atomic.h: New file.
2392 * sysdeps/ia64/Makefile: New file.
2393 * sysdeps/ia64/pthread_spin_init.c: New file.
2394 * sysdeps/ia64/pthread_spin_lock.c: New file.
2395 * sysdeps/ia64/pthread_spin_trylock.c: New file.
2396 * sysdeps/ia64/pthread_spin_unlock.c: New file.
2397 * sysdeps/ia64/pthreaddef.h: New file.
2398 * sysdeps/ia64/tcb-offsets.sym: New file.
2399 * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
2400 * sysdeps/ia64/tls.h: New file.
2401
2402 * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
2403 to syscall instead of no arguments.
2404
2b30b2e5
UD
24052003-03-10 Ulrich Drepper <drepper@redhat.com>
2406
db5f2fc9
UD
2407 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
2408 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
2409 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
2410 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
2411
2412 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
2413 unused code.
2414
6a4263e3
UD
2415 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
2416
3de7c2a9
UD
2417 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
2418 lowlevelbarrier.sym.
2419 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
2420 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
2421 Include lowlevelbarrier.h and don't define offsets locally.
6a4263e3 2422 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
3de7c2a9 2423
2a544d82
UD
2424 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2425 (__lll_mutex_lock_wait): Reverse order of first two parameters.
2426 (__lll_mutex_timedlock_wait): Likewise.
2427 (lll_mutex_lock): Adjust asm for that.
2428 (lll_mutex_timedlock): Likewise. Mark cx, cc, r10 as clobbered.
2429 (lll_lock): Adjust asm for operand order change.
2430 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
2431 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
2432
ec06436c
UD
2433 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
2434 Reverse order of parameters.
2435 (__lll_timedwait_tid): Remove regparms attribute.
2436 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
2437 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
2438
3273832c
UD
2439 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
2440 (__lll_timedwait_tid): Remove one unnecessary instruction.
2441
51f32ab8
UD
2442 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
2443 __lll_mutex_timedlock_wait only for NOT_IN_libc.
2444 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
2445 lowlevelmutex.S.
2446
2447 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
2448 lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
2449 for NOT_IN_libc.
2450 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
2451 lowlevellock.S.
2452
fad48d9e
UD
2453 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
2454 LOCK is already defined. Don't define __lll_mutex_timedlock_wait
2455 for libc.so.
2456 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
2457 define LOCK here (if UP is not defined). The actual code is in
2458 lowlevelmutex.S.
2459
9356d063
UD
2460 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
2461 LOCK is already defined. Don't define lll_unlock_wake_cb and
2462 __lll_timedwait_tid for libc.so.
2463 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
2464 define LOCK here (if UP is not defined). The actual code is in
2465 lowlevellock.S.
2466
ebf0cbc5 2467 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
106f6f9d
UD
2468 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
2469 * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
2470 instead of lowlevelsem.h.
2471 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
2472 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
2473 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
0be8ee21 2474
c915e5ad
UD
2475 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
2476 lowlevelrwlock.sym.
2477 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
2478 * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
146fa1ee 2479 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
c915e5ad 2480
4c3c2e8a
UD
2481 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
2482 register loading.
2483 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
2484 last changed. D'oh.
2485
2b30b2e5
UD
2486 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
2487
2488 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
2489 of __libc_locking_needed.
2490 (lll_trylock): Initialize %eax to zero.
2491
2b30b2e5
UD
2492 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
2493 pthread_cond_t definition.
2494
e48f9638
RM
24952003-03-10 Roland McGrath <roland@redhat.com>
2496
2497 * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
2498 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
2499 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
2500 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
2501 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
2502
2503 * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
2504 Instead of setting PD->multiple_threads, set globals
2505 __pthread_multiple_threads and __libc_multiple_threads.
2506 * sysdeps/pthread/createthread.c (create_thread): Likewise.
2507 * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
2508 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
2509
2510 * descr.h (struct pthread): Conditionalize first member on
2511 [!TLS_DTV_AT_TP]. Replace the `header' member with an anonymous union
2512 containing an anonymous tcbhead_t. Move `list' member out.
2513 [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
2514 * allocatestack.c: Remove use of `header.data.' prefix.
2515 * pthread_create.c: Likewise.
2516 * init.c (__pthread_initialize_minimal_internal): Likewise.
2517 * sysdeps/pthread/createthread.c (create_thread): Likewise.
2518 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
2519 (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
2520 * sysdeps/x86_64/tls.h: Likewise.
2521 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
2522 (SINGLE_THREAD_P): Likewise.
2523 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
2524 (SINGLE_THREAD_P): Likewise.
2525 * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
2526 * sysdeps/s390/tls.h (tcbhead_t): Likewise.
2527
c37cae9e
UD
25282003-03-09 Ulrich Drepper <drepper@redhat.com>
2529
d38c777e
RM
2530 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
2531
7b44a5e0 2532 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
2b30b2e5 2533 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
7b44a5e0 2534
c2e5e085
UD
2535 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
2536 leftovers from the ia32 code.
2537
2538 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
2539 memory load.
2540 (clear_once_control): Don't load %esi.
2541
2542 * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
2543 handling.
2544
2545 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
2546
cd4b2a55
UD
2547 * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
2548 * sysdeps/unix/sysv/linux/createthread.c: ...here.
2549
c37cae9e
UD
2550 * Makefile (tests): Add tst-cond10.
2551 * tst-cond10.c: New file.
2552
d130a341
UD
25532003-03-08 Ulrich Drepper <drepper@redhat.com>
2554
ccf1d573
UD
2555 * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
2556 * tst-signal3.c (do_test): Likewise.
2557 * tst-sem5.c (do_test): Likewise.
2558 * tst-kill6.c (do_test): Likewise.
2559 * tst-tls3.c (do_test): Likewise. Include <errno.h>.
2560
2561 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
2562 of inc/dec.
2563 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
2564 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
2565 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2566 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
2567 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2568 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2569 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2570 Likewise.
2571 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2572 Likewise.
2573 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2574 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2575 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2576 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
2577 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
2578 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
2579 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
2580 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2581
d130a341
UD
2582 * allocatestack.c (allocate_stack): If mprotect() fails free the
2583 TLS memory.
2584
bc6389ad
UD
25852003-03-07 Ulrich Drepper <drepper@redhat.com>
2586
41d4d223
UD
2587 * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
2588
2589 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
2590 lll_wake_tid. This was used only to work around kernel limits in
2591 the early days.
2592 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2593 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
2594 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
2595 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
2596
bc6389ad
UD
2597 * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
2598 (__pthread_initialize_minimal_internal): Change initialization of
2599 __static_tls_align_m1 appropriately.
2600 * pthreadP.h (__static_tls_align_m1): Renamed from
2601 __static_tls_align.
2602 * allocatestack.c (allocate_stack): Use __static_tls_align_m1
2603 instead of __static_tls_align-1.
2604
cc775edf
UD
26052003-03-04 Ulrich Drepper <drepper@redhat.com>
2606
0de28d5c 2607 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
6245b6ae 2608
518b5308
UD
2609 * pthread_create.c: Define __pthread_keys using nocommon
2610 attribute, not by placing it explicitly in bss.
2611 Remove DEFINE_DEALLOC definition. Not needed anymore.
2612
2613 * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
2614 Use it in mmap call to allocate stacks.
2615
2616 * sysdeps/pthread/createthread.c (create_thread): Fix comment.
2617
cc775edf
UD
2618 * pthread_create.c (start_thread): Use THREAD_SETMEM to store
2619 result of the thread function.
2620
4f6f0a8f
UD
26212003-03-03 Ulrich Drepper <drepper@redhat.com>
2622
f04a2721
UD
2623 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed. The generic
2624 version is just fine.
2625
4f6f0a8f
UD
2626 * sysdeps/unix/sysv/linux/libc_pthread_init.c
2627 (__pthread_child_handler): Renamed from pthread_child_handler,
2628 exported, and marked hidden. Change all users.
2629 * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
2630 free __pthread_child_handler from child list.
2631
7ce5c164
UD
26322003-03-03 Martin Schwidefsky <schwidefsky@de.ibm.com>
2633
2634 * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
2635
2636 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
2637 Fix handling of cancellation and failing pthread_mutex_unlock call.
2638 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
2639 (__pthread_cond_wait): Likewise.
2640
2641 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
2642 (pthread_rwlock_timedrdlock): Fix clobber of result variable by
2643 lll_futex_timed_wait call.
2644 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2645 (pthread_rwlock_timedwrlock): Likewise.
2646
2647 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
2648 Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
2649 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
2650
2651 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
2652 check of lll_futex_wake return value.
2653
ea6a015b
RM
26542003-03-03 Roland McGrath <roland@redhat.com>
2655
2656 * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
2657
2658 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
2659 Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
2660 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
2661
4adacf57
UD
26622003-03-02 Ulrich Drepper <drepper@redhat.com>
2663
1be3d664
UD
2664 * sysdeps/pthread/timer_create.c (timer_create): Return correct
2665 error for CPU clocks.
2666
885bafa1
UD
2667 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2668 _POSIX_MONOTONIC_CLOCK.
2669 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2670
4adacf57
UD
2671 * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
2672 recent kernels.
2673
86bfff4d
UD
26742003-03-01 Ulrich Drepper <drepper@redhat.com>
2675
2676 * descr.h (struct pthread): Move cleanup field to the front.
2677
d1149385
RM
26782003-03-01 Roland McGrath <roland@redhat.com>
2679
2680 * sem_open.c (sem_open): Braino fix.
2681
bd8bb78b
UD
26822003-03-01 Ulrich Drepper <drepper@redhat.com>
2683
748bec08
UD
2684 * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
2685 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
2686 __pthread_cleanup_pop functionality.
2687 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2688
bd8bb78b
UD
2689 * descr.h (struct pthread): Move tid field to the front now that
2690 it is often used.
2691
2692 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
2693 (__lll_mutex_timedlock_wait): Remove.
2694 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
2695 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
2696 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
2697 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
2698 (lll_unlock_wake_cb): Don't save and restore %esi.
2699 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
2700 %esi.
2701 (__lll_timedwait_tid): Add alignment.
2702 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
2703 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
2704 %esi.
2705 (__lll_timedwait_tid): Removed.
2706 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
2707 (__pthread_cond_broadcast): Don't save, load, and restore %esi.
2708 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
2709 (pthread_barrier_wait): Don't save, load, and restore %esi for
2710 last thread.
2711 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
2712 (__pthread_cond_signal): Don't save, load, and restore %esi.
2713 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
2714 (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
2715 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
2716 Don't save, load, and restore %esi.
2717
d2637c70
UD
27182003-02-27 Ulrich Drepper <drepper@redhat.com>
2719
567fb22a
UD
2720 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
2721 Release lock before waking up the waiters.
2722
427f5fa1
UD
2723 * tst-exit1.c (do_test): Don't start more than one thread in parallel.
2724
a2d83cfb
UD
2725 * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
2726 (reader_thread): Likewise.
2727
d2637c70
UD
2728 * sysdeps/pthread/pthread_rwlock_unlock.c
2729 (__pthread_rwlock_unlock): Release internal lock early. Don't try
2730 to wake up readers if there are none.
2731
2732 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
2733 Release internal lock before wake threads.
2734
b1531183
UD
27352003-02-26 Ulrich Drepper <drepper@redhat.com>
2736
dbf6131c
UD
2737 * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
2738 * tst-rwlock8.c: Initialize lock with INIT. Allow INIT to be
2739 predefined.
2740 * tst-rwlock9.c: Likewise.
2741 * tst-rwlock10.c: New file.
2742 * tst-rwlock11.c: New file.
2743
695799fe
UD
2744 * Makefile (tests): Add tst-dlsym1.
2745 * tst-dlsym1.c: New file.
2746
b1531183
UD
2747 * init.c (__pthread_initialize_minimal_internal): Set
2748 GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
2749 * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
2750
3724f268
UD
27512003-02-24 Ulrich Drepper <drepper@redhat.com>
2752
3857ca78
UD
2753 * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
2754
80d80779
UD
2755 * tst-cond2.c: Fix sychronization with child.
2756
86371308
UD
2757 * tst-rwlock8.c (reader_thread): Remove unused variable.
2758
ffeb4481
UD
2759 * Makefile: Add rules to build and run tst-tls3.
2760 * tst-tls3.c: New file.
2761 * tst-tls3mod.c: New file.
2762
3724f268
UD
2763 * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
2764 * tst-rwlock8.c: New file.
2765 * tst-rwlock9.c: New file.
2766 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
2767 complete broken rwlock implementation.
2768 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2769 Likewise.
2770 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2771 Likewise.
2772 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2773 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
18a53579
UD
2774 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
2775 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
2776 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
2777 * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
2778 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
3724f268 2779
8915cc40
RM
27802003-02-23 Roland McGrath <roland@redhat.com>
2781
2782 * Makefile (nptl-version): Change regexp so case sensitivity is ok.
2783
fd1a0d0c
UD
27842003-02-23 Ulrich Drepper <drepper@redhat.com>
2785
ecf28959
UD
2786 * Makefile (tests): Add tst-context1.
2787 * tst-context1.c: New file.
2788
5e47b76b
UD
2789 * Makefile (tests): Add tst-tls1 and tst-tls2.
2790 * tst-tls1.c: New file.
2791 * tst-tls2.c: New file.
2792
5a6bbb41
UD
2793 * libc-cancellation.c (__libc_enable_asynccancel): Correct test
2794 for failed cmpxchg.
2795
fd1a0d0c
UD
2796 * pthread_create.c (start_thread): Set EXITING_BIT early.
2797
2798 * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
2799 (THREAD_GETMEM_NC): Likewise.
2800
757f9fcb
UD
28012003-02-22 Ulrich Drepper <drepper@redhat.com>
2802
b1b8e747
UD
2803 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
2804 off 3 more bytes by using offset-less instructions when possible.
2805
c780aa21 2806 * Makefile: Add dependency for $(objpfx)version.d.
757f9fcb
UD
2807
2808 * eintr.c (eintr_source): Add unnecessary return but the compiler
2809 insists.
2810
2811 * tst-kill3.c: Include <unistd.h>.
2812
5148559c
RM
28132003-02-21 Roland McGrath <roland@redhat.com>
2814
2815 * pthread_create.c (start_thread): Call __libc_thread_freeres.
2816
ab2d98e3
UD
28172003-02-21 Ulrich Drepper <drepper@redhat.com>
2818
71028edd
UD
2819 * Makefile (tests): Add tst-eintr1.
2820 (distribute): Add eintr.c.
2821 * tst-eintr1.c: New file.
2822 * eintr.c: New file.
2823
e814f748
UD
2824 * pthread_cancel.c (pthread_cancel): Use tkill directly.
2825
2826 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
2827 Disallow sending SIGCANCEL.
2828
ab2d98e3 2829 * Makefile (tests): Remove tst-basic7. Add tst-kill1, tst-kill2,
9c03686d 2830 tst-kill3, tst-kill4, tst-kill5, tst-kill6.
e814f748
UD
2831 * tst-kill1.c: New file.
2832 * tst-kill2.c: New file.
2833 * tst-kill3.c: New file.
2834 * tst-kill5.c: New file.
9c03686d 2835 * tst-kill6.c: New file.
e814f748
UD
2836 * tst-basic7.c: Renamed to...
2837 * tst-kill4.c: ...this.
ab2d98e3 2838
59fed0e2
RM
28392003-02-21 Roland McGrath <roland@redhat.com>
2840
2841 * Makefile (install-lib-ldscripts): New variable.
2842
49dc759f
UD
28432003-02-21 Ulrich Drepper <drepper@redhat.com>
2844
8c2e9a29
UD
2845 * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
2846 * pthread_cancel.c: Use INVALID_TD_P.
2847 * pthread_detach.c: Likewise.
2848 * pthread_getschedparam.c: Likewise.
2849 * pthread_setschedparam.c: Likewise.
2850 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
2851 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
2852 * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
2853 * pthread_timedjoin.c: Likewise.
2854
2855 * tst-basic7.c: Include <signal.h>.
2856
49dc759f
UD
2857 * pthread_join.c (pthread_join): Limited checking for invalid
2858 descriptors.
2859 * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
2860
df5803bf
UD
28612003-02-20 Ulrich Drepper <drepper@redhat.com>
2862
c5acd3d7
UD
2863 * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
2864 beginning of the loop. Clear the entire first block of TSD.
df5803bf
UD
2865 * Makefile (tests): Add tst-key4.
2866 * tst-key4.c: New file.
2867
729924a0
UD
28682003-02-18 Ulrich Drepper <drepper@redhat.com>
2869
2f7dc594
UD
2870 * Makefile (tests): Add tst-basic7.
2871 * tst-basic7.c: New file.
2872
ba25bb0f
UD
2873 * pthread_create.c (deallocate_tsd): Mark as internal_function.
2874 Add some more __builtin_expect.
2875
12fd3c5f 2876 * pthreadP.h: Define dummy version of DEBUGGING_P.
729924a0 2877
5430d926
UD
28782003-02-17 Ulrich Drepper <drepper@redhat.com>
2879
b0db7fbe
UD
2880 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
2881 _POSIX_THREAD_PRIORITY_SCHEDULING.
2882 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
2883 _XOPEN_REALTIME_THREADS.
2884 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
2885
2886 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
2887 kernel returns EINVAL for PID <= 0, work around it.
2888
ecfda9bd
UD
2889 * Makefile (tests): Add tst-signal5.
2890 * tst-signal5.c: New file.
2891
7d78ab99
UD
2892 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
2893 and LOGIN_NAME_MAX.
2894
371a2972
UD
2895 * tst-cancel1.c (tf): Block all signals.
2896
5430d926
UD
2897 * Makefile (tests): Add tst-basic6.
2898 * tst-basic6.c: New file.
2899
2900 * tst-basic1.c: Add test for process ID.
2901
2902 * Makefile (tests): Add tst-cancel10.
2903 * tst-cancel10.c: New file.
2904
2905 * Makefile (tests): Add tst-signal4.
2906 * tst-signal4.c: New file.
2907
2908 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
2909 __sigismember instead of sigismember. Add __builtin_expect.
2910
1564916a
UD
29112003-02-16 Ulrich Drepper <drepper@redhat.com>
2912
179ff175
UD
2913 * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
2914 pthread_setcancelstate, and pthread_rwlock_setpshared.
2915
e4335f9a
UD
2916 * tst-cancel7.c (do_test): Make sure the pid file exists before
2917 canceling the thread.
2918
0a37669a
UD
2919 * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
2920 pthread_rwlock_timedrdlock tests.
2921 * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
2922 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2923 Check for invalid tv_nsec field.
2924 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2925 Likewise.
2926
2927 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
2928 recursive mutex of overflow.
2929
2930 * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
2931
e4335f9a 2932 * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
1564916a
UD
2933 going into an endless loop.
2934 * Makefile (tests): Add tst-cancel9.
2935 * tst-cancel9.c: New file.
2936
2937 * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
2938
b270b548
UD
29392003-02-15 Ulrich Drepper <drepper@redhat.com>
2940
1c82b97f
UD
2941 * tst-mutex5.c (do_test): Add more timedlock tests.
2942
b2f05465 2943 * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
c3bb9ee1
UD
2944 * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
2945
e798b60f
UD
2946 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
2947 use INLINE_SYSCALL. Error number is returned, not -1.
2948
90491dc4
UD
2949 * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
2950 and __deallocate_stack with internal_function.
2951 * pthread_create.c: Adjust definitions appropriately.
2952 * allocatestack.c: Likewise.
2953
2954 * pthread_join.c: Add one more __builtin_expect.
2955 * pthread_timedjoin.c: Likewise.
2956
2957 * pthread_getspecific.c (__pthread_getspecific): Clear data->data
2958 not data of sequence number does not match.
2959 Add one __builtin_expect.
2960
c6247c9d
UD
2961 * Makefile (tests): Add tst-clock1.
2962 * tst-clock1.c: New file.
2963
b270b548
UD
2964 * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
2965 negative arguments.
2966 * Makefile (tests): Add tst-basic5.
2967 * tst-basic5.c: New file.
2968
700bf7af
UD
29692003-02-14 Ulrich Drepper <drepper@redhat.com>
2970
757de559
UD
2971 * Makefile (tests): Add tst-basic4.
2972 * tst-basic4.c: New file.
2973
47202270
UD
2974 * pthreadP.h: Add declaraction for __nptl_nthreads.
2975 * pthread_create.c: Define __nptl_nthreads
2976 (start_thread): Increment __nptl_nthreads at beginning. Decrement
b270b548 2977 after thread is done. If then zero, call exit(0).
47202270
UD
2978 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
2979 Add ptr_nthreads. Define HAVE_PTR_NTHREADS.
2980 * init.c (pthread_functions): Initialize ptr_nthreads.
2981 * allocatestack.c (nptl_nthreads): Remove definition and all uses.
2982 (__reclaim_stacks): Decrement __nptl_nthreads.
2983 * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
2984 Define.
2985 * Makefile (tests): Add tst-basic3.
2986 * tst-basic3.c: New file.
2987
e320ef46
UD
2988 * descr.h: Define CANCELING_BIT and CANCELING_BITMASK. Introduce
2989 after CANCELTYPE_BIT, move the other bits up. Update CANCEL_RESTMASK.
2990 * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
2991 * pthread_cancel.c (pthread_cancel): Likewise. Also set CANCELING_BIT
2992 if asynchronous canceling is enabled.
2993 * pthread_join.c (pthread_join): When recognizing circular joins,
2994 take into account the other thread might be already canceled.
2995 * Makefile (tests): Add tst-join5.
2996 * tst-join5.c: New file.
2997
700bf7af
UD
2998 * Makefile (tests): Add tst-join4.
2999 * tst-join4.c: New file.
3000
30012003-02-13 Ulrich Drepper <drepper@redhat.com>
3002
3003 * tst-cond4.c (main): Add test of pthread_attr_getpshared.
3004
dac0f772
UD
30052003-02-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
3006
3007 * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
3008 THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
3009 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
3010 warning.
3011 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
3012 to avoid warning.
3013 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
3014 error if lll_futex_wake failed.
3015
e8cda341
UD
30162003-02-13 Ulrich Drepper <drepper@redhat.com>
3017
a7720b5e
UD
3018 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
3019 handling of cancellation and failung pthread_mutex_unlock call.
3020 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3021 * Makefile (tests): Add tst-cond8 and tst-cond9.
3022 * tst-cond8.c: New file.
3023 * tst-cond9.c: New file.
3024
a1ea4c06
UD
3025 * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
3026
3027 * sysdeps/pthread/pthread.h: Add missing initializers. Protect
3028 non-standard initializers with __USE_GNU.
3029
e8cda341
UD
3030 * Makefile (tests): Add tst-cleanup3.
3031 * tst-cleanup3.c: New file.
3032
2067577c
UD
30332003-02-12 Ulrich Drepper <drepper@redhat.com>
3034
89e78a95
UD
3035 * Makefile (tests): Add tst-attr1 and tst-attr2.
3036 * tst-attr1.c: New file.
3037 * tst-attr2.c: New file.
3038
dfdd294a
UD
3039 * Makefile: Add rules to build and run tst-atfork2 test.
3040 * tst-atfork2.c: New file.
3041 * tst-atfork2mod.c: New file.
3042
3043 * sysdeps/unix/sysv/linux/unregister-atfork.c
3044 (__unregister_atfork): Free the memory allocated for the handlers
3045 after removing them from the lists.
3046
3047 * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
3048 cleanup function.
3049
3050 * tst-atfork1.c (do_test): Wait for the child we forked.
3051 Report error in child.
3052
3053 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
3054
2067577c
UD
3055 * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
3056
2a8a8a84
UD
30572003-02-10 Ulrich Drepper <drepper@redhat.com>
3058
d9dd121e
UD
3059 * Makefile (tests): Add tst-cancel8.
3060 * tst-cancel8.c: New file.
3061
2a8a8a84
UD
3062 * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
3063 clearing of control variable.
defd1870 3064 * Makefile (tests): Add tst-once3 and tst-once4.
2a8a8a84 3065 * tst-once3.c: New file.
defd1870 3066 * tst-once4.c: New file.
2a8a8a84 3067
a54e8d33
UD
30682003-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
3069
3070 * sysdeps/sh/Makefile: New file.
3071 * sysdeps/sh/bits/atomic.h: New file.
3072 * sysdeps/sh/pthread_spin_init.c: New file.
3073 * sysdeps/sh/pthread_spin_lock.c: New file.
3074 * sysdeps/sh/pthread_spin_trylock.S: New file.
3075 * sysdeps/sh/pthread_spin_unlock.S: New file.
3076 * sysdeps/sh/pthreaddef.h: New file.
3077 * sysdeps/sh/tcb-offsets.sym: New file.
3078 * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
3079 * sysdeps/sh/tls.h: New file.
3080 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
3081 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
3082 * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
3083 * sysdeps/unix/sysv/linux/sh/fork.c: New file.
3084 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
3085 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
3086 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
3087 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
3088 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
3089 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
3090 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
3091 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
3092 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
3093 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
3094 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
3095 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
3096 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
3097 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
3098 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
3099 * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
3100 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
3101 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
3102 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
3103 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
3104 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
3105 * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
3106 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
3107 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
3108 * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
3109 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
3110
696e556e
UD
31112003-02-08 Ulrich Drepper <drepper@redhat.com>
3112
3113 * tst-cond2.c: Rearrange code to not rely on behavior undefined
3114 according to POSIX.
3115
3116 * tst-basic2.c (do_test): Lock mutex before creating the thread.
3117
fef710d6
UD
31182003-02-07 Ulrich Drepper <drepper@redhat.com>
3119
c6180643
UD
3120 * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
3121 (TLS_GET_FS): New #define.
3122 (TLS_SET_FS): New #define.
3123 Correct value of __NR_set_thread_area.
3124
fef710d6
UD
3125 * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
3126
11090a99
UD
31272003-02-06 Ulrich Drepper <drepper@redhat.com>
3128
65c68990
UD
3129 * Makefile (tests): Add tst-popen1.
3130 * tst-popen1.c: New file.
3131
11090a99
UD
3132 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
3133 but inactive generalization.
3134 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3135 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
3136 Minor optimization, remove one instruction.
3137 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
3138
a88c9263
UD
31392003-02-04 Martin Schwidefsky <schwidefsky@de.ibm.com>
3140
3141 * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
3142
31432003-01-31 Martin Schwidefsky <schwidefsky@de.ibm.com>
3144
3145 * init.c (__NR_set_tid_address): Add #ifdef for s390.
3146 * sysdeps/pthread/pthread_barrier_wait.c: New file.
3147 * sysdeps/pthread/pthread_cond_broadcast.c: New file.
3148 * sysdeps/pthread/pthread_cond_signal.c: New file.
3149 * sysdeps/pthread/pthread_cond_timedwait.c: New file.
3150 * sysdeps/pthread/pthread_cond_wait.c: New file.
3151 * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
3152 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
3153 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
3154 * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
3155 * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
3156 * sysdeps/s390/Makefile: New file.
3157 * sysdeps/s390/bits/atomic.h: New file.
3158 * sysdeps/s390/pthread_spin_init.c: New file.
3159 * sysdeps/s390/pthread_spin_lock.c: New file.
3160 * sysdeps/s390/pthread_spin_trylock.c: New file.
3161 * sysdeps/s390/pthread_spin_unlock.c: New file.
3162 * sysdeps/s390/pthreaddef.h: New file.
3163 * sysdeps/s390/tcb-offsets.sym: New file.
3164 * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
3165 * sysdeps/s390/tls.h: New file.
3166 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
3167 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
3168 * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
3169 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
3170 * sysdeps/unix/sysv/linux/s390/fork.c: New file.
3171 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
3172 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
3173 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
3174 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
3175 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
3176 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
3177 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
3178 * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
3179 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
3180 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
3181 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
3182 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
3183 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
3184 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
3185 * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
3186 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
3187 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
3188 * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
3189
6f1cff95
UD
31902003-02-04 Ulrich Drepper <drepper@redhat.com>
3191
ec609a8e
UD
3192 * atomic.h: Add a couple more default implementations.
3193 (atomic_compare_and_exchange_acq): Use
d45e8740
UD
3194 __arch_compare_and_exchange_32_acq in return value definition. It
3195 always exists.
3196 (atomic_bit_set): Renamed from atomic_set_bit.
0289bef9 3197 Add missing atomic_ prefixes.
e3ec8904 3198
6f1cff95
UD
3199 * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
3200 thread library is available, use correct value to mark initialized
3201 once variable.
3202
4f088329
UD
32032003-02-03 Ulrich Drepper <drepper@redhat.com>
3204
6f1cff95
UD
3205 * allocatestack.c (allocate_stack): Use __getpagesize instead of
3206 __sysconf to determine pagesize.
3207
3e4fc359 3208 * pthread_create.c: Include <atomic.h>.
4f088329
UD
3209 * allocatestack.c (allocate_stack): Implement coloring of the
3210 allocated stack memory. Rename pagesize to pagesize_m1. It's the
3211 size minus one. Adjust users.
3e4fc359 3212 * sysdeps/i386/i686/Makefile: New file.
4f088329 3213
2f42e8be
UD
32142003-02-02 Ulrich Drepper <drepper@redhat.com>
3215
4301f7e2
UD
3216 * allocatestack.c: Improve comment throughout the file.
3217
2f42e8be 3218 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
a37818b3 3219 (__lll_lock_wait): Add branch prediction.
2f42e8be
UD
3220 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
3221 (__lll_lock_wait): Likewise.
3222 (lll_unlock_wake_cb): Removed.
3223
4a7d6545
UD
32242003-01-31 Ulrich Drepper <drepper@redhat.com>
3225
3226 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
3227 _POSIX_THREAD_PRIORITY_SCHEDULING.
3228
886d5973
UD
32292003-01-30 Jakub Jelinek <jakub@redhat.com>
3230
3231 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3232 Fix return type of ptr___pthread_getspecific.
3233
e474ca78
UD
32342003-01-29 Ulrich Drepper <drepper@redhat.com>
3235
3236 * Makefile (tests): Add tst-umask1.
3237 (tst-umask1-ARGS): Define.
3238 * tst-umask1.c: New file.
3239
e6ebd2e4
UD
32402003-01-28 Ulrich Drepper <drepper@redhat.com>
3241
6cf26f41
UD
3242 * Makefile (libpthread-routines): Remove lowlevelrwlock. Add
3243 pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
3244 pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
3245 pthread_rwlock_unlock.
3246 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
3247 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
3248 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
3249 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
3250 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3251 New file.
3252 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
3253 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3254 New file.
3255 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
3256 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
3257 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
3258 New file.
3259 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
3260 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
3261 New file.
3262 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
3263 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
3264 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
3265 New file.
3266 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
3267 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
3268 New file.
3269 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
3270
1d087a7e
UD
3271 * Makefile (libpthread-routines): Remove lowlevelcond and
3272 lowlevelsem. Add sem_wait, sem_trywait, sem_timedwait, sem_post,
3273 pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
3274 and pthread_cond_broadcast.
4a99d160
UD
3275 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
3276 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
3277 * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
3278 * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
3279 * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
3280 * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
3281 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
3282 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
3283 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
3284 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
3285 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
3286 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
3287 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
3288 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
3289 * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
3290 * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
3291 * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
3292 * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
3293 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
3294 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
3295 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
3296 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
3297 * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
3298 * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
3299 * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
3300 * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
3301 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
3302 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
3303 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
3304 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
3305 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
1d087a7e 3306
e6ebd2e4
UD
3307 * sysdeps/unix/sysv/linux/i386/createthread.c: Define
3308 PREPARE_CREATE and TLS_VALUE with x86-specific bits. All the rest
3309 of the code is moved to ...
3310 * sysdeps/pthread/createthread.c: ...here. New file.
3311
a15698cb
UD
33122003-01-27 Ulrich Drepper <drepper@redhat.com>
3313
0566b130
UD
3314 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
3315 (__new_sem_post): Clear %eax before returning.
3316 Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
3317
e6fb8846
UD
3318 * Makefile (tests): Add tst-cleanup2.
3319 * tst-cleanup2.c: New file.
3320
a15698cb
UD
3321 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
3322 Interpret first parameter correctly.
3323
8824b0a1
UD
33242003-01-17 Ulrich Drepper <drepper@redhat.com>
3325
3326 * Makefile (headers): Add bits/semaphore.h.
3327
850dcfca
UD
33282003-01-16 Jakub Jelinek <jakub@redhat.com>
3329
3330 * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
3331 if not SHARED.
3332
574b892e
UD
33332003-01-14 Ulrich Drepper <drepper@redhat.com>
3334
a8d87c92
UD
3335 * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
3336 must be used and mapping failed.
3337 Reported by Luke Elliott <luke.elliott@activfinancial.com>.
3338
574b892e
UD
3339 * Makefile (CFLAGS-pthread_self.os): Define this, not
3340 CFLAGS-pthread_self.c.
3341
fb48047a
UD
33422003-01-13 Ulrich Drepper <drepper@redhat.com>
3343
47805511
UD
3344 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
3345 lll_unlock_wake_cb.
3346
fb48047a
UD
3347 * Makefile (libpthread-routines): Add version. Add rules to build
3348 version.os and banner.h.
3349 * version.c: New file.
3350
115bb61d
UD
33512003-01-13 Jakub Jelinek <jakub@redhat.com>
3352
3353 * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
3354 the alias unconditional.
3355 * pthread_mutex_unlock.c (__pthread_mutex_unlock_internal): Likewise.
3356
33572003-01-13 Ulrich Drepper <drepper@redhat.com>
3358
3359 * Makefile (CFLAGS-pthread_self.c): New definition.
3360
6aca81bb
UD
33612003-01-06 Jakub Jelinek <jakub@redhat.com>
3362
3363 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
3364 INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
3365 * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
3366 * init.c (__pthread_initialize_minimal_internal): Likewise.
3367
e9c7764e
UD
33682003-01-07 Jakub Jelinek <jakub@redhat.com>
3369
b5facfda
UD
3370 * pthreadP.h (__pthread_cond_timedwait): Add prototype.
3371
e9c7764e
UD
3372 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
3373 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
3374 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
3375 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
3376 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
3377 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
3378
bef1e42f
UD
33792003-01-06 Jakub Jelinek <jakub@redhat.com>
3380
3381 * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
3382 * pt-system.c (LIBC_CANCEL_HANDLED): Add.
3383 * tst-cancel-wrappers.sh: Remove all exceptions.
3384
bbd17455
UD
33852003-01-05 Ulrich Drepper <drepper@redhat.com>
3386
a73ab6df
UD
3387 * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
3388 features. Reported by Marijn Ros <marijn@mad.scientist.com>.
3389
bbd17455
UD
3390 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
3391 Use __libc_pthread_functions array if SHARED.
3392
3393 * pthreadP.h: Move pthread_cond_2_0_t definition to...
3394 * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
3395
3396 * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
3397 (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
3398 __libc_key_create, __libc_getspecific, __libc_setspecific): Use
3399 __libc_ptf_call instead of __libc_maybe_call.
3400 (PTF): New #define.
3401 (__libc_cleanup_region_start): Wrap function name with PTF call.
3402 (__libc_cleanup_region_end): Likewise.
3403 (__libc_cleanup_end): Likewise.
3404
3405 * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
3406 * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
3407 * pthread_key_create.c: Add __pthread_key_create_internal alias.
3408 * pthreadP.h: Add prototypes.
3409
3410 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
3411 __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
3412 __pthread_rwlock_unlock aliases.
3413 * pthreadP.h: Add prototypes for new aliases.
3414
3415 * pthreadP.h (struct pthead_functions): Moved to...
3416 * sysdeps/pthread/pthread-functions.h: ...here. New file.
3417 * init.c (pthread_functions): Add initializers for new elements.
3418
3419 * cleanup_defer.c: Add __pthread_cleanup_push_defer and
3420 __pthread_cleanup_pop_restore aliases.
3421 * pthreadP.h: Add prototypes.
3422
3423 * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
3424 and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
3425 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
3426 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
3427 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
3428 * pthreadP.h: Adjust prototypes and callers.
3429
d27a78be
UD
34302003-01-04 Ulrich Drepper <drepper@redhat.com>
3431
b74121ae
UD
3432 * Makefile (tests): Add tst-cancel7.
3433 (tst-cancel7-ARGS): New variable.
bbd17455 3434 * tst-cancel7.c: New file.
b74121ae 3435
29bc410c
UD
3436 * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
3437 around gcc defficiencies.
3438 * old_pthread_cond_signal.c: Likewise.
3439 * old_pthread_cond_timedwait.c: Likewise.
3440 * old_pthread_cond_wait.c: Likewise.
3441
d27a78be
UD
3442 * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
3443
733f25e6
UD
34442003-01-03 Ulrich Drepper <drepper@redhat.com>
3445
7edb2ae3
UD
3446 * Makefile (tests): Add tst-cond7.
3447 * tst-cond7.c: New file.
3448
b1151300
UD
3449 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
3450 (condvar_cleanup): Get condvar address from the right place.
3451
733f25e6
UD
3452 * atomic.h: Correct definitions of atomic_full_barrier,
3453 atomic_read_barrier, atomic_write_barrier.
3454
3455 * old_pthread_cond_broadcast.c: Make memory allocate and initialization
3456 race-free.
3457 * old_pthread_cond_signal.c: Likewise.
3458 * old_pthread_cond_timedwait.c: Likewise.
3459 * old_pthread_cond_wait.c: Likewise.
3460
686b7223
UD
34612003-01-03 Jakub Jelinek <jakub@redhat.com>
3462
3463 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
3464
0e07706e
UD
34652003-01-03 Ulrich Drepper <drepper@redhat.com>
3466
997256dd
UD
3467 * pthreadP.h (pthread_cond_2_0_t): New type.
3468 (struct pthread_functions): Use new type for 2.0 condvar callbacks.
3469 Use new type for the 2.0 condvar function prototypes.
3470 * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
3471 * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
3472 parameter.
3473 * old_pthread_cond_destroy.c: Likewise.
3474 * old_pthread_cond_broadcast.c: Likewise. Lock appropriately.
3475 * old_pthread_cond_signal.c: Likewise.
3476 * old_pthread_cond_timedwait.c: Likewise.
3477 * old_pthread_cond_wait.c: Likewise.
3478
842d2817
UD
3479 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
3480 (__pthread_cond_wait): Don't save cancellation mode and seq value
3481 in same location.
3482
0e07706e
UD
3483 * herrno.c (__h_errno_location): Don't define as weak.
3484
bf293afe
UD
34852003-01-02 Jakub Jelinek <jakub@redhat.com>
3486
3487 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
3488 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
3489 and pthread_cond_wait.
3490 * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
3491 Renamed to...
3492 (__pthread_cond_broadcast_2_0): ... this.
3493 * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
3494 Renamed to...
3495 (__pthread_cond_destroy_2_0): ... this.
3496 * old_pthread_cond_init.c (__old_pthread_cond_init):
3497 Renamed to...
3498 (__pthread_cond_init_2_0): ... this.
3499 * old_pthread_cond_signal.c (__old_pthread_cond_signal):
3500 Renamed to...
3501 (__pthread_cond_signal_2_0): ... this.
3502 * old_pthread_cond_wait.c (__old_pthread_cond_wait):
3503 Renamed to...
3504 (__pthread_cond_wait_2_0): ... this.
3505 * pthread_cond_destroy.c: Include shlib-compat.h.
3506 (pthread_cond_destroy): Change strong_alias into versioned_symbol.
3507 * pthread_cond_init.c: Include shlib-compat.h.
3508 (pthread_cond_init): Change strong_alias into versioned_symbol.
3509 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
3510 fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
3511 fields.
3512 (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
3513 __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
3514 __pthread_cond_wait_2_0): New prototypes.
3515 (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
3516 __old_pthread_cond_init, __old_pthread_cond_signal,
3517 __old_pthread_cond_wait): Removed.
3518 * init.c: Include shlib-compat.h.
3519 (pthread_functions): Guard ptr___pthread_attr_init_2_0
3520 initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
3521 Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
3522 ptr___pthread_cond_*_2_0 fields.
3523 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
3524 pthread_cond_*@GLIBC_2.0 compatibility symbols.
3525
3526 * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
3527 LIBC_SIGACTION was not yet defined.
3528 [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
3529 [!defined LIBC_SIGACTION] (__sigaction): New function and
3530 libc_hidden_weak.
3531 [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
3532 [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
3533
35342003-01-02 Jakub Jelinek <jakub@redhat.com>
3535
3536 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
3537
05df18c3
UD
35382003-01-02 Ulrich Drepper <drepper@redhat.com>
3539
3540 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
3541 New, larger type definition.
3542 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
3543 implementation.
3544 * Versions [libpthread]: Add definitions for new pthread_cond_*
3545 interfaces for version GLIBC_2.3.2.
3546 * pthread_cond_init.c: Update initialization for new type definition.
3547 * Makefile (libpthread-routines): Remove pthread_cond_wait,
3548 pthread_cond_timedwait, pthread_cond_signal, and
3549 pthread_cond_broadcast. Add old_pthread_cond_init,
3550 old_pthread_cond_destroy, old_pthread_cond_wait,
3551 old_pthread_cond_timedwait, old_pthread_cond_signal, and
3552 old_pthread_cond_broadcast.
3553 * old_pthread_cond_broadcast.c: New file.
3554 * old_pthread_cond_destroy.c: New file.
3555 * old_pthread_cond_init.c: New file.
3556 * old_pthread_cond_signal.c: New file.
3557 * old_pthread_cond_timedwait.c: New file.
3558 * old_pthread_cond_wait.c: New file.
3559 * pthreadP.h: Add prototypes for the compatibility interfaces.
3560
3561 * pthread_cond_destroy.c: Don't include <errno.h>.
3562
fd8979e4
UD
35632003-01-01 Ulrich Drepper <drepper@redhat.com>
3564
3565 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
3566 unnecessary zero offset when addressing MUTEX.
3567
6d6ee629
UD
35682002-12-31 Ulrich Drepper <drepper@redhat.com>
3569
3570 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
3571 __register_atfork.
3572 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
3573 for __register_atfork.
3574
a4baf360
UD
35752002-12-31 Jakub Jelinek <jakub@redhat.com>
3576
3577 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
3578 instead of ASSEMBLER test macro.
3579
3580 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
3581 __libc_current_sigrtmax): Add libc_hidden_def.
3582
3583 * sysdeps/pthread/list.h: Remove assert.h include.
3584
e9395a94
UD
35852002-12-31 Ulrich Drepper <drepper@redhat.com>
3586
3587 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
3588 __pthread_initialize_minimal_internal not
3589 __pthread_initialize_minimal.
3590
89d6e444
UD
35912002-12-30 Ulrich Drepper <drepper@redhat.com>
3592
416d2de6
UD
3593 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
3594 __pthread_initialize_minimal as hidden.
3595
89d6e444
UD
3596 * init.c (__pthread_initialize_minimal_internal): Don't mark as
3597 constructor.
3598
35992002-12-31 Jakub Jelinek <jakub@redhat.com>
3600
3601 * Makefile ($(inst_libdir)/libpthread.so): Depend on
3602 $(common-objpfx)format.lds, include that into the output script.
3603 Fix comment.
3604 (extra-B-pthread.so): Change linuxthreads/ into nptl/.
3605
8cac677c
UD
36062002-12-28 Andreas Jaeger <aj@suse.de>
3607
3608 * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
3609 nsec resolution changes.
3610 (xstat64_conv): Likewise.
3611 (xstat32_conv): Likewise.
3612 * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
3613 struct kernel_stat.
3614 * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
3615 structs stat and stat64.
3616 * time/time.h (__timespec_defined): Define for __USE_MISC.
89d6e444 3617 * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
8cac677c 3618
49e9f864
UD
36192002-12-30 Jakub Jelinek <jakub@redhat.com>
3620
3621 * forward.c (FORWARD2): Renamed from FORWARD3. Remove unused export
3622 argument.
3623 (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
3624 (pthread_exit): Use strong_alias to avoid warnings.
3625 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
3626 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
3627 ptr___pthread_attr_init_2_*.
3628 * init.c (pthread_functions): Adjust.
3629
bab09b26
UD
36302002-12-29 Ulrich Drepper <drepper@redhat.com>
3631
598d7a42
UD
3632 * forward.c: Make all functions available by default again. It
3633 caused too much trouble.
3634
bab09b26
UD
3635 * pt-siglongjmp.c: Removed.
3636
3b7ed871
UD
36372002-12-28 Jakub Jelinek <jakub@redhat.com>
3638
3639 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
3640 (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
3641 * sysdeps/i386/Makefile: New file.
3642 * sysdeps/i386/tcb-offsets.sym: New file.
3643 * sysdeps/pthread/tcb-offsets.h: New file.
3644 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
3645 Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
3646
3647 * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
3648 __register_atfork...
3649 (GLIBC_2.3.2): ...here.
3650
36512002-12-28 Ulrich Drepper <drepper@redhat.com>
3652
3653 * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
3654 pthread_attr_setstackaddr with __attribute_deprecated__.
3655
270d9d47
UD
36562002-12-27 Jakub Jelinek <jakub@redhat.com>
3657
3658 * pt-system.c (system): Remove cancellation handling.
3659 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
3660 cancellation routines.
3661
131fd126
UD
36622002-12-28 Ulrich Drepper <drepper@redhat.com>
3663
afb2e954
UD
3664 * descr.h: Include <dl-sysdep.h>.
3665 (struct pthread): Move header.data.list to the back of the struct.
131fd126
UD
3666 * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
3667 (MULTIPLE_THREADS_OFFSET): Adjust offset.
3668 (SYSINFO_OFFSEET): Likewise.
3669
36702002-12-27 Jakub Jelinek <jakub@redhat.com>
3671
3672 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
3673 Define.
3674 (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
3675 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
3676 DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
3677 (USE_DL_SYSINFO): Undef.
3678
36792002-12-22 Jakub Jelinek <jakub@redhat.com>
3680
3681 * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
3682 $(common-objpfx)libc.so.
3683 * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
3684 it is bigger than pipe buffer size even on arches with bigger
3685 page size.
3686 (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
3687
a218c9cf
UD
36882002-12-25 Ulrich Drepper <drepper@redhat.com>
3689
3690 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
3691 correct errno access for case that USE___THREAD is not defined.
3692
015a2dc9
UD
36932002-12-24 Ulrich Drepper <drepper@redhat.com>
3694
3695 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
3696 Patch by Marijn Ros <marijn@mad.scientist.com>.
3697
5220f9ac
RM
36982002-12-22 Roland McGrath <roland@redhat.com>
3699
3700 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
3701
1561bf63
UD
37022002-12-20 Ulrich Drepper <drepper@redhat.com>
3703
3704 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
3705
3325198e
UD
37062002-12-19 Ulrich Drepper <drepper@redhat.com>
3707
057c823f
UD
3708 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
3709 NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
3710 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
3711
097eca29
UD
3712 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
3713 of int $0x80.
3714 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
3715 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
3716 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
3717 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
3718 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
3719 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
3720 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
3721 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
3722
3723 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
3724 sysenter.
3725 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
3726
3727 * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
3728
5f5843e3
UD
3729 * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
3730 in new TCB.
3731 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
3732 that sysinfo is properly initialized.
3733 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
3734 to 1 only for ld.so.
3735
3325198e
UD
3736 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
3737 RTLD_CORRECT_DYNAMIC_WEAK.
3738
74e8f2dc
UD
37392002-12-19 Jakub Jelinek <jakub@redhat.com>
3740
3741 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
3742 Use return 0 as 6th argument to FORWARD4.
3743 * pthread_equal.c: Include pthreadP.h instead of pthread.h.
3744
df45b31e
UD
37452002-12-18 Ulrich Drepper <drepper@redhat.com>
3746
3747 * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
3748 * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
3749 Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
3750 (INIT_SYSINFO): New #define.
3751 (TLS_TP_INIT): Use INIT_SYSINFO.
3752 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
3753 At test to make sure SYSINFO_OFFSET value is correct.
3754 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
3755
3d539579
UD
37562002-12-18 Jakub Jelinek <jakub@redhat.com>
3757
3758 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
3759 * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
3760 * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
3761 [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
3762 __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
3763 __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
3764 __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
3765
d7913e0e
UD
37662002-12-18 Ulrich Drepper <drepper@redhat.com>
3767
f051627f
UD
3768 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
3769 macro instead of using int $0x80 directly.
3770
d7913e0e
UD
3771 * sysdeps/pthread/bits/stdio-lock.h: New file.
3772 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
3773 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
3774 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
3775 * Makefile (routines): Add libc-lowlevelmutex.
3776
3777 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
3778 __i686.get_pc_thunk.dx.
3779
f077a4a9
UD
37802002-12-17 Jakub Jelinek <jakub@redhat.com>
3781
3782 * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
3783 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
3784 ($(objpfx)tst-cancel-wrappers.out): New rule.
3785 * tst-cancel-wrappers.sh: New test.
3786 * tst-locale1.c: Include signal.h.
3787 (uselocale): Test static linking of __libc_current_sigrt*.
3788
37892002-12-17 Ulrich Drepper <drepper@redhat.com>
3790
3791 * Makefile (tests): Add tst-cancel6.
3792 * tst-cancel6.c: New file
3793
bd499a3b
UD
37942002-12-17 Jakub Jelinek <jakub@redhat.com>
3795
3796 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
3797 Define meaningfully for assembler as well.
3798 * pthreadP.h (struct pthread_functions): Remove
3799 ptr_pthread_attr_init field. Add ptr_pthread_attr_init_2_0
3800 and ptr_pthread_attr_init_2_1 fields.
3801 * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
3802 and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
3803 * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
3804 (FORWARD3): Define using FORWARD4.
3805 (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
3806 versions.
3807 * pt-system.c: Remove duplicate stdlib.h include.
3808
0a1063f4
UD
38092002-12-16 Ulrich Drepper <drepper@redhat.com>
3810
87d60668
UD
3811 * sem_init.c: Define sem_init@GLIBC_2.0.
3812 * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
3813 * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
3814
0a1063f4
UD
3815 * flockfile.c: Moved to...
3816 * sysdeps/pthread/flockfile.c: ...here. New file.
3817 * funlockfile.c: Moved to...
3818 * sysdeps/pthread/funlockfile.c: ...here. New file.
3819 * ftrylockfile.c: Moved to...
3820 * sysdeps/pthread/ftrylockfile.c: ...here. New file.
3821
9634cf9d
UD
38222002-12-16 Jakub Jelinek <jakub@redhat.com>
3823
3824 * libc-cancellation.c: Guard both function with
3825 #if !defined NOT_IN_libc.
3826 * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
3827 automatically provided pthread wrappers.
3828 * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
3829 CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
3830 nor in libpthread.
3831 * pt-open.c: Removed.
3832 * pt-fcntl.c: Removed.
3833 * pt-fsync.c: Removed.
3834 * pt-lseek.c: Removed.
3835 * pt-msgrcv.c: Removed.
3836 * pt-msgsnd.c: Removed.
3837 * pt-msync.c: Removed.
3838 * pt-nanosleep.c: Removed.
3839 * pt-open64.c: Removed.
3840 * pt-pause.c: Removed.
3841 * pt-pread.c: Removed.
3842 * pt-pread64.c: Removed.
3843 * pt-pwrite.c: Removed.
3844 * pt-pwrite64.c: Removed.
3845 * pt-read.c: Removed.
3846 * pt-recv.c: Removed.
3847 * pt-recvfrom.c: Removed.
3848 * pt-recvmsg.c: Removed.
3849 * pt-send.c: Removed.
3850 * pt-sendto.c: Removed.
3851 * pt-sigtimedwait.c: Removed.
3852 * pt-sigwait.c: Removed.
3853 * pt-wait.c: Removed.
3854 * pt-waitpid.c: Removed.
3855 * pt-write.c: Removed.
3856 * pt-accept.c: Removed.
3857 * pt-close.c: Removed.
3858 * pt-connect.c: Removed.
3859 * pt-lseek64.c: Removed.
3860 * pt-sendmsg.c: Removed.
3861 * pt-tcdrain.c: Removed.
3862
6ee8d334
UD
38632002-12-15 Ulrich Drepper <drepper@redhat.com>
3864
81fa9371
UD
3865 * init.c (__pthread_initialize_minimal_internal): Renamed from
3866 __pthread_initialize_minimal. Make old name an alias. This
3867 converts a normal relocation into a relative relocation.
3868
f3015aa5
UD
3869 * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
3870
4cbc1950
UD
3871 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
3872 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
3873 * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
3874 pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
3875 pt-sigwaitinfo, pt-waitid, and pt-writev.
3876 * pt-creat.c: Removed.
3877 * pt-poll.c: Removed.
3878 * pt-pselect.c: Removed.
3879 * pt-readv.c: Removed.
3880 * pt-select.c: Removed.
3881 * pt-sigpause.c: Removed.
3882 * pt-sigsuspend.c: Removed.
3883 * pt-sigwaitinfo.c: Removed.
3884 * pt-waitid.c: Removed.
3885 * pt-writev.c: Removed.
3886
8454830b
UD
3887 * init.c (pthread_functions): New variable.
3888 (__pthread_initialize_minimal): Pass pointer to pthread_functions
3889 (or NULL) to __libc_pthread_init.
3890 * forward.c: Rewrite to use __libc:pthread_functions array to get
3891 function addresses.
3892 * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
3893 prototype.
3894 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
3895 Take new parameter. Copy content of variable pointed to by it
3896 to __libc_pthread_init.
3897
3898 * pthreadP.h (struct pthread_functions): New type.
3899 (__libc_pthread_init): Declare.
3900
3901 * pthread_attr_destroy.c: Add namespace protected alias.
3902 * pthread_attr_getdetachstate.c: Likewise.
3903 * pthread_attr_getinheritsched.c: Likewise.
3904 * pthread_attr_getschedparam.c: Likewise.
3905 * pthread_attr_getschedpolicy.c: Likewise.
3906 * pthread_attr_getscope.c: Likewise.
3907 * pthread_attr_setdetachstate.c: Likewise.
3908 * pthread_attr_setinheritsched.c: Likewise.
3909 * pthread_attr_setschedparam.c: Likewise.
3910 * pthread_attr_setschedpolicy.c: Likewise.
3911 * pthread_attr_setscope.c: Likewise.
3912 * pthread_cond_broadcast.c: Likewise.
3913 * pthread_cond_destroy.c: Likewise.
3914 * pthread_cond_init.c: Likewise.
3915 * pthread_cond_signal.c: Likewise.
3916 * pthread_cond_wait.c: Likewise.
3917 * pthread_condattr_destroy.c: Likewise.
3918 * pthread_condattr_init.c: Likewise.
3919 * pthread_equal.c: Likewise.
3920 * pthread_exit.c: Likewise.
3921 * pthread_getschedparam.c: Likewise.
3922 * pthread_self.c: Likewise.
3923 * pthread_setcancelstate.c: Likewise.
3924 * pthread_setschedparam.c: Likewise.
3925 * pthread_mutex_destroy.c: Likewise.
3926 * pthread_mutex_init.c: Likewise.
3927 * pthreadP.h: Add prototypes for the aliases.
3928
0d5f4929
UD
3929 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
3930 multiple_threads member in correct TCB to 1.
3931
6ee8d334
UD
3932 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
3933 SINGLE_THREAD_P. If in libc or libpthread examine multiple_thread
3934 member of thread decriptor, otherwise return unconditionally 1.
3935
2fb6444d
UD
39362002-12-14 Ulrich Drepper <drepper@redhat.com>
3937
3938 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
3939 regular Linux version. Remove file.
3940 * sysdeps/unix/sysv/linux/connect.S: Likewise. Remove file.
3941 * sysdeps/unix/sysv/linux/llseek.c: Likewise. Remove file.
3942 * sysdeps/unix/sysv/linux/msgrcv.c: Likewise. Remove file.
3943 * sysdeps/unix/sysv/linux/msgsnd.c: Likewise. Remove file.
3944 * sysdeps/unix/sysv/linux/open64.c: Likewise. Remove file.
3945 * sysdeps/unix/sysv/linux/poll.c: Likewise. Remove file.
3946 * sysdeps/unix/sysv/linux/pread.c: Likewise. Remove file.
3947 * sysdeps/unix/sysv/linux/pread64.c: Likewise. Remove file.
3948 * sysdeps/unix/sysv/linux/pselect.c: Likewise. Remove file.
3949 * sysdeps/unix/sysv/linux/pwrite.c: Likewise. Remove file.
3950 * sysdeps/unix/sysv/linux/pwrite64.c: Likewise. Remove file.
3951 * sysdeps/unix/sysv/linux/readv.c: Likewise. Remove file.
3952 * sysdeps/unix/sysv/linux/recv.S: Likewise. Remove file.
3953 * sysdeps/unix/sysv/linux/recvfrom.S: Likewise. Remove file.
3954 * sysdeps/unix/sysv/linux/recvmsg.S: Likewise. Remove file.
3955 * sysdeps/unix/sysv/linux/send.S: Likewise. Remove file.
3956 * sysdeps/unix/sysv/linux/sendmsg.S: Likewise. Remove file.
3957 * sysdeps/unix/sysv/linux/sendto.S: Likewise. Remove file.
3958 * sysdeps/unix/sysv/linux/sigpause.c: Likewise. Remove file.
3959 * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise. Remove file.
3960 * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise. Remove file.
3961 * sysdeps/unix/sysv/linux/sigwait.c: Likewise. Remove file.
3962 * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise. Remove file.
3963 * sysdeps/unix/sysv/linux/system.c: Likewise. Remove file.
3964 * sysdeps/unix/sysv/linux/tcdrain.c: Likewise. Remove file.
3965 * sysdeps/unix/sysv/linux/wait.c: Likewise. Remove file.
3966 * sysdeps/unix/sysv/linux/waitid.c: Likewise. Remove file.
3967 * sysdeps/unix/sysv/linux/waitpid.c: Likewise. Remove file.
3968 * sysdeps/unix/sysv/linux/writev.c: Likewise. Remove file.
3969 * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise. Remove file.
3970
86b2dc40
UD
39712002-12-14 Jakub Jelinek <jakub@redhat.com>
3972
3973 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
3974 * sysdeps/unix/sysv/linux/open.c: Removed.
3975 * sysdeps/unix/sysv/linux/fsync.c: Removed.
3976 * sysdeps/unix/sysv/linux/lseek.c: Removed.
3977 * sysdeps/unix/sysv/linux/msync.c: Removed.
3978 * sysdeps/unix/sysv/linux/read.c: Removed.
3979 * sysdeps/unix/sysv/linux/close.c: Removed.
3980 * sysdeps/unix/sysv/linux/creat.c: Removed.
3981 * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
3982 * sysdeps/unix/sysv/linux/pause.c: Removed.
3983 * sysdeps/unix/sysv/linux/select.c: Removed.
3984 * sysdeps/unix/sysv/linux/write.c: Removed.
3985
9d263d72
UD
39862002-12-14 Ulrich Drepper <drepper@redhat.com>
3987
3988 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
3989 element in TCB to see whether locking is needed.
3990
3991 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
3992 MULTIPLE_THREADS_OFFSET value is correct.
3993
3994 * sysdeps/unix/sysv/linux/close.c: New file.
3995 * sysdeps/unix/sysv/linux/connect.S: New file.
3996 * sysdeps/unix/sysv/linux/creat.c: New file.
3997 * sysdeps/unix/sysv/linux/fsync.c: New file.
3998 * sysdeps/unix/sysv/linux/llseek.c: New file.
3999 * sysdeps/unix/sysv/linux/lseek.c: New file.
4000 * sysdeps/unix/sysv/linux/msgrcv.c: New file.
4001 * sysdeps/unix/sysv/linux/msgsnd.c: New file.
4002 * sysdeps/unix/sysv/linux/msync.c: New file.
4003 * sysdeps/unix/sysv/linux/nanosleep.c: New file.
4004 * sysdeps/unix/sysv/linux/open.c: New file.
4005 * sysdeps/unix/sysv/linux/open64.c: New file.
4006 * sysdeps/unix/sysv/linux/pause.c: New file.
4007 * sysdeps/unix/sysv/linux/poll.c: New file.
4008 * sysdeps/unix/sysv/linux/pread.c: New file.
4009 * sysdeps/unix/sysv/linux/pread64.c: New file.
4010 * sysdeps/unix/sysv/linux/pselect.c: New file.
4011 * sysdeps/unix/sysv/linux/pwrite.c: New file.
4012 * sysdeps/unix/sysv/linux/pwrite64.c: New file.
4013 * sysdeps/unix/sysv/linux/readv.c: New file.
4014 * sysdeps/unix/sysv/linux/recv.S: New file.
4015 * sysdeps/unix/sysv/linux/recvfrom.S: New file.
4016 * sysdeps/unix/sysv/linux/recvmsg.S: New file.
4017 * sysdeps/unix/sysv/linux/select.c: New file.
4018 * sysdeps/unix/sysv/linux/send.S: New file.
4019 * sysdeps/unix/sysv/linux/sendmsg.S: New file.
4020 * sysdeps/unix/sysv/linux/sendto.S: New file.
4021 * sysdeps/unix/sysv/linux/sigpause.c: New file.
4022 * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
4023 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
4024 * sysdeps/unix/sysv/linux/sigwait.c: New file.
4025 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
4026 * sysdeps/unix/sysv/linux/system.c: New file.
4027 * sysdeps/unix/sysv/linux/tcdrain.c: New file.
4028 * sysdeps/unix/sysv/linux/wait.c: New file.
4029 * sysdeps/unix/sysv/linux/waitid.c: New file.
4030 * sysdeps/unix/sysv/linux/waitpid.c: New file.
4031 * sysdeps/unix/sysv/linux/writev.c: New file.
4032 * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
4033
4034 * pt-readv.c: Fix comment.
4035
40362002-12-14 Jakub Jelinek <jakub@redhat.com>
4037
4038 * tst-cleanup1.c: Include stdlib.h.
4039
4040 * tst-cancel5.c: New test.
4041 * Makefile (tests): Add tst-cancel5.
4042 (tst-cancel5): Link against libc.so libpthread.so in that order.
4043
9ae0909b
UD
40442002-12-13 Ulrich Drepper <drepper@redhat.com>
4045
b7bdd9c4
UD
4046 * forward.c (test_loaded): Prevent recursive calls.
4047
9ae0909b
UD
4048 * Makefile (routines): Add libc-cancellation.
4049 * libc-cancellation.c: New file.
4050 * descr.h (struct pthread): Add multiple_threads field.
4051 * allocatestack.c (allocate_stack): Initialize multiple_header field of
4052 new thread descriptor to 1.
4053 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
4054 Initialize multiple_thread field after successful thread creation.
4055 * cancellation.c (__do_cancel): Move to pthreadP.h.
4056 (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
4057 (__pthread_disable_asynccancel): Add internal_function attribute.
4058 * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
4059 * pthread_setcancelstate.c: Likewise.
4060 * pthread_setcanceltype.c: Likewise.
4061 * pthread_exit.c: Likewise.
4062 * pthreadP.h (CANCELLATION_P): Likewise.
4063 (__do_cancel): Define as static inline.
4064 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
4065 (__libc_enable_asynccancel, __libc_disable_asynccancel): New
4066 declarations.
4067 * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
4068 fields. Define MULTIPLE_THREADS_OFFSET.
4069 * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
4070 declaration.
4071 * sysdeps/unix/sysv/linux/accept.S: New file.
4072 * sysdeps/unix/sysv/linux/read.c: New file.
4073 * sysdeps/unix/sysv/linux/write.c: New file.
4074 * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
4075 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
4076 initialization of __libc_locking_needed.
4077 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
4078 __libc_locking_needed, use multiple_threads field in TCB.
4079 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
4080
22f20674
UD
40812002-12-12 Ulrich Drepper <drepper@redhat.com>
4082
2ad2e1e7
UD
4083 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
4084 version.
4085 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
4086
22f20674
UD
4087 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
4088 access to __libc_locking_needed for PIC.
4089
aa80bf86
UD
40902002-12-12 Jakub Jelinek <jakub@redhat.com>
4091
4092 * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
4093 declare for libc.so.
4094 (__libc_lock_init, __libc_lock_init_recursive): Change into comma
4095 expression.
4096 (__libc_lock_lock): Put into statement expression.
4097 (__libc_lock_unlock): Remove trailing semicolon.
4098 * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
4099
24021373
RM
41002002-12-12 Roland McGrath <roland@redhat.com>
4101
4102 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
4103 "m" constraint to refer to __libc_locking_needed. Declare it here.
4104
14e7aece
UD
41052002-12-12 Ulrich Drepper <drepper@redhat.com>
4106
4107 * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
4108 * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
4109 Initialize __libc_locking_needed.
4110 * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
4111 instead of __register_pthread_fork_handler.
4112 * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
4113 * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
4114 fork-gen with libc_pthread_init.
4115 * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
4116 of __register_pthread_fork_handler.
4117 * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
4118 of __register_pthread_fork_handler.
4119 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
4120 __libc_locking_needed to determine whether lock prefix can be avoided.
4121 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
4122
85631c8e
UD
41232002-12-11 Ulrich Drepper <drepper@redhat.com>
4124
da63009e
UD
4125 * Makefile (tests): Add tst-cleanup1.
4126 * tst-cleanup1.c: New file.
4127 * cancellation.c (__cleanup_thread): Removed.
4128 (__do_cancel): Remove call to __cleanup_thread.
4129 * pthreadP.h: Remove __cleanup_thread prorotype.
4130
000160a2
UD
4131 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
4132 Remember function and argument even if cancellation handler
4133 function is not available.
4134 (__libc_cleanup_region_end): Execute registered function directly if
4135 pthread functions are not available.
4136 (__libc_cleanup_end): Likewise.
4137
85631c8e
UD
4138 * init.c (__pthread_initialize_minimal): Fix initialization in
4139 static lib by preventing gcc from being too clever.
4140
dce8f2b6
UD
41412002-12-10 Ulrich Drepper <drepper@redhat.com>
4142
34a075be
UD
4143 * init.c (__pthread_initialize_minimal): Remove unneccesary
4144 sigaddset call.
4145
dce8f2b6
UD
4146 * Makefile (tests): We can run tst-locale2 now.
4147
e5e45b53
UD
41482002-12-09 Ulrich Drepper <drepper@redhat.com>
4149
4150 * Versions: Remove duplicated sigwait entry.
4151
bdb04f92
UD
41522002-12-08 Ulrich Drepper <drepper@redhat.com>
4153
1e506629
UD
4154 * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
4155 inside libpthread.
4156
a3957dd5
UD
4157 * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
4158
bdb04f92
UD
4159 * pthreadP.h: Declare __pthread_enable_asynccancel and
4160 __pthread_disable_asynccancel.
4161 (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
4162 (CANCEL_RESET): Use __pthread_disable_asynccancel.
4163 * cancellation.c (__pthread_enable_asynccancel): New function.
4164 (__pthread_disable_asynccancel): New function.
4165 * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
4166 * pt-close.c: Likewise.
4167 * pt-connect.c: Likewise.
4168 * pt-creat.c: Likewise.
4169 * pt-fcntl.c: Likewise.
4170 * pt-fsync.c: Likewise.
4171 * pt-lseek.c: Likewise.
4172 * pt-lseek64.c: Likewise.
4173 * pt-msgrcv.c: Likewise.
4174 * pt-msgsnd.c: Likewise.
4175 * pt-msync.c: Likewise.
4176 * pt-nanosleep.c: Likewise.
4177 * pt-open.c: Likewise.
4178 * pt-open64.c: Likewise.
4179 * pt-pause.c: Likewise.
4180 * pt-poll.c: Likewise.
4181 * pt-pread.c: Likewise.
4182 * pt-pread64.c: Likewise.
4183 * pt-pselect.c: Likewise.
4184 * pt-pwrite.c: Likewise.
4185 * pt-pwrite64.c: Likewise.
4186 * pt-read.c: Likewise.
4187 * pt-readv.c: Likewise.
4188 * pt-recv.c: Likewise.
4189 * pt-recvfrom.c: Likewise.
4190 * pt-recvmsg.c: Likewise.
4191 * pt-select.c: Likewise.
4192 * pt-send.c: Likewise.
4193 * pt-sendmsg.c: Likewise.
4194 * pt-sendto.c: Likewise.
4195 * pt-sigpause.c: Likewise.
4196 * pt-sigsuspend.c: Likewise.
4197 * pt-sigtimedwait.c: Likewise.
4198 * pt-sigwait.c: Likewise.
4199 * pt-sigwaitinfo.c: Likewise.
4200 * pt-system.c: Likewise.
4201 * pt-tcdrain.c: Likewise.
4202 * pt-wait.c: Likewise.
4203 * pt-waitid.c: Likewise.
4204 * pt-waitpid.c: Likewise.
4205 * pt-write.c: Likewise.
4206 * pt-writev.c: Likewise.
a3957dd5
UD
4207 * pthread_join.c: Likewise.
4208 * pthread_timedjoin.c: Likewise.
bdb04f92
UD
4209
4210 * pt-sigpause.c (sigsuspend): Call __sigsuspend.
4211 (__xpg_sigpause): New function.
4212 * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
4213
6ccb3834
UD
42142002-12-07 Ulrich Drepper <drepper@redhat.com>
4215
09efc3ba
UD
4216 * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
4217
4218 * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
4219 _GI_pthread_cleanup_pop to pthreadP.h.
4220
4221 * ftrylockfile.c: Use _IO_lock_trylock instead of
4222 pthread_mutex_trylock.
4223
4224 * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
4225 (CANCEL_RESET): Likewise.
4226 (__pthread_setcanceltype_): Declare.
4227 (__pthread_mutex_lock_internal): Declare.
4228 (__pthread_mutex_unlock_internal): Declare.
4229 (__pthread_once_internal): Declare.
4230 (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
4231 (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
4232
4233 * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
4234 and pthread_mutex_unlock.
4235 * pthread_cond_wait.c: Likewise.
4236 * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
4237 * pthread_mutex_unlock.c: Likewise.
4238
4239 * pthread_setcanceltype.c: Add additional alias
4240 __pthread_setcanceltype.
4241
4242 * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
4243 * sem_open.c (sem_open): Likewise.
4244 Use __libc_open, __libc_write, and __libc_close instead of
4245 open, write, and close respectively.
4246
4247 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
4248 Rewrite as statement expression since it must return a value.
4249
4250 * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
4251 * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
4252 __pthread_kill.
4253
4254 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
4255 alias __pthread_once_internal.
4256
6ccb3834
UD
4257 * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
4258
d3c9f895
UD
42592002-12-06 Ulrich Drepper <drepper@redhat.com>
4260
4614167a
UD
4261 * Makefile (tests): Add tst-stdio1 and tst-stdio2.
4262 * tst-stdio1.c: New file.
4263 * tst-stdio2.c: New file.
4264
a4548cea
UD
4265 * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
4266
d3c9f895
UD
4267 * Makefile (tests): Comment out tst-locale2 for now.
4268 (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
4269
4270 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
4271 -D_IO_MTSAFE_IO.
4272 * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
4273 Use _IO_lock_init instead of explicit assignment.
4274
4275 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
4276 Define __libc_lock_* and __libc_lock_recursive macros with
4277 lowlevellock macros, not pthread mutexes.
4278
4279 * flockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_lock instead
4280 of pthread_mutex_lock.
4281 * funlockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_unlock
4282 instead of pthread_mutex_unlock.
4283
fde89ad0
RM
42842002-12-06 Roland McGrath <roland@redhat.com>
4285
4286 * allocatestack.c (__stack_user): Use uninitialized defn.
4287 * init.c (__pthread_initialize_minimal): Initialize it here.
4288
11767d47
RM
42892002-12-05 Roland McGrath <roland@redhat.com>
4290
fde89ad0
RM
4291 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
4292 string.
4293 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
4294
11767d47
RM
4295 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
4296 missing & here too.
4297
440d8bc2
UD
42982002-12-05 Ulrich Drepper <drepper@redhat.com>
4299
4300 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
4301 lowlevellock.
4302 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
4303 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
4304 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
4305 * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
4306 for __libc_lock_* macros.
4307 * Makefile (routines): Add libc-lowlevellock.
4308
43092002-10-09 Roland McGrath <roland@redhat.com>
4310
4311 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
4312 Under [__PIC__], call the function via the pointer fetched for
4313 comparison rather than a call by name that uses the PLT.
4314 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
4315 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
4316 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
4317 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
4318 (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
4319
d5ed0118
RM
43202002-12-04 Roland McGrath <roland@redhat.com>
4321
4322 * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
4323
4324 * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
4325 * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
4326
4327 * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
4328
eaa4099f
UD
43292002-12-04 Ulrich Drepper <drepper@redhat.com>
4330
4331 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
4332 a completely opaque, non-integer type.
4333 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4334
33b5d0cc
UD
43352002-12-05 Jakub Jelinek <jakub@redhat.com>
4336
4337 * sysdeps/i386/tls.h: Include stdlib.h.
4338 * sysdeps/x86_64/tls.h: Likewise.
4339
7a5cdb30
UD
43402002-12-04 Ulrich Drepper <drepper@redhat.com>
4341
c4a6d859
UD
4342 * Makefile (tests): Add tst-locale2.
4343 (tests-static): Likewise.
4344 * tst-locale2.c: New file.
4345
7a5cdb30
UD
4346 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
4347 volatile and add memory clobbers to lock operations.
4348
d82d5d12
UD
43492002-12-03 Ulrich Drepper <drepper@redhat.com>
4350
69cae3cf
UD
4351 * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
4352 * sysdeps/i386/i486/bits/atomic.h: New file.
4353 * sysdeps/i386/i586/bits/atomic.h: New file.
4354 * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
4355 include i486 version.
4356 * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
4357 * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
c97c64de 4358 Patch by Marijn Ros <marijn@mad.scientist.com>.
69cae3cf 4359
e4044c01
UD
4360 * allocatestack.c (get_cached_stack): Don't crash if we first
4361 found a stack with a larger size then needed.
4362 Reported by Hui Huang <hui.huang@sun.com>.
4363
d82d5d12
UD
4364 * Makefile (tests): Add tst-sysconf.
4365 * tst-sysconf.c: New file.
4366
4367 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
4368 PTHREAD_THREADS_MAX.
4369
fa9a4ff0
RM
43702002-12-02 Roland McGrath <roland@redhat.com>
4371
4372 * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
4373 Declare using hidden_proto instead of attribute_hidden, so there are
4374 non-.hidden static symbols for gdb to find.
4375 (__pthread_keys): Likewise.
4376 * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
4377 * allocatestack.c (__stack_user): Likewise.
4378 * pthread_create.c (__pthread_keys): Likewise.
4379 (__nptl_threads_events, __nptl_last_event): Make these static instead
4380 of hidden.
4381 * pthread_key_create.c (__pthread_pthread_keys_max,
4382 __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
4383
91949a33
UD
43842002-12-02 Ulrich Drepper <drepper@redhat.com>
4385
c22b52fa
UD
4386 * Makefile (tests): Add tst-locale1. If buid-static is yes link
4387 statically.
4388 * tst-locale1.c: New file.
4389
beb6aa41
UD
4390 * pthread_cond_timedwait.c: Include <stdlib.h>.
4391
91949a33
UD
4392 * Makefile (tests): Add tst-fork2 and tst-fork3.
4393 * tst-fork2.c: New file.
4394 * tst-fork3.c: New file.
4395
654dff90
UD
43962002-11-28 Ulrich Drepper <drepper@redhat.com>
4397
cb0e76b4
UD
4398 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
4399
4400 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
4401 require it to 200112L.
4402
4403 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
4404 instruction only if HAVE_CMOV is defined.
4405 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
4406
975aa229
UD
4407 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
4408
654dff90
UD
4409 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
4410
4411 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
4412
4413 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
4414
a3931336
UD
44152002-11-27 Ulrich Drepper <drepper@redhat.com>
4416
c10c099c
UD
4417 * sysdeps/x86_64/bits/atomic.h: New file.
4418
4419 * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
4420 16-bit operations.
4421
dca99d27
UD
4422 * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
4423 possible since gettid cannot fail.
4424
f78deea6
UD
4425 * sysdeps/x86_64/pthreaddef.h: New file.
4426
4427 * sysdeps/i386/pthreaddef.h (gettid): Removed.
4428
4429 * sysdeps/x86_64/pthread_spin_init.c: New file.
4430 * sysdeps/x86_64/pthread_spin_lock.c: New file.
4431 * sysdeps/x86_64/pthread_spin_trylock.c: New file.
4432 * sysdeps/x86_64/pthread_spin_unlock.c: New file.
4433
4434 * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
4435 Add missing lock prefix. Minute optimization.
4436
4437 * tst-spin2.c (main): Also check successful trylock call.
4438
4439 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
4440 syscall. Fix typo in case INTERNAL_SYSCALL is not used.
4441
4442 * sysdeps/i386/pthread_spin_destroy.c: Moved to...
4443 * sysdeps/pthread/pthread_spin_destroy.c: ...here. New file.
4444
4445 * sysdeps/i386/pthread_sigmask.c: Removed. Use the generic code.
4446 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
4447 value in case of an error. Add support for INTERNAL_SYSCALL.
b54e18eb
UD
4448
4449 * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
4450 value in case of an error.
4451
a3931336
UD
4452 * sysdeps/x86_64/tls.h: New file.
4453
76a50749
UD
44542002-11-26 Ulrich Drepper <drepper@redhat.com>
4455
117c452c
UD
4456 * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface. It now
4457 takes the array member name and the index as parameters.
4458 (THREAD_SETMEM_NC): Likewise.
4459 * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
4460 * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
4461 interfaces.
4462
4463 * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
4464 to decide which code to use.
4465 (THREAD_SETMEM_NC): Likewise.
4466
76a50749
UD
4467 * allocatestack.c (queue_stack): Don't remove stack from list here.
4468 Do it in the caller. Correct condition to prematurely terminate
4469 loop to free stacks.
4470 (__deallocate_stack): Remove stack from list here.
4471
44722002-11-26 Ulrich Drepper <drepper@redhat.com>
4473
4474 * Makefile (tests): Add tst-stack1.
4475 * tst-stack1.c: New file.
4476
4477 * allocatestack.c (allocate_stack): Initialize the TCB on a user
4478 provided stack.
4479
4480 * pthread_attr_getstack.c: Return bottom of the thread area.
4481
44822002-11-25 Ulrich Drepper <drepper@redhat.com>
4483
4484 * Makefile (libpthread-routines): Add pt-allocrtsig and
4485 pthread_kill_other_threads.
4486 * pt-allocrtsig.c: New file.
4487 * pthread_kill_other_threads.c: New file.
4488 * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
4489 all three functions.
4490 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
4491 allocrtsig.
4492 * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
4493 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
4494 and __libc_allocate_rtsig_private.
4495 * Versions (libpthread): Export pthread_kill_other_threads_np,
4496 __libc_current_sigrtmin, and __libc_current_sigrtmax.
4497
44982002-11-24 Ulrich Drepper <drepper@redhat.com>
4499
4500 * allocatestack.c (allocate_stack): stackaddr in attribute points to
4501 the end of the stack. Adjust computations.
4502 When mprotect call fails dequeue stack and free it.
4503 * pthread_attr_setstack.c: Store top of the stack in stackaddr
4504 attribute.
4505 * pthread_getattr_np.c: Likewise.
4506
4507 * descr.h (IS_DETACHED): Add some more parenthesis to prevent
4508 surprises.
4509
45102002-11-23 Ulrich Drepper <drepper@redhat.com>
4511
4512 * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
4513 attribute definitions. Patch by Luca Barbieri <ldb@ldb.ods.org>.
4514
45152002-11-22 Ulrich Drepper <drepper@redhat.com>
4516
4517 * pthread_getspecific.c: Optimize access to first 2nd-level array.
4518 * pthread_setspecific.c: Likewise.
4519
45202002-11-21 Ulrich Drepper <drepper@redhat.com>
4521
4522 * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
4523 definitions. Get them from the official place.
4524 * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
4525
4526 * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
4527 Use new CLONE_ flags in clone() calls.
4528
4529 * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
4530 * sysdeps/unix/sysv/linux/i386/fork.c: New file.
4531
4532 * Versions: Add pthread_* functions for libc.
4533 * forward.c: New file.
4534
4535 * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
4536 errno-loc.
4537 * herrno.c: New file.
4538 * res.c: New file.
4539
4540 * Makefile (libpthread-routines): Remove sem_post, sem_wait,
4541 sem_trywait, and sem_timedwait. Add herrno and res.
4542 * sem_init.c: Don't initialize lock and waiters members.
4543 * sem_open.c: Likewise.
4544 * sem_post.c: Removed.
4545 * sem_wait.c: Removed.
4546 * sem_trywait.c: Removed.
4547 * sem_timedwait.c: Removed.
4548 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
4549 Includes full implementations of sem_post, sem_wait, sem_trywait,
4550 and sem_timedwait.
4551 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
4552 for new implementation.
4553 * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
4554 and waiters fields.
4555
4556 * tst-sem3.c: Improve error message.
4557 * tst-signal3.c: Likewise.
4558
4559 * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
4560 to tell the kernel about the termination futex and to initialize tid
4561 member. Don't initialize main_thread.
4562 * descr.h (struct pthread): Remove main_thread member.
4563 * cancelllation.c (__do_cancel): Remove code handling main thread.
4564 The main thread is not special anymore.
4565
4566 * allocatestack.c (__reclaim_stacks): Mark stacks as unused. Add
4567 size of the stacks to stack_cache_actsize.
4568
4569 * pt-readv.c: Add missing "defined".
4570 * pt-sigwait.c: Likewise.
4571 * pt-writev.c: Likewise.
4572
45732002-11-09 Ulrich Drepper <drepper@redhat.com>
4574
4575 * Versions: Export __connect from libpthread.
4576 Patch by Luca Barbieri <ldb@ldb.ods.org>.
4577
4578 * Makefile (libpthread-routines): Add pt-raise.
4579 * sysdeps/unix/sysv/linux/raise.c: New file.
4580 * sysdeps/unix/sysv/linux/pt-raise.c: New file.
4581 * sysdeps/generic/pt-raise.c: New file.
4582
4583 * pthread_cond_init.c: Initialize all data elements of the condvar
4584 structure. Patch by Luca Barbieri <ldb@ldb.ods.org>.
4585
4586 * pthread_attr_init.c: Actually implement 2.0 compatibility version.
4587 * pthread_create.c: Likewise.
4588
4589 * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
4590 * tst-key1.c: New file.
4591 * tst-key2.c: New file.
4592 * tst-key3.c: New file.
4593
4594 * Versions: Export pthread_detach for version GLIBC_2.0.
4595 Reported by Saurabh Desai <sdesai@austin.ibm.com>.
4596
45972002-11-08 Ulrich Drepper <drepper@redhat.com>
4598
4599 * pthread_key_create.c: Terminate search after an unused key was found.
4600 Patch by Luca Barbieri <ldb@ldb.ods.org>.
4601
4602 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
4603 Patch by Luca Barbieri <ldb@ldb.ods.org>.
4604
46052002-10-10 Ulrich Drepper <drepper@redhat.com>
4606
4607 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
4608 dynamic lookup for errno in PIC.
4609
4610 * allocatestack.c (get_cached_stack): Rearrange code slightly to
4611 release the stack lock as soon as possible.
4612 Call _dl_allocate_tls_init for TCB from the cache to re-initialize
4613 the static TLS block.
4614 (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
4615
4616 * cancellation.c: Renamed from cancelation.c.
4617 * Makefile: Adjust accordingly.
4618 * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
4619 * cleanup_defer.c: Use CANCELLATION_P.
4620 * pthread_testcancel.c: Likewise.
4621 * descr.h: Fix spelling in comments.
4622 * init.c: Likewise.
4623 * pthread_getattr_np.c: Likewise.
4624 * pthread_getschedparam.c: Likewise.
4625 * pthread_setschedparam.c: Likewise.
4626 * Versions: Likewise.
4627
4628 * pt-pselect.c: New file.
4629 * Makefile (libpthread-routines): Add pt-pselect.
4630 * Versions: Add pselect.
4631
4632 * tst-cancel4.c: New file.
4633 * Makefile (tests): Add tst-cancel4.
4634
46352002-10-09 Ulrich Drepper <drepper@redhat.com>
4636
4637 * pthread_mutex_lock.c: Always record lock ownership.
4638 * pthread_mutex_timedlock.c: Likewise.
4639 * pthread_mutex_trylock.c: Likewise.
4640
4641 * pt-readv.c: New file.
4642 * pt-writev.c: New file.
4643 * pt-creat.c: New file.
4644 * pt-msgrcv.c: New file.
4645 * pt-msgsnd.c: New file.
4646 * pt-poll.c: New file.
4647 * pt-select.c: New file.
4648 * pt-sigpause.c: New file.
4649 * pt-sigsuspend.c: New file.
4650 * pt-sigwait.c: New file.
4651 * pt-sigwaitinfo.c: New file.
4652 * pt-waitid.c: New file.
4653 * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
4654 pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
4655 pt-sigwait, pt-sigwaitinfo, and pt-waitid.
4656 * Versions: Add all the new functions.
4657
4658 * tst-exit1.c: New file.
4659 * Makefile (tests): Add tst-exit1.
4660
4661 * sem_timedwait.c: Minor optimization for more optimal fastpath.
4662
46632002-10-08 Ulrich Drepper <drepper@redhat.com>
4664
4665 * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
4666
4667 * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
4668 call. pthread_join is an official cancellation point.
4669 * pthread_timedjoin.c: Likewise.
4670
4671 * pthread_cond_wait.c: Revert order in which internal lock are dropped
4672 and the condvar's mutex are retrieved.
4673 * pthread_cond_timedwait.c: Likewise.
4674 Reported by dice@saros.East.Sun.COM.
4675
46762002-10-07 Ulrich Drepper <drepper@redhat.com>
4677
4678 * pthreadP.h: Cut out all type definitions and move them...
4679 * sysdeps/unix/sysv/linux/internaltypes.h: ...here. New file.
4680 * pthreadP.h: Include <internaltypes.h>.
4681
4682 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
4683 performance tweaks.
4684
4685 * sem_trywait.c: Shuffle #includes around to get right order.
4686 * sem_timedwait.c: Likewise.
4687 * sem_post.c: Likewise.
4688 * sem_wait.c: Likewise.
4689
4690 * nptl 0.3 released.
4691
4692 * Makefile (tests): Add tst-signal3.
4693 * tst-signal3.c: New file.
4694
46952002-10-05 Ulrich Drepper <drepper@redhat.com>
4696
4697 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
4698 the asms modify the sem object.
4699 (__lll_sem_timedwait): Now takes struct sem* as first parameter.
4700
4701 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
4702 the actual members.
4703 * pthreadP.h (struct sem): New type. Actual semaphore type.
4704 * semaphoreP.h: Include pthreadP.h.
4705 * sem_getvalue.c: Adjust to sem_t change.
4706 * sem_init.c: Likewise.
4707 * sem_open.c: Likewise.
4708 * sem_post.c: Likewise.
4709 * sem_timedwait.c: Likewise.
4710 * sem_trywait.c: Likewise.
4711 * sem_wait.c: Likewise.
4712
47132002-10-04 Ulrich Drepper <drepper@redhat.com>
4714
4715 * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
4716 * tst-basic2.c: New file.
4717 * tst-exec1.c: New file.
4718 * tst-exec2.c: New file.
4719 * tst-exec3.c: New file.
4720
4721 * tst-fork1.c: Remove extra */.
4722
4723 * nptl 0.2 released. The API for IA-32 is complete.
This page took 0.663664 seconds and 5 git commands to generate.