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