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