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