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