]> git.ipfire.org Git - thirdparty/glibc.git/blame - nptl/ChangeLog
2003-03-18 Roland McGrath <roland@redhat.com>
[thirdparty/glibc.git] / nptl / ChangeLog
CommitLineData
86a9ee5e
UD
12003-03-18 Ulrich Drepper <drepper@redhat.com>
2
ac9e0aa1
UD
3 * Makefile (tests): Add tst-cond11.
4 * tst-cond11.c: New file.
5
a14b373c
UD
6 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
7 struct passed to cleanup handler to eliminate one more
8 instruction.
9 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10
24a49f38
UD
11 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
12 (pthrad_cond_t): Replace __unused field with __clock.
13
14 * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
15 waken all waiters in cleanup handler.
16 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
17 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
18
86a9ee5e
UD
19 * pthread_condattr_getclock.c: New file.
20 * pthread_condattr_setclock.c: New file.
21 * sysdeps/pthread/pthread.h: Declare these new functions.
22 * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
23 * Makefile (libpthread-routines): Add the new functions.
24 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
25 Renamed field to value. Document use of the bits.
26 * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
27 change.
28 * pthread_condattr_setpshared.c: Likewise.
d5cb8389 29 * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
86a9ee5e
UD
30 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
31 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
32 Add __clock field.
33 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
34 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
35 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
36 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
37 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
38 Implement clock selection.
39 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
40 * pthread-errnos.sym: Add ENOSYS.
41 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
42 _POSIX_CLOCK_SELECTION.
43 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
44
45 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
46 invalid .size directive.
47
98054a05
RM
482003-03-17 Roland McGrath <roland@redhat.com>
49
50 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
51 Formatting tweaks.
52
001bea71
UD
532003-03-17 Ulrich Drepper <drepper@redhat.com>
54
4773086e
UD
55 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
56 Use __lll_add instead of spelling it out. Use protected symbol names.
57 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
58 Use __lll_add.
59 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
60 Renamed from lll_compare_and_swap. Use new name where necessary.
61 (__lll_add): Defined.
62 (__lll_dec_if_positive): Defined.
63 (__lll_test_and_set): Defined.
64 * sysdeps/ia64/pthread_spin_init.c: Removed.
65 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
66 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
67 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
68 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
69 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
70 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
71 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
001bea71
UD
72 * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
73 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
74 __sync_lock_release_si.
75 Patch by Jakub Jelinek.
76
77 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
78 Fix timeout handling.
79 (__lll_timedwait_tid): Likewise.
80 (lll_unlock_wake_cb): Wake up other waiters if necessary.
81 Patch by Jakub Jelinek.
82
83 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
84
de4471dd
RM
852003-03-17 Roland McGrath <roland@redhat.com>
86
87 PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
88 * sysdeps/pthread/pthread_spin_init.c: New file.
89 * sysdeps/pthread/pthread_spin_unlock.c: New file.
90 * sysdeps/powerpc/Makefile: New file.
91 * sysdeps/powerpc/pthread_spin_lock.c: New file.
92 * sysdeps/powerpc/pthread_spin_trylock.c: New file.
93 * sysdeps/powerpc/pthreaddef.h: New file.
94 * sysdeps/powerpc/tcb-offsets.sym: New file.
95 * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
96 * sysdeps/powerpc/tls.h: New file.
97 * sysdeps/powerpc/bits/atomic.h: New file.
98 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
99 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
100 * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
98054a05 101
de4471dd
RM
102 * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
103 * sysdeps/unix/sysv/linux/sem_post.c: New file.
104 * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
105 * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
106 * sysdeps/unix/sysv/linux/sem_wait.c: New file.
107 * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
108 * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
109 * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
110 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
111 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
112 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
113 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
114 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
115 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
116 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
117
118 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
119 not gettimeofday.
120 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
121 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
122 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
123 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
124 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
125
5778033f
UD
1262003-03-17 Ulrich Drepper <drepper@redhat.com>
127
128 * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
129 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
130 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
131 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
132 Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
133
796038f8
RM
1342003-03-16 Roland McGrath <roland@redhat.com>
135
136 * tst-fork4.c: Include <string.h>.
137 * tst-signal2.c: Likewise.
138 * tst-mutex5.c (do_test): exit -> return.
139 * tst-mutex2.c: Include <stdlib.h>.
140
51d0678c
UD
1412003-03-16 Ulrich Drepper <drepper@redhat.com>
142
5778033f
UD
143 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
144 (__lll_mutex_timedlock_wait): Correct expected value after
145 spurious wakeup. Otherwise we would never wait again.
146
b6e2f87a
UD
147 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
148 zone versus inline asm stupidity. Use correct instructions.
149
51d0678c
UD
150 * tst-rwlock6.c: Add some more status output.
151
8112cc70
RM
1522003-03-15 Roland McGrath <roland@redhat.com>
153
154 * sysdeps/pthread/configure.in: New file.
155 * sysdeps/pthread/configure: New file (generated).
156
49773c19
UD
1572003-03-15 Ulrich Drepper <drepper@redhat.com>
158
159 * allocatestack.c (allocate_stack): Store the exact stack size of
160 user allocated stacks.
161
eec0ca9f
JJ
1622003-03-15 Jakub Jelinek <jakub@redhat.com>
163
164 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
165 (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
166 * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
167 * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
168 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
169 Use `header.' prefix.
170 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
171
a87731e2
UD
1722003-03-15 Ulrich Drepper <drepper@redhat.com>
173
174 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
175 __builtin_frame_address, use stack pointer.
176
177 * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
178 instead of __builtin_frame_pointer.
179
e22a221d
UD
1802003-03-14 Ulrich Drepper <drepper@redhat.com>
181
92ed3daf
UD
182 * tst-basic1.c (do_test): Add cast to avoid warning.
183 * tst-basic2.c (do_test): Likewise.
184
9b89567d
UD
185 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
186 amount of stack correction.
187
e22a221d
UD
188 * tst-fork4.c: Use test-skeleton.c.
189
2e49caba
RM
1902003-03-14 Roland McGrath <roland@redhat.com>
191
192 * init.c: Fix typo "#eli" for "#else".
193
415ef7d8
RM
1942003-03-14 Steven Munroe <sjmunroe@us.ibm.com>
195
196 * allocatestack.c (__stack_user): Use hidden_data_def.
197 * pthread_create.c (__pthread_keys): Likewise.
198
199 * init.c [__powerpc__] (__NR_set_tid_address): Define it.
200
52287505
RM
2012003-03-14 Roland McGrath <roland@redhat.com>
202
415ef7d8
RM
203 * tst-fork4.c: New file.
204 * Makefile (tests): Add it.
205
52287505
RM
206 * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
207 we always define the padding space.
208 [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
209 stopped supporting its own extensions fully.
210 [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
211 struct also called `header', so `header.multiple_threads' is the field
212 name to use on all machines.
213 * allocatestack.c (allocate_stack): Use `header.' prefix.
214 * sysdeps/pthread/createthread.c (create_thread): Likewise.
215 * pthread_create.c (__pthread_create_2_1): Likewise.
216 * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
217 (THREAD_SELF): Likewise.
218 * sysdeps/x86_64/tls.h: Likewise.
219 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
220 (SINGLE_THREAD_P): Likewise.
221 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
222 (SINGLE_THREAD_P): Likewise.
223 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
224 (SINGLE_THREAD_P): Likewise.
225
226 * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
227 value directly.
228
c44bf9aa
UD
2292003-03-14 Ulrich Drepper <drepper@redhat.com>
230
e22a221d
UD
231 * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
232 * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
233
0eb18281
UD
234 * pthread_create.c (start_thread): setjmp is expected to return 0.
235
c44bf9aa
UD
236 * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
237 (THREAD_GETMEM_NC): Likewise.
238
564cd8b6
UD
2392003-03-13 Ulrich Drepper <drepper@redhat.com>
240
241 * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
242 and the size of the stack which must be allocated is a multiple,
243 allocate one more page.
244 * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
245 MULTI_PAGE_ALIASING.
246
6461e577
RM
2472003-03-13 Roland McGrath <roland@redhat.com>
248
249 * pthread_create.c (start_thread): Set EXITING_BIT after the
250 event-reporting (and destructors), not before.
251
b5ec5617
UD
2522003-03-13 Jakub Jelinek <jakub@redhat.com>
253
6461e577
RM
254 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
255 lll_futex_wake): Declare register variables as long int instead of
256 unsigned long int. Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
257 Make syscall arguments clobbered by the syscall.
258 (lll_futex_wait): Define using lll_futex_timed_wait.
259
260 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
261 to void *.
262
263 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
264 PPID if [! NDEBUG].
265
266 * allocatestack.c (nptl_ncreated): Only declare if
267 COLORING_INCREMENT != 0.
268
269 * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
270 (__libc_enable_asynccancel_2): Remove prototype.
271
b5ec5617
UD
272 * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
273 ctid to match kernel.
274
d0369fb8
UD
2752003-03-12 Ulrich Drepper <drepper@redhat.com>
276
7588880f
UD
277 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
278 libc_multiple_threads.
279 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
280 __libc_multiple_threads to...
281 * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here. New file.
282
283 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
284 versioning.
285 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
286 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
287
288 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
289 (__pthread_once_internal): Define.
290
291 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
292 macros instead of .symver directly.
293 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
294 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
295
d0369fb8
UD
296 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
297 * sysdeps/x86_64/tcb-offsets.sym: New file.
298 * sysdeps/x86_64/Makefile: New file.
299
300 * sysdeps/i386/tcb-offsets.sym: Add SELF.
301 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
302 to access own pthread_t in TCB.
303 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
304 Likewise.
305 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
306 Likewise.
307 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
308
0bb2ac85
RM
3092003-03-12 Roland McGrath <roland@redhat.com>
310
311 * pthread-errnos.sym: New file.
312 * Makefile (gen-as-const-headers): New variable, list that file.
313 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
314 header <pthread-errnos.h> instead of defining errno values here.
315 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
316 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
317 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
318 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
319 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
320 Likewise.
321 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
322 Likewise.
323 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
324 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
325 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
326 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
327 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
328 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
329 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
330 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
331 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
332 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
333 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
334 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
335 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
336 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
337 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
338 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
339 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
340 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
341 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
342 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
343 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
344 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
345 * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
346 * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
347 * sysdeps/sh/pthread_spin_trylock.S: Likewise.
348 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
349 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
350
351 * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
352 CLONE_CHILD_SETTID worked.
353
35e148cb
UD
3542003-03-12 Ulrich Drepper <drepper@redhat.com>
355
d0369fb8
UD
356 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
357 file.
358 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
359 file.
360
361 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
362 (pthread_cond_t): Add padding.
363
da49194d
UD
364 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
365 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
366 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
367
35e148cb
UD
368 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
369 (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
370 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
371 (__pthread_rwlock_timedrdlock): Likewise.
372 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
373 (__pthread_rwlock_wrlock): Likewise.
374 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
375 (__pthread_rwlock_rdlock): Likewise.
376
377 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
378
379 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
380 result of lock re-get if it fails.
381
3e976b96
UD
3822003-03-11 Ulrich Drepper <drepper@redhat.com>
383
5a03acfe
UD
384 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
385 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
386 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
387 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
388 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
389 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
390 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
391 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
392 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
393 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
394
395 * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
396 THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
397
398 * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
399 Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
400 * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
401 (create_thread): Likewise.
402 Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
403 * init.c (__pthread_initialize_minimal_internal): Initialize
404 __libc_multiple_threads_ptr if necessary.
405 * pthreadP.h: Adjust prototype for __libc_pthread_init. Declare
406 __pthread_multiple_threads and __libc_multiple_threads_ptr.
407 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
408 __libc_multiple_threads.
409 (__libc_pthread_init): Return pointer to __libc_pthread_init if
410 necessary.
411
412 * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
413 (THREAD_SETMEM_NC): Likewise.
414
415 * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
416 * sysdeps/x86_64/pthread_spin_trylock.S: New file.
417 * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
418 * sysdeps/x86_64/pthread_spin_unlock.S: New file.
419
420 * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
421 Eliminate one entire instruction.
422
32a589b1
UD
423 * cancellation.c (__pthread_enable_asynccancel_2): New function.
424 * pthreadP.h: Declare __pthread_enable_asynccancel_2.
425 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
426 (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
427 instead of __pthread_enable_asynccancel.
428 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
429 (__pthread_cond_wait): Likewise.
430 * sysdeps/pthread/pthread_cond_timedwait.c
431 (__pthread_cond_timedwait): Likewise.
432 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
433
3e976b96
UD
434 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
435 (__condvar_cleanup): Wake up all waiters in case we got signaled
436 after being woken up but before disabling asynchronous
437 cancellation.
438 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
439 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
440 (__condvar_cleanup): Likewise.
441
442 * init.c (__NR_set_tid_address): If already defined, don't redefine.
443 Make it an error if architecture has no #if case. Add x86-64.
444
445 * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
446 pt-initfini.s generation.
447
448 * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
449 (TLS_INIT_TP): Fix typo.
450
6c477888
UD
4512003-03-11 Jakub Jelinek <jakub@redhat.com>
452
453 * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
454 3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
455
456 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
457 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
458 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
459 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
460 * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
461 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
462 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
463 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
464
ea694823
UD
4652003-03-11 Ulrich Drepper <drepper@redhat.com>
466
6c477888
UD
467 * sysdeps/pthread/pthread_cond_timedwait.c
468 (__pthread_cond_timedwait): Return the result of the final
469 locking. If it succeeds, the regular function return value.
470
471 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
472 Return result of the final locking.
473 * version.c (__nptl_main): Work around problems with the strange
474 INTERNAL_SYSCALL macro on ppc32.
475 * init.c (__pthread_initialize_minimal_internal): Unblock
476 SIGCANCEL in case the parent blocked it.
477 Reported by Paul Mackerras <paulus@samba.org>.
478
ea694823
UD
479 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
480 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
481 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
482
b33e6163
RM
4832003-03-11 Jakub Jelinek <jakub@redhat.com>
484
485 * sysdeps/pthread/pthread_cond_timedwait.c
486 (__pthread_cond_timedwait): Unlock and fail if
487 __pthread_mutex_unlock_internal failed.
488
489 * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
490 (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
491 Use ARCH_CLONE.
492 * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
493 [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
494 STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
495 ALLOCATE_STACK): New macros.
496 (TLS_TPADJ): New macro.
497 (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
498 (allocate_stack): Handle TLS_DTV_AT_TP and
499 NEED_SEPARATE_REGISTER_STACK. Use TLS_TPADJ.
500 * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
501 Don't set PD->self.
502 * init.c [__ia64__] (__NR_set_tid_address): Define.
503
504 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
505 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
506 * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
507 * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
508 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
509 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
510 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
511 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
512 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
513 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
514 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
515 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
516 * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
517 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
518 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
519 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
520 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
521 * sysdeps/ia64/bits/atomic.h: New file.
522 * sysdeps/ia64/Makefile: New file.
523 * sysdeps/ia64/pthread_spin_init.c: New file.
524 * sysdeps/ia64/pthread_spin_lock.c: New file.
525 * sysdeps/ia64/pthread_spin_trylock.c: New file.
526 * sysdeps/ia64/pthread_spin_unlock.c: New file.
527 * sysdeps/ia64/pthreaddef.h: New file.
528 * sysdeps/ia64/tcb-offsets.sym: New file.
529 * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
530 * sysdeps/ia64/tls.h: New file.
531
532 * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
533 to syscall instead of no arguments.
534
2b30b2e5
UD
5352003-03-10 Ulrich Drepper <drepper@redhat.com>
536
db5f2fc9
UD
537 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
538 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
539 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
540 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
541
542 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
543 unused code.
544
6a4263e3
UD
545 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
546
3de7c2a9
UD
547 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
548 lowlevelbarrier.sym.
549 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
550 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
551 Include lowlevelbarrier.h and don't define offsets locally.
6a4263e3 552 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
3de7c2a9 553
2a544d82
UD
554 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
555 (__lll_mutex_lock_wait): Reverse order of first two parameters.
556 (__lll_mutex_timedlock_wait): Likewise.
557 (lll_mutex_lock): Adjust asm for that.
558 (lll_mutex_timedlock): Likewise. Mark cx, cc, r10 as clobbered.
559 (lll_lock): Adjust asm for operand order change.
560 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
561 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
562
ec06436c
UD
563 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
564 Reverse order of parameters.
565 (__lll_timedwait_tid): Remove regparms attribute.
566 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
567 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
568
3273832c
UD
569 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
570 (__lll_timedwait_tid): Remove one unnecessary instruction.
571
51f32ab8
UD
572 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
573 __lll_mutex_timedlock_wait only for NOT_IN_libc.
574 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
575 lowlevelmutex.S.
576
577 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
578 lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
579 for NOT_IN_libc.
580 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
581 lowlevellock.S.
582
fad48d9e
UD
583 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
584 LOCK is already defined. Don't define __lll_mutex_timedlock_wait
585 for libc.so.
586 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
587 define LOCK here (if UP is not defined). The actual code is in
588 lowlevelmutex.S.
589
9356d063
UD
590 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
591 LOCK is already defined. Don't define lll_unlock_wake_cb and
592 __lll_timedwait_tid for libc.so.
593 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
594 define LOCK here (if UP is not defined). The actual code is in
595 lowlevellock.S.
596
ebf0cbc5 597 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
106f6f9d
UD
598 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
599 * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
600 instead of lowlevelsem.h.
601 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
602 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
603 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
0be8ee21 604
c915e5ad
UD
605 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
606 lowlevelrwlock.sym.
607 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
608 * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
146fa1ee 609 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
c915e5ad 610
4c3c2e8a
UD
611 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
612 register loading.
613 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
614 last changed. D'oh.
615
2b30b2e5
UD
616 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
617
618 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
619 of __libc_locking_needed.
620 (lll_trylock): Initialize %eax to zero.
621
2b30b2e5
UD
622 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
623 pthread_cond_t definition.
624
e48f9638
RM
6252003-03-10 Roland McGrath <roland@redhat.com>
626
627 * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
628 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
629 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
630 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
631 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
632
633 * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
634 Instead of setting PD->multiple_threads, set globals
635 __pthread_multiple_threads and __libc_multiple_threads.
636 * sysdeps/pthread/createthread.c (create_thread): Likewise.
637 * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
638 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
639
640 * descr.h (struct pthread): Conditionalize first member on
641 [!TLS_DTV_AT_TP]. Replace the `header' member with an anonymous union
642 containing an anonymous tcbhead_t. Move `list' member out.
643 [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
644 * allocatestack.c: Remove use of `header.data.' prefix.
645 * pthread_create.c: Likewise.
646 * init.c (__pthread_initialize_minimal_internal): Likewise.
647 * sysdeps/pthread/createthread.c (create_thread): Likewise.
648 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
649 (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
650 * sysdeps/x86_64/tls.h: Likewise.
651 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
652 (SINGLE_THREAD_P): Likewise.
653 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
654 (SINGLE_THREAD_P): Likewise.
655 * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
656 * sysdeps/s390/tls.h (tcbhead_t): Likewise.
657
c37cae9e
UD
6582003-03-09 Ulrich Drepper <drepper@redhat.com>
659
d38c777e
RM
660 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
661
7b44a5e0 662 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
2b30b2e5 663 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
7b44a5e0 664
c2e5e085
UD
665 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
666 leftovers from the ia32 code.
667
668 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
669 memory load.
670 (clear_once_control): Don't load %esi.
671
672 * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
673 handling.
674
675 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
676
cd4b2a55
UD
677 * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
678 * sysdeps/unix/sysv/linux/createthread.c: ...here.
679
c37cae9e
UD
680 * Makefile (tests): Add tst-cond10.
681 * tst-cond10.c: New file.
682
d130a341
UD
6832003-03-08 Ulrich Drepper <drepper@redhat.com>
684
ccf1d573
UD
685 * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
686 * tst-signal3.c (do_test): Likewise.
687 * tst-sem5.c (do_test): Likewise.
688 * tst-kill6.c (do_test): Likewise.
689 * tst-tls3.c (do_test): Likewise. Include <errno.h>.
690
691 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
692 of inc/dec.
693 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
694 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
695 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
696 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
697 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
698 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
699 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
700 Likewise.
701 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
702 Likewise.
703 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
704 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
705 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
706 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
707 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
708 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
709 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
710 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
711
d130a341
UD
712 * allocatestack.c (allocate_stack): If mprotect() fails free the
713 TLS memory.
714
bc6389ad
UD
7152003-03-07 Ulrich Drepper <drepper@redhat.com>
716
41d4d223
UD
717 * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
718
719 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
720 lll_wake_tid. This was used only to work around kernel limits in
721 the early days.
722 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
723 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
724 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
725 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
726
bc6389ad
UD
727 * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
728 (__pthread_initialize_minimal_internal): Change initialization of
729 __static_tls_align_m1 appropriately.
730 * pthreadP.h (__static_tls_align_m1): Renamed from
731 __static_tls_align.
732 * allocatestack.c (allocate_stack): Use __static_tls_align_m1
733 instead of __static_tls_align-1.
734
cc775edf
UD
7352003-03-04 Ulrich Drepper <drepper@redhat.com>
736
0de28d5c 737 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
6245b6ae 738
518b5308
UD
739 * pthread_create.c: Define __pthread_keys using nocommon
740 attribute, not by placing it explicitly in bss.
741 Remove DEFINE_DEALLOC definition. Not needed anymore.
742
743 * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
744 Use it in mmap call to allocate stacks.
745
746 * sysdeps/pthread/createthread.c (create_thread): Fix comment.
747
cc775edf
UD
748 * pthread_create.c (start_thread): Use THREAD_SETMEM to store
749 result of the thread function.
750
4f6f0a8f
UD
7512003-03-03 Ulrich Drepper <drepper@redhat.com>
752
f04a2721
UD
753 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed. The generic
754 version is just fine.
755
4f6f0a8f
UD
756 * sysdeps/unix/sysv/linux/libc_pthread_init.c
757 (__pthread_child_handler): Renamed from pthread_child_handler,
758 exported, and marked hidden. Change all users.
759 * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
760 free __pthread_child_handler from child list.
761
7ce5c164
UD
7622003-03-03 Martin Schwidefsky <schwidefsky@de.ibm.com>
763
764 * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
765
766 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
767 Fix handling of cancellation and failing pthread_mutex_unlock call.
768 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
769 (__pthread_cond_wait): Likewise.
770
771 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
772 (pthread_rwlock_timedrdlock): Fix clobber of result variable by
773 lll_futex_timed_wait call.
774 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
775 (pthread_rwlock_timedwrlock): Likewise.
776
777 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
778 Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
779 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
780
781 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
782 check of lll_futex_wake return value.
783
ea6a015b
RM
7842003-03-03 Roland McGrath <roland@redhat.com>
785
786 * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
787
788 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
789 Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
790 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
791
4adacf57
UD
7922003-03-02 Ulrich Drepper <drepper@redhat.com>
793
1be3d664
UD
794 * sysdeps/pthread/timer_create.c (timer_create): Return correct
795 error for CPU clocks.
796
885bafa1
UD
797 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
798 _POSIX_MONOTONIC_CLOCK.
799 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
800
4adacf57
UD
801 * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
802 recent kernels.
803
86bfff4d
UD
8042003-03-01 Ulrich Drepper <drepper@redhat.com>
805
806 * descr.h (struct pthread): Move cleanup field to the front.
807
d1149385
RM
8082003-03-01 Roland McGrath <roland@redhat.com>
809
810 * sem_open.c (sem_open): Braino fix.
811
bd8bb78b
UD
8122003-03-01 Ulrich Drepper <drepper@redhat.com>
813
748bec08
UD
814 * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
815 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
816 __pthread_cleanup_pop functionality.
817 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
818
bd8bb78b
UD
819 * descr.h (struct pthread): Move tid field to the front now that
820 it is often used.
821
822 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
823 (__lll_mutex_timedlock_wait): Remove.
824 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
825 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
826 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
827 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
828 (lll_unlock_wake_cb): Don't save and restore %esi.
829 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
830 %esi.
831 (__lll_timedwait_tid): Add alignment.
832 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
833 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
834 %esi.
835 (__lll_timedwait_tid): Removed.
836 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
837 (__pthread_cond_broadcast): Don't save, load, and restore %esi.
838 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
839 (pthread_barrier_wait): Don't save, load, and restore %esi for
840 last thread.
841 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
842 (__pthread_cond_signal): Don't save, load, and restore %esi.
843 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
844 (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
845 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
846 Don't save, load, and restore %esi.
847
d2637c70
UD
8482003-02-27 Ulrich Drepper <drepper@redhat.com>
849
567fb22a
UD
850 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
851 Release lock before waking up the waiters.
852
427f5fa1
UD
853 * tst-exit1.c (do_test): Don't start more than one thread in parallel.
854
a2d83cfb
UD
855 * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
856 (reader_thread): Likewise.
857
d2637c70
UD
858 * sysdeps/pthread/pthread_rwlock_unlock.c
859 (__pthread_rwlock_unlock): Release internal lock early. Don't try
860 to wake up readers if there are none.
861
862 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
863 Release internal lock before wake threads.
864
b1531183
UD
8652003-02-26 Ulrich Drepper <drepper@redhat.com>
866
dbf6131c
UD
867 * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
868 * tst-rwlock8.c: Initialize lock with INIT. Allow INIT to be
869 predefined.
870 * tst-rwlock9.c: Likewise.
871 * tst-rwlock10.c: New file.
872 * tst-rwlock11.c: New file.
873
695799fe
UD
874 * Makefile (tests): Add tst-dlsym1.
875 * tst-dlsym1.c: New file.
876
b1531183
UD
877 * init.c (__pthread_initialize_minimal_internal): Set
878 GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
879 * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
880
3724f268
UD
8812003-02-24 Ulrich Drepper <drepper@redhat.com>
882
3857ca78
UD
883 * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
884
80d80779
UD
885 * tst-cond2.c: Fix sychronization with child.
886
86371308
UD
887 * tst-rwlock8.c (reader_thread): Remove unused variable.
888
ffeb4481
UD
889 * Makefile: Add rules to build and run tst-tls3.
890 * tst-tls3.c: New file.
891 * tst-tls3mod.c: New file.
892
3724f268
UD
893 * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
894 * tst-rwlock8.c: New file.
895 * tst-rwlock9.c: New file.
896 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
897 complete broken rwlock implementation.
898 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
899 Likewise.
900 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
901 Likewise.
902 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
903 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
18a53579
UD
904 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
905 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
906 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
907 * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
908 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
3724f268 909
8915cc40
RM
9102003-02-23 Roland McGrath <roland@redhat.com>
911
912 * Makefile (nptl-version): Change regexp so case sensitivity is ok.
913
fd1a0d0c
UD
9142003-02-23 Ulrich Drepper <drepper@redhat.com>
915
ecf28959
UD
916 * Makefile (tests): Add tst-context1.
917 * tst-context1.c: New file.
918
5e47b76b
UD
919 * Makefile (tests): Add tst-tls1 and tst-tls2.
920 * tst-tls1.c: New file.
921 * tst-tls2.c: New file.
922
5a6bbb41
UD
923 * libc-cancellation.c (__libc_enable_asynccancel): Correct test
924 for failed cmpxchg.
925
fd1a0d0c
UD
926 * pthread_create.c (start_thread): Set EXITING_BIT early.
927
928 * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
929 (THREAD_GETMEM_NC): Likewise.
930
757f9fcb
UD
9312003-02-22 Ulrich Drepper <drepper@redhat.com>
932
b1b8e747
UD
933 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
934 off 3 more bytes by using offset-less instructions when possible.
935
c780aa21 936 * Makefile: Add dependency for $(objpfx)version.d.
757f9fcb
UD
937
938 * eintr.c (eintr_source): Add unnecessary return but the compiler
939 insists.
940
941 * tst-kill3.c: Include <unistd.h>.
942
5148559c
RM
9432003-02-21 Roland McGrath <roland@redhat.com>
944
945 * pthread_create.c (start_thread): Call __libc_thread_freeres.
946
ab2d98e3
UD
9472003-02-21 Ulrich Drepper <drepper@redhat.com>
948
71028edd
UD
949 * Makefile (tests): Add tst-eintr1.
950 (distribute): Add eintr.c.
951 * tst-eintr1.c: New file.
952 * eintr.c: New file.
953
e814f748
UD
954 * pthread_cancel.c (pthread_cancel): Use tkill directly.
955
956 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
957 Disallow sending SIGCANCEL.
958
ab2d98e3 959 * Makefile (tests): Remove tst-basic7. Add tst-kill1, tst-kill2,
9c03686d 960 tst-kill3, tst-kill4, tst-kill5, tst-kill6.
e814f748
UD
961 * tst-kill1.c: New file.
962 * tst-kill2.c: New file.
963 * tst-kill3.c: New file.
964 * tst-kill5.c: New file.
9c03686d 965 * tst-kill6.c: New file.
e814f748
UD
966 * tst-basic7.c: Renamed to...
967 * tst-kill4.c: ...this.
ab2d98e3 968
59fed0e2
RM
9692003-02-21 Roland McGrath <roland@redhat.com>
970
971 * Makefile (install-lib-ldscripts): New variable.
972
49dc759f
UD
9732003-02-21 Ulrich Drepper <drepper@redhat.com>
974
8c2e9a29
UD
975 * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
976 * pthread_cancel.c: Use INVALID_TD_P.
977 * pthread_detach.c: Likewise.
978 * pthread_getschedparam.c: Likewise.
979 * pthread_setschedparam.c: Likewise.
980 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
981 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
982 * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
983 * pthread_timedjoin.c: Likewise.
984
985 * tst-basic7.c: Include <signal.h>.
986
49dc759f
UD
987 * pthread_join.c (pthread_join): Limited checking for invalid
988 descriptors.
989 * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
990
df5803bf
UD
9912003-02-20 Ulrich Drepper <drepper@redhat.com>
992
c5acd3d7
UD
993 * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
994 beginning of the loop. Clear the entire first block of TSD.
df5803bf
UD
995 * Makefile (tests): Add tst-key4.
996 * tst-key4.c: New file.
997
729924a0
UD
9982003-02-18 Ulrich Drepper <drepper@redhat.com>
999
2f7dc594
UD
1000 * Makefile (tests): Add tst-basic7.
1001 * tst-basic7.c: New file.
1002
ba25bb0f
UD
1003 * pthread_create.c (deallocate_tsd): Mark as internal_function.
1004 Add some more __builtin_expect.
1005
12fd3c5f 1006 * pthreadP.h: Define dummy version of DEBUGGING_P.
729924a0 1007
5430d926
UD
10082003-02-17 Ulrich Drepper <drepper@redhat.com>
1009
b0db7fbe
UD
1010 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
1011 _POSIX_THREAD_PRIORITY_SCHEDULING.
1012 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
1013 _XOPEN_REALTIME_THREADS.
1014 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
1015
1016 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
1017 kernel returns EINVAL for PID <= 0, work around it.
1018
ecfda9bd
UD
1019 * Makefile (tests): Add tst-signal5.
1020 * tst-signal5.c: New file.
1021
7d78ab99
UD
1022 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
1023 and LOGIN_NAME_MAX.
1024
371a2972
UD
1025 * tst-cancel1.c (tf): Block all signals.
1026
5430d926
UD
1027 * Makefile (tests): Add tst-basic6.
1028 * tst-basic6.c: New file.
1029
1030 * tst-basic1.c: Add test for process ID.
1031
1032 * Makefile (tests): Add tst-cancel10.
1033 * tst-cancel10.c: New file.
1034
1035 * Makefile (tests): Add tst-signal4.
1036 * tst-signal4.c: New file.
1037
1038 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
1039 __sigismember instead of sigismember. Add __builtin_expect.
1040
1564916a
UD
10412003-02-16 Ulrich Drepper <drepper@redhat.com>
1042
179ff175
UD
1043 * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
1044 pthread_setcancelstate, and pthread_rwlock_setpshared.
1045
e4335f9a
UD
1046 * tst-cancel7.c (do_test): Make sure the pid file exists before
1047 canceling the thread.
1048
0a37669a
UD
1049 * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
1050 pthread_rwlock_timedrdlock tests.
1051 * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
1052 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1053 Check for invalid tv_nsec field.
1054 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1055 Likewise.
1056
1057 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
1058 recursive mutex of overflow.
1059
1060 * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
1061
e4335f9a 1062 * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
1564916a
UD
1063 going into an endless loop.
1064 * Makefile (tests): Add tst-cancel9.
1065 * tst-cancel9.c: New file.
1066
1067 * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
1068
b270b548
UD
10692003-02-15 Ulrich Drepper <drepper@redhat.com>
1070
1c82b97f
UD
1071 * tst-mutex5.c (do_test): Add more timedlock tests.
1072
b2f05465 1073 * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
c3bb9ee1
UD
1074 * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
1075
e798b60f
UD
1076 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
1077 use INLINE_SYSCALL. Error number is returned, not -1.
1078
90491dc4
UD
1079 * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
1080 and __deallocate_stack with internal_function.
1081 * pthread_create.c: Adjust definitions appropriately.
1082 * allocatestack.c: Likewise.
1083
1084 * pthread_join.c: Add one more __builtin_expect.
1085 * pthread_timedjoin.c: Likewise.
1086
1087 * pthread_getspecific.c (__pthread_getspecific): Clear data->data
1088 not data of sequence number does not match.
1089 Add one __builtin_expect.
1090
c6247c9d
UD
1091 * Makefile (tests): Add tst-clock1.
1092 * tst-clock1.c: New file.
1093
b270b548
UD
1094 * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
1095 negative arguments.
1096 * Makefile (tests): Add tst-basic5.
1097 * tst-basic5.c: New file.
1098
700bf7af
UD
10992003-02-14 Ulrich Drepper <drepper@redhat.com>
1100
757de559
UD
1101 * Makefile (tests): Add tst-basic4.
1102 * tst-basic4.c: New file.
1103
47202270
UD
1104 * pthreadP.h: Add declaraction for __nptl_nthreads.
1105 * pthread_create.c: Define __nptl_nthreads
1106 (start_thread): Increment __nptl_nthreads at beginning. Decrement
b270b548 1107 after thread is done. If then zero, call exit(0).
47202270
UD
1108 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1109 Add ptr_nthreads. Define HAVE_PTR_NTHREADS.
1110 * init.c (pthread_functions): Initialize ptr_nthreads.
1111 * allocatestack.c (nptl_nthreads): Remove definition and all uses.
1112 (__reclaim_stacks): Decrement __nptl_nthreads.
1113 * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
1114 Define.
1115 * Makefile (tests): Add tst-basic3.
1116 * tst-basic3.c: New file.
1117
e320ef46
UD
1118 * descr.h: Define CANCELING_BIT and CANCELING_BITMASK. Introduce
1119 after CANCELTYPE_BIT, move the other bits up. Update CANCEL_RESTMASK.
1120 * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
1121 * pthread_cancel.c (pthread_cancel): Likewise. Also set CANCELING_BIT
1122 if asynchronous canceling is enabled.
1123 * pthread_join.c (pthread_join): When recognizing circular joins,
1124 take into account the other thread might be already canceled.
1125 * Makefile (tests): Add tst-join5.
1126 * tst-join5.c: New file.
1127
700bf7af
UD
1128 * Makefile (tests): Add tst-join4.
1129 * tst-join4.c: New file.
1130
11312003-02-13 Ulrich Drepper <drepper@redhat.com>
1132
1133 * tst-cond4.c (main): Add test of pthread_attr_getpshared.
1134
dac0f772
UD
11352003-02-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
1136
1137 * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
1138 THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
1139 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
1140 warning.
1141 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
1142 to avoid warning.
1143 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
1144 error if lll_futex_wake failed.
1145
e8cda341
UD
11462003-02-13 Ulrich Drepper <drepper@redhat.com>
1147
a7720b5e
UD
1148 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
1149 handling of cancellation and failung pthread_mutex_unlock call.
1150 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1151 * Makefile (tests): Add tst-cond8 and tst-cond9.
1152 * tst-cond8.c: New file.
1153 * tst-cond9.c: New file.
1154
a1ea4c06
UD
1155 * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
1156
1157 * sysdeps/pthread/pthread.h: Add missing initializers. Protect
1158 non-standard initializers with __USE_GNU.
1159
e8cda341
UD
1160 * Makefile (tests): Add tst-cleanup3.
1161 * tst-cleanup3.c: New file.
1162
2067577c
UD
11632003-02-12 Ulrich Drepper <drepper@redhat.com>
1164
89e78a95
UD
1165 * Makefile (tests): Add tst-attr1 and tst-attr2.
1166 * tst-attr1.c: New file.
1167 * tst-attr2.c: New file.
1168
dfdd294a
UD
1169 * Makefile: Add rules to build and run tst-atfork2 test.
1170 * tst-atfork2.c: New file.
1171 * tst-atfork2mod.c: New file.
1172
1173 * sysdeps/unix/sysv/linux/unregister-atfork.c
1174 (__unregister_atfork): Free the memory allocated for the handlers
1175 after removing them from the lists.
1176
1177 * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
1178 cleanup function.
1179
1180 * tst-atfork1.c (do_test): Wait for the child we forked.
1181 Report error in child.
1182
1183 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
1184
2067577c
UD
1185 * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
1186
2a8a8a84
UD
11872003-02-10 Ulrich Drepper <drepper@redhat.com>
1188
d9dd121e
UD
1189 * Makefile (tests): Add tst-cancel8.
1190 * tst-cancel8.c: New file.
1191
2a8a8a84
UD
1192 * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
1193 clearing of control variable.
defd1870 1194 * Makefile (tests): Add tst-once3 and tst-once4.
2a8a8a84 1195 * tst-once3.c: New file.
defd1870 1196 * tst-once4.c: New file.
2a8a8a84 1197
a54e8d33
UD
11982003-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
1199
1200 * sysdeps/sh/Makefile: New file.
1201 * sysdeps/sh/bits/atomic.h: New file.
1202 * sysdeps/sh/pthread_spin_init.c: New file.
1203 * sysdeps/sh/pthread_spin_lock.c: New file.
1204 * sysdeps/sh/pthread_spin_trylock.S: New file.
1205 * sysdeps/sh/pthread_spin_unlock.S: New file.
1206 * sysdeps/sh/pthreaddef.h: New file.
1207 * sysdeps/sh/tcb-offsets.sym: New file.
1208 * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
1209 * sysdeps/sh/tls.h: New file.
1210 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
1211 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
1212 * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
1213 * sysdeps/unix/sysv/linux/sh/fork.c: New file.
1214 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
1215 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
1216 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
1217 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
1218 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
1219 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
1220 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
1221 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
1222 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
1223 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
1224 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
1225 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
1226 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
1227 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
1228 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
1229 * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
1230 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
1231 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
1232 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
1233 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
1234 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
1235 * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
1236 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
1237 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
1238 * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
1239 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
1240
696e556e
UD
12412003-02-08 Ulrich Drepper <drepper@redhat.com>
1242
1243 * tst-cond2.c: Rearrange code to not rely on behavior undefined
1244 according to POSIX.
1245
1246 * tst-basic2.c (do_test): Lock mutex before creating the thread.
1247
fef710d6
UD
12482003-02-07 Ulrich Drepper <drepper@redhat.com>
1249
c6180643
UD
1250 * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
1251 (TLS_GET_FS): New #define.
1252 (TLS_SET_FS): New #define.
1253 Correct value of __NR_set_thread_area.
1254
fef710d6
UD
1255 * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
1256
11090a99
UD
12572003-02-06 Ulrich Drepper <drepper@redhat.com>
1258
65c68990
UD
1259 * Makefile (tests): Add tst-popen1.
1260 * tst-popen1.c: New file.
1261
11090a99
UD
1262 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
1263 but inactive generalization.
1264 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1265 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
1266 Minor optimization, remove one instruction.
1267 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
1268
a88c9263
UD
12692003-02-04 Martin Schwidefsky <schwidefsky@de.ibm.com>
1270
1271 * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
1272
12732003-01-31 Martin Schwidefsky <schwidefsky@de.ibm.com>
1274
1275 * init.c (__NR_set_tid_address): Add #ifdef for s390.
1276 * sysdeps/pthread/pthread_barrier_wait.c: New file.
1277 * sysdeps/pthread/pthread_cond_broadcast.c: New file.
1278 * sysdeps/pthread/pthread_cond_signal.c: New file.
1279 * sysdeps/pthread/pthread_cond_timedwait.c: New file.
1280 * sysdeps/pthread/pthread_cond_wait.c: New file.
1281 * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
1282 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
1283 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
1284 * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
1285 * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
1286 * sysdeps/s390/Makefile: New file.
1287 * sysdeps/s390/bits/atomic.h: New file.
1288 * sysdeps/s390/pthread_spin_init.c: New file.
1289 * sysdeps/s390/pthread_spin_lock.c: New file.
1290 * sysdeps/s390/pthread_spin_trylock.c: New file.
1291 * sysdeps/s390/pthread_spin_unlock.c: New file.
1292 * sysdeps/s390/pthreaddef.h: New file.
1293 * sysdeps/s390/tcb-offsets.sym: New file.
1294 * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
1295 * sysdeps/s390/tls.h: New file.
1296 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
1297 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
1298 * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
1299 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
1300 * sysdeps/unix/sysv/linux/s390/fork.c: New file.
1301 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
1302 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
1303 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
1304 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
1305 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
1306 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
1307 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
1308 * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
1309 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
1310 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
1311 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
1312 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
1313 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
1314 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
1315 * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
1316 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
1317 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
1318 * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
1319
6f1cff95
UD
13202003-02-04 Ulrich Drepper <drepper@redhat.com>
1321
ec609a8e
UD
1322 * atomic.h: Add a couple more default implementations.
1323 (atomic_compare_and_exchange_acq): Use
d45e8740
UD
1324 __arch_compare_and_exchange_32_acq in return value definition. It
1325 always exists.
1326 (atomic_bit_set): Renamed from atomic_set_bit.
0289bef9 1327 Add missing atomic_ prefixes.
e3ec8904 1328
6f1cff95
UD
1329 * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
1330 thread library is available, use correct value to mark initialized
1331 once variable.
1332
4f088329
UD
13332003-02-03 Ulrich Drepper <drepper@redhat.com>
1334
6f1cff95
UD
1335 * allocatestack.c (allocate_stack): Use __getpagesize instead of
1336 __sysconf to determine pagesize.
1337
3e4fc359 1338 * pthread_create.c: Include <atomic.h>.
4f088329
UD
1339 * allocatestack.c (allocate_stack): Implement coloring of the
1340 allocated stack memory. Rename pagesize to pagesize_m1. It's the
1341 size minus one. Adjust users.
3e4fc359 1342 * sysdeps/i386/i686/Makefile: New file.
4f088329 1343
2f42e8be
UD
13442003-02-02 Ulrich Drepper <drepper@redhat.com>
1345
4301f7e2
UD
1346 * allocatestack.c: Improve comment throughout the file.
1347
2f42e8be 1348 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
a37818b3 1349 (__lll_lock_wait): Add branch prediction.
2f42e8be
UD
1350 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
1351 (__lll_lock_wait): Likewise.
1352 (lll_unlock_wake_cb): Removed.
1353
4a7d6545
UD
13542003-01-31 Ulrich Drepper <drepper@redhat.com>
1355
1356 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
1357 _POSIX_THREAD_PRIORITY_SCHEDULING.
1358
886d5973
UD
13592003-01-30 Jakub Jelinek <jakub@redhat.com>
1360
1361 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1362 Fix return type of ptr___pthread_getspecific.
1363
e474ca78
UD
13642003-01-29 Ulrich Drepper <drepper@redhat.com>
1365
1366 * Makefile (tests): Add tst-umask1.
1367 (tst-umask1-ARGS): Define.
1368 * tst-umask1.c: New file.
1369
e6ebd2e4
UD
13702003-01-28 Ulrich Drepper <drepper@redhat.com>
1371
6cf26f41
UD
1372 * Makefile (libpthread-routines): Remove lowlevelrwlock. Add
1373 pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
1374 pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
1375 pthread_rwlock_unlock.
1376 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
1377 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
1378 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
1379 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
1380 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1381 New file.
1382 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
1383 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1384 New file.
1385 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
1386 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
1387 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
1388 New file.
1389 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
1390 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
1391 New file.
1392 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
1393 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
1394 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
1395 New file.
1396 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
1397 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
1398 New file.
1399 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
1400
1d087a7e
UD
1401 * Makefile (libpthread-routines): Remove lowlevelcond and
1402 lowlevelsem. Add sem_wait, sem_trywait, sem_timedwait, sem_post,
1403 pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
1404 and pthread_cond_broadcast.
4a99d160
UD
1405 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
1406 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
1407 * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
1408 * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
1409 * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
1410 * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
1411 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
1412 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
1413 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
1414 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
1415 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
1416 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
1417 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
1418 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
1419 * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
1420 * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
1421 * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
1422 * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
1423 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
1424 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
1425 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
1426 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
1427 * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
1428 * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
1429 * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
1430 * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
1431 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
1432 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
1433 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
1434 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
1435 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
1d087a7e 1436
e6ebd2e4
UD
1437 * sysdeps/unix/sysv/linux/i386/createthread.c: Define
1438 PREPARE_CREATE and TLS_VALUE with x86-specific bits. All the rest
1439 of the code is moved to ...
1440 * sysdeps/pthread/createthread.c: ...here. New file.
1441
a15698cb
UD
14422003-01-27 Ulrich Drepper <drepper@redhat.com>
1443
0566b130
UD
1444 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
1445 (__new_sem_post): Clear %eax before returning.
1446 Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
1447
e6fb8846
UD
1448 * Makefile (tests): Add tst-cleanup2.
1449 * tst-cleanup2.c: New file.
1450
a15698cb
UD
1451 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
1452 Interpret first parameter correctly.
1453
8824b0a1
UD
14542003-01-17 Ulrich Drepper <drepper@redhat.com>
1455
1456 * Makefile (headers): Add bits/semaphore.h.
1457
850dcfca
UD
14582003-01-16 Jakub Jelinek <jakub@redhat.com>
1459
1460 * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
1461 if not SHARED.
1462
574b892e
UD
14632003-01-14 Ulrich Drepper <drepper@redhat.com>
1464
a8d87c92
UD
1465 * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
1466 must be used and mapping failed.
1467 Reported by Luke Elliott <luke.elliott@activfinancial.com>.
1468
574b892e
UD
1469 * Makefile (CFLAGS-pthread_self.os): Define this, not
1470 CFLAGS-pthread_self.c.
1471
fb48047a
UD
14722003-01-13 Ulrich Drepper <drepper@redhat.com>
1473
47805511
UD
1474 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
1475 lll_unlock_wake_cb.
1476
fb48047a
UD
1477 * Makefile (libpthread-routines): Add version. Add rules to build
1478 version.os and banner.h.
1479 * version.c: New file.
1480
115bb61d
UD
14812003-01-13 Jakub Jelinek <jakub@redhat.com>
1482
1483 * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
1484 the alias unconditional.
1485 * pthread_mutex_unlock.c (__pthread_mutex_unlock_internal): Likewise.
1486
14872003-01-13 Ulrich Drepper <drepper@redhat.com>
1488
1489 * Makefile (CFLAGS-pthread_self.c): New definition.
1490
6aca81bb
UD
14912003-01-06 Jakub Jelinek <jakub@redhat.com>
1492
1493 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
1494 INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
1495 * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
1496 * init.c (__pthread_initialize_minimal_internal): Likewise.
1497
e9c7764e
UD
14982003-01-07 Jakub Jelinek <jakub@redhat.com>
1499
b5facfda
UD
1500 * pthreadP.h (__pthread_cond_timedwait): Add prototype.
1501
e9c7764e
UD
1502 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
1503 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
1504 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
1505 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
1506 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
1507 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
1508
bef1e42f
UD
15092003-01-06 Jakub Jelinek <jakub@redhat.com>
1510
1511 * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
1512 * pt-system.c (LIBC_CANCEL_HANDLED): Add.
1513 * tst-cancel-wrappers.sh: Remove all exceptions.
1514
bbd17455
UD
15152003-01-05 Ulrich Drepper <drepper@redhat.com>
1516
a73ab6df
UD
1517 * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
1518 features. Reported by Marijn Ros <marijn@mad.scientist.com>.
1519
bbd17455
UD
1520 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
1521 Use __libc_pthread_functions array if SHARED.
1522
1523 * pthreadP.h: Move pthread_cond_2_0_t definition to...
1524 * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
1525
1526 * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
1527 (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
1528 __libc_key_create, __libc_getspecific, __libc_setspecific): Use
1529 __libc_ptf_call instead of __libc_maybe_call.
1530 (PTF): New #define.
1531 (__libc_cleanup_region_start): Wrap function name with PTF call.
1532 (__libc_cleanup_region_end): Likewise.
1533 (__libc_cleanup_end): Likewise.
1534
1535 * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
1536 * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
1537 * pthread_key_create.c: Add __pthread_key_create_internal alias.
1538 * pthreadP.h: Add prototypes.
1539
1540 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
1541 __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
1542 __pthread_rwlock_unlock aliases.
1543 * pthreadP.h: Add prototypes for new aliases.
1544
1545 * pthreadP.h (struct pthead_functions): Moved to...
1546 * sysdeps/pthread/pthread-functions.h: ...here. New file.
1547 * init.c (pthread_functions): Add initializers for new elements.
1548
1549 * cleanup_defer.c: Add __pthread_cleanup_push_defer and
1550 __pthread_cleanup_pop_restore aliases.
1551 * pthreadP.h: Add prototypes.
1552
1553 * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
1554 and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
1555 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
1556 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
1557 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
1558 * pthreadP.h: Adjust prototypes and callers.
1559
d27a78be
UD
15602003-01-04 Ulrich Drepper <drepper@redhat.com>
1561
b74121ae
UD
1562 * Makefile (tests): Add tst-cancel7.
1563 (tst-cancel7-ARGS): New variable.
bbd17455 1564 * tst-cancel7.c: New file.
b74121ae 1565
29bc410c
UD
1566 * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
1567 around gcc defficiencies.
1568 * old_pthread_cond_signal.c: Likewise.
1569 * old_pthread_cond_timedwait.c: Likewise.
1570 * old_pthread_cond_wait.c: Likewise.
1571
d27a78be
UD
1572 * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
1573
733f25e6
UD
15742003-01-03 Ulrich Drepper <drepper@redhat.com>
1575
7edb2ae3
UD
1576 * Makefile (tests): Add tst-cond7.
1577 * tst-cond7.c: New file.
1578
b1151300
UD
1579 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
1580 (condvar_cleanup): Get condvar address from the right place.
1581
733f25e6
UD
1582 * atomic.h: Correct definitions of atomic_full_barrier,
1583 atomic_read_barrier, atomic_write_barrier.
1584
1585 * old_pthread_cond_broadcast.c: Make memory allocate and initialization
1586 race-free.
1587 * old_pthread_cond_signal.c: Likewise.
1588 * old_pthread_cond_timedwait.c: Likewise.
1589 * old_pthread_cond_wait.c: Likewise.
1590
686b7223
UD
15912003-01-03 Jakub Jelinek <jakub@redhat.com>
1592
1593 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
1594
0e07706e
UD
15952003-01-03 Ulrich Drepper <drepper@redhat.com>
1596
997256dd
UD
1597 * pthreadP.h (pthread_cond_2_0_t): New type.
1598 (struct pthread_functions): Use new type for 2.0 condvar callbacks.
1599 Use new type for the 2.0 condvar function prototypes.
1600 * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
1601 * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
1602 parameter.
1603 * old_pthread_cond_destroy.c: Likewise.
1604 * old_pthread_cond_broadcast.c: Likewise. Lock appropriately.
1605 * old_pthread_cond_signal.c: Likewise.
1606 * old_pthread_cond_timedwait.c: Likewise.
1607 * old_pthread_cond_wait.c: Likewise.
1608
842d2817
UD
1609 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
1610 (__pthread_cond_wait): Don't save cancellation mode and seq value
1611 in same location.
1612
0e07706e
UD
1613 * herrno.c (__h_errno_location): Don't define as weak.
1614
bf293afe
UD
16152003-01-02 Jakub Jelinek <jakub@redhat.com>
1616
1617 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
1618 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
1619 and pthread_cond_wait.
1620 * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
1621 Renamed to...
1622 (__pthread_cond_broadcast_2_0): ... this.
1623 * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
1624 Renamed to...
1625 (__pthread_cond_destroy_2_0): ... this.
1626 * old_pthread_cond_init.c (__old_pthread_cond_init):
1627 Renamed to...
1628 (__pthread_cond_init_2_0): ... this.
1629 * old_pthread_cond_signal.c (__old_pthread_cond_signal):
1630 Renamed to...
1631 (__pthread_cond_signal_2_0): ... this.
1632 * old_pthread_cond_wait.c (__old_pthread_cond_wait):
1633 Renamed to...
1634 (__pthread_cond_wait_2_0): ... this.
1635 * pthread_cond_destroy.c: Include shlib-compat.h.
1636 (pthread_cond_destroy): Change strong_alias into versioned_symbol.
1637 * pthread_cond_init.c: Include shlib-compat.h.
1638 (pthread_cond_init): Change strong_alias into versioned_symbol.
1639 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
1640 fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
1641 fields.
1642 (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
1643 __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
1644 __pthread_cond_wait_2_0): New prototypes.
1645 (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
1646 __old_pthread_cond_init, __old_pthread_cond_signal,
1647 __old_pthread_cond_wait): Removed.
1648 * init.c: Include shlib-compat.h.
1649 (pthread_functions): Guard ptr___pthread_attr_init_2_0
1650 initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
1651 Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
1652 ptr___pthread_cond_*_2_0 fields.
1653 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
1654 pthread_cond_*@GLIBC_2.0 compatibility symbols.
1655
1656 * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
1657 LIBC_SIGACTION was not yet defined.
1658 [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
1659 [!defined LIBC_SIGACTION] (__sigaction): New function and
1660 libc_hidden_weak.
1661 [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
1662 [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
1663
16642003-01-02 Jakub Jelinek <jakub@redhat.com>
1665
1666 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
1667
05df18c3
UD
16682003-01-02 Ulrich Drepper <drepper@redhat.com>
1669
1670 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
1671 New, larger type definition.
1672 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
1673 implementation.
1674 * Versions [libpthread]: Add definitions for new pthread_cond_*
1675 interfaces for version GLIBC_2.3.2.
1676 * pthread_cond_init.c: Update initialization for new type definition.
1677 * Makefile (libpthread-routines): Remove pthread_cond_wait,
1678 pthread_cond_timedwait, pthread_cond_signal, and
1679 pthread_cond_broadcast. Add old_pthread_cond_init,
1680 old_pthread_cond_destroy, old_pthread_cond_wait,
1681 old_pthread_cond_timedwait, old_pthread_cond_signal, and
1682 old_pthread_cond_broadcast.
1683 * old_pthread_cond_broadcast.c: New file.
1684 * old_pthread_cond_destroy.c: New file.
1685 * old_pthread_cond_init.c: New file.
1686 * old_pthread_cond_signal.c: New file.
1687 * old_pthread_cond_timedwait.c: New file.
1688 * old_pthread_cond_wait.c: New file.
1689 * pthreadP.h: Add prototypes for the compatibility interfaces.
1690
1691 * pthread_cond_destroy.c: Don't include <errno.h>.
1692
fd8979e4
UD
16932003-01-01 Ulrich Drepper <drepper@redhat.com>
1694
1695 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
1696 unnecessary zero offset when addressing MUTEX.
1697
6d6ee629
UD
16982002-12-31 Ulrich Drepper <drepper@redhat.com>
1699
1700 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
1701 __register_atfork.
1702 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
1703 for __register_atfork.
1704
a4baf360
UD
17052002-12-31 Jakub Jelinek <jakub@redhat.com>
1706
1707 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
1708 instead of ASSEMBLER test macro.
1709
1710 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
1711 __libc_current_sigrtmax): Add libc_hidden_def.
1712
1713 * sysdeps/pthread/list.h: Remove assert.h include.
1714
e9395a94
UD
17152002-12-31 Ulrich Drepper <drepper@redhat.com>
1716
1717 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
1718 __pthread_initialize_minimal_internal not
1719 __pthread_initialize_minimal.
1720
89d6e444
UD
17212002-12-30 Ulrich Drepper <drepper@redhat.com>
1722
416d2de6
UD
1723 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
1724 __pthread_initialize_minimal as hidden.
1725
89d6e444
UD
1726 * init.c (__pthread_initialize_minimal_internal): Don't mark as
1727 constructor.
1728
17292002-12-31 Jakub Jelinek <jakub@redhat.com>
1730
1731 * Makefile ($(inst_libdir)/libpthread.so): Depend on
1732 $(common-objpfx)format.lds, include that into the output script.
1733 Fix comment.
1734 (extra-B-pthread.so): Change linuxthreads/ into nptl/.
1735
8cac677c
UD
17362002-12-28 Andreas Jaeger <aj@suse.de>
1737
1738 * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
1739 nsec resolution changes.
1740 (xstat64_conv): Likewise.
1741 (xstat32_conv): Likewise.
1742 * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
1743 struct kernel_stat.
1744 * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
1745 structs stat and stat64.
1746 * time/time.h (__timespec_defined): Define for __USE_MISC.
89d6e444 1747 * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
8cac677c 1748
49e9f864
UD
17492002-12-30 Jakub Jelinek <jakub@redhat.com>
1750
1751 * forward.c (FORWARD2): Renamed from FORWARD3. Remove unused export
1752 argument.
1753 (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
1754 (pthread_exit): Use strong_alias to avoid warnings.
1755 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
1756 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
1757 ptr___pthread_attr_init_2_*.
1758 * init.c (pthread_functions): Adjust.
1759
bab09b26
UD
17602002-12-29 Ulrich Drepper <drepper@redhat.com>
1761
598d7a42
UD
1762 * forward.c: Make all functions available by default again. It
1763 caused too much trouble.
1764
bab09b26
UD
1765 * pt-siglongjmp.c: Removed.
1766
3b7ed871
UD
17672002-12-28 Jakub Jelinek <jakub@redhat.com>
1768
1769 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
1770 (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
1771 * sysdeps/i386/Makefile: New file.
1772 * sysdeps/i386/tcb-offsets.sym: New file.
1773 * sysdeps/pthread/tcb-offsets.h: New file.
1774 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1775 Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
1776
1777 * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
1778 __register_atfork...
1779 (GLIBC_2.3.2): ...here.
1780
17812002-12-28 Ulrich Drepper <drepper@redhat.com>
1782
1783 * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
1784 pthread_attr_setstackaddr with __attribute_deprecated__.
1785
270d9d47
UD
17862002-12-27 Jakub Jelinek <jakub@redhat.com>
1787
1788 * pt-system.c (system): Remove cancellation handling.
1789 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
1790 cancellation routines.
1791
131fd126
UD
17922002-12-28 Ulrich Drepper <drepper@redhat.com>
1793
afb2e954
UD
1794 * descr.h: Include <dl-sysdep.h>.
1795 (struct pthread): Move header.data.list to the back of the struct.
131fd126
UD
1796 * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
1797 (MULTIPLE_THREADS_OFFSET): Adjust offset.
1798 (SYSINFO_OFFSEET): Likewise.
1799
18002002-12-27 Jakub Jelinek <jakub@redhat.com>
1801
1802 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
1803 Define.
1804 (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
1805 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
1806 DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
1807 (USE_DL_SYSINFO): Undef.
1808
18092002-12-22 Jakub Jelinek <jakub@redhat.com>
1810
1811 * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
1812 $(common-objpfx)libc.so.
1813 * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
1814 it is bigger than pipe buffer size even on arches with bigger
1815 page size.
1816 (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
1817
a218c9cf
UD
18182002-12-25 Ulrich Drepper <drepper@redhat.com>
1819
1820 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
1821 correct errno access for case that USE___THREAD is not defined.
1822
015a2dc9
UD
18232002-12-24 Ulrich Drepper <drepper@redhat.com>
1824
1825 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
1826 Patch by Marijn Ros <marijn@mad.scientist.com>.
1827
5220f9ac
RM
18282002-12-22 Roland McGrath <roland@redhat.com>
1829
1830 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
1831
1561bf63
UD
18322002-12-20 Ulrich Drepper <drepper@redhat.com>
1833
1834 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
1835
3325198e
UD
18362002-12-19 Ulrich Drepper <drepper@redhat.com>
1837
057c823f
UD
1838 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
1839 NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
1840 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
1841
097eca29
UD
1842 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
1843 of int $0x80.
1844 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
1845 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
1846 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
1847 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1848 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
1849 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
1850 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
1851 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
1852
1853 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
1854 sysenter.
1855 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
1856
1857 * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
1858
5f5843e3
UD
1859 * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
1860 in new TCB.
1861 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
1862 that sysinfo is properly initialized.
1863 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
1864 to 1 only for ld.so.
1865
3325198e
UD
1866 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
1867 RTLD_CORRECT_DYNAMIC_WEAK.
1868
74e8f2dc
UD
18692002-12-19 Jakub Jelinek <jakub@redhat.com>
1870
1871 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
1872 Use return 0 as 6th argument to FORWARD4.
1873 * pthread_equal.c: Include pthreadP.h instead of pthread.h.
1874
df45b31e
UD
18752002-12-18 Ulrich Drepper <drepper@redhat.com>
1876
1877 * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
1878 * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
1879 Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
1880 (INIT_SYSINFO): New #define.
1881 (TLS_TP_INIT): Use INIT_SYSINFO.
1882 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1883 At test to make sure SYSINFO_OFFSET value is correct.
1884 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
1885
3d539579
UD
18862002-12-18 Jakub Jelinek <jakub@redhat.com>
1887
1888 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
1889 * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
1890 * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
1891 [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
1892 __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
1893 __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
1894 __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
1895
d7913e0e
UD
18962002-12-18 Ulrich Drepper <drepper@redhat.com>
1897
f051627f
UD
1898 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
1899 macro instead of using int $0x80 directly.
1900
d7913e0e
UD
1901 * sysdeps/pthread/bits/stdio-lock.h: New file.
1902 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
1903 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
1904 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
1905 * Makefile (routines): Add libc-lowlevelmutex.
1906
1907 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
1908 __i686.get_pc_thunk.dx.
1909
f077a4a9
UD
19102002-12-17 Jakub Jelinek <jakub@redhat.com>
1911
1912 * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
1913 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
1914 ($(objpfx)tst-cancel-wrappers.out): New rule.
1915 * tst-cancel-wrappers.sh: New test.
1916 * tst-locale1.c: Include signal.h.
1917 (uselocale): Test static linking of __libc_current_sigrt*.
1918
19192002-12-17 Ulrich Drepper <drepper@redhat.com>
1920
1921 * Makefile (tests): Add tst-cancel6.
1922 * tst-cancel6.c: New file
1923
bd499a3b
UD
19242002-12-17 Jakub Jelinek <jakub@redhat.com>
1925
1926 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
1927 Define meaningfully for assembler as well.
1928 * pthreadP.h (struct pthread_functions): Remove
1929 ptr_pthread_attr_init field. Add ptr_pthread_attr_init_2_0
1930 and ptr_pthread_attr_init_2_1 fields.
1931 * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
1932 and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
1933 * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
1934 (FORWARD3): Define using FORWARD4.
1935 (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
1936 versions.
1937 * pt-system.c: Remove duplicate stdlib.h include.
1938
0a1063f4
UD
19392002-12-16 Ulrich Drepper <drepper@redhat.com>
1940
87d60668
UD
1941 * sem_init.c: Define sem_init@GLIBC_2.0.
1942 * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
1943 * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
1944
0a1063f4
UD
1945 * flockfile.c: Moved to...
1946 * sysdeps/pthread/flockfile.c: ...here. New file.
1947 * funlockfile.c: Moved to...
1948 * sysdeps/pthread/funlockfile.c: ...here. New file.
1949 * ftrylockfile.c: Moved to...
1950 * sysdeps/pthread/ftrylockfile.c: ...here. New file.
1951
9634cf9d
UD
19522002-12-16 Jakub Jelinek <jakub@redhat.com>
1953
1954 * libc-cancellation.c: Guard both function with
1955 #if !defined NOT_IN_libc.
1956 * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
1957 automatically provided pthread wrappers.
1958 * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
1959 CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
1960 nor in libpthread.
1961 * pt-open.c: Removed.
1962 * pt-fcntl.c: Removed.
1963 * pt-fsync.c: Removed.
1964 * pt-lseek.c: Removed.
1965 * pt-msgrcv.c: Removed.
1966 * pt-msgsnd.c: Removed.
1967 * pt-msync.c: Removed.
1968 * pt-nanosleep.c: Removed.
1969 * pt-open64.c: Removed.
1970 * pt-pause.c: Removed.
1971 * pt-pread.c: Removed.
1972 * pt-pread64.c: Removed.
1973 * pt-pwrite.c: Removed.
1974 * pt-pwrite64.c: Removed.
1975 * pt-read.c: Removed.
1976 * pt-recv.c: Removed.
1977 * pt-recvfrom.c: Removed.
1978 * pt-recvmsg.c: Removed.
1979 * pt-send.c: Removed.
1980 * pt-sendto.c: Removed.
1981 * pt-sigtimedwait.c: Removed.
1982 * pt-sigwait.c: Removed.
1983 * pt-wait.c: Removed.
1984 * pt-waitpid.c: Removed.
1985 * pt-write.c: Removed.
1986 * pt-accept.c: Removed.
1987 * pt-close.c: Removed.
1988 * pt-connect.c: Removed.
1989 * pt-lseek64.c: Removed.
1990 * pt-sendmsg.c: Removed.
1991 * pt-tcdrain.c: Removed.
1992
6ee8d334
UD
19932002-12-15 Ulrich Drepper <drepper@redhat.com>
1994
81fa9371
UD
1995 * init.c (__pthread_initialize_minimal_internal): Renamed from
1996 __pthread_initialize_minimal. Make old name an alias. This
1997 converts a normal relocation into a relative relocation.
1998
f3015aa5
UD
1999 * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
2000
4cbc1950
UD
2001 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
2002 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
2003 * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
2004 pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
2005 pt-sigwaitinfo, pt-waitid, and pt-writev.
2006 * pt-creat.c: Removed.
2007 * pt-poll.c: Removed.
2008 * pt-pselect.c: Removed.
2009 * pt-readv.c: Removed.
2010 * pt-select.c: Removed.
2011 * pt-sigpause.c: Removed.
2012 * pt-sigsuspend.c: Removed.
2013 * pt-sigwaitinfo.c: Removed.
2014 * pt-waitid.c: Removed.
2015 * pt-writev.c: Removed.
2016
8454830b
UD
2017 * init.c (pthread_functions): New variable.
2018 (__pthread_initialize_minimal): Pass pointer to pthread_functions
2019 (or NULL) to __libc_pthread_init.
2020 * forward.c: Rewrite to use __libc:pthread_functions array to get
2021 function addresses.
2022 * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
2023 prototype.
2024 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
2025 Take new parameter. Copy content of variable pointed to by it
2026 to __libc_pthread_init.
2027
2028 * pthreadP.h (struct pthread_functions): New type.
2029 (__libc_pthread_init): Declare.
2030
2031 * pthread_attr_destroy.c: Add namespace protected alias.
2032 * pthread_attr_getdetachstate.c: Likewise.
2033 * pthread_attr_getinheritsched.c: Likewise.
2034 * pthread_attr_getschedparam.c: Likewise.
2035 * pthread_attr_getschedpolicy.c: Likewise.
2036 * pthread_attr_getscope.c: Likewise.
2037 * pthread_attr_setdetachstate.c: Likewise.
2038 * pthread_attr_setinheritsched.c: Likewise.
2039 * pthread_attr_setschedparam.c: Likewise.
2040 * pthread_attr_setschedpolicy.c: Likewise.
2041 * pthread_attr_setscope.c: Likewise.
2042 * pthread_cond_broadcast.c: Likewise.
2043 * pthread_cond_destroy.c: Likewise.
2044 * pthread_cond_init.c: Likewise.
2045 * pthread_cond_signal.c: Likewise.
2046 * pthread_cond_wait.c: Likewise.
2047 * pthread_condattr_destroy.c: Likewise.
2048 * pthread_condattr_init.c: Likewise.
2049 * pthread_equal.c: Likewise.
2050 * pthread_exit.c: Likewise.
2051 * pthread_getschedparam.c: Likewise.
2052 * pthread_self.c: Likewise.
2053 * pthread_setcancelstate.c: Likewise.
2054 * pthread_setschedparam.c: Likewise.
2055 * pthread_mutex_destroy.c: Likewise.
2056 * pthread_mutex_init.c: Likewise.
2057 * pthreadP.h: Add prototypes for the aliases.
2058
0d5f4929
UD
2059 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
2060 multiple_threads member in correct TCB to 1.
2061
6ee8d334
UD
2062 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
2063 SINGLE_THREAD_P. If in libc or libpthread examine multiple_thread
2064 member of thread decriptor, otherwise return unconditionally 1.
2065
2fb6444d
UD
20662002-12-14 Ulrich Drepper <drepper@redhat.com>
2067
2068 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
2069 regular Linux version. Remove file.
2070 * sysdeps/unix/sysv/linux/connect.S: Likewise. Remove file.
2071 * sysdeps/unix/sysv/linux/llseek.c: Likewise. Remove file.
2072 * sysdeps/unix/sysv/linux/msgrcv.c: Likewise. Remove file.
2073 * sysdeps/unix/sysv/linux/msgsnd.c: Likewise. Remove file.
2074 * sysdeps/unix/sysv/linux/open64.c: Likewise. Remove file.
2075 * sysdeps/unix/sysv/linux/poll.c: Likewise. Remove file.
2076 * sysdeps/unix/sysv/linux/pread.c: Likewise. Remove file.
2077 * sysdeps/unix/sysv/linux/pread64.c: Likewise. Remove file.
2078 * sysdeps/unix/sysv/linux/pselect.c: Likewise. Remove file.
2079 * sysdeps/unix/sysv/linux/pwrite.c: Likewise. Remove file.
2080 * sysdeps/unix/sysv/linux/pwrite64.c: Likewise. Remove file.
2081 * sysdeps/unix/sysv/linux/readv.c: Likewise. Remove file.
2082 * sysdeps/unix/sysv/linux/recv.S: Likewise. Remove file.
2083 * sysdeps/unix/sysv/linux/recvfrom.S: Likewise. Remove file.
2084 * sysdeps/unix/sysv/linux/recvmsg.S: Likewise. Remove file.
2085 * sysdeps/unix/sysv/linux/send.S: Likewise. Remove file.
2086 * sysdeps/unix/sysv/linux/sendmsg.S: Likewise. Remove file.
2087 * sysdeps/unix/sysv/linux/sendto.S: Likewise. Remove file.
2088 * sysdeps/unix/sysv/linux/sigpause.c: Likewise. Remove file.
2089 * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise. Remove file.
2090 * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise. Remove file.
2091 * sysdeps/unix/sysv/linux/sigwait.c: Likewise. Remove file.
2092 * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise. Remove file.
2093 * sysdeps/unix/sysv/linux/system.c: Likewise. Remove file.
2094 * sysdeps/unix/sysv/linux/tcdrain.c: Likewise. Remove file.
2095 * sysdeps/unix/sysv/linux/wait.c: Likewise. Remove file.
2096 * sysdeps/unix/sysv/linux/waitid.c: Likewise. Remove file.
2097 * sysdeps/unix/sysv/linux/waitpid.c: Likewise. Remove file.
2098 * sysdeps/unix/sysv/linux/writev.c: Likewise. Remove file.
2099 * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise. Remove file.
2100
86b2dc40
UD
21012002-12-14 Jakub Jelinek <jakub@redhat.com>
2102
2103 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
2104 * sysdeps/unix/sysv/linux/open.c: Removed.
2105 * sysdeps/unix/sysv/linux/fsync.c: Removed.
2106 * sysdeps/unix/sysv/linux/lseek.c: Removed.
2107 * sysdeps/unix/sysv/linux/msync.c: Removed.
2108 * sysdeps/unix/sysv/linux/read.c: Removed.
2109 * sysdeps/unix/sysv/linux/close.c: Removed.
2110 * sysdeps/unix/sysv/linux/creat.c: Removed.
2111 * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
2112 * sysdeps/unix/sysv/linux/pause.c: Removed.
2113 * sysdeps/unix/sysv/linux/select.c: Removed.
2114 * sysdeps/unix/sysv/linux/write.c: Removed.
2115
9d263d72
UD
21162002-12-14 Ulrich Drepper <drepper@redhat.com>
2117
2118 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
2119 element in TCB to see whether locking is needed.
2120
2121 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
2122 MULTIPLE_THREADS_OFFSET value is correct.
2123
2124 * sysdeps/unix/sysv/linux/close.c: New file.
2125 * sysdeps/unix/sysv/linux/connect.S: New file.
2126 * sysdeps/unix/sysv/linux/creat.c: New file.
2127 * sysdeps/unix/sysv/linux/fsync.c: New file.
2128 * sysdeps/unix/sysv/linux/llseek.c: New file.
2129 * sysdeps/unix/sysv/linux/lseek.c: New file.
2130 * sysdeps/unix/sysv/linux/msgrcv.c: New file.
2131 * sysdeps/unix/sysv/linux/msgsnd.c: New file.
2132 * sysdeps/unix/sysv/linux/msync.c: New file.
2133 * sysdeps/unix/sysv/linux/nanosleep.c: New file.
2134 * sysdeps/unix/sysv/linux/open.c: New file.
2135 * sysdeps/unix/sysv/linux/open64.c: New file.
2136 * sysdeps/unix/sysv/linux/pause.c: New file.
2137 * sysdeps/unix/sysv/linux/poll.c: New file.
2138 * sysdeps/unix/sysv/linux/pread.c: New file.
2139 * sysdeps/unix/sysv/linux/pread64.c: New file.
2140 * sysdeps/unix/sysv/linux/pselect.c: New file.
2141 * sysdeps/unix/sysv/linux/pwrite.c: New file.
2142 * sysdeps/unix/sysv/linux/pwrite64.c: New file.
2143 * sysdeps/unix/sysv/linux/readv.c: New file.
2144 * sysdeps/unix/sysv/linux/recv.S: New file.
2145 * sysdeps/unix/sysv/linux/recvfrom.S: New file.
2146 * sysdeps/unix/sysv/linux/recvmsg.S: New file.
2147 * sysdeps/unix/sysv/linux/select.c: New file.
2148 * sysdeps/unix/sysv/linux/send.S: New file.
2149 * sysdeps/unix/sysv/linux/sendmsg.S: New file.
2150 * sysdeps/unix/sysv/linux/sendto.S: New file.
2151 * sysdeps/unix/sysv/linux/sigpause.c: New file.
2152 * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
2153 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
2154 * sysdeps/unix/sysv/linux/sigwait.c: New file.
2155 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
2156 * sysdeps/unix/sysv/linux/system.c: New file.
2157 * sysdeps/unix/sysv/linux/tcdrain.c: New file.
2158 * sysdeps/unix/sysv/linux/wait.c: New file.
2159 * sysdeps/unix/sysv/linux/waitid.c: New file.
2160 * sysdeps/unix/sysv/linux/waitpid.c: New file.
2161 * sysdeps/unix/sysv/linux/writev.c: New file.
2162 * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
2163
2164 * pt-readv.c: Fix comment.
2165
21662002-12-14 Jakub Jelinek <jakub@redhat.com>
2167
2168 * tst-cleanup1.c: Include stdlib.h.
2169
2170 * tst-cancel5.c: New test.
2171 * Makefile (tests): Add tst-cancel5.
2172 (tst-cancel5): Link against libc.so libpthread.so in that order.
2173
9ae0909b
UD
21742002-12-13 Ulrich Drepper <drepper@redhat.com>
2175
b7bdd9c4
UD
2176 * forward.c (test_loaded): Prevent recursive calls.
2177
9ae0909b
UD
2178 * Makefile (routines): Add libc-cancellation.
2179 * libc-cancellation.c: New file.
2180 * descr.h (struct pthread): Add multiple_threads field.
2181 * allocatestack.c (allocate_stack): Initialize multiple_header field of
2182 new thread descriptor to 1.
2183 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
2184 Initialize multiple_thread field after successful thread creation.
2185 * cancellation.c (__do_cancel): Move to pthreadP.h.
2186 (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
2187 (__pthread_disable_asynccancel): Add internal_function attribute.
2188 * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
2189 * pthread_setcancelstate.c: Likewise.
2190 * pthread_setcanceltype.c: Likewise.
2191 * pthread_exit.c: Likewise.
2192 * pthreadP.h (CANCELLATION_P): Likewise.
2193 (__do_cancel): Define as static inline.
2194 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
2195 (__libc_enable_asynccancel, __libc_disable_asynccancel): New
2196 declarations.
2197 * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
2198 fields. Define MULTIPLE_THREADS_OFFSET.
2199 * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
2200 declaration.
2201 * sysdeps/unix/sysv/linux/accept.S: New file.
2202 * sysdeps/unix/sysv/linux/read.c: New file.
2203 * sysdeps/unix/sysv/linux/write.c: New file.
2204 * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
2205 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
2206 initialization of __libc_locking_needed.
2207 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
2208 __libc_locking_needed, use multiple_threads field in TCB.
2209 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
2210
22f20674
UD
22112002-12-12 Ulrich Drepper <drepper@redhat.com>
2212
2ad2e1e7
UD
2213 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
2214 version.
2215 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
2216
22f20674
UD
2217 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
2218 access to __libc_locking_needed for PIC.
2219
aa80bf86
UD
22202002-12-12 Jakub Jelinek <jakub@redhat.com>
2221
2222 * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
2223 declare for libc.so.
2224 (__libc_lock_init, __libc_lock_init_recursive): Change into comma
2225 expression.
2226 (__libc_lock_lock): Put into statement expression.
2227 (__libc_lock_unlock): Remove trailing semicolon.
2228 * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
2229
24021373
RM
22302002-12-12 Roland McGrath <roland@redhat.com>
2231
2232 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
2233 "m" constraint to refer to __libc_locking_needed. Declare it here.
2234
14e7aece
UD
22352002-12-12 Ulrich Drepper <drepper@redhat.com>
2236
2237 * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
2238 * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
2239 Initialize __libc_locking_needed.
2240 * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
2241 instead of __register_pthread_fork_handler.
2242 * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
2243 * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
2244 fork-gen with libc_pthread_init.
2245 * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
2246 of __register_pthread_fork_handler.
2247 * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
2248 of __register_pthread_fork_handler.
2249 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
2250 __libc_locking_needed to determine whether lock prefix can be avoided.
2251 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
2252
85631c8e
UD
22532002-12-11 Ulrich Drepper <drepper@redhat.com>
2254
da63009e
UD
2255 * Makefile (tests): Add tst-cleanup1.
2256 * tst-cleanup1.c: New file.
2257 * cancellation.c (__cleanup_thread): Removed.
2258 (__do_cancel): Remove call to __cleanup_thread.
2259 * pthreadP.h: Remove __cleanup_thread prorotype.
2260
000160a2
UD
2261 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
2262 Remember function and argument even if cancellation handler
2263 function is not available.
2264 (__libc_cleanup_region_end): Execute registered function directly if
2265 pthread functions are not available.
2266 (__libc_cleanup_end): Likewise.
2267
85631c8e
UD
2268 * init.c (__pthread_initialize_minimal): Fix initialization in
2269 static lib by preventing gcc from being too clever.
2270
dce8f2b6
UD
22712002-12-10 Ulrich Drepper <drepper@redhat.com>
2272
34a075be
UD
2273 * init.c (__pthread_initialize_minimal): Remove unneccesary
2274 sigaddset call.
2275
dce8f2b6
UD
2276 * Makefile (tests): We can run tst-locale2 now.
2277
e5e45b53
UD
22782002-12-09 Ulrich Drepper <drepper@redhat.com>
2279
2280 * Versions: Remove duplicated sigwait entry.
2281
bdb04f92
UD
22822002-12-08 Ulrich Drepper <drepper@redhat.com>
2283
1e506629
UD
2284 * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
2285 inside libpthread.
2286
a3957dd5
UD
2287 * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
2288
bdb04f92
UD
2289 * pthreadP.h: Declare __pthread_enable_asynccancel and
2290 __pthread_disable_asynccancel.
2291 (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
2292 (CANCEL_RESET): Use __pthread_disable_asynccancel.
2293 * cancellation.c (__pthread_enable_asynccancel): New function.
2294 (__pthread_disable_asynccancel): New function.
2295 * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
2296 * pt-close.c: Likewise.
2297 * pt-connect.c: Likewise.
2298 * pt-creat.c: Likewise.
2299 * pt-fcntl.c: Likewise.
2300 * pt-fsync.c: Likewise.
2301 * pt-lseek.c: Likewise.
2302 * pt-lseek64.c: Likewise.
2303 * pt-msgrcv.c: Likewise.
2304 * pt-msgsnd.c: Likewise.
2305 * pt-msync.c: Likewise.
2306 * pt-nanosleep.c: Likewise.
2307 * pt-open.c: Likewise.
2308 * pt-open64.c: Likewise.
2309 * pt-pause.c: Likewise.
2310 * pt-poll.c: Likewise.
2311 * pt-pread.c: Likewise.
2312 * pt-pread64.c: Likewise.
2313 * pt-pselect.c: Likewise.
2314 * pt-pwrite.c: Likewise.
2315 * pt-pwrite64.c: Likewise.
2316 * pt-read.c: Likewise.
2317 * pt-readv.c: Likewise.
2318 * pt-recv.c: Likewise.
2319 * pt-recvfrom.c: Likewise.
2320 * pt-recvmsg.c: Likewise.
2321 * pt-select.c: Likewise.
2322 * pt-send.c: Likewise.
2323 * pt-sendmsg.c: Likewise.
2324 * pt-sendto.c: Likewise.
2325 * pt-sigpause.c: Likewise.
2326 * pt-sigsuspend.c: Likewise.
2327 * pt-sigtimedwait.c: Likewise.
2328 * pt-sigwait.c: Likewise.
2329 * pt-sigwaitinfo.c: Likewise.
2330 * pt-system.c: Likewise.
2331 * pt-tcdrain.c: Likewise.
2332 * pt-wait.c: Likewise.
2333 * pt-waitid.c: Likewise.
2334 * pt-waitpid.c: Likewise.
2335 * pt-write.c: Likewise.
2336 * pt-writev.c: Likewise.
a3957dd5
UD
2337 * pthread_join.c: Likewise.
2338 * pthread_timedjoin.c: Likewise.
bdb04f92
UD
2339
2340 * pt-sigpause.c (sigsuspend): Call __sigsuspend.
2341 (__xpg_sigpause): New function.
2342 * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
2343
6ccb3834
UD
23442002-12-07 Ulrich Drepper <drepper@redhat.com>
2345
09efc3ba
UD
2346 * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
2347
2348 * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
2349 _GI_pthread_cleanup_pop to pthreadP.h.
2350
2351 * ftrylockfile.c: Use _IO_lock_trylock instead of
2352 pthread_mutex_trylock.
2353
2354 * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
2355 (CANCEL_RESET): Likewise.
2356 (__pthread_setcanceltype_): Declare.
2357 (__pthread_mutex_lock_internal): Declare.
2358 (__pthread_mutex_unlock_internal): Declare.
2359 (__pthread_once_internal): Declare.
2360 (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
2361 (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
2362
2363 * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
2364 and pthread_mutex_unlock.
2365 * pthread_cond_wait.c: Likewise.
2366 * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
2367 * pthread_mutex_unlock.c: Likewise.
2368
2369 * pthread_setcanceltype.c: Add additional alias
2370 __pthread_setcanceltype.
2371
2372 * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
2373 * sem_open.c (sem_open): Likewise.
2374 Use __libc_open, __libc_write, and __libc_close instead of
2375 open, write, and close respectively.
2376
2377 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
2378 Rewrite as statement expression since it must return a value.
2379
2380 * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
2381 * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
2382 __pthread_kill.
2383
2384 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
2385 alias __pthread_once_internal.
2386
6ccb3834
UD
2387 * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
2388
d3c9f895
UD
23892002-12-06 Ulrich Drepper <drepper@redhat.com>
2390
4614167a
UD
2391 * Makefile (tests): Add tst-stdio1 and tst-stdio2.
2392 * tst-stdio1.c: New file.
2393 * tst-stdio2.c: New file.
2394
a4548cea
UD
2395 * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
2396
d3c9f895
UD
2397 * Makefile (tests): Comment out tst-locale2 for now.
2398 (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
2399
2400 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
2401 -D_IO_MTSAFE_IO.
2402 * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
2403 Use _IO_lock_init instead of explicit assignment.
2404
2405 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
2406 Define __libc_lock_* and __libc_lock_recursive macros with
2407 lowlevellock macros, not pthread mutexes.
2408
2409 * flockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_lock instead
2410 of pthread_mutex_lock.
2411 * funlockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_unlock
2412 instead of pthread_mutex_unlock.
2413
fde89ad0
RM
24142002-12-06 Roland McGrath <roland@redhat.com>
2415
2416 * allocatestack.c (__stack_user): Use uninitialized defn.
2417 * init.c (__pthread_initialize_minimal): Initialize it here.
2418
11767d47
RM
24192002-12-05 Roland McGrath <roland@redhat.com>
2420
fde89ad0
RM
2421 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
2422 string.
2423 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
2424
11767d47
RM
2425 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
2426 missing & here too.
2427
440d8bc2
UD
24282002-12-05 Ulrich Drepper <drepper@redhat.com>
2429
2430 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
2431 lowlevellock.
2432 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
2433 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
2434 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
2435 * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
2436 for __libc_lock_* macros.
2437 * Makefile (routines): Add libc-lowlevellock.
2438
24392002-10-09 Roland McGrath <roland@redhat.com>
2440
2441 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
2442 Under [__PIC__], call the function via the pointer fetched for
2443 comparison rather than a call by name that uses the PLT.
2444 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
2445 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
2446 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
2447 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
2448 (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
2449
d5ed0118
RM
24502002-12-04 Roland McGrath <roland@redhat.com>
2451
2452 * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
2453
2454 * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
2455 * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
2456
2457 * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
2458
eaa4099f
UD
24592002-12-04 Ulrich Drepper <drepper@redhat.com>
2460
2461 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
2462 a completely opaque, non-integer type.
2463 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2464
33b5d0cc
UD
24652002-12-05 Jakub Jelinek <jakub@redhat.com>
2466
2467 * sysdeps/i386/tls.h: Include stdlib.h.
2468 * sysdeps/x86_64/tls.h: Likewise.
2469
7a5cdb30
UD
24702002-12-04 Ulrich Drepper <drepper@redhat.com>
2471
c4a6d859
UD
2472 * Makefile (tests): Add tst-locale2.
2473 (tests-static): Likewise.
2474 * tst-locale2.c: New file.
2475
7a5cdb30
UD
2476 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
2477 volatile and add memory clobbers to lock operations.
2478
d82d5d12
UD
24792002-12-03 Ulrich Drepper <drepper@redhat.com>
2480
69cae3cf
UD
2481 * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
2482 * sysdeps/i386/i486/bits/atomic.h: New file.
2483 * sysdeps/i386/i586/bits/atomic.h: New file.
2484 * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
2485 include i486 version.
2486 * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
2487 * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
c97c64de 2488 Patch by Marijn Ros <marijn@mad.scientist.com>.
69cae3cf 2489
e4044c01
UD
2490 * allocatestack.c (get_cached_stack): Don't crash if we first
2491 found a stack with a larger size then needed.
2492 Reported by Hui Huang <hui.huang@sun.com>.
2493
d82d5d12
UD
2494 * Makefile (tests): Add tst-sysconf.
2495 * tst-sysconf.c: New file.
2496
2497 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
2498 PTHREAD_THREADS_MAX.
2499
fa9a4ff0
RM
25002002-12-02 Roland McGrath <roland@redhat.com>
2501
2502 * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
2503 Declare using hidden_proto instead of attribute_hidden, so there are
2504 non-.hidden static symbols for gdb to find.
2505 (__pthread_keys): Likewise.
2506 * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
2507 * allocatestack.c (__stack_user): Likewise.
2508 * pthread_create.c (__pthread_keys): Likewise.
2509 (__nptl_threads_events, __nptl_last_event): Make these static instead
2510 of hidden.
2511 * pthread_key_create.c (__pthread_pthread_keys_max,
2512 __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
2513
91949a33
UD
25142002-12-02 Ulrich Drepper <drepper@redhat.com>
2515
c22b52fa
UD
2516 * Makefile (tests): Add tst-locale1. If buid-static is yes link
2517 statically.
2518 * tst-locale1.c: New file.
2519
beb6aa41
UD
2520 * pthread_cond_timedwait.c: Include <stdlib.h>.
2521
91949a33
UD
2522 * Makefile (tests): Add tst-fork2 and tst-fork3.
2523 * tst-fork2.c: New file.
2524 * tst-fork3.c: New file.
2525
654dff90
UD
25262002-11-28 Ulrich Drepper <drepper@redhat.com>
2527
cb0e76b4
UD
2528 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
2529
2530 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
2531 require it to 200112L.
2532
2533 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
2534 instruction only if HAVE_CMOV is defined.
2535 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
2536
975aa229
UD
2537 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
2538
654dff90
UD
2539 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
2540
2541 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
2542
2543 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
2544
a3931336
UD
25452002-11-27 Ulrich Drepper <drepper@redhat.com>
2546
c10c099c
UD
2547 * sysdeps/x86_64/bits/atomic.h: New file.
2548
2549 * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
2550 16-bit operations.
2551
dca99d27
UD
2552 * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
2553 possible since gettid cannot fail.
2554
f78deea6
UD
2555 * sysdeps/x86_64/pthreaddef.h: New file.
2556
2557 * sysdeps/i386/pthreaddef.h (gettid): Removed.
2558
2559 * sysdeps/x86_64/pthread_spin_init.c: New file.
2560 * sysdeps/x86_64/pthread_spin_lock.c: New file.
2561 * sysdeps/x86_64/pthread_spin_trylock.c: New file.
2562 * sysdeps/x86_64/pthread_spin_unlock.c: New file.
2563
2564 * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
2565 Add missing lock prefix. Minute optimization.
2566
2567 * tst-spin2.c (main): Also check successful trylock call.
2568
2569 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
2570 syscall. Fix typo in case INTERNAL_SYSCALL is not used.
2571
2572 * sysdeps/i386/pthread_spin_destroy.c: Moved to...
2573 * sysdeps/pthread/pthread_spin_destroy.c: ...here. New file.
2574
2575 * sysdeps/i386/pthread_sigmask.c: Removed. Use the generic code.
2576 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
2577 value in case of an error. Add support for INTERNAL_SYSCALL.
b54e18eb
UD
2578
2579 * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
2580 value in case of an error.
2581
a3931336
UD
2582 * sysdeps/x86_64/tls.h: New file.
2583
76a50749
UD
25842002-11-26 Ulrich Drepper <drepper@redhat.com>
2585
117c452c
UD
2586 * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface. It now
2587 takes the array member name and the index as parameters.
2588 (THREAD_SETMEM_NC): Likewise.
2589 * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
2590 * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
2591 interfaces.
2592
2593 * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
2594 to decide which code to use.
2595 (THREAD_SETMEM_NC): Likewise.
2596
76a50749
UD
2597 * allocatestack.c (queue_stack): Don't remove stack from list here.
2598 Do it in the caller. Correct condition to prematurely terminate
2599 loop to free stacks.
2600 (__deallocate_stack): Remove stack from list here.
2601
26022002-11-26 Ulrich Drepper <drepper@redhat.com>
2603
2604 * Makefile (tests): Add tst-stack1.
2605 * tst-stack1.c: New file.
2606
2607 * allocatestack.c (allocate_stack): Initialize the TCB on a user
2608 provided stack.
2609
2610 * pthread_attr_getstack.c: Return bottom of the thread area.
2611
26122002-11-25 Ulrich Drepper <drepper@redhat.com>
2613
2614 * Makefile (libpthread-routines): Add pt-allocrtsig and
2615 pthread_kill_other_threads.
2616 * pt-allocrtsig.c: New file.
2617 * pthread_kill_other_threads.c: New file.
2618 * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
2619 all three functions.
2620 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
2621 allocrtsig.
2622 * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
2623 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
2624 and __libc_allocate_rtsig_private.
2625 * Versions (libpthread): Export pthread_kill_other_threads_np,
2626 __libc_current_sigrtmin, and __libc_current_sigrtmax.
2627
26282002-11-24 Ulrich Drepper <drepper@redhat.com>
2629
2630 * allocatestack.c (allocate_stack): stackaddr in attribute points to
2631 the end of the stack. Adjust computations.
2632 When mprotect call fails dequeue stack and free it.
2633 * pthread_attr_setstack.c: Store top of the stack in stackaddr
2634 attribute.
2635 * pthread_getattr_np.c: Likewise.
2636
2637 * descr.h (IS_DETACHED): Add some more parenthesis to prevent
2638 surprises.
2639
26402002-11-23 Ulrich Drepper <drepper@redhat.com>
2641
2642 * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
2643 attribute definitions. Patch by Luca Barbieri <ldb@ldb.ods.org>.
2644
26452002-11-22 Ulrich Drepper <drepper@redhat.com>
2646
2647 * pthread_getspecific.c: Optimize access to first 2nd-level array.
2648 * pthread_setspecific.c: Likewise.
2649
26502002-11-21 Ulrich Drepper <drepper@redhat.com>
2651
2652 * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
2653 definitions. Get them from the official place.
2654 * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
2655
2656 * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
2657 Use new CLONE_ flags in clone() calls.
2658
2659 * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
2660 * sysdeps/unix/sysv/linux/i386/fork.c: New file.
2661
2662 * Versions: Add pthread_* functions for libc.
2663 * forward.c: New file.
2664
2665 * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
2666 errno-loc.
2667 * herrno.c: New file.
2668 * res.c: New file.
2669
2670 * Makefile (libpthread-routines): Remove sem_post, sem_wait,
2671 sem_trywait, and sem_timedwait. Add herrno and res.
2672 * sem_init.c: Don't initialize lock and waiters members.
2673 * sem_open.c: Likewise.
2674 * sem_post.c: Removed.
2675 * sem_wait.c: Removed.
2676 * sem_trywait.c: Removed.
2677 * sem_timedwait.c: Removed.
2678 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
2679 Includes full implementations of sem_post, sem_wait, sem_trywait,
2680 and sem_timedwait.
2681 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
2682 for new implementation.
2683 * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
2684 and waiters fields.
2685
2686 * tst-sem3.c: Improve error message.
2687 * tst-signal3.c: Likewise.
2688
2689 * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
2690 to tell the kernel about the termination futex and to initialize tid
2691 member. Don't initialize main_thread.
2692 * descr.h (struct pthread): Remove main_thread member.
2693 * cancelllation.c (__do_cancel): Remove code handling main thread.
2694 The main thread is not special anymore.
2695
2696 * allocatestack.c (__reclaim_stacks): Mark stacks as unused. Add
2697 size of the stacks to stack_cache_actsize.
2698
2699 * pt-readv.c: Add missing "defined".
2700 * pt-sigwait.c: Likewise.
2701 * pt-writev.c: Likewise.
2702
27032002-11-09 Ulrich Drepper <drepper@redhat.com>
2704
2705 * Versions: Export __connect from libpthread.
2706 Patch by Luca Barbieri <ldb@ldb.ods.org>.
2707
2708 * Makefile (libpthread-routines): Add pt-raise.
2709 * sysdeps/unix/sysv/linux/raise.c: New file.
2710 * sysdeps/unix/sysv/linux/pt-raise.c: New file.
2711 * sysdeps/generic/pt-raise.c: New file.
2712
2713 * pthread_cond_init.c: Initialize all data elements of the condvar
2714 structure. Patch by Luca Barbieri <ldb@ldb.ods.org>.
2715
2716 * pthread_attr_init.c: Actually implement 2.0 compatibility version.
2717 * pthread_create.c: Likewise.
2718
2719 * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
2720 * tst-key1.c: New file.
2721 * tst-key2.c: New file.
2722 * tst-key3.c: New file.
2723
2724 * Versions: Export pthread_detach for version GLIBC_2.0.
2725 Reported by Saurabh Desai <sdesai@austin.ibm.com>.
2726
27272002-11-08 Ulrich Drepper <drepper@redhat.com>
2728
2729 * pthread_key_create.c: Terminate search after an unused key was found.
2730 Patch by Luca Barbieri <ldb@ldb.ods.org>.
2731
2732 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
2733 Patch by Luca Barbieri <ldb@ldb.ods.org>.
2734
27352002-10-10 Ulrich Drepper <drepper@redhat.com>
2736
2737 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
2738 dynamic lookup for errno in PIC.
2739
2740 * allocatestack.c (get_cached_stack): Rearrange code slightly to
2741 release the stack lock as soon as possible.
2742 Call _dl_allocate_tls_init for TCB from the cache to re-initialize
2743 the static TLS block.
2744 (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
2745
2746 * cancellation.c: Renamed from cancelation.c.
2747 * Makefile: Adjust accordingly.
2748 * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
2749 * cleanup_defer.c: Use CANCELLATION_P.
2750 * pthread_testcancel.c: Likewise.
2751 * descr.h: Fix spelling in comments.
2752 * init.c: Likewise.
2753 * pthread_getattr_np.c: Likewise.
2754 * pthread_getschedparam.c: Likewise.
2755 * pthread_setschedparam.c: Likewise.
2756 * Versions: Likewise.
2757
2758 * pt-pselect.c: New file.
2759 * Makefile (libpthread-routines): Add pt-pselect.
2760 * Versions: Add pselect.
2761
2762 * tst-cancel4.c: New file.
2763 * Makefile (tests): Add tst-cancel4.
2764
27652002-10-09 Ulrich Drepper <drepper@redhat.com>
2766
2767 * pthread_mutex_lock.c: Always record lock ownership.
2768 * pthread_mutex_timedlock.c: Likewise.
2769 * pthread_mutex_trylock.c: Likewise.
2770
2771 * pt-readv.c: New file.
2772 * pt-writev.c: New file.
2773 * pt-creat.c: New file.
2774 * pt-msgrcv.c: New file.
2775 * pt-msgsnd.c: New file.
2776 * pt-poll.c: New file.
2777 * pt-select.c: New file.
2778 * pt-sigpause.c: New file.
2779 * pt-sigsuspend.c: New file.
2780 * pt-sigwait.c: New file.
2781 * pt-sigwaitinfo.c: New file.
2782 * pt-waitid.c: New file.
2783 * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
2784 pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
2785 pt-sigwait, pt-sigwaitinfo, and pt-waitid.
2786 * Versions: Add all the new functions.
2787
2788 * tst-exit1.c: New file.
2789 * Makefile (tests): Add tst-exit1.
2790
2791 * sem_timedwait.c: Minor optimization for more optimal fastpath.
2792
27932002-10-08 Ulrich Drepper <drepper@redhat.com>
2794
2795 * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
2796
2797 * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
2798 call. pthread_join is an official cancellation point.
2799 * pthread_timedjoin.c: Likewise.
2800
2801 * pthread_cond_wait.c: Revert order in which internal lock are dropped
2802 and the condvar's mutex are retrieved.
2803 * pthread_cond_timedwait.c: Likewise.
2804 Reported by dice@saros.East.Sun.COM.
2805
28062002-10-07 Ulrich Drepper <drepper@redhat.com>
2807
2808 * pthreadP.h: Cut out all type definitions and move them...
2809 * sysdeps/unix/sysv/linux/internaltypes.h: ...here. New file.
2810 * pthreadP.h: Include <internaltypes.h>.
2811
2812 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
2813 performance tweaks.
2814
2815 * sem_trywait.c: Shuffle #includes around to get right order.
2816 * sem_timedwait.c: Likewise.
2817 * sem_post.c: Likewise.
2818 * sem_wait.c: Likewise.
2819
2820 * nptl 0.3 released.
2821
2822 * Makefile (tests): Add tst-signal3.
2823 * tst-signal3.c: New file.
2824
28252002-10-05 Ulrich Drepper <drepper@redhat.com>
2826
2827 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
2828 the asms modify the sem object.
2829 (__lll_sem_timedwait): Now takes struct sem* as first parameter.
2830
2831 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
2832 the actual members.
2833 * pthreadP.h (struct sem): New type. Actual semaphore type.
2834 * semaphoreP.h: Include pthreadP.h.
2835 * sem_getvalue.c: Adjust to sem_t change.
2836 * sem_init.c: Likewise.
2837 * sem_open.c: Likewise.
2838 * sem_post.c: Likewise.
2839 * sem_timedwait.c: Likewise.
2840 * sem_trywait.c: Likewise.
2841 * sem_wait.c: Likewise.
2842
28432002-10-04 Ulrich Drepper <drepper@redhat.com>
2844
2845 * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
2846 * tst-basic2.c: New file.
2847 * tst-exec1.c: New file.
2848 * tst-exec2.c: New file.
2849 * tst-exec3.c: New file.
2850
2851 * tst-fork1.c: Remove extra */.
2852
2853 * nptl 0.2 released. The API for IA-32 is complete.