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