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