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