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