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