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