]> git.ipfire.org Git - thirdparty/glibc.git/blame - nptl/ChangeLog
(__static_tls_align_m1): Renamed from __static_tls_align. (__pthread_initialize_minim...
[thirdparty/glibc.git] / nptl / ChangeLog
CommitLineData
cc775edf
UD
12003-03-04 Ulrich Drepper <drepper@redhat.com>
2
0de28d5c 3 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
6245b6ae 4
518b5308
UD
5 * pthread_create.c: Define __pthread_keys using nocommon
6 attribute, not by placing it explicitly in bss.
7 Remove DEFINE_DEALLOC definition. Not needed anymore.
8
9 * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
10 Use it in mmap call to allocate stacks.
11
12 * sysdeps/pthread/createthread.c (create_thread): Fix comment.
13
cc775edf
UD
14 * pthread_create.c (start_thread): Use THREAD_SETMEM to store
15 result of the thread function.
16
4f6f0a8f
UD
172003-03-03 Ulrich Drepper <drepper@redhat.com>
18
f04a2721
UD
19 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed. The generic
20 version is just fine.
21
4f6f0a8f
UD
22 * sysdeps/unix/sysv/linux/libc_pthread_init.c
23 (__pthread_child_handler): Renamed from pthread_child_handler,
24 exported, and marked hidden. Change all users.
25 * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
26 free __pthread_child_handler from child list.
27
7ce5c164
UD
282003-03-03 Martin Schwidefsky <schwidefsky@de.ibm.com>
29
30 * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
31
32 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
33 Fix handling of cancellation and failing pthread_mutex_unlock call.
34 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
35 (__pthread_cond_wait): Likewise.
36
37 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
38 (pthread_rwlock_timedrdlock): Fix clobber of result variable by
39 lll_futex_timed_wait call.
40 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
41 (pthread_rwlock_timedwrlock): Likewise.
42
43 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
44 Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
45 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
46
47 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
48 check of lll_futex_wake return value.
49
ea6a015b
RM
502003-03-03 Roland McGrath <roland@redhat.com>
51
52 * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
53
54 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
55 Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
56 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
57
4adacf57
UD
582003-03-02 Ulrich Drepper <drepper@redhat.com>
59
1be3d664
UD
60 * sysdeps/pthread/timer_create.c (timer_create): Return correct
61 error for CPU clocks.
62
885bafa1
UD
63 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
64 _POSIX_MONOTONIC_CLOCK.
65 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
66
4adacf57
UD
67 * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
68 recent kernels.
69
86bfff4d
UD
702003-03-01 Ulrich Drepper <drepper@redhat.com>
71
72 * descr.h (struct pthread): Move cleanup field to the front.
73
d1149385
RM
742003-03-01 Roland McGrath <roland@redhat.com>
75
76 * sem_open.c (sem_open): Braino fix.
77
bd8bb78b
UD
782003-03-01 Ulrich Drepper <drepper@redhat.com>
79
748bec08
UD
80 * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
81 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
82 __pthread_cleanup_pop functionality.
83 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
84
bd8bb78b
UD
85 * descr.h (struct pthread): Move tid field to the front now that
86 it is often used.
87
88 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
89 (__lll_mutex_timedlock_wait): Remove.
90 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
91 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
92 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
93 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
94 (lll_unlock_wake_cb): Don't save and restore %esi.
95 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
96 %esi.
97 (__lll_timedwait_tid): Add alignment.
98 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
99 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
100 %esi.
101 (__lll_timedwait_tid): Removed.
102 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
103 (__pthread_cond_broadcast): Don't save, load, and restore %esi.
104 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
105 (pthread_barrier_wait): Don't save, load, and restore %esi for
106 last thread.
107 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
108 (__pthread_cond_signal): Don't save, load, and restore %esi.
109 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
110 (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
111 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
112 Don't save, load, and restore %esi.
113
d2637c70
UD
1142003-02-27 Ulrich Drepper <drepper@redhat.com>
115
567fb22a
UD
116 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
117 Release lock before waking up the waiters.
118
427f5fa1
UD
119 * tst-exit1.c (do_test): Don't start more than one thread in parallel.
120
a2d83cfb
UD
121 * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
122 (reader_thread): Likewise.
123
d2637c70
UD
124 * sysdeps/pthread/pthread_rwlock_unlock.c
125 (__pthread_rwlock_unlock): Release internal lock early. Don't try
126 to wake up readers if there are none.
127
128 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
129 Release internal lock before wake threads.
130
b1531183
UD
1312003-02-26 Ulrich Drepper <drepper@redhat.com>
132
dbf6131c
UD
133 * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
134 * tst-rwlock8.c: Initialize lock with INIT. Allow INIT to be
135 predefined.
136 * tst-rwlock9.c: Likewise.
137 * tst-rwlock10.c: New file.
138 * tst-rwlock11.c: New file.
139
695799fe
UD
140 * Makefile (tests): Add tst-dlsym1.
141 * tst-dlsym1.c: New file.
142
b1531183
UD
143 * init.c (__pthread_initialize_minimal_internal): Set
144 GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
145 * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
146
3724f268
UD
1472003-02-24 Ulrich Drepper <drepper@redhat.com>
148
3857ca78
UD
149 * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
150
80d80779
UD
151 * tst-cond2.c: Fix sychronization with child.
152
86371308
UD
153 * tst-rwlock8.c (reader_thread): Remove unused variable.
154
ffeb4481
UD
155 * Makefile: Add rules to build and run tst-tls3.
156 * tst-tls3.c: New file.
157 * tst-tls3mod.c: New file.
158
3724f268
UD
159 * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
160 * tst-rwlock8.c: New file.
161 * tst-rwlock9.c: New file.
162 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
163 complete broken rwlock implementation.
164 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
165 Likewise.
166 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
167 Likewise.
168 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
169 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
18a53579
UD
170 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
171 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
172 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
173 * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
174 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
3724f268 175
8915cc40
RM
1762003-02-23 Roland McGrath <roland@redhat.com>
177
178 * Makefile (nptl-version): Change regexp so case sensitivity is ok.
179
fd1a0d0c
UD
1802003-02-23 Ulrich Drepper <drepper@redhat.com>
181
ecf28959
UD
182 * Makefile (tests): Add tst-context1.
183 * tst-context1.c: New file.
184
5e47b76b
UD
185 * Makefile (tests): Add tst-tls1 and tst-tls2.
186 * tst-tls1.c: New file.
187 * tst-tls2.c: New file.
188
5a6bbb41
UD
189 * libc-cancellation.c (__libc_enable_asynccancel): Correct test
190 for failed cmpxchg.
191
fd1a0d0c
UD
192 * pthread_create.c (start_thread): Set EXITING_BIT early.
193
194 * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
195 (THREAD_GETMEM_NC): Likewise.
196
757f9fcb
UD
1972003-02-22 Ulrich Drepper <drepper@redhat.com>
198
b1b8e747
UD
199 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
200 off 3 more bytes by using offset-less instructions when possible.
201
c780aa21 202 * Makefile: Add dependency for $(objpfx)version.d.
757f9fcb
UD
203
204 * eintr.c (eintr_source): Add unnecessary return but the compiler
205 insists.
206
207 * tst-kill3.c: Include <unistd.h>.
208
5148559c
RM
2092003-02-21 Roland McGrath <roland@redhat.com>
210
211 * pthread_create.c (start_thread): Call __libc_thread_freeres.
212
ab2d98e3
UD
2132003-02-21 Ulrich Drepper <drepper@redhat.com>
214
71028edd
UD
215 * Makefile (tests): Add tst-eintr1.
216 (distribute): Add eintr.c.
217 * tst-eintr1.c: New file.
218 * eintr.c: New file.
219
e814f748
UD
220 * pthread_cancel.c (pthread_cancel): Use tkill directly.
221
222 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
223 Disallow sending SIGCANCEL.
224
ab2d98e3 225 * Makefile (tests): Remove tst-basic7. Add tst-kill1, tst-kill2,
9c03686d 226 tst-kill3, tst-kill4, tst-kill5, tst-kill6.
e814f748
UD
227 * tst-kill1.c: New file.
228 * tst-kill2.c: New file.
229 * tst-kill3.c: New file.
230 * tst-kill5.c: New file.
9c03686d 231 * tst-kill6.c: New file.
e814f748
UD
232 * tst-basic7.c: Renamed to...
233 * tst-kill4.c: ...this.
ab2d98e3 234
59fed0e2
RM
2352003-02-21 Roland McGrath <roland@redhat.com>
236
237 * Makefile (install-lib-ldscripts): New variable.
238
49dc759f
UD
2392003-02-21 Ulrich Drepper <drepper@redhat.com>
240
8c2e9a29
UD
241 * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
242 * pthread_cancel.c: Use INVALID_TD_P.
243 * pthread_detach.c: Likewise.
244 * pthread_getschedparam.c: Likewise.
245 * pthread_setschedparam.c: Likewise.
246 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
247 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
248 * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
249 * pthread_timedjoin.c: Likewise.
250
251 * tst-basic7.c: Include <signal.h>.
252
49dc759f
UD
253 * pthread_join.c (pthread_join): Limited checking for invalid
254 descriptors.
255 * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
256
df5803bf
UD
2572003-02-20 Ulrich Drepper <drepper@redhat.com>
258
c5acd3d7
UD
259 * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
260 beginning of the loop. Clear the entire first block of TSD.
df5803bf
UD
261 * Makefile (tests): Add tst-key4.
262 * tst-key4.c: New file.
263
729924a0
UD
2642003-02-18 Ulrich Drepper <drepper@redhat.com>
265
2f7dc594
UD
266 * Makefile (tests): Add tst-basic7.
267 * tst-basic7.c: New file.
268
ba25bb0f
UD
269 * pthread_create.c (deallocate_tsd): Mark as internal_function.
270 Add some more __builtin_expect.
271
12fd3c5f 272 * pthreadP.h: Define dummy version of DEBUGGING_P.
729924a0 273
5430d926
UD
2742003-02-17 Ulrich Drepper <drepper@redhat.com>
275
b0db7fbe
UD
276 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
277 _POSIX_THREAD_PRIORITY_SCHEDULING.
278 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
279 _XOPEN_REALTIME_THREADS.
280 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
281
282 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
283 kernel returns EINVAL for PID <= 0, work around it.
284
ecfda9bd
UD
285 * Makefile (tests): Add tst-signal5.
286 * tst-signal5.c: New file.
287
7d78ab99
UD
288 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
289 and LOGIN_NAME_MAX.
290
371a2972
UD
291 * tst-cancel1.c (tf): Block all signals.
292
5430d926
UD
293 * Makefile (tests): Add tst-basic6.
294 * tst-basic6.c: New file.
295
296 * tst-basic1.c: Add test for process ID.
297
298 * Makefile (tests): Add tst-cancel10.
299 * tst-cancel10.c: New file.
300
301 * Makefile (tests): Add tst-signal4.
302 * tst-signal4.c: New file.
303
304 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
305 __sigismember instead of sigismember. Add __builtin_expect.
306
1564916a
UD
3072003-02-16 Ulrich Drepper <drepper@redhat.com>
308
179ff175
UD
309 * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
310 pthread_setcancelstate, and pthread_rwlock_setpshared.
311
e4335f9a
UD
312 * tst-cancel7.c (do_test): Make sure the pid file exists before
313 canceling the thread.
314
0a37669a
UD
315 * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
316 pthread_rwlock_timedrdlock tests.
317 * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
318 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
319 Check for invalid tv_nsec field.
320 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
321 Likewise.
322
323 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
324 recursive mutex of overflow.
325
326 * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
327
e4335f9a 328 * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
1564916a
UD
329 going into an endless loop.
330 * Makefile (tests): Add tst-cancel9.
331 * tst-cancel9.c: New file.
332
333 * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
334
b270b548
UD
3352003-02-15 Ulrich Drepper <drepper@redhat.com>
336
1c82b97f
UD
337 * tst-mutex5.c (do_test): Add more timedlock tests.
338
b2f05465 339 * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
c3bb9ee1
UD
340 * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
341
e798b60f
UD
342 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
343 use INLINE_SYSCALL. Error number is returned, not -1.
344
90491dc4
UD
345 * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
346 and __deallocate_stack with internal_function.
347 * pthread_create.c: Adjust definitions appropriately.
348 * allocatestack.c: Likewise.
349
350 * pthread_join.c: Add one more __builtin_expect.
351 * pthread_timedjoin.c: Likewise.
352
353 * pthread_getspecific.c (__pthread_getspecific): Clear data->data
354 not data of sequence number does not match.
355 Add one __builtin_expect.
356
c6247c9d
UD
357 * Makefile (tests): Add tst-clock1.
358 * tst-clock1.c: New file.
359
b270b548
UD
360 * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
361 negative arguments.
362 * Makefile (tests): Add tst-basic5.
363 * tst-basic5.c: New file.
364
700bf7af
UD
3652003-02-14 Ulrich Drepper <drepper@redhat.com>
366
757de559
UD
367 * Makefile (tests): Add tst-basic4.
368 * tst-basic4.c: New file.
369
47202270
UD
370 * pthreadP.h: Add declaraction for __nptl_nthreads.
371 * pthread_create.c: Define __nptl_nthreads
372 (start_thread): Increment __nptl_nthreads at beginning. Decrement
b270b548 373 after thread is done. If then zero, call exit(0).
47202270
UD
374 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
375 Add ptr_nthreads. Define HAVE_PTR_NTHREADS.
376 * init.c (pthread_functions): Initialize ptr_nthreads.
377 * allocatestack.c (nptl_nthreads): Remove definition and all uses.
378 (__reclaim_stacks): Decrement __nptl_nthreads.
379 * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
380 Define.
381 * Makefile (tests): Add tst-basic3.
382 * tst-basic3.c: New file.
383
e320ef46
UD
384 * descr.h: Define CANCELING_BIT and CANCELING_BITMASK. Introduce
385 after CANCELTYPE_BIT, move the other bits up. Update CANCEL_RESTMASK.
386 * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
387 * pthread_cancel.c (pthread_cancel): Likewise. Also set CANCELING_BIT
388 if asynchronous canceling is enabled.
389 * pthread_join.c (pthread_join): When recognizing circular joins,
390 take into account the other thread might be already canceled.
391 * Makefile (tests): Add tst-join5.
392 * tst-join5.c: New file.
393
700bf7af
UD
394 * Makefile (tests): Add tst-join4.
395 * tst-join4.c: New file.
396
3972003-02-13 Ulrich Drepper <drepper@redhat.com>
398
399 * tst-cond4.c (main): Add test of pthread_attr_getpshared.
400
dac0f772
UD
4012003-02-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
402
403 * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
404 THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
405 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
406 warning.
407 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
408 to avoid warning.
409 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
410 error if lll_futex_wake failed.
411
e8cda341
UD
4122003-02-13 Ulrich Drepper <drepper@redhat.com>
413
a7720b5e
UD
414 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
415 handling of cancellation and failung pthread_mutex_unlock call.
416 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
417 * Makefile (tests): Add tst-cond8 and tst-cond9.
418 * tst-cond8.c: New file.
419 * tst-cond9.c: New file.
420
a1ea4c06
UD
421 * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
422
423 * sysdeps/pthread/pthread.h: Add missing initializers. Protect
424 non-standard initializers with __USE_GNU.
425
e8cda341
UD
426 * Makefile (tests): Add tst-cleanup3.
427 * tst-cleanup3.c: New file.
428
2067577c
UD
4292003-02-12 Ulrich Drepper <drepper@redhat.com>
430
89e78a95
UD
431 * Makefile (tests): Add tst-attr1 and tst-attr2.
432 * tst-attr1.c: New file.
433 * tst-attr2.c: New file.
434
dfdd294a
UD
435 * Makefile: Add rules to build and run tst-atfork2 test.
436 * tst-atfork2.c: New file.
437 * tst-atfork2mod.c: New file.
438
439 * sysdeps/unix/sysv/linux/unregister-atfork.c
440 (__unregister_atfork): Free the memory allocated for the handlers
441 after removing them from the lists.
442
443 * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
444 cleanup function.
445
446 * tst-atfork1.c (do_test): Wait for the child we forked.
447 Report error in child.
448
449 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
450
2067577c
UD
451 * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
452
2a8a8a84
UD
4532003-02-10 Ulrich Drepper <drepper@redhat.com>
454
d9dd121e
UD
455 * Makefile (tests): Add tst-cancel8.
456 * tst-cancel8.c: New file.
457
2a8a8a84
UD
458 * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
459 clearing of control variable.
defd1870 460 * Makefile (tests): Add tst-once3 and tst-once4.
2a8a8a84 461 * tst-once3.c: New file.
defd1870 462 * tst-once4.c: New file.
2a8a8a84 463
a54e8d33
UD
4642003-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
465
466 * sysdeps/sh/Makefile: New file.
467 * sysdeps/sh/bits/atomic.h: New file.
468 * sysdeps/sh/pthread_spin_init.c: New file.
469 * sysdeps/sh/pthread_spin_lock.c: New file.
470 * sysdeps/sh/pthread_spin_trylock.S: New file.
471 * sysdeps/sh/pthread_spin_unlock.S: New file.
472 * sysdeps/sh/pthreaddef.h: New file.
473 * sysdeps/sh/tcb-offsets.sym: New file.
474 * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
475 * sysdeps/sh/tls.h: New file.
476 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
477 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
478 * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
479 * sysdeps/unix/sysv/linux/sh/fork.c: New file.
480 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
481 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
482 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
483 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
484 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
485 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
486 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
487 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
488 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
489 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
490 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
491 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
492 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
493 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
494 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
495 * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
496 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
497 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
498 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
499 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
500 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
501 * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
502 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
503 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
504 * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
505 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
506
696e556e
UD
5072003-02-08 Ulrich Drepper <drepper@redhat.com>
508
509 * tst-cond2.c: Rearrange code to not rely on behavior undefined
510 according to POSIX.
511
512 * tst-basic2.c (do_test): Lock mutex before creating the thread.
513
fef710d6
UD
5142003-02-07 Ulrich Drepper <drepper@redhat.com>
515
c6180643
UD
516 * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
517 (TLS_GET_FS): New #define.
518 (TLS_SET_FS): New #define.
519 Correct value of __NR_set_thread_area.
520
fef710d6
UD
521 * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
522
11090a99
UD
5232003-02-06 Ulrich Drepper <drepper@redhat.com>
524
65c68990
UD
525 * Makefile (tests): Add tst-popen1.
526 * tst-popen1.c: New file.
527
11090a99
UD
528 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
529 but inactive generalization.
530 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
531 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
532 Minor optimization, remove one instruction.
533 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
534
a88c9263
UD
5352003-02-04 Martin Schwidefsky <schwidefsky@de.ibm.com>
536
537 * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
538
5392003-01-31 Martin Schwidefsky <schwidefsky@de.ibm.com>
540
541 * init.c (__NR_set_tid_address): Add #ifdef for s390.
542 * sysdeps/pthread/pthread_barrier_wait.c: New file.
543 * sysdeps/pthread/pthread_cond_broadcast.c: New file.
544 * sysdeps/pthread/pthread_cond_signal.c: New file.
545 * sysdeps/pthread/pthread_cond_timedwait.c: New file.
546 * sysdeps/pthread/pthread_cond_wait.c: New file.
547 * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
548 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
549 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
550 * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
551 * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
552 * sysdeps/s390/Makefile: New file.
553 * sysdeps/s390/bits/atomic.h: New file.
554 * sysdeps/s390/pthread_spin_init.c: New file.
555 * sysdeps/s390/pthread_spin_lock.c: New file.
556 * sysdeps/s390/pthread_spin_trylock.c: New file.
557 * sysdeps/s390/pthread_spin_unlock.c: New file.
558 * sysdeps/s390/pthreaddef.h: New file.
559 * sysdeps/s390/tcb-offsets.sym: New file.
560 * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
561 * sysdeps/s390/tls.h: New file.
562 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
563 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
564 * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
565 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
566 * sysdeps/unix/sysv/linux/s390/fork.c: New file.
567 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
568 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
569 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
570 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
571 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
572 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
573 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
574 * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
575 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
576 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
577 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
578 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
579 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
580 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
581 * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
582 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
583 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
584 * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
585
6f1cff95
UD
5862003-02-04 Ulrich Drepper <drepper@redhat.com>
587
ec609a8e
UD
588 * atomic.h: Add a couple more default implementations.
589 (atomic_compare_and_exchange_acq): Use
d45e8740
UD
590 __arch_compare_and_exchange_32_acq in return value definition. It
591 always exists.
592 (atomic_bit_set): Renamed from atomic_set_bit.
0289bef9 593 Add missing atomic_ prefixes.
e3ec8904 594
6f1cff95
UD
595 * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
596 thread library is available, use correct value to mark initialized
597 once variable.
598
4f088329
UD
5992003-02-03 Ulrich Drepper <drepper@redhat.com>
600
6f1cff95
UD
601 * allocatestack.c (allocate_stack): Use __getpagesize instead of
602 __sysconf to determine pagesize.
603
3e4fc359 604 * pthread_create.c: Include <atomic.h>.
4f088329
UD
605 * allocatestack.c (allocate_stack): Implement coloring of the
606 allocated stack memory. Rename pagesize to pagesize_m1. It's the
607 size minus one. Adjust users.
3e4fc359 608 * sysdeps/i386/i686/Makefile: New file.
4f088329 609
2f42e8be
UD
6102003-02-02 Ulrich Drepper <drepper@redhat.com>
611
4301f7e2
UD
612 * allocatestack.c: Improve comment throughout the file.
613
2f42e8be 614 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
a37818b3 615 (__lll_lock_wait): Add branch prediction.
2f42e8be
UD
616 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
617 (__lll_lock_wait): Likewise.
618 (lll_unlock_wake_cb): Removed.
619
4a7d6545
UD
6202003-01-31 Ulrich Drepper <drepper@redhat.com>
621
622 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
623 _POSIX_THREAD_PRIORITY_SCHEDULING.
624
886d5973
UD
6252003-01-30 Jakub Jelinek <jakub@redhat.com>
626
627 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
628 Fix return type of ptr___pthread_getspecific.
629
e474ca78
UD
6302003-01-29 Ulrich Drepper <drepper@redhat.com>
631
632 * Makefile (tests): Add tst-umask1.
633 (tst-umask1-ARGS): Define.
634 * tst-umask1.c: New file.
635
e6ebd2e4
UD
6362003-01-28 Ulrich Drepper <drepper@redhat.com>
637
6cf26f41
UD
638 * Makefile (libpthread-routines): Remove lowlevelrwlock. Add
639 pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
640 pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
641 pthread_rwlock_unlock.
642 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
643 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
644 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
645 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
646 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
647 New file.
648 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
649 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
650 New file.
651 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
652 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
653 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
654 New file.
655 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
656 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
657 New file.
658 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
659 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
660 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
661 New file.
662 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
663 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
664 New file.
665 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
666
1d087a7e
UD
667 * Makefile (libpthread-routines): Remove lowlevelcond and
668 lowlevelsem. Add sem_wait, sem_trywait, sem_timedwait, sem_post,
669 pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
670 and pthread_cond_broadcast.
4a99d160
UD
671 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
672 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
673 * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
674 * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
675 * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
676 * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
677 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
678 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
679 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
680 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
681 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
682 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
683 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
684 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
685 * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
686 * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
687 * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
688 * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
689 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
690 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
691 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
692 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
693 * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
694 * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
695 * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
696 * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
697 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
698 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
699 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
700 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
701 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
1d087a7e 702
e6ebd2e4
UD
703 * sysdeps/unix/sysv/linux/i386/createthread.c: Define
704 PREPARE_CREATE and TLS_VALUE with x86-specific bits. All the rest
705 of the code is moved to ...
706 * sysdeps/pthread/createthread.c: ...here. New file.
707
a15698cb
UD
7082003-01-27 Ulrich Drepper <drepper@redhat.com>
709
0566b130
UD
710 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
711 (__new_sem_post): Clear %eax before returning.
712 Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
713
e6fb8846
UD
714 * Makefile (tests): Add tst-cleanup2.
715 * tst-cleanup2.c: New file.
716
a15698cb
UD
717 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
718 Interpret first parameter correctly.
719
8824b0a1
UD
7202003-01-17 Ulrich Drepper <drepper@redhat.com>
721
722 * Makefile (headers): Add bits/semaphore.h.
723
850dcfca
UD
7242003-01-16 Jakub Jelinek <jakub@redhat.com>
725
726 * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
727 if not SHARED.
728
574b892e
UD
7292003-01-14 Ulrich Drepper <drepper@redhat.com>
730
a8d87c92
UD
731 * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
732 must be used and mapping failed.
733 Reported by Luke Elliott <luke.elliott@activfinancial.com>.
734
574b892e
UD
735 * Makefile (CFLAGS-pthread_self.os): Define this, not
736 CFLAGS-pthread_self.c.
737
fb48047a
UD
7382003-01-13 Ulrich Drepper <drepper@redhat.com>
739
47805511
UD
740 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
741 lll_unlock_wake_cb.
742
fb48047a
UD
743 * Makefile (libpthread-routines): Add version. Add rules to build
744 version.os and banner.h.
745 * version.c: New file.
746
115bb61d
UD
7472003-01-13 Jakub Jelinek <jakub@redhat.com>
748
749 * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
750 the alias unconditional.
751 * pthread_mutex_unlock.c (__pthread_mutex_unlock_internal): Likewise.
752
7532003-01-13 Ulrich Drepper <drepper@redhat.com>
754
755 * Makefile (CFLAGS-pthread_self.c): New definition.
756
6aca81bb
UD
7572003-01-06 Jakub Jelinek <jakub@redhat.com>
758
759 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
760 INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
761 * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
762 * init.c (__pthread_initialize_minimal_internal): Likewise.
763
e9c7764e
UD
7642003-01-07 Jakub Jelinek <jakub@redhat.com>
765
b5facfda
UD
766 * pthreadP.h (__pthread_cond_timedwait): Add prototype.
767
e9c7764e
UD
768 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
769 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
770 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
771 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
772 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
773 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
774
bef1e42f
UD
7752003-01-06 Jakub Jelinek <jakub@redhat.com>
776
777 * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
778 * pt-system.c (LIBC_CANCEL_HANDLED): Add.
779 * tst-cancel-wrappers.sh: Remove all exceptions.
780
bbd17455
UD
7812003-01-05 Ulrich Drepper <drepper@redhat.com>
782
a73ab6df
UD
783 * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
784 features. Reported by Marijn Ros <marijn@mad.scientist.com>.
785
bbd17455
UD
786 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
787 Use __libc_pthread_functions array if SHARED.
788
789 * pthreadP.h: Move pthread_cond_2_0_t definition to...
790 * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
791
792 * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
793 (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
794 __libc_key_create, __libc_getspecific, __libc_setspecific): Use
795 __libc_ptf_call instead of __libc_maybe_call.
796 (PTF): New #define.
797 (__libc_cleanup_region_start): Wrap function name with PTF call.
798 (__libc_cleanup_region_end): Likewise.
799 (__libc_cleanup_end): Likewise.
800
801 * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
802 * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
803 * pthread_key_create.c: Add __pthread_key_create_internal alias.
804 * pthreadP.h: Add prototypes.
805
806 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
807 __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
808 __pthread_rwlock_unlock aliases.
809 * pthreadP.h: Add prototypes for new aliases.
810
811 * pthreadP.h (struct pthead_functions): Moved to...
812 * sysdeps/pthread/pthread-functions.h: ...here. New file.
813 * init.c (pthread_functions): Add initializers for new elements.
814
815 * cleanup_defer.c: Add __pthread_cleanup_push_defer and
816 __pthread_cleanup_pop_restore aliases.
817 * pthreadP.h: Add prototypes.
818
819 * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
820 and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
821 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
822 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
823 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
824 * pthreadP.h: Adjust prototypes and callers.
825
d27a78be
UD
8262003-01-04 Ulrich Drepper <drepper@redhat.com>
827
b74121ae
UD
828 * Makefile (tests): Add tst-cancel7.
829 (tst-cancel7-ARGS): New variable.
bbd17455 830 * tst-cancel7.c: New file.
b74121ae 831
29bc410c
UD
832 * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
833 around gcc defficiencies.
834 * old_pthread_cond_signal.c: Likewise.
835 * old_pthread_cond_timedwait.c: Likewise.
836 * old_pthread_cond_wait.c: Likewise.
837
d27a78be
UD
838 * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
839
733f25e6
UD
8402003-01-03 Ulrich Drepper <drepper@redhat.com>
841
7edb2ae3
UD
842 * Makefile (tests): Add tst-cond7.
843 * tst-cond7.c: New file.
844
b1151300
UD
845 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
846 (condvar_cleanup): Get condvar address from the right place.
847
733f25e6
UD
848 * atomic.h: Correct definitions of atomic_full_barrier,
849 atomic_read_barrier, atomic_write_barrier.
850
851 * old_pthread_cond_broadcast.c: Make memory allocate and initialization
852 race-free.
853 * old_pthread_cond_signal.c: Likewise.
854 * old_pthread_cond_timedwait.c: Likewise.
855 * old_pthread_cond_wait.c: Likewise.
856
686b7223
UD
8572003-01-03 Jakub Jelinek <jakub@redhat.com>
858
859 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
860
0e07706e
UD
8612003-01-03 Ulrich Drepper <drepper@redhat.com>
862
997256dd
UD
863 * pthreadP.h (pthread_cond_2_0_t): New type.
864 (struct pthread_functions): Use new type for 2.0 condvar callbacks.
865 Use new type for the 2.0 condvar function prototypes.
866 * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
867 * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
868 parameter.
869 * old_pthread_cond_destroy.c: Likewise.
870 * old_pthread_cond_broadcast.c: Likewise. Lock appropriately.
871 * old_pthread_cond_signal.c: Likewise.
872 * old_pthread_cond_timedwait.c: Likewise.
873 * old_pthread_cond_wait.c: Likewise.
874
842d2817
UD
875 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
876 (__pthread_cond_wait): Don't save cancellation mode and seq value
877 in same location.
878
0e07706e
UD
879 * herrno.c (__h_errno_location): Don't define as weak.
880
bf293afe
UD
8812003-01-02 Jakub Jelinek <jakub@redhat.com>
882
883 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
884 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
885 and pthread_cond_wait.
886 * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
887 Renamed to...
888 (__pthread_cond_broadcast_2_0): ... this.
889 * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
890 Renamed to...
891 (__pthread_cond_destroy_2_0): ... this.
892 * old_pthread_cond_init.c (__old_pthread_cond_init):
893 Renamed to...
894 (__pthread_cond_init_2_0): ... this.
895 * old_pthread_cond_signal.c (__old_pthread_cond_signal):
896 Renamed to...
897 (__pthread_cond_signal_2_0): ... this.
898 * old_pthread_cond_wait.c (__old_pthread_cond_wait):
899 Renamed to...
900 (__pthread_cond_wait_2_0): ... this.
901 * pthread_cond_destroy.c: Include shlib-compat.h.
902 (pthread_cond_destroy): Change strong_alias into versioned_symbol.
903 * pthread_cond_init.c: Include shlib-compat.h.
904 (pthread_cond_init): Change strong_alias into versioned_symbol.
905 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
906 fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
907 fields.
908 (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
909 __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
910 __pthread_cond_wait_2_0): New prototypes.
911 (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
912 __old_pthread_cond_init, __old_pthread_cond_signal,
913 __old_pthread_cond_wait): Removed.
914 * init.c: Include shlib-compat.h.
915 (pthread_functions): Guard ptr___pthread_attr_init_2_0
916 initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
917 Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
918 ptr___pthread_cond_*_2_0 fields.
919 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
920 pthread_cond_*@GLIBC_2.0 compatibility symbols.
921
922 * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
923 LIBC_SIGACTION was not yet defined.
924 [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
925 [!defined LIBC_SIGACTION] (__sigaction): New function and
926 libc_hidden_weak.
927 [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
928 [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
929
9302003-01-02 Jakub Jelinek <jakub@redhat.com>
931
932 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
933
05df18c3
UD
9342003-01-02 Ulrich Drepper <drepper@redhat.com>
935
936 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
937 New, larger type definition.
938 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
939 implementation.
940 * Versions [libpthread]: Add definitions for new pthread_cond_*
941 interfaces for version GLIBC_2.3.2.
942 * pthread_cond_init.c: Update initialization for new type definition.
943 * Makefile (libpthread-routines): Remove pthread_cond_wait,
944 pthread_cond_timedwait, pthread_cond_signal, and
945 pthread_cond_broadcast. Add old_pthread_cond_init,
946 old_pthread_cond_destroy, old_pthread_cond_wait,
947 old_pthread_cond_timedwait, old_pthread_cond_signal, and
948 old_pthread_cond_broadcast.
949 * old_pthread_cond_broadcast.c: New file.
950 * old_pthread_cond_destroy.c: New file.
951 * old_pthread_cond_init.c: New file.
952 * old_pthread_cond_signal.c: New file.
953 * old_pthread_cond_timedwait.c: New file.
954 * old_pthread_cond_wait.c: New file.
955 * pthreadP.h: Add prototypes for the compatibility interfaces.
956
957 * pthread_cond_destroy.c: Don't include <errno.h>.
958
fd8979e4
UD
9592003-01-01 Ulrich Drepper <drepper@redhat.com>
960
961 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
962 unnecessary zero offset when addressing MUTEX.
963
6d6ee629
UD
9642002-12-31 Ulrich Drepper <drepper@redhat.com>
965
966 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
967 __register_atfork.
968 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
969 for __register_atfork.
970
a4baf360
UD
9712002-12-31 Jakub Jelinek <jakub@redhat.com>
972
973 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
974 instead of ASSEMBLER test macro.
975
976 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
977 __libc_current_sigrtmax): Add libc_hidden_def.
978
979 * sysdeps/pthread/list.h: Remove assert.h include.
980
e9395a94
UD
9812002-12-31 Ulrich Drepper <drepper@redhat.com>
982
983 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
984 __pthread_initialize_minimal_internal not
985 __pthread_initialize_minimal.
986
89d6e444
UD
9872002-12-30 Ulrich Drepper <drepper@redhat.com>
988
416d2de6
UD
989 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
990 __pthread_initialize_minimal as hidden.
991
89d6e444
UD
992 * init.c (__pthread_initialize_minimal_internal): Don't mark as
993 constructor.
994
9952002-12-31 Jakub Jelinek <jakub@redhat.com>
996
997 * Makefile ($(inst_libdir)/libpthread.so): Depend on
998 $(common-objpfx)format.lds, include that into the output script.
999 Fix comment.
1000 (extra-B-pthread.so): Change linuxthreads/ into nptl/.
1001
8cac677c
UD
10022002-12-28 Andreas Jaeger <aj@suse.de>
1003
1004 * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
1005 nsec resolution changes.
1006 (xstat64_conv): Likewise.
1007 (xstat32_conv): Likewise.
1008 * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
1009 struct kernel_stat.
1010 * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
1011 structs stat and stat64.
1012 * time/time.h (__timespec_defined): Define for __USE_MISC.
89d6e444 1013 * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
8cac677c 1014
49e9f864
UD
10152002-12-30 Jakub Jelinek <jakub@redhat.com>
1016
1017 * forward.c (FORWARD2): Renamed from FORWARD3. Remove unused export
1018 argument.
1019 (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
1020 (pthread_exit): Use strong_alias to avoid warnings.
1021 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
1022 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
1023 ptr___pthread_attr_init_2_*.
1024 * init.c (pthread_functions): Adjust.
1025
bab09b26
UD
10262002-12-29 Ulrich Drepper <drepper@redhat.com>
1027
598d7a42
UD
1028 * forward.c: Make all functions available by default again. It
1029 caused too much trouble.
1030
bab09b26
UD
1031 * pt-siglongjmp.c: Removed.
1032
3b7ed871
UD
10332002-12-28 Jakub Jelinek <jakub@redhat.com>
1034
1035 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
1036 (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
1037 * sysdeps/i386/Makefile: New file.
1038 * sysdeps/i386/tcb-offsets.sym: New file.
1039 * sysdeps/pthread/tcb-offsets.h: New file.
1040 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1041 Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
1042
1043 * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
1044 __register_atfork...
1045 (GLIBC_2.3.2): ...here.
1046
10472002-12-28 Ulrich Drepper <drepper@redhat.com>
1048
1049 * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
1050 pthread_attr_setstackaddr with __attribute_deprecated__.
1051
270d9d47
UD
10522002-12-27 Jakub Jelinek <jakub@redhat.com>
1053
1054 * pt-system.c (system): Remove cancellation handling.
1055 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
1056 cancellation routines.
1057
131fd126
UD
10582002-12-28 Ulrich Drepper <drepper@redhat.com>
1059
afb2e954
UD
1060 * descr.h: Include <dl-sysdep.h>.
1061 (struct pthread): Move header.data.list to the back of the struct.
131fd126
UD
1062 * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
1063 (MULTIPLE_THREADS_OFFSET): Adjust offset.
1064 (SYSINFO_OFFSEET): Likewise.
1065
10662002-12-27 Jakub Jelinek <jakub@redhat.com>
1067
1068 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
1069 Define.
1070 (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
1071 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
1072 DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
1073 (USE_DL_SYSINFO): Undef.
1074
10752002-12-22 Jakub Jelinek <jakub@redhat.com>
1076
1077 * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
1078 $(common-objpfx)libc.so.
1079 * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
1080 it is bigger than pipe buffer size even on arches with bigger
1081 page size.
1082 (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
1083
a218c9cf
UD
10842002-12-25 Ulrich Drepper <drepper@redhat.com>
1085
1086 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
1087 correct errno access for case that USE___THREAD is not defined.
1088
015a2dc9
UD
10892002-12-24 Ulrich Drepper <drepper@redhat.com>
1090
1091 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
1092 Patch by Marijn Ros <marijn@mad.scientist.com>.
1093
5220f9ac
RM
10942002-12-22 Roland McGrath <roland@redhat.com>
1095
1096 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
1097
1561bf63
UD
10982002-12-20 Ulrich Drepper <drepper@redhat.com>
1099
1100 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
1101
3325198e
UD
11022002-12-19 Ulrich Drepper <drepper@redhat.com>
1103
057c823f
UD
1104 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
1105 NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
1106 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
1107
097eca29
UD
1108 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
1109 of int $0x80.
1110 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
1111 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
1112 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
1113 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1114 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
1115 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
1116 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
1117 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
1118
1119 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
1120 sysenter.
1121 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
1122
1123 * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
1124
5f5843e3
UD
1125 * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
1126 in new TCB.
1127 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
1128 that sysinfo is properly initialized.
1129 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
1130 to 1 only for ld.so.
1131
3325198e
UD
1132 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
1133 RTLD_CORRECT_DYNAMIC_WEAK.
1134
74e8f2dc
UD
11352002-12-19 Jakub Jelinek <jakub@redhat.com>
1136
1137 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
1138 Use return 0 as 6th argument to FORWARD4.
1139 * pthread_equal.c: Include pthreadP.h instead of pthread.h.
1140
df45b31e
UD
11412002-12-18 Ulrich Drepper <drepper@redhat.com>
1142
1143 * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
1144 * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
1145 Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
1146 (INIT_SYSINFO): New #define.
1147 (TLS_TP_INIT): Use INIT_SYSINFO.
1148 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1149 At test to make sure SYSINFO_OFFSET value is correct.
1150 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
1151
3d539579
UD
11522002-12-18 Jakub Jelinek <jakub@redhat.com>
1153
1154 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
1155 * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
1156 * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
1157 [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
1158 __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
1159 __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
1160 __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
1161
d7913e0e
UD
11622002-12-18 Ulrich Drepper <drepper@redhat.com>
1163
f051627f
UD
1164 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
1165 macro instead of using int $0x80 directly.
1166
d7913e0e
UD
1167 * sysdeps/pthread/bits/stdio-lock.h: New file.
1168 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
1169 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
1170 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
1171 * Makefile (routines): Add libc-lowlevelmutex.
1172
1173 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
1174 __i686.get_pc_thunk.dx.
1175
f077a4a9
UD
11762002-12-17 Jakub Jelinek <jakub@redhat.com>
1177
1178 * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
1179 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
1180 ($(objpfx)tst-cancel-wrappers.out): New rule.
1181 * tst-cancel-wrappers.sh: New test.
1182 * tst-locale1.c: Include signal.h.
1183 (uselocale): Test static linking of __libc_current_sigrt*.
1184
11852002-12-17 Ulrich Drepper <drepper@redhat.com>
1186
1187 * Makefile (tests): Add tst-cancel6.
1188 * tst-cancel6.c: New file
1189
bd499a3b
UD
11902002-12-17 Jakub Jelinek <jakub@redhat.com>
1191
1192 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
1193 Define meaningfully for assembler as well.
1194 * pthreadP.h (struct pthread_functions): Remove
1195 ptr_pthread_attr_init field. Add ptr_pthread_attr_init_2_0
1196 and ptr_pthread_attr_init_2_1 fields.
1197 * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
1198 and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
1199 * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
1200 (FORWARD3): Define using FORWARD4.
1201 (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
1202 versions.
1203 * pt-system.c: Remove duplicate stdlib.h include.
1204
0a1063f4
UD
12052002-12-16 Ulrich Drepper <drepper@redhat.com>
1206
87d60668
UD
1207 * sem_init.c: Define sem_init@GLIBC_2.0.
1208 * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
1209 * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
1210
0a1063f4
UD
1211 * flockfile.c: Moved to...
1212 * sysdeps/pthread/flockfile.c: ...here. New file.
1213 * funlockfile.c: Moved to...
1214 * sysdeps/pthread/funlockfile.c: ...here. New file.
1215 * ftrylockfile.c: Moved to...
1216 * sysdeps/pthread/ftrylockfile.c: ...here. New file.
1217
9634cf9d
UD
12182002-12-16 Jakub Jelinek <jakub@redhat.com>
1219
1220 * libc-cancellation.c: Guard both function with
1221 #if !defined NOT_IN_libc.
1222 * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
1223 automatically provided pthread wrappers.
1224 * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
1225 CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
1226 nor in libpthread.
1227 * pt-open.c: Removed.
1228 * pt-fcntl.c: Removed.
1229 * pt-fsync.c: Removed.
1230 * pt-lseek.c: Removed.
1231 * pt-msgrcv.c: Removed.
1232 * pt-msgsnd.c: Removed.
1233 * pt-msync.c: Removed.
1234 * pt-nanosleep.c: Removed.
1235 * pt-open64.c: Removed.
1236 * pt-pause.c: Removed.
1237 * pt-pread.c: Removed.
1238 * pt-pread64.c: Removed.
1239 * pt-pwrite.c: Removed.
1240 * pt-pwrite64.c: Removed.
1241 * pt-read.c: Removed.
1242 * pt-recv.c: Removed.
1243 * pt-recvfrom.c: Removed.
1244 * pt-recvmsg.c: Removed.
1245 * pt-send.c: Removed.
1246 * pt-sendto.c: Removed.
1247 * pt-sigtimedwait.c: Removed.
1248 * pt-sigwait.c: Removed.
1249 * pt-wait.c: Removed.
1250 * pt-waitpid.c: Removed.
1251 * pt-write.c: Removed.
1252 * pt-accept.c: Removed.
1253 * pt-close.c: Removed.
1254 * pt-connect.c: Removed.
1255 * pt-lseek64.c: Removed.
1256 * pt-sendmsg.c: Removed.
1257 * pt-tcdrain.c: Removed.
1258
6ee8d334
UD
12592002-12-15 Ulrich Drepper <drepper@redhat.com>
1260
81fa9371
UD
1261 * init.c (__pthread_initialize_minimal_internal): Renamed from
1262 __pthread_initialize_minimal. Make old name an alias. This
1263 converts a normal relocation into a relative relocation.
1264
f3015aa5
UD
1265 * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
1266
4cbc1950
UD
1267 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
1268 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
1269 * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
1270 pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
1271 pt-sigwaitinfo, pt-waitid, and pt-writev.
1272 * pt-creat.c: Removed.
1273 * pt-poll.c: Removed.
1274 * pt-pselect.c: Removed.
1275 * pt-readv.c: Removed.
1276 * pt-select.c: Removed.
1277 * pt-sigpause.c: Removed.
1278 * pt-sigsuspend.c: Removed.
1279 * pt-sigwaitinfo.c: Removed.
1280 * pt-waitid.c: Removed.
1281 * pt-writev.c: Removed.
1282
8454830b
UD
1283 * init.c (pthread_functions): New variable.
1284 (__pthread_initialize_minimal): Pass pointer to pthread_functions
1285 (or NULL) to __libc_pthread_init.
1286 * forward.c: Rewrite to use __libc:pthread_functions array to get
1287 function addresses.
1288 * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
1289 prototype.
1290 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1291 Take new parameter. Copy content of variable pointed to by it
1292 to __libc_pthread_init.
1293
1294 * pthreadP.h (struct pthread_functions): New type.
1295 (__libc_pthread_init): Declare.
1296
1297 * pthread_attr_destroy.c: Add namespace protected alias.
1298 * pthread_attr_getdetachstate.c: Likewise.
1299 * pthread_attr_getinheritsched.c: Likewise.
1300 * pthread_attr_getschedparam.c: Likewise.
1301 * pthread_attr_getschedpolicy.c: Likewise.
1302 * pthread_attr_getscope.c: Likewise.
1303 * pthread_attr_setdetachstate.c: Likewise.
1304 * pthread_attr_setinheritsched.c: Likewise.
1305 * pthread_attr_setschedparam.c: Likewise.
1306 * pthread_attr_setschedpolicy.c: Likewise.
1307 * pthread_attr_setscope.c: Likewise.
1308 * pthread_cond_broadcast.c: Likewise.
1309 * pthread_cond_destroy.c: Likewise.
1310 * pthread_cond_init.c: Likewise.
1311 * pthread_cond_signal.c: Likewise.
1312 * pthread_cond_wait.c: Likewise.
1313 * pthread_condattr_destroy.c: Likewise.
1314 * pthread_condattr_init.c: Likewise.
1315 * pthread_equal.c: Likewise.
1316 * pthread_exit.c: Likewise.
1317 * pthread_getschedparam.c: Likewise.
1318 * pthread_self.c: Likewise.
1319 * pthread_setcancelstate.c: Likewise.
1320 * pthread_setschedparam.c: Likewise.
1321 * pthread_mutex_destroy.c: Likewise.
1322 * pthread_mutex_init.c: Likewise.
1323 * pthreadP.h: Add prototypes for the aliases.
1324
0d5f4929
UD
1325 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
1326 multiple_threads member in correct TCB to 1.
1327
6ee8d334
UD
1328 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
1329 SINGLE_THREAD_P. If in libc or libpthread examine multiple_thread
1330 member of thread decriptor, otherwise return unconditionally 1.
1331
2fb6444d
UD
13322002-12-14 Ulrich Drepper <drepper@redhat.com>
1333
1334 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
1335 regular Linux version. Remove file.
1336 * sysdeps/unix/sysv/linux/connect.S: Likewise. Remove file.
1337 * sysdeps/unix/sysv/linux/llseek.c: Likewise. Remove file.
1338 * sysdeps/unix/sysv/linux/msgrcv.c: Likewise. Remove file.
1339 * sysdeps/unix/sysv/linux/msgsnd.c: Likewise. Remove file.
1340 * sysdeps/unix/sysv/linux/open64.c: Likewise. Remove file.
1341 * sysdeps/unix/sysv/linux/poll.c: Likewise. Remove file.
1342 * sysdeps/unix/sysv/linux/pread.c: Likewise. Remove file.
1343 * sysdeps/unix/sysv/linux/pread64.c: Likewise. Remove file.
1344 * sysdeps/unix/sysv/linux/pselect.c: Likewise. Remove file.
1345 * sysdeps/unix/sysv/linux/pwrite.c: Likewise. Remove file.
1346 * sysdeps/unix/sysv/linux/pwrite64.c: Likewise. Remove file.
1347 * sysdeps/unix/sysv/linux/readv.c: Likewise. Remove file.
1348 * sysdeps/unix/sysv/linux/recv.S: Likewise. Remove file.
1349 * sysdeps/unix/sysv/linux/recvfrom.S: Likewise. Remove file.
1350 * sysdeps/unix/sysv/linux/recvmsg.S: Likewise. Remove file.
1351 * sysdeps/unix/sysv/linux/send.S: Likewise. Remove file.
1352 * sysdeps/unix/sysv/linux/sendmsg.S: Likewise. Remove file.
1353 * sysdeps/unix/sysv/linux/sendto.S: Likewise. Remove file.
1354 * sysdeps/unix/sysv/linux/sigpause.c: Likewise. Remove file.
1355 * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise. Remove file.
1356 * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise. Remove file.
1357 * sysdeps/unix/sysv/linux/sigwait.c: Likewise. Remove file.
1358 * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise. Remove file.
1359 * sysdeps/unix/sysv/linux/system.c: Likewise. Remove file.
1360 * sysdeps/unix/sysv/linux/tcdrain.c: Likewise. Remove file.
1361 * sysdeps/unix/sysv/linux/wait.c: Likewise. Remove file.
1362 * sysdeps/unix/sysv/linux/waitid.c: Likewise. Remove file.
1363 * sysdeps/unix/sysv/linux/waitpid.c: Likewise. Remove file.
1364 * sysdeps/unix/sysv/linux/writev.c: Likewise. Remove file.
1365 * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise. Remove file.
1366
86b2dc40
UD
13672002-12-14 Jakub Jelinek <jakub@redhat.com>
1368
1369 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
1370 * sysdeps/unix/sysv/linux/open.c: Removed.
1371 * sysdeps/unix/sysv/linux/fsync.c: Removed.
1372 * sysdeps/unix/sysv/linux/lseek.c: Removed.
1373 * sysdeps/unix/sysv/linux/msync.c: Removed.
1374 * sysdeps/unix/sysv/linux/read.c: Removed.
1375 * sysdeps/unix/sysv/linux/close.c: Removed.
1376 * sysdeps/unix/sysv/linux/creat.c: Removed.
1377 * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
1378 * sysdeps/unix/sysv/linux/pause.c: Removed.
1379 * sysdeps/unix/sysv/linux/select.c: Removed.
1380 * sysdeps/unix/sysv/linux/write.c: Removed.
1381
9d263d72
UD
13822002-12-14 Ulrich Drepper <drepper@redhat.com>
1383
1384 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
1385 element in TCB to see whether locking is needed.
1386
1387 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
1388 MULTIPLE_THREADS_OFFSET value is correct.
1389
1390 * sysdeps/unix/sysv/linux/close.c: New file.
1391 * sysdeps/unix/sysv/linux/connect.S: New file.
1392 * sysdeps/unix/sysv/linux/creat.c: New file.
1393 * sysdeps/unix/sysv/linux/fsync.c: New file.
1394 * sysdeps/unix/sysv/linux/llseek.c: New file.
1395 * sysdeps/unix/sysv/linux/lseek.c: New file.
1396 * sysdeps/unix/sysv/linux/msgrcv.c: New file.
1397 * sysdeps/unix/sysv/linux/msgsnd.c: New file.
1398 * sysdeps/unix/sysv/linux/msync.c: New file.
1399 * sysdeps/unix/sysv/linux/nanosleep.c: New file.
1400 * sysdeps/unix/sysv/linux/open.c: New file.
1401 * sysdeps/unix/sysv/linux/open64.c: New file.
1402 * sysdeps/unix/sysv/linux/pause.c: New file.
1403 * sysdeps/unix/sysv/linux/poll.c: New file.
1404 * sysdeps/unix/sysv/linux/pread.c: New file.
1405 * sysdeps/unix/sysv/linux/pread64.c: New file.
1406 * sysdeps/unix/sysv/linux/pselect.c: New file.
1407 * sysdeps/unix/sysv/linux/pwrite.c: New file.
1408 * sysdeps/unix/sysv/linux/pwrite64.c: New file.
1409 * sysdeps/unix/sysv/linux/readv.c: New file.
1410 * sysdeps/unix/sysv/linux/recv.S: New file.
1411 * sysdeps/unix/sysv/linux/recvfrom.S: New file.
1412 * sysdeps/unix/sysv/linux/recvmsg.S: New file.
1413 * sysdeps/unix/sysv/linux/select.c: New file.
1414 * sysdeps/unix/sysv/linux/send.S: New file.
1415 * sysdeps/unix/sysv/linux/sendmsg.S: New file.
1416 * sysdeps/unix/sysv/linux/sendto.S: New file.
1417 * sysdeps/unix/sysv/linux/sigpause.c: New file.
1418 * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
1419 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
1420 * sysdeps/unix/sysv/linux/sigwait.c: New file.
1421 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
1422 * sysdeps/unix/sysv/linux/system.c: New file.
1423 * sysdeps/unix/sysv/linux/tcdrain.c: New file.
1424 * sysdeps/unix/sysv/linux/wait.c: New file.
1425 * sysdeps/unix/sysv/linux/waitid.c: New file.
1426 * sysdeps/unix/sysv/linux/waitpid.c: New file.
1427 * sysdeps/unix/sysv/linux/writev.c: New file.
1428 * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
1429
1430 * pt-readv.c: Fix comment.
1431
14322002-12-14 Jakub Jelinek <jakub@redhat.com>
1433
1434 * tst-cleanup1.c: Include stdlib.h.
1435
1436 * tst-cancel5.c: New test.
1437 * Makefile (tests): Add tst-cancel5.
1438 (tst-cancel5): Link against libc.so libpthread.so in that order.
1439
9ae0909b
UD
14402002-12-13 Ulrich Drepper <drepper@redhat.com>
1441
b7bdd9c4
UD
1442 * forward.c (test_loaded): Prevent recursive calls.
1443
9ae0909b
UD
1444 * Makefile (routines): Add libc-cancellation.
1445 * libc-cancellation.c: New file.
1446 * descr.h (struct pthread): Add multiple_threads field.
1447 * allocatestack.c (allocate_stack): Initialize multiple_header field of
1448 new thread descriptor to 1.
1449 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
1450 Initialize multiple_thread field after successful thread creation.
1451 * cancellation.c (__do_cancel): Move to pthreadP.h.
1452 (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
1453 (__pthread_disable_asynccancel): Add internal_function attribute.
1454 * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
1455 * pthread_setcancelstate.c: Likewise.
1456 * pthread_setcanceltype.c: Likewise.
1457 * pthread_exit.c: Likewise.
1458 * pthreadP.h (CANCELLATION_P): Likewise.
1459 (__do_cancel): Define as static inline.
1460 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
1461 (__libc_enable_asynccancel, __libc_disable_asynccancel): New
1462 declarations.
1463 * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
1464 fields. Define MULTIPLE_THREADS_OFFSET.
1465 * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
1466 declaration.
1467 * sysdeps/unix/sysv/linux/accept.S: New file.
1468 * sysdeps/unix/sysv/linux/read.c: New file.
1469 * sysdeps/unix/sysv/linux/write.c: New file.
1470 * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
1471 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
1472 initialization of __libc_locking_needed.
1473 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
1474 __libc_locking_needed, use multiple_threads field in TCB.
1475 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
1476
22f20674
UD
14772002-12-12 Ulrich Drepper <drepper@redhat.com>
1478
2ad2e1e7
UD
1479 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
1480 version.
1481 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
1482
22f20674
UD
1483 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
1484 access to __libc_locking_needed for PIC.
1485
aa80bf86
UD
14862002-12-12 Jakub Jelinek <jakub@redhat.com>
1487
1488 * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
1489 declare for libc.so.
1490 (__libc_lock_init, __libc_lock_init_recursive): Change into comma
1491 expression.
1492 (__libc_lock_lock): Put into statement expression.
1493 (__libc_lock_unlock): Remove trailing semicolon.
1494 * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
1495
24021373
RM
14962002-12-12 Roland McGrath <roland@redhat.com>
1497
1498 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
1499 "m" constraint to refer to __libc_locking_needed. Declare it here.
1500
14e7aece
UD
15012002-12-12 Ulrich Drepper <drepper@redhat.com>
1502
1503 * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
1504 * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
1505 Initialize __libc_locking_needed.
1506 * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
1507 instead of __register_pthread_fork_handler.
1508 * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
1509 * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
1510 fork-gen with libc_pthread_init.
1511 * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
1512 of __register_pthread_fork_handler.
1513 * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
1514 of __register_pthread_fork_handler.
1515 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
1516 __libc_locking_needed to determine whether lock prefix can be avoided.
1517 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
1518
85631c8e
UD
15192002-12-11 Ulrich Drepper <drepper@redhat.com>
1520
da63009e
UD
1521 * Makefile (tests): Add tst-cleanup1.
1522 * tst-cleanup1.c: New file.
1523 * cancellation.c (__cleanup_thread): Removed.
1524 (__do_cancel): Remove call to __cleanup_thread.
1525 * pthreadP.h: Remove __cleanup_thread prorotype.
1526
000160a2
UD
1527 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
1528 Remember function and argument even if cancellation handler
1529 function is not available.
1530 (__libc_cleanup_region_end): Execute registered function directly if
1531 pthread functions are not available.
1532 (__libc_cleanup_end): Likewise.
1533
85631c8e
UD
1534 * init.c (__pthread_initialize_minimal): Fix initialization in
1535 static lib by preventing gcc from being too clever.
1536
dce8f2b6
UD
15372002-12-10 Ulrich Drepper <drepper@redhat.com>
1538
34a075be
UD
1539 * init.c (__pthread_initialize_minimal): Remove unneccesary
1540 sigaddset call.
1541
dce8f2b6
UD
1542 * Makefile (tests): We can run tst-locale2 now.
1543
e5e45b53
UD
15442002-12-09 Ulrich Drepper <drepper@redhat.com>
1545
1546 * Versions: Remove duplicated sigwait entry.
1547
bdb04f92
UD
15482002-12-08 Ulrich Drepper <drepper@redhat.com>
1549
1e506629
UD
1550 * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
1551 inside libpthread.
1552
a3957dd5
UD
1553 * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
1554
bdb04f92
UD
1555 * pthreadP.h: Declare __pthread_enable_asynccancel and
1556 __pthread_disable_asynccancel.
1557 (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
1558 (CANCEL_RESET): Use __pthread_disable_asynccancel.
1559 * cancellation.c (__pthread_enable_asynccancel): New function.
1560 (__pthread_disable_asynccancel): New function.
1561 * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
1562 * pt-close.c: Likewise.
1563 * pt-connect.c: Likewise.
1564 * pt-creat.c: Likewise.
1565 * pt-fcntl.c: Likewise.
1566 * pt-fsync.c: Likewise.
1567 * pt-lseek.c: Likewise.
1568 * pt-lseek64.c: Likewise.
1569 * pt-msgrcv.c: Likewise.
1570 * pt-msgsnd.c: Likewise.
1571 * pt-msync.c: Likewise.
1572 * pt-nanosleep.c: Likewise.
1573 * pt-open.c: Likewise.
1574 * pt-open64.c: Likewise.
1575 * pt-pause.c: Likewise.
1576 * pt-poll.c: Likewise.
1577 * pt-pread.c: Likewise.
1578 * pt-pread64.c: Likewise.
1579 * pt-pselect.c: Likewise.
1580 * pt-pwrite.c: Likewise.
1581 * pt-pwrite64.c: Likewise.
1582 * pt-read.c: Likewise.
1583 * pt-readv.c: Likewise.
1584 * pt-recv.c: Likewise.
1585 * pt-recvfrom.c: Likewise.
1586 * pt-recvmsg.c: Likewise.
1587 * pt-select.c: Likewise.
1588 * pt-send.c: Likewise.
1589 * pt-sendmsg.c: Likewise.
1590 * pt-sendto.c: Likewise.
1591 * pt-sigpause.c: Likewise.
1592 * pt-sigsuspend.c: Likewise.
1593 * pt-sigtimedwait.c: Likewise.
1594 * pt-sigwait.c: Likewise.
1595 * pt-sigwaitinfo.c: Likewise.
1596 * pt-system.c: Likewise.
1597 * pt-tcdrain.c: Likewise.
1598 * pt-wait.c: Likewise.
1599 * pt-waitid.c: Likewise.
1600 * pt-waitpid.c: Likewise.
1601 * pt-write.c: Likewise.
1602 * pt-writev.c: Likewise.
a3957dd5
UD
1603 * pthread_join.c: Likewise.
1604 * pthread_timedjoin.c: Likewise.
bdb04f92
UD
1605
1606 * pt-sigpause.c (sigsuspend): Call __sigsuspend.
1607 (__xpg_sigpause): New function.
1608 * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
1609
6ccb3834
UD
16102002-12-07 Ulrich Drepper <drepper@redhat.com>
1611
09efc3ba
UD
1612 * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
1613
1614 * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
1615 _GI_pthread_cleanup_pop to pthreadP.h.
1616
1617 * ftrylockfile.c: Use _IO_lock_trylock instead of
1618 pthread_mutex_trylock.
1619
1620 * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
1621 (CANCEL_RESET): Likewise.
1622 (__pthread_setcanceltype_): Declare.
1623 (__pthread_mutex_lock_internal): Declare.
1624 (__pthread_mutex_unlock_internal): Declare.
1625 (__pthread_once_internal): Declare.
1626 (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
1627 (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
1628
1629 * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
1630 and pthread_mutex_unlock.
1631 * pthread_cond_wait.c: Likewise.
1632 * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
1633 * pthread_mutex_unlock.c: Likewise.
1634
1635 * pthread_setcanceltype.c: Add additional alias
1636 __pthread_setcanceltype.
1637
1638 * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
1639 * sem_open.c (sem_open): Likewise.
1640 Use __libc_open, __libc_write, and __libc_close instead of
1641 open, write, and close respectively.
1642
1643 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
1644 Rewrite as statement expression since it must return a value.
1645
1646 * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
1647 * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
1648 __pthread_kill.
1649
1650 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
1651 alias __pthread_once_internal.
1652
6ccb3834
UD
1653 * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
1654
d3c9f895
UD
16552002-12-06 Ulrich Drepper <drepper@redhat.com>
1656
4614167a
UD
1657 * Makefile (tests): Add tst-stdio1 and tst-stdio2.
1658 * tst-stdio1.c: New file.
1659 * tst-stdio2.c: New file.
1660
a4548cea
UD
1661 * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
1662
d3c9f895
UD
1663 * Makefile (tests): Comment out tst-locale2 for now.
1664 (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
1665
1666 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
1667 -D_IO_MTSAFE_IO.
1668 * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
1669 Use _IO_lock_init instead of explicit assignment.
1670
1671 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
1672 Define __libc_lock_* and __libc_lock_recursive macros with
1673 lowlevellock macros, not pthread mutexes.
1674
1675 * flockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_lock instead
1676 of pthread_mutex_lock.
1677 * funlockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_unlock
1678 instead of pthread_mutex_unlock.
1679
fde89ad0
RM
16802002-12-06 Roland McGrath <roland@redhat.com>
1681
1682 * allocatestack.c (__stack_user): Use uninitialized defn.
1683 * init.c (__pthread_initialize_minimal): Initialize it here.
1684
11767d47
RM
16852002-12-05 Roland McGrath <roland@redhat.com>
1686
fde89ad0
RM
1687 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
1688 string.
1689 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
1690
11767d47
RM
1691 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
1692 missing & here too.
1693
440d8bc2
UD
16942002-12-05 Ulrich Drepper <drepper@redhat.com>
1695
1696 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
1697 lowlevellock.
1698 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
1699 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
1700 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
1701 * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
1702 for __libc_lock_* macros.
1703 * Makefile (routines): Add libc-lowlevellock.
1704
17052002-10-09 Roland McGrath <roland@redhat.com>
1706
1707 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
1708 Under [__PIC__], call the function via the pointer fetched for
1709 comparison rather than a call by name that uses the PLT.
1710 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
1711 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
1712 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
1713 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
1714 (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
1715
d5ed0118
RM
17162002-12-04 Roland McGrath <roland@redhat.com>
1717
1718 * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
1719
1720 * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
1721 * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
1722
1723 * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
1724
eaa4099f
UD
17252002-12-04 Ulrich Drepper <drepper@redhat.com>
1726
1727 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
1728 a completely opaque, non-integer type.
1729 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1730
33b5d0cc
UD
17312002-12-05 Jakub Jelinek <jakub@redhat.com>
1732
1733 * sysdeps/i386/tls.h: Include stdlib.h.
1734 * sysdeps/x86_64/tls.h: Likewise.
1735
7a5cdb30
UD
17362002-12-04 Ulrich Drepper <drepper@redhat.com>
1737
c4a6d859
UD
1738 * Makefile (tests): Add tst-locale2.
1739 (tests-static): Likewise.
1740 * tst-locale2.c: New file.
1741
7a5cdb30
UD
1742 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
1743 volatile and add memory clobbers to lock operations.
1744
d82d5d12
UD
17452002-12-03 Ulrich Drepper <drepper@redhat.com>
1746
69cae3cf
UD
1747 * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
1748 * sysdeps/i386/i486/bits/atomic.h: New file.
1749 * sysdeps/i386/i586/bits/atomic.h: New file.
1750 * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
1751 include i486 version.
1752 * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
1753 * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
c97c64de 1754 Patch by Marijn Ros <marijn@mad.scientist.com>.
69cae3cf 1755
e4044c01
UD
1756 * allocatestack.c (get_cached_stack): Don't crash if we first
1757 found a stack with a larger size then needed.
1758 Reported by Hui Huang <hui.huang@sun.com>.
1759
d82d5d12
UD
1760 * Makefile (tests): Add tst-sysconf.
1761 * tst-sysconf.c: New file.
1762
1763 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
1764 PTHREAD_THREADS_MAX.
1765
fa9a4ff0
RM
17662002-12-02 Roland McGrath <roland@redhat.com>
1767
1768 * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
1769 Declare using hidden_proto instead of attribute_hidden, so there are
1770 non-.hidden static symbols for gdb to find.
1771 (__pthread_keys): Likewise.
1772 * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
1773 * allocatestack.c (__stack_user): Likewise.
1774 * pthread_create.c (__pthread_keys): Likewise.
1775 (__nptl_threads_events, __nptl_last_event): Make these static instead
1776 of hidden.
1777 * pthread_key_create.c (__pthread_pthread_keys_max,
1778 __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
1779
91949a33
UD
17802002-12-02 Ulrich Drepper <drepper@redhat.com>
1781
c22b52fa
UD
1782 * Makefile (tests): Add tst-locale1. If buid-static is yes link
1783 statically.
1784 * tst-locale1.c: New file.
1785
beb6aa41
UD
1786 * pthread_cond_timedwait.c: Include <stdlib.h>.
1787
91949a33
UD
1788 * Makefile (tests): Add tst-fork2 and tst-fork3.
1789 * tst-fork2.c: New file.
1790 * tst-fork3.c: New file.
1791
654dff90
UD
17922002-11-28 Ulrich Drepper <drepper@redhat.com>
1793
cb0e76b4
UD
1794 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
1795
1796 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
1797 require it to 200112L.
1798
1799 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
1800 instruction only if HAVE_CMOV is defined.
1801 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
1802
975aa229
UD
1803 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
1804
654dff90
UD
1805 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
1806
1807 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
1808
1809 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
1810
a3931336
UD
18112002-11-27 Ulrich Drepper <drepper@redhat.com>
1812
c10c099c
UD
1813 * sysdeps/x86_64/bits/atomic.h: New file.
1814
1815 * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
1816 16-bit operations.
1817
dca99d27
UD
1818 * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
1819 possible since gettid cannot fail.
1820
f78deea6
UD
1821 * sysdeps/x86_64/pthreaddef.h: New file.
1822
1823 * sysdeps/i386/pthreaddef.h (gettid): Removed.
1824
1825 * sysdeps/x86_64/pthread_spin_init.c: New file.
1826 * sysdeps/x86_64/pthread_spin_lock.c: New file.
1827 * sysdeps/x86_64/pthread_spin_trylock.c: New file.
1828 * sysdeps/x86_64/pthread_spin_unlock.c: New file.
1829
1830 * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
1831 Add missing lock prefix. Minute optimization.
1832
1833 * tst-spin2.c (main): Also check successful trylock call.
1834
1835 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
1836 syscall. Fix typo in case INTERNAL_SYSCALL is not used.
1837
1838 * sysdeps/i386/pthread_spin_destroy.c: Moved to...
1839 * sysdeps/pthread/pthread_spin_destroy.c: ...here. New file.
1840
1841 * sysdeps/i386/pthread_sigmask.c: Removed. Use the generic code.
1842 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
1843 value in case of an error. Add support for INTERNAL_SYSCALL.
b54e18eb
UD
1844
1845 * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
1846 value in case of an error.
1847
a3931336
UD
1848 * sysdeps/x86_64/tls.h: New file.
1849
76a50749
UD
18502002-11-26 Ulrich Drepper <drepper@redhat.com>
1851
117c452c
UD
1852 * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface. It now
1853 takes the array member name and the index as parameters.
1854 (THREAD_SETMEM_NC): Likewise.
1855 * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
1856 * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
1857 interfaces.
1858
1859 * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
1860 to decide which code to use.
1861 (THREAD_SETMEM_NC): Likewise.
1862
76a50749
UD
1863 * allocatestack.c (queue_stack): Don't remove stack from list here.
1864 Do it in the caller. Correct condition to prematurely terminate
1865 loop to free stacks.
1866 (__deallocate_stack): Remove stack from list here.
1867
18682002-11-26 Ulrich Drepper <drepper@redhat.com>
1869
1870 * Makefile (tests): Add tst-stack1.
1871 * tst-stack1.c: New file.
1872
1873 * allocatestack.c (allocate_stack): Initialize the TCB on a user
1874 provided stack.
1875
1876 * pthread_attr_getstack.c: Return bottom of the thread area.
1877
18782002-11-25 Ulrich Drepper <drepper@redhat.com>
1879
1880 * Makefile (libpthread-routines): Add pt-allocrtsig and
1881 pthread_kill_other_threads.
1882 * pt-allocrtsig.c: New file.
1883 * pthread_kill_other_threads.c: New file.
1884 * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
1885 all three functions.
1886 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
1887 allocrtsig.
1888 * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
1889 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
1890 and __libc_allocate_rtsig_private.
1891 * Versions (libpthread): Export pthread_kill_other_threads_np,
1892 __libc_current_sigrtmin, and __libc_current_sigrtmax.
1893
18942002-11-24 Ulrich Drepper <drepper@redhat.com>
1895
1896 * allocatestack.c (allocate_stack): stackaddr in attribute points to
1897 the end of the stack. Adjust computations.
1898 When mprotect call fails dequeue stack and free it.
1899 * pthread_attr_setstack.c: Store top of the stack in stackaddr
1900 attribute.
1901 * pthread_getattr_np.c: Likewise.
1902
1903 * descr.h (IS_DETACHED): Add some more parenthesis to prevent
1904 surprises.
1905
19062002-11-23 Ulrich Drepper <drepper@redhat.com>
1907
1908 * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
1909 attribute definitions. Patch by Luca Barbieri <ldb@ldb.ods.org>.
1910
19112002-11-22 Ulrich Drepper <drepper@redhat.com>
1912
1913 * pthread_getspecific.c: Optimize access to first 2nd-level array.
1914 * pthread_setspecific.c: Likewise.
1915
19162002-11-21 Ulrich Drepper <drepper@redhat.com>
1917
1918 * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
1919 definitions. Get them from the official place.
1920 * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
1921
1922 * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
1923 Use new CLONE_ flags in clone() calls.
1924
1925 * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
1926 * sysdeps/unix/sysv/linux/i386/fork.c: New file.
1927
1928 * Versions: Add pthread_* functions for libc.
1929 * forward.c: New file.
1930
1931 * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
1932 errno-loc.
1933 * herrno.c: New file.
1934 * res.c: New file.
1935
1936 * Makefile (libpthread-routines): Remove sem_post, sem_wait,
1937 sem_trywait, and sem_timedwait. Add herrno and res.
1938 * sem_init.c: Don't initialize lock and waiters members.
1939 * sem_open.c: Likewise.
1940 * sem_post.c: Removed.
1941 * sem_wait.c: Removed.
1942 * sem_trywait.c: Removed.
1943 * sem_timedwait.c: Removed.
1944 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
1945 Includes full implementations of sem_post, sem_wait, sem_trywait,
1946 and sem_timedwait.
1947 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
1948 for new implementation.
1949 * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
1950 and waiters fields.
1951
1952 * tst-sem3.c: Improve error message.
1953 * tst-signal3.c: Likewise.
1954
1955 * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
1956 to tell the kernel about the termination futex and to initialize tid
1957 member. Don't initialize main_thread.
1958 * descr.h (struct pthread): Remove main_thread member.
1959 * cancelllation.c (__do_cancel): Remove code handling main thread.
1960 The main thread is not special anymore.
1961
1962 * allocatestack.c (__reclaim_stacks): Mark stacks as unused. Add
1963 size of the stacks to stack_cache_actsize.
1964
1965 * pt-readv.c: Add missing "defined".
1966 * pt-sigwait.c: Likewise.
1967 * pt-writev.c: Likewise.
1968
19692002-11-09 Ulrich Drepper <drepper@redhat.com>
1970
1971 * Versions: Export __connect from libpthread.
1972 Patch by Luca Barbieri <ldb@ldb.ods.org>.
1973
1974 * Makefile (libpthread-routines): Add pt-raise.
1975 * sysdeps/unix/sysv/linux/raise.c: New file.
1976 * sysdeps/unix/sysv/linux/pt-raise.c: New file.
1977 * sysdeps/generic/pt-raise.c: New file.
1978
1979 * pthread_cond_init.c: Initialize all data elements of the condvar
1980 structure. Patch by Luca Barbieri <ldb@ldb.ods.org>.
1981
1982 * pthread_attr_init.c: Actually implement 2.0 compatibility version.
1983 * pthread_create.c: Likewise.
1984
1985 * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
1986 * tst-key1.c: New file.
1987 * tst-key2.c: New file.
1988 * tst-key3.c: New file.
1989
1990 * Versions: Export pthread_detach for version GLIBC_2.0.
1991 Reported by Saurabh Desai <sdesai@austin.ibm.com>.
1992
19932002-11-08 Ulrich Drepper <drepper@redhat.com>
1994
1995 * pthread_key_create.c: Terminate search after an unused key was found.
1996 Patch by Luca Barbieri <ldb@ldb.ods.org>.
1997
1998 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
1999 Patch by Luca Barbieri <ldb@ldb.ods.org>.
2000
20012002-10-10 Ulrich Drepper <drepper@redhat.com>
2002
2003 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
2004 dynamic lookup for errno in PIC.
2005
2006 * allocatestack.c (get_cached_stack): Rearrange code slightly to
2007 release the stack lock as soon as possible.
2008 Call _dl_allocate_tls_init for TCB from the cache to re-initialize
2009 the static TLS block.
2010 (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
2011
2012 * cancellation.c: Renamed from cancelation.c.
2013 * Makefile: Adjust accordingly.
2014 * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
2015 * cleanup_defer.c: Use CANCELLATION_P.
2016 * pthread_testcancel.c: Likewise.
2017 * descr.h: Fix spelling in comments.
2018 * init.c: Likewise.
2019 * pthread_getattr_np.c: Likewise.
2020 * pthread_getschedparam.c: Likewise.
2021 * pthread_setschedparam.c: Likewise.
2022 * Versions: Likewise.
2023
2024 * pt-pselect.c: New file.
2025 * Makefile (libpthread-routines): Add pt-pselect.
2026 * Versions: Add pselect.
2027
2028 * tst-cancel4.c: New file.
2029 * Makefile (tests): Add tst-cancel4.
2030
20312002-10-09 Ulrich Drepper <drepper@redhat.com>
2032
2033 * pthread_mutex_lock.c: Always record lock ownership.
2034 * pthread_mutex_timedlock.c: Likewise.
2035 * pthread_mutex_trylock.c: Likewise.
2036
2037 * pt-readv.c: New file.
2038 * pt-writev.c: New file.
2039 * pt-creat.c: New file.
2040 * pt-msgrcv.c: New file.
2041 * pt-msgsnd.c: New file.
2042 * pt-poll.c: New file.
2043 * pt-select.c: New file.
2044 * pt-sigpause.c: New file.
2045 * pt-sigsuspend.c: New file.
2046 * pt-sigwait.c: New file.
2047 * pt-sigwaitinfo.c: New file.
2048 * pt-waitid.c: New file.
2049 * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
2050 pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
2051 pt-sigwait, pt-sigwaitinfo, and pt-waitid.
2052 * Versions: Add all the new functions.
2053
2054 * tst-exit1.c: New file.
2055 * Makefile (tests): Add tst-exit1.
2056
2057 * sem_timedwait.c: Minor optimization for more optimal fastpath.
2058
20592002-10-08 Ulrich Drepper <drepper@redhat.com>
2060
2061 * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
2062
2063 * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
2064 call. pthread_join is an official cancellation point.
2065 * pthread_timedjoin.c: Likewise.
2066
2067 * pthread_cond_wait.c: Revert order in which internal lock are dropped
2068 and the condvar's mutex are retrieved.
2069 * pthread_cond_timedwait.c: Likewise.
2070 Reported by dice@saros.East.Sun.COM.
2071
20722002-10-07 Ulrich Drepper <drepper@redhat.com>
2073
2074 * pthreadP.h: Cut out all type definitions and move them...
2075 * sysdeps/unix/sysv/linux/internaltypes.h: ...here. New file.
2076 * pthreadP.h: Include <internaltypes.h>.
2077
2078 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
2079 performance tweaks.
2080
2081 * sem_trywait.c: Shuffle #includes around to get right order.
2082 * sem_timedwait.c: Likewise.
2083 * sem_post.c: Likewise.
2084 * sem_wait.c: Likewise.
2085
2086 * nptl 0.3 released.
2087
2088 * Makefile (tests): Add tst-signal3.
2089 * tst-signal3.c: New file.
2090
20912002-10-05 Ulrich Drepper <drepper@redhat.com>
2092
2093 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
2094 the asms modify the sem object.
2095 (__lll_sem_timedwait): Now takes struct sem* as first parameter.
2096
2097 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
2098 the actual members.
2099 * pthreadP.h (struct sem): New type. Actual semaphore type.
2100 * semaphoreP.h: Include pthreadP.h.
2101 * sem_getvalue.c: Adjust to sem_t change.
2102 * sem_init.c: Likewise.
2103 * sem_open.c: Likewise.
2104 * sem_post.c: Likewise.
2105 * sem_timedwait.c: Likewise.
2106 * sem_trywait.c: Likewise.
2107 * sem_wait.c: Likewise.
2108
21092002-10-04 Ulrich Drepper <drepper@redhat.com>
2110
2111 * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
2112 * tst-basic2.c: New file.
2113 * tst-exec1.c: New file.
2114 * tst-exec2.c: New file.
2115 * tst-exec3.c: New file.
2116
2117 * tst-fork1.c: Remove extra */.
2118
2119 * nptl 0.2 released. The API for IA-32 is complete.