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