1 2003-04-29 Jakub Jelinek <jakub@redhat.com>
3 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
4 (__SIZEOF_PTHREAD_COND_T): Define to 48.
5 (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
6 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
7 Make __align long long instead of long.
8 (pthread_rwlock_t): Formatting.
9 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
10 (pthread_rwlock_t): Formatting.
11 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
12 (pthread_cond_t): Make __align long long instead of long.
13 (pthread_rwlock_t): Move __flags field to the same position as in
16 2003-04-30 Ulrich Drepper <drepper@redhat.com>
18 * tst-rwlock6.c (do_test): Use correct printf format specifiers.
19 * tst-rwlock7.c (do_test): Likewise.
21 2003-04-26 Roland McGrath <roland@redhat.com>
23 * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
25 2003-04-22 Jakub Jelinek <jakub@redhat.com>
27 * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
28 sizeof (struct pthread).
29 (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
31 * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
33 (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
35 (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
37 (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
39 (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
41 (NO_TLS_OFFSET): Define.
42 * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
43 add TLS_TCB_SIZE unnecessarily.
45 2003-04-22 Roland McGrath <roland@redhat.com>
47 * Makeconfig (shared-thread-library): Reverse link order to work
50 2003-04-22 Ulrich Drepper <drepper@redhat.com>
52 * semaphore.h: Fix typo in comment.
54 2003-04-21 Ulrich Drepper <drepper@redhat.com>
56 * sysdeps/pthread/sigfillset.c: New file.
58 * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
59 * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
60 * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
61 * sysdeps/pthread/sigaction.c: Likewise.
62 * sysdeps/pthread/sigprocmask.c: New file.
63 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
65 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
66 Block SIGTIMER. Also handle SI_TKILL events and terminate thread
69 2003-04-19 Ulrich Drepper <drepper@redhat.com>
71 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
72 (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
74 * sysdeps/unix/sysv/linux/unregister-atfork.c
75 (__unregister_atfork): Don't free memory not allocated dynamically.
77 * semaphore.h: Remove __THROW marker from cancellation points.
78 * nptl/sysdeps/pthread/pthread.h: Likewise.
80 2003-04-18 Ulrich Drepper <drepper@redhat.com>
82 * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
83 pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
86 2003-04-16 Jakub Jelinek <jakub@redhat.com>
88 * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
90 2003-04-15 Roland McGrath <roland@redhat.com>
92 * forward.c (__pthread_unwind): Tweak to avoid warning.
94 2003-04-15 Ulrich Drepper <drepper@redhat.com>
96 * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
98 2003-04-14 Ulrich Drepper <drepper@redhat.com>
100 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
101 overflow CFA advance instructions.
102 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
104 2003-04-14 Jakub Jelinek <jakub@redhat.com>
106 * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
107 * sysdeps/i386/pthread_spin_lock.c: Likewise.
108 * sysdeps/x86_64/tls.h: Likewise. Define LOCK_PREFIX if not already
111 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
112 DW_CFA_advance_loc2 for .Laddl-.Lsubl.
113 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
114 DW_CFA_advance_loc for .Laddl-.Lsubl.
116 2003-04-13 Ulrich Drepper <drepper@redhat.com>
118 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
119 position-independent unwind data for static libraries.
120 Add missing unwind info. Add comments.
122 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
123 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
124 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
125 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
127 2003-04-12 Ulrich Drepper <drepper@redhat.com>
129 * Makefile: Make sure all cancellation points are compiled with
130 exception and asynchronous unwind tables.
132 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
133 which mishandles loading of global object addresses in PIC.
134 (THREAD_SETMEM_NC): Likewise.
136 2003-04-11 Ulrich Drepper <drepper@redhat.com>
138 * pthread.h: Define new data structure for cleanup buffer. Declare
139 new cleanup handler interfaces.
140 * descr.h: Include <unwind.h> if necessary. Define pthread_unwind_buf.
141 (struct pthread): Add cleanup_jmp_buf pointer. Define
142 HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
143 * pthreadP.h: Declare __pthread_unwind. Define __do_cancel to use
144 it. Declare old cleanup handler installation functions.
145 * cleanup.c: Rewrite. Install handler for unwind-based cleanup
147 * cleanup_defer.c: Likewise.
148 * cleanup_compat.c: New file. Old cleanup code.
149 * cleanup_def_compat.c: New file. Old cleanup code.
150 * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
151 if own thread descriptor.
152 * unwind.c: New file.
153 * forward.c: Add __pthread_unwind.
154 * init.c (pthread_functions): Add __pthread_unwind.
155 * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
156 Add ptr___pthread_unwind.
157 * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
159 * Makefile (libpthread-routines): Add cleanup_compat,
160 cleanup_def_compat, and unwind. Define CFLAGS to enable unwind
161 table generation if necessary.
162 * version.c: Record whether unwind support is compiled in.
163 * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
164 * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
166 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
167 complication to generate unwind information for syscall wrappers.
168 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
169 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
170 __cleanup_fct_attribute.
172 * Makefile: Add rules to build and run tst-cleanup0.
173 * tst-cleanup0.c: New file.
174 * tst-cleanup0.expect: New file.
176 * pthread_create.c (deallocate_tsd): Don't take parameter. Adjust
177 caller. Optimize to avoid often unecessary local variable.
179 2003-04-11 Roland McGrath <roland@redhat.com>
181 * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
182 sets variable `multidir'; include that.
184 ($(objpfx)$(multidir)/crti.o): New target.
185 [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
187 2003-04-11 Ulrich Drepper <drepper@redhat.com>
189 * tst-attr2.c (do_test): Add cast to avoid warning.
190 * tst-mutex4.c (do_test): Likewise.
192 2003-04-10 Ulrich Drepper <drepper@redhat.com>
194 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
197 2003-04-09 Ulrich Drepper <drepper@redhat.com>
199 * Makefile (tests): Add tst-detach1.
200 * tst-detach1.c: New file.
202 2003-04-08 Ulrich Drepper <drepper@redhat.com>
204 * sysdeps/pthread/pthread.h: Remove duplicate
205 pthread_cleanup_{push,pop} definitions.
207 * tst-barrier2.c: Eliminate warnings.
208 * tst-cancel4.c: Likewise.
209 * tst-cond4.c: Likewise.
210 * tst-cond6.c: Likewise.
211 * tst-detach1.c: Likewise.
212 * tst-rwlock4.c: Likewise.
213 * tst-rwlock6.c: Likewise.
214 * tst-rwlock7.c: Likewise.
215 * tst-sem3.c: Likewise.
216 * tst-spin2.c: Likewise.
217 * tst-umask1.c: Likewise.
219 2003-04-07 Ulrich Drepper <drepper@redhat.com>
221 * pthread_detach.c (pthread_detach): Fix test for invalid TID.
223 2003-04-06 Ulrich Drepper <drepper@redhat.com>
225 * descr.h (struct pthread): Move cancelhandling member to the front.
227 2003-04-05 Ulrich Drepper <drepper@redhat.com>
229 * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
230 malloc_parent, and malloc_child statically.
231 (__register_atfork_malloc): New function.
232 (free_mem): Don't free any of the malloc_* variables on the list.
233 * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
234 Define HAVE_register_atfork_malloc.
236 2003-04-04 Ulrich Drepper <drepper@redhat.com>
238 * sysdeps/pthread/createthread.c (create_thread): Add some more
239 comments explaining when to set multiple_threads and when not.
241 * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
242 THREAD_ATOMIC_BIT_SET if not already defined.
243 * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
244 THREAD_ATOMIC_BIT_SET:
245 * sysdeps/x86_64/tls.h: Likewise.
246 * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
247 THREAD_ATOMIC_CMPXCHG_VAL.
248 (_pthread_cleanup_pop_restore): Likewise.
249 * cancellation.c (__pthread_enable_asynccancel): Likewise.
250 (__pthread_enable_asynccancel_2): Likewise.
251 (__pthread_disable_asynccancel): Likewise.
252 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
253 (__libc_disable_asynccancel): Likewise.
254 * init.c (sigcancel_handler): Likewise.
255 * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
256 * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
258 2003-04-03 Ulrich Drepper <drepper@redhat.com>
260 * init.c (sigcancel_handler): Don't set EXITING_BIT here.
261 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
262 * pthreadP.h (__do_cancel): Set EXITING_BIT here.
263 * Makefile (tests): Add tst-cancel11.
264 * tst-cancel11.c: New file.
266 2003-04-01 Ulrich Drepper <drepper@redhat.com>
268 * pthread_create.c (deallocate_tsd): Clear/free memory after the last
269 round, not the first. Use specific_used flag instead of local
270 found_nonzero variable. Use THREAD_[SG]ETMEM where possible.
271 (__free_tcb): Don't call deallocate_tsd here.
272 (start_thread): Call deallocate_tsd here.
273 * pthread_setspecific.c: Set specific_used flag really only when
275 * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
276 * tst-tsd3.c: New file.
277 * tst-tsd4.c: New file.
279 2003-03-31 Ulrich Drepper <drepper@redhat.com>
281 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
282 Use atomic_exchange_and_add instead of __lll_add.
283 (__lll_mutex_timedlock): Likewise.
284 Patch by Ian Wienand.
286 2003-03-24 Steven Munroe <sjmunroe@us.ibm.com>
288 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
289 (SINGLE_THREAD_P): Fix typo.
290 * tst-cancel-wrappers.sh: Handle '.'ed symbols.
292 2003-03-31 Ulrich Drepper <drepper@redhat.com>
294 * Makefile (tests): Add tst-align.
295 * tst-align.c: New file.
296 * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
298 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
301 * tst-tsd2.c: Add casts to avoid warnings.
303 2003-03-30 Ulrich Drepper <drepper@redhat.com>
305 * descr.h (struct pthread): Move most often used elements to the front.
307 2003-03-29 Ulrich Drepper <drepper@redhat.com>
309 * Makefile (libpthread-routines): Add pthread_atfork.
310 (libpthread-static-only-routines): Add pthread_atfork.
312 2003-03-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
314 * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
316 (INSTALL_DTV): Add parens.
317 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
318 Use passed descr instead of THREAD_SELF.
319 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
320 (__lll_mutex_timedlock_wait): Correct expected value after
322 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
323 Release lock before waking up the waiters.
324 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
325 criteria. Reorderstruct passed to cleanup handler. Fix
326 handling of cancellation and failung pthread_mutex_unlock call.
327 Use __pthread_enable_asynccancel_2 instead of
328 __pthread_enable_asynccancel.
329 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
330 Return result of lock re-get if it fails.
331 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
332 for __pthread_cleanup_push.
333 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
334 completely broken rwlock implementation.
335 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
336 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
337 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
338 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
339 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
340 * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value. Use
341 versioned_symbol macro.
342 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
343 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
345 2003-03-27 Ulrich Drepper <drepper@redhat.com>
347 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
348 __timer_helper_thread. Declare __start_helper_thread, __helper_once,
350 (struct timer): Remove th and bar field.
351 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
352 debugging code. Create only one helper thread.
353 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
355 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
356 Renamed. Define statically. Use thread info from siginfo.
357 (__helper_once): New variable.
358 (__helper_tid): New variable.
359 (__reset_helper_control): New function.
360 (__start_helper_thread): New function.
362 * pthread_create.c (start_thread): Don't use setjmp inside
363 __builtin_expect to work around gcc bug.
365 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
366 timer_delete syscall fails, but not with ENOSYS, set
369 * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
370 (timer_settime): Fix typo.
371 * sysdeps/unix/sysv/linux/timer_getoverr.c
372 [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
374 2003-03-27 Jakub Jelinek <jakub@redhat.com>
376 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
377 offset of cleanupbuf.__prev.
379 2003-03-26 Jakub Jelinek <jakub@redhat.com>
381 * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
384 2003-03-26 Ulrich Drepper <drepper@redhat.com>
386 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
387 NULL provide default definition to syscall.
389 2003-03-25 Roland McGrath <roland@redhat.com>
391 * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
392 (timer_id2ptr): Fix typo.
394 2003-03-25 Ulrich Drepper <drepper@redhat.com>
396 * pthreadP.h: Define SIGCANCEL and SIGTIMER.
397 * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
398 * sysdeps/ia64/pthreaddef.h: Likewise.
399 * sysdeps/powerpc/pthreaddef.h: Likewise.
400 * sysdeps/s390/pthreaddef.h: Likewise.
401 * sysdeps/sh/pthreaddef.h: Likewise.
402 * sysdeps/x86_64/pthreaddef.h: Likewise.
403 * init.c (__pthread_initialize_minimal): Block SIGTIMER.
404 * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
406 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
407 SIGTIMER is not unblocked.
408 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
410 * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
412 * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
413 pass pointer through as ID.
414 * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
415 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
416 * sysdeps/unix/sysv/linux/timer_create.c: New file.
417 * sysdeps/unix/sysv/linux/timer_delete.c: New file.
418 * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
419 * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
420 * sysdeps/unix/sysv/linux/timer_routines.c: New file.
421 * sysdeps/unix/sysv/linux/timer_settime.c: New file.
422 * sysdeps/unix/sysv/linux/ia64/Versions: New file.
423 * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
424 * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
425 * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
426 * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
427 * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
428 * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
429 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
430 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
431 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
432 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
433 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
434 * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
435 * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
436 * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
437 * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
438 * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
439 * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
440 * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
441 * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
442 * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
443 * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
444 * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
445 * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
446 * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
448 * pthreadP.h: Remove FRAME_LEFT definition.
449 * cleanup.c (_pthread_cleanup_push): Don't check for reference to
450 already left frame. Programs which have this problem are not POSIX
452 * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
454 2003-03-24 Ulrich Drepper <drepper@redhat.com>
456 * sysdeps/pthread/tst-timer.c: Check return values of the
459 2003-03-23 Roland McGrath <roland@redhat.com>
461 * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
462 * tst-tls3mod.c: Likewise.
463 * tst-tls1.c: Likewise.
464 * tst-tls2.c: Likewise.
466 * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
469 * tst-join5.c (tf1, tf2): Add a cast.
471 * Makeconfig (includes): Append -I$(..)nptl to this variable.
473 * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
475 * tst-cond4.c: Likewise.
476 * tst-cond6.c: Likewise.
477 * tst-flock2.c: Likewise.
478 * tst-mutex4.c: Likewise.
479 * tst-rwlock4.c: Likewise.
480 * tst-signal1.c: Likewise.
481 * tst-spin2.c: Likewise.
482 * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
484 * tst-mutex4.c: Use test-skeleton.c.
485 * tst-spin2.c: Likewise.
486 * tst-sysconf.c: Likewise.
487 * tst-barrier2.c: Likewise.
488 * tst-cond4.c: Likewise.
489 * tst-cond6.c: Likewise.
490 * tst-rwlock4.c: Likewise.
491 * tst-unload.c: Likewise.
492 * tst-flock2.c (do_test): Use return instead of exit.
494 2003-03-22 Jakub Jelinek <jakub@redhat.com>
496 * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
498 2003-03-21 Ulrich Drepper <drepper@redhat.com>
500 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
501 (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
502 instead of __lll_compare_and_swap.
503 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
505 Removed definition if __lll_compare_and_swap.
507 * cancellation.c: Adjust for new form of compare&exchange macros.
508 * cleanup_defer.c: Likewise.
510 * libc-cancellation.c: Likewise.
511 * old_pthread_cond_broadcast.c: Likewise.
512 * old_pthread_cond_signal.c: Likewise.
513 * old_pthread_cond_timedwait.c: Likewise.
514 * old_pthread_cond_wait.c: Likewise.
515 * pthread_cancel.c: Likewise.
516 * pthread_create.c: Likewise.
517 * pthread_detach.c: Likewise.
518 * pthread_join.c: Likewise.
519 * pthread_key_delete.c: Likewise.
520 * pthread_setcancelstate.c: Likewise.
521 * pthread_setcanceltype.c: Likewise.
522 * pthread_timedjoin.c: Likewise.
523 * pthread_tryjoin.c: Likewise.
524 * sysdeps/pthread/createthread.c: Likewise.
526 2003-03-20 Ulrich Drepper <drepper@redhat.com>
528 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
529 Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
530 definitions. Replace uses with calls to atomic_* functions.
531 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
532 * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
533 __lll_test_and_set calls with atomic_exchange_and_add and
534 atomic_exchange calls respectively.
535 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
536 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
537 * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
538 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
539 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
540 * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
541 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
543 * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
544 returns the old value.
546 2003-03-20 Martin Schwidefsky <sky@mschwid3.boeblingen.de.ibm.com>
548 * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
549 int for variable OLDVAL and correct inline assembler contraint.
550 * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
551 type int for variable OLD.
553 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
555 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
556 (SINGLE_THREAD_P): Use global variable __local_multiple_threads
557 instead of multiple_threads field in the TCB.
559 2003-03-19 Ulrich Drepper <drepper@redhat.com>
561 * sysdeps/i386/i686/bits/atomic.h: Removed.
562 * sysdeps/i386/i586/bits/atomic.h: Removed.
563 * sysdeps/i386/i486/bits/atomic.h: Removed. Moved to glibc.
564 * sysdeps/x86_64/bits/atomic.h: Removed. Moved to glibc.
565 * sysdeps/s390/bits/atomic.h: Removed. Moved to glibc.
566 * sysdeps/sh/bits/atomic.h: Removed. Moved to glibc.
567 * sysdeps/ia64/bits/atomic.h: Removed. Moved to glibc.
568 * sysdeps/powerpc/bits/atomic.h: Removed. Moved to glibc.
569 * atomic.h: Removed. Moved to glibc.
571 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
572 support for clock selection.
574 * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
577 2003-03-18 Roland McGrath <roland@redhat.com>
579 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
580 Add __lll_rel_instr first. Add memory clobber.
581 (lll_mutex_unlock): Use __lll_test_and_set.
582 From Paul Mackerras <paulus@samba.org>.
584 * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
586 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
587 (SINGLE_THREAD_P): Add `header.' prefix.
588 From Paul Mackerras <paulus@samba.org>.
590 * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
591 pthread_timedjoin_np to ...
592 (libpthread: GLIBC_2.3.3): ... here.
593 (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
595 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
596 Avoid shadowing VAL variable.
598 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
601 2003-03-18 Ulrich Drepper <drepper@redhat.com>
603 * Makefile (tests): Add tst-cond11.
604 * tst-cond11.c: New file.
606 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
607 struct passed to cleanup handler to eliminate one more
609 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
611 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
612 (pthrad_cond_t): Replace __unused field with __clock.
614 * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
615 waken all waiters in cleanup handler.
616 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
617 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
619 * pthread_condattr_getclock.c: New file.
620 * pthread_condattr_setclock.c: New file.
621 * sysdeps/pthread/pthread.h: Declare these new functions.
622 * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
623 * Makefile (libpthread-routines): Add the new functions.
624 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
625 Renamed field to value. Document use of the bits.
626 * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
628 * pthread_condattr_setpshared.c: Likewise.
629 * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
630 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
631 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
633 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
634 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
635 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
636 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
637 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
638 Implement clock selection.
639 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
640 * pthread-errnos.sym: Add ENOSYS.
641 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
642 _POSIX_CLOCK_SELECTION.
643 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
645 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
646 invalid .size directive.
648 2003-03-17 Roland McGrath <roland@redhat.com>
650 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
653 2003-03-17 Ulrich Drepper <drepper@redhat.com>
655 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
656 Use __lll_add instead of spelling it out. Use protected symbol names.
657 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
659 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
660 Renamed from lll_compare_and_swap. Use new name where necessary.
661 (__lll_add): Defined.
662 (__lll_dec_if_positive): Defined.
663 (__lll_test_and_set): Defined.
664 * sysdeps/ia64/pthread_spin_init.c: Removed.
665 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
666 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
667 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
668 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
669 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
670 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
671 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
672 * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
673 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
674 __sync_lock_release_si.
675 Patch by Jakub Jelinek.
677 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
678 Fix timeout handling.
679 (__lll_timedwait_tid): Likewise.
680 (lll_unlock_wake_cb): Wake up other waiters if necessary.
681 Patch by Jakub Jelinek.
683 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
685 2003-03-17 Roland McGrath <roland@redhat.com>
687 PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
688 * sysdeps/pthread/pthread_spin_init.c: New file.
689 * sysdeps/pthread/pthread_spin_unlock.c: New file.
690 * sysdeps/powerpc/Makefile: New file.
691 * sysdeps/powerpc/pthread_spin_lock.c: New file.
692 * sysdeps/powerpc/pthread_spin_trylock.c: New file.
693 * sysdeps/powerpc/pthreaddef.h: New file.
694 * sysdeps/powerpc/tcb-offsets.sym: New file.
695 * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
696 * sysdeps/powerpc/tls.h: New file.
697 * sysdeps/powerpc/bits/atomic.h: New file.
698 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
699 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
700 * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
702 * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
703 * sysdeps/unix/sysv/linux/sem_post.c: New file.
704 * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
705 * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
706 * sysdeps/unix/sysv/linux/sem_wait.c: New file.
707 * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
708 * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
709 * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
710 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
711 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
712 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
713 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
714 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
715 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
716 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
718 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
720 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
721 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
722 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
723 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
724 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
726 2003-03-17 Ulrich Drepper <drepper@redhat.com>
728 * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
729 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
730 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
731 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
732 Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
734 2003-03-16 Roland McGrath <roland@redhat.com>
736 * tst-fork4.c: Include <string.h>.
737 * tst-signal2.c: Likewise.
738 * tst-mutex5.c (do_test): exit -> return.
739 * tst-mutex2.c: Include <stdlib.h>.
741 2003-03-16 Ulrich Drepper <drepper@redhat.com>
743 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
744 (__lll_mutex_timedlock_wait): Correct expected value after
745 spurious wakeup. Otherwise we would never wait again.
747 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
748 zone versus inline asm stupidity. Use correct instructions.
750 * tst-rwlock6.c: Add some more status output.
752 2003-03-15 Roland McGrath <roland@redhat.com>
754 * sysdeps/pthread/configure.in: New file.
755 * sysdeps/pthread/configure: New file (generated).
757 2003-03-15 Ulrich Drepper <drepper@redhat.com>
759 * allocatestack.c (allocate_stack): Store the exact stack size of
760 user allocated stacks.
762 2003-03-15 Jakub Jelinek <jakub@redhat.com>
764 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
765 (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
766 * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
767 * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
768 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
769 Use `header.' prefix.
770 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
772 2003-03-15 Ulrich Drepper <drepper@redhat.com>
774 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
775 __builtin_frame_address, use stack pointer.
777 * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
778 instead of __builtin_frame_pointer.
780 2003-03-14 Ulrich Drepper <drepper@redhat.com>
782 * tst-basic1.c (do_test): Add cast to avoid warning.
783 * tst-basic2.c (do_test): Likewise.
785 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
786 amount of stack correction.
788 * tst-fork4.c: Use test-skeleton.c.
790 2003-03-14 Roland McGrath <roland@redhat.com>
792 * init.c: Fix typo "#eli" for "#else".
794 2003-03-14 Steven Munroe <sjmunroe@us.ibm.com>
796 * allocatestack.c (__stack_user): Use hidden_data_def.
797 * pthread_create.c (__pthread_keys): Likewise.
799 * init.c [__powerpc__] (__NR_set_tid_address): Define it.
801 2003-03-14 Roland McGrath <roland@redhat.com>
803 * tst-fork4.c: New file.
804 * Makefile (tests): Add it.
806 * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
807 we always define the padding space.
808 [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
809 stopped supporting its own extensions fully.
810 [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
811 struct also called `header', so `header.multiple_threads' is the field
812 name to use on all machines.
813 * allocatestack.c (allocate_stack): Use `header.' prefix.
814 * sysdeps/pthread/createthread.c (create_thread): Likewise.
815 * pthread_create.c (__pthread_create_2_1): Likewise.
816 * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
817 (THREAD_SELF): Likewise.
818 * sysdeps/x86_64/tls.h: Likewise.
819 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
820 (SINGLE_THREAD_P): Likewise.
821 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
822 (SINGLE_THREAD_P): Likewise.
823 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
824 (SINGLE_THREAD_P): Likewise.
826 * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
829 2003-03-14 Ulrich Drepper <drepper@redhat.com>
831 * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
832 * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
834 * pthread_create.c (start_thread): setjmp is expected to return 0.
836 * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
837 (THREAD_GETMEM_NC): Likewise.
839 2003-03-13 Ulrich Drepper <drepper@redhat.com>
841 * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
842 and the size of the stack which must be allocated is a multiple,
843 allocate one more page.
844 * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
847 2003-03-13 Roland McGrath <roland@redhat.com>
849 * pthread_create.c (start_thread): Set EXITING_BIT after the
850 event-reporting (and destructors), not before.
852 2003-03-13 Jakub Jelinek <jakub@redhat.com>
854 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
855 lll_futex_wake): Declare register variables as long int instead of
856 unsigned long int. Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
857 Make syscall arguments clobbered by the syscall.
858 (lll_futex_wait): Define using lll_futex_timed_wait.
860 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
863 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
866 * allocatestack.c (nptl_ncreated): Only declare if
867 COLORING_INCREMENT != 0.
869 * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
870 (__libc_enable_asynccancel_2): Remove prototype.
872 * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
873 ctid to match kernel.
875 2003-03-12 Ulrich Drepper <drepper@redhat.com>
877 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
878 libc_multiple_threads.
879 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
880 __libc_multiple_threads to...
881 * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here. New file.
883 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
885 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
886 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
888 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
889 (__pthread_once_internal): Define.
891 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
892 macros instead of .symver directly.
893 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
894 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
896 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
897 * sysdeps/x86_64/tcb-offsets.sym: New file.
898 * sysdeps/x86_64/Makefile: New file.
900 * sysdeps/i386/tcb-offsets.sym: Add SELF.
901 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
902 to access own pthread_t in TCB.
903 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
905 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
907 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
909 2003-03-12 Roland McGrath <roland@redhat.com>
911 * pthread-errnos.sym: New file.
912 * Makefile (gen-as-const-headers): New variable, list that file.
913 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
914 header <pthread-errnos.h> instead of defining errno values here.
915 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
916 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
917 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
918 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
919 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
921 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
923 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
924 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
925 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
926 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
927 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
928 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
929 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
930 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
931 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
932 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
933 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
934 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
935 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
936 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
937 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
938 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
939 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
940 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
941 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
942 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
943 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
944 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
945 * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
946 * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
947 * sysdeps/sh/pthread_spin_trylock.S: Likewise.
948 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
949 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
951 * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
952 CLONE_CHILD_SETTID worked.
954 2003-03-12 Ulrich Drepper <drepper@redhat.com>
956 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
958 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
961 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
962 (pthread_cond_t): Add padding.
964 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
965 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
966 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
968 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
969 (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
970 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
971 (__pthread_rwlock_timedrdlock): Likewise.
972 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
973 (__pthread_rwlock_wrlock): Likewise.
974 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
975 (__pthread_rwlock_rdlock): Likewise.
977 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
979 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
980 result of lock re-get if it fails.
982 2003-03-11 Ulrich Drepper <drepper@redhat.com>
984 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
985 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
986 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
987 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
988 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
989 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
990 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
991 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
992 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
993 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
995 * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
996 THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
998 * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
999 Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
1000 * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
1001 (create_thread): Likewise.
1002 Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
1003 * init.c (__pthread_initialize_minimal_internal): Initialize
1004 __libc_multiple_threads_ptr if necessary.
1005 * pthreadP.h: Adjust prototype for __libc_pthread_init. Declare
1006 __pthread_multiple_threads and __libc_multiple_threads_ptr.
1007 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
1008 __libc_multiple_threads.
1009 (__libc_pthread_init): Return pointer to __libc_pthread_init if
1012 * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
1013 (THREAD_SETMEM_NC): Likewise.
1015 * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
1016 * sysdeps/x86_64/pthread_spin_trylock.S: New file.
1017 * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
1018 * sysdeps/x86_64/pthread_spin_unlock.S: New file.
1020 * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
1021 Eliminate one entire instruction.
1023 * cancellation.c (__pthread_enable_asynccancel_2): New function.
1024 * pthreadP.h: Declare __pthread_enable_asynccancel_2.
1025 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
1026 (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
1027 instead of __pthread_enable_asynccancel.
1028 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
1029 (__pthread_cond_wait): Likewise.
1030 * sysdeps/pthread/pthread_cond_timedwait.c
1031 (__pthread_cond_timedwait): Likewise.
1032 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
1034 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
1035 (__condvar_cleanup): Wake up all waiters in case we got signaled
1036 after being woken up but before disabling asynchronous
1038 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
1039 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1040 (__condvar_cleanup): Likewise.
1042 * init.c (__NR_set_tid_address): If already defined, don't redefine.
1043 Make it an error if architecture has no #if case. Add x86-64.
1045 * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
1046 pt-initfini.s generation.
1048 * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
1049 (TLS_INIT_TP): Fix typo.
1051 2003-03-11 Jakub Jelinek <jakub@redhat.com>
1053 * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
1054 3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
1056 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
1057 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
1058 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
1059 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
1060 * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
1061 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
1062 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
1063 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
1065 2003-03-11 Ulrich Drepper <drepper@redhat.com>
1067 * sysdeps/pthread/pthread_cond_timedwait.c
1068 (__pthread_cond_timedwait): Return the result of the final
1069 locking. If it succeeds, the regular function return value.
1071 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
1072 Return result of the final locking.
1073 * version.c (__nptl_main): Work around problems with the strange
1074 INTERNAL_SYSCALL macro on ppc32.
1075 * init.c (__pthread_initialize_minimal_internal): Unblock
1076 SIGCANCEL in case the parent blocked it.
1077 Reported by Paul Mackerras <paulus@samba.org>.
1079 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
1080 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
1081 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
1083 2003-03-11 Jakub Jelinek <jakub@redhat.com>
1085 * sysdeps/pthread/pthread_cond_timedwait.c
1086 (__pthread_cond_timedwait): Unlock and fail if
1087 __pthread_mutex_unlock_internal failed.
1089 * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
1090 (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
1092 * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
1093 [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
1094 STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
1095 ALLOCATE_STACK): New macros.
1096 (TLS_TPADJ): New macro.
1097 (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
1098 (allocate_stack): Handle TLS_DTV_AT_TP and
1099 NEED_SEPARATE_REGISTER_STACK. Use TLS_TPADJ.
1100 * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
1102 * init.c [__ia64__] (__NR_set_tid_address): Define.
1104 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
1105 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
1106 * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
1107 * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
1108 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
1109 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
1110 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
1111 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
1112 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
1113 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
1114 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
1115 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
1116 * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
1117 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
1118 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
1119 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
1120 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
1121 * sysdeps/ia64/bits/atomic.h: New file.
1122 * sysdeps/ia64/Makefile: New file.
1123 * sysdeps/ia64/pthread_spin_init.c: New file.
1124 * sysdeps/ia64/pthread_spin_lock.c: New file.
1125 * sysdeps/ia64/pthread_spin_trylock.c: New file.
1126 * sysdeps/ia64/pthread_spin_unlock.c: New file.
1127 * sysdeps/ia64/pthreaddef.h: New file.
1128 * sysdeps/ia64/tcb-offsets.sym: New file.
1129 * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
1130 * sysdeps/ia64/tls.h: New file.
1132 * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
1133 to syscall instead of no arguments.
1135 2003-03-10 Ulrich Drepper <drepper@redhat.com>
1137 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
1138 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
1139 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
1140 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
1142 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
1145 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
1147 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
1148 lowlevelbarrier.sym.
1149 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
1150 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
1151 Include lowlevelbarrier.h and don't define offsets locally.
1152 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
1154 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1155 (__lll_mutex_lock_wait): Reverse order of first two parameters.
1156 (__lll_mutex_timedlock_wait): Likewise.
1157 (lll_mutex_lock): Adjust asm for that.
1158 (lll_mutex_timedlock): Likewise. Mark cx, cc, r10 as clobbered.
1159 (lll_lock): Adjust asm for operand order change.
1160 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
1161 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
1163 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
1164 Reverse order of parameters.
1165 (__lll_timedwait_tid): Remove regparms attribute.
1166 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
1167 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
1169 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1170 (__lll_timedwait_tid): Remove one unnecessary instruction.
1172 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
1173 __lll_mutex_timedlock_wait only for NOT_IN_libc.
1174 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
1177 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
1178 lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
1180 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
1183 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
1184 LOCK is already defined. Don't define __lll_mutex_timedlock_wait
1186 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
1187 define LOCK here (if UP is not defined). The actual code is in
1190 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
1191 LOCK is already defined. Don't define lll_unlock_wake_cb and
1192 __lll_timedwait_tid for libc.so.
1193 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
1194 define LOCK here (if UP is not defined). The actual code is in
1197 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
1198 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
1199 * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
1200 instead of lowlevelsem.h.
1201 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
1202 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
1203 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
1205 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
1207 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
1208 * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
1209 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
1211 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
1213 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
1216 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
1218 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
1219 of __libc_locking_needed.
1220 (lll_trylock): Initialize %eax to zero.
1222 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
1223 pthread_cond_t definition.
1225 2003-03-10 Roland McGrath <roland@redhat.com>
1227 * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
1228 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
1229 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
1230 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
1231 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
1233 * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
1234 Instead of setting PD->multiple_threads, set globals
1235 __pthread_multiple_threads and __libc_multiple_threads.
1236 * sysdeps/pthread/createthread.c (create_thread): Likewise.
1237 * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
1238 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
1240 * descr.h (struct pthread): Conditionalize first member on
1241 [!TLS_DTV_AT_TP]. Replace the `header' member with an anonymous union
1242 containing an anonymous tcbhead_t. Move `list' member out.
1243 [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
1244 * allocatestack.c: Remove use of `header.data.' prefix.
1245 * pthread_create.c: Likewise.
1246 * init.c (__pthread_initialize_minimal_internal): Likewise.
1247 * sysdeps/pthread/createthread.c (create_thread): Likewise.
1248 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
1249 (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
1250 * sysdeps/x86_64/tls.h: Likewise.
1251 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
1252 (SINGLE_THREAD_P): Likewise.
1253 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
1254 (SINGLE_THREAD_P): Likewise.
1255 * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
1256 * sysdeps/s390/tls.h (tcbhead_t): Likewise.
1258 2003-03-09 Ulrich Drepper <drepper@redhat.com>
1260 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
1262 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
1263 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
1265 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
1266 leftovers from the ia32 code.
1268 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
1270 (clear_once_control): Don't load %esi.
1272 * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
1275 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
1277 * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
1278 * sysdeps/unix/sysv/linux/createthread.c: ...here.
1280 * Makefile (tests): Add tst-cond10.
1281 * tst-cond10.c: New file.
1283 2003-03-08 Ulrich Drepper <drepper@redhat.com>
1285 * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
1286 * tst-signal3.c (do_test): Likewise.
1287 * tst-sem5.c (do_test): Likewise.
1288 * tst-kill6.c (do_test): Likewise.
1289 * tst-tls3.c (do_test): Likewise. Include <errno.h>.
1291 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
1293 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
1294 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
1295 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1296 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1297 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1298 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1299 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1301 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1303 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1304 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1305 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1306 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
1307 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
1308 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
1309 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
1310 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1312 * allocatestack.c (allocate_stack): If mprotect() fails free the
1315 2003-03-07 Ulrich Drepper <drepper@redhat.com>
1317 * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
1319 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
1320 lll_wake_tid. This was used only to work around kernel limits in
1322 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1323 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
1324 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
1325 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
1327 * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
1328 (__pthread_initialize_minimal_internal): Change initialization of
1329 __static_tls_align_m1 appropriately.
1330 * pthreadP.h (__static_tls_align_m1): Renamed from
1332 * allocatestack.c (allocate_stack): Use __static_tls_align_m1
1333 instead of __static_tls_align-1.
1335 2003-03-04 Ulrich Drepper <drepper@redhat.com>
1337 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
1339 * pthread_create.c: Define __pthread_keys using nocommon
1340 attribute, not by placing it explicitly in bss.
1341 Remove DEFINE_DEALLOC definition. Not needed anymore.
1343 * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
1344 Use it in mmap call to allocate stacks.
1346 * sysdeps/pthread/createthread.c (create_thread): Fix comment.
1348 * pthread_create.c (start_thread): Use THREAD_SETMEM to store
1349 result of the thread function.
1351 2003-03-03 Ulrich Drepper <drepper@redhat.com>
1353 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed. The generic
1354 version is just fine.
1356 * sysdeps/unix/sysv/linux/libc_pthread_init.c
1357 (__pthread_child_handler): Renamed from pthread_child_handler,
1358 exported, and marked hidden. Change all users.
1359 * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
1360 free __pthread_child_handler from child list.
1362 2003-03-03 Martin Schwidefsky <schwidefsky@de.ibm.com>
1364 * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
1366 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
1367 Fix handling of cancellation and failing pthread_mutex_unlock call.
1368 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
1369 (__pthread_cond_wait): Likewise.
1371 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
1372 (pthread_rwlock_timedrdlock): Fix clobber of result variable by
1373 lll_futex_timed_wait call.
1374 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
1375 (pthread_rwlock_timedwrlock): Likewise.
1377 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
1378 Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
1379 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
1381 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
1382 check of lll_futex_wake return value.
1384 2003-03-03 Roland McGrath <roland@redhat.com>
1386 * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
1388 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1389 Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
1390 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
1392 2003-03-02 Ulrich Drepper <drepper@redhat.com>
1394 * sysdeps/pthread/timer_create.c (timer_create): Return correct
1395 error for CPU clocks.
1397 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1398 _POSIX_MONOTONIC_CLOCK.
1399 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1401 * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
1404 2003-03-01 Ulrich Drepper <drepper@redhat.com>
1406 * descr.h (struct pthread): Move cleanup field to the front.
1408 2003-03-01 Roland McGrath <roland@redhat.com>
1410 * sem_open.c (sem_open): Braino fix.
1412 2003-03-01 Ulrich Drepper <drepper@redhat.com>
1414 * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
1415 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
1416 __pthread_cleanup_pop functionality.
1417 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1419 * descr.h (struct pthread): Move tid field to the front now that
1422 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
1423 (__lll_mutex_timedlock_wait): Remove.
1424 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
1425 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
1426 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
1427 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1428 (lll_unlock_wake_cb): Don't save and restore %esi.
1429 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
1431 (__lll_timedwait_tid): Add alignment.
1432 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
1433 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
1435 (__lll_timedwait_tid): Removed.
1436 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
1437 (__pthread_cond_broadcast): Don't save, load, and restore %esi.
1438 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
1439 (pthread_barrier_wait): Don't save, load, and restore %esi for
1441 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
1442 (__pthread_cond_signal): Don't save, load, and restore %esi.
1443 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
1444 (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
1445 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
1446 Don't save, load, and restore %esi.
1448 2003-02-27 Ulrich Drepper <drepper@redhat.com>
1450 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
1451 Release lock before waking up the waiters.
1453 * tst-exit1.c (do_test): Don't start more than one thread in parallel.
1455 * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
1456 (reader_thread): Likewise.
1458 * sysdeps/pthread/pthread_rwlock_unlock.c
1459 (__pthread_rwlock_unlock): Release internal lock early. Don't try
1460 to wake up readers if there are none.
1462 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
1463 Release internal lock before wake threads.
1465 2003-02-26 Ulrich Drepper <drepper@redhat.com>
1467 * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
1468 * tst-rwlock8.c: Initialize lock with INIT. Allow INIT to be
1470 * tst-rwlock9.c: Likewise.
1471 * tst-rwlock10.c: New file.
1472 * tst-rwlock11.c: New file.
1474 * Makefile (tests): Add tst-dlsym1.
1475 * tst-dlsym1.c: New file.
1477 * init.c (__pthread_initialize_minimal_internal): Set
1478 GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
1479 * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
1481 2003-02-24 Ulrich Drepper <drepper@redhat.com>
1483 * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
1485 * tst-cond2.c: Fix sychronization with child.
1487 * tst-rwlock8.c (reader_thread): Remove unused variable.
1489 * Makefile: Add rules to build and run tst-tls3.
1490 * tst-tls3.c: New file.
1491 * tst-tls3mod.c: New file.
1493 * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
1494 * tst-rwlock8.c: New file.
1495 * tst-rwlock9.c: New file.
1496 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
1497 complete broken rwlock implementation.
1498 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1500 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1502 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1503 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1504 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
1505 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
1506 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
1507 * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
1508 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
1510 2003-02-23 Roland McGrath <roland@redhat.com>
1512 * Makefile (nptl-version): Change regexp so case sensitivity is ok.
1514 2003-02-23 Ulrich Drepper <drepper@redhat.com>
1516 * Makefile (tests): Add tst-context1.
1517 * tst-context1.c: New file.
1519 * Makefile (tests): Add tst-tls1 and tst-tls2.
1520 * tst-tls1.c: New file.
1521 * tst-tls2.c: New file.
1523 * libc-cancellation.c (__libc_enable_asynccancel): Correct test
1526 * pthread_create.c (start_thread): Set EXITING_BIT early.
1528 * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
1529 (THREAD_GETMEM_NC): Likewise.
1531 2003-02-22 Ulrich Drepper <drepper@redhat.com>
1533 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
1534 off 3 more bytes by using offset-less instructions when possible.
1536 * Makefile: Add dependency for $(objpfx)version.d.
1538 * eintr.c (eintr_source): Add unnecessary return but the compiler
1541 * tst-kill3.c: Include <unistd.h>.
1543 2003-02-21 Roland McGrath <roland@redhat.com>
1545 * pthread_create.c (start_thread): Call __libc_thread_freeres.
1547 2003-02-21 Ulrich Drepper <drepper@redhat.com>
1549 * Makefile (tests): Add tst-eintr1.
1550 (distribute): Add eintr.c.
1551 * tst-eintr1.c: New file.
1552 * eintr.c: New file.
1554 * pthread_cancel.c (pthread_cancel): Use tkill directly.
1556 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
1557 Disallow sending SIGCANCEL.
1559 * Makefile (tests): Remove tst-basic7. Add tst-kill1, tst-kill2,
1560 tst-kill3, tst-kill4, tst-kill5, tst-kill6.
1561 * tst-kill1.c: New file.
1562 * tst-kill2.c: New file.
1563 * tst-kill3.c: New file.
1564 * tst-kill5.c: New file.
1565 * tst-kill6.c: New file.
1566 * tst-basic7.c: Renamed to...
1567 * tst-kill4.c: ...this.
1569 2003-02-21 Roland McGrath <roland@redhat.com>
1571 * Makefile (install-lib-ldscripts): New variable.
1573 2003-02-21 Ulrich Drepper <drepper@redhat.com>
1575 * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
1576 * pthread_cancel.c: Use INVALID_TD_P.
1577 * pthread_detach.c: Likewise.
1578 * pthread_getschedparam.c: Likewise.
1579 * pthread_setschedparam.c: Likewise.
1580 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
1581 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
1582 * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
1583 * pthread_timedjoin.c: Likewise.
1585 * tst-basic7.c: Include <signal.h>.
1587 * pthread_join.c (pthread_join): Limited checking for invalid
1589 * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
1591 2003-02-20 Ulrich Drepper <drepper@redhat.com>
1593 * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
1594 beginning of the loop. Clear the entire first block of TSD.
1595 * Makefile (tests): Add tst-key4.
1596 * tst-key4.c: New file.
1598 2003-02-18 Ulrich Drepper <drepper@redhat.com>
1600 * Makefile (tests): Add tst-basic7.
1601 * tst-basic7.c: New file.
1603 * pthread_create.c (deallocate_tsd): Mark as internal_function.
1604 Add some more __builtin_expect.
1606 * pthreadP.h: Define dummy version of DEBUGGING_P.
1608 2003-02-17 Ulrich Drepper <drepper@redhat.com>
1610 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
1611 _POSIX_THREAD_PRIORITY_SCHEDULING.
1612 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
1613 _XOPEN_REALTIME_THREADS.
1614 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
1616 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
1617 kernel returns EINVAL for PID <= 0, work around it.
1619 * Makefile (tests): Add tst-signal5.
1620 * tst-signal5.c: New file.
1622 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
1625 * tst-cancel1.c (tf): Block all signals.
1627 * Makefile (tests): Add tst-basic6.
1628 * tst-basic6.c: New file.
1630 * tst-basic1.c: Add test for process ID.
1632 * Makefile (tests): Add tst-cancel10.
1633 * tst-cancel10.c: New file.
1635 * Makefile (tests): Add tst-signal4.
1636 * tst-signal4.c: New file.
1638 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
1639 __sigismember instead of sigismember. Add __builtin_expect.
1641 2003-02-16 Ulrich Drepper <drepper@redhat.com>
1643 * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
1644 pthread_setcancelstate, and pthread_rwlock_setpshared.
1646 * tst-cancel7.c (do_test): Make sure the pid file exists before
1647 canceling the thread.
1649 * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
1650 pthread_rwlock_timedrdlock tests.
1651 * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
1652 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1653 Check for invalid tv_nsec field.
1654 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1657 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
1658 recursive mutex of overflow.
1660 * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
1662 * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
1663 going into an endless loop.
1664 * Makefile (tests): Add tst-cancel9.
1665 * tst-cancel9.c: New file.
1667 * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
1669 2003-02-15 Ulrich Drepper <drepper@redhat.com>
1671 * tst-mutex5.c (do_test): Add more timedlock tests.
1673 * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
1674 * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
1676 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
1677 use INLINE_SYSCALL. Error number is returned, not -1.
1679 * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
1680 and __deallocate_stack with internal_function.
1681 * pthread_create.c: Adjust definitions appropriately.
1682 * allocatestack.c: Likewise.
1684 * pthread_join.c: Add one more __builtin_expect.
1685 * pthread_timedjoin.c: Likewise.
1687 * pthread_getspecific.c (__pthread_getspecific): Clear data->data
1688 not data of sequence number does not match.
1689 Add one __builtin_expect.
1691 * Makefile (tests): Add tst-clock1.
1692 * tst-clock1.c: New file.
1694 * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
1696 * Makefile (tests): Add tst-basic5.
1697 * tst-basic5.c: New file.
1699 2003-02-14 Ulrich Drepper <drepper@redhat.com>
1701 * Makefile (tests): Add tst-basic4.
1702 * tst-basic4.c: New file.
1704 * pthreadP.h: Add declaraction for __nptl_nthreads.
1705 * pthread_create.c: Define __nptl_nthreads
1706 (start_thread): Increment __nptl_nthreads at beginning. Decrement
1707 after thread is done. If then zero, call exit(0).
1708 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1709 Add ptr_nthreads. Define HAVE_PTR_NTHREADS.
1710 * init.c (pthread_functions): Initialize ptr_nthreads.
1711 * allocatestack.c (nptl_nthreads): Remove definition and all uses.
1712 (__reclaim_stacks): Decrement __nptl_nthreads.
1713 * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
1715 * Makefile (tests): Add tst-basic3.
1716 * tst-basic3.c: New file.
1718 * descr.h: Define CANCELING_BIT and CANCELING_BITMASK. Introduce
1719 after CANCELTYPE_BIT, move the other bits up. Update CANCEL_RESTMASK.
1720 * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
1721 * pthread_cancel.c (pthread_cancel): Likewise. Also set CANCELING_BIT
1722 if asynchronous canceling is enabled.
1723 * pthread_join.c (pthread_join): When recognizing circular joins,
1724 take into account the other thread might be already canceled.
1725 * Makefile (tests): Add tst-join5.
1726 * tst-join5.c: New file.
1728 * Makefile (tests): Add tst-join4.
1729 * tst-join4.c: New file.
1731 2003-02-13 Ulrich Drepper <drepper@redhat.com>
1733 * tst-cond4.c (main): Add test of pthread_attr_getpshared.
1735 2003-02-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
1737 * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
1738 THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
1739 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
1741 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
1743 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
1744 error if lll_futex_wake failed.
1746 2003-02-13 Ulrich Drepper <drepper@redhat.com>
1748 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
1749 handling of cancellation and failung pthread_mutex_unlock call.
1750 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1751 * Makefile (tests): Add tst-cond8 and tst-cond9.
1752 * tst-cond8.c: New file.
1753 * tst-cond9.c: New file.
1755 * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
1757 * sysdeps/pthread/pthread.h: Add missing initializers. Protect
1758 non-standard initializers with __USE_GNU.
1760 * Makefile (tests): Add tst-cleanup3.
1761 * tst-cleanup3.c: New file.
1763 2003-02-12 Ulrich Drepper <drepper@redhat.com>
1765 * Makefile (tests): Add tst-attr1 and tst-attr2.
1766 * tst-attr1.c: New file.
1767 * tst-attr2.c: New file.
1769 * Makefile: Add rules to build and run tst-atfork2 test.
1770 * tst-atfork2.c: New file.
1771 * tst-atfork2mod.c: New file.
1773 * sysdeps/unix/sysv/linux/unregister-atfork.c
1774 (__unregister_atfork): Free the memory allocated for the handlers
1775 after removing them from the lists.
1777 * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
1780 * tst-atfork1.c (do_test): Wait for the child we forked.
1781 Report error in child.
1783 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
1785 * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
1787 2003-02-10 Ulrich Drepper <drepper@redhat.com>
1789 * Makefile (tests): Add tst-cancel8.
1790 * tst-cancel8.c: New file.
1792 * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
1793 clearing of control variable.
1794 * Makefile (tests): Add tst-once3 and tst-once4.
1795 * tst-once3.c: New file.
1796 * tst-once4.c: New file.
1798 2003-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
1800 * sysdeps/sh/Makefile: New file.
1801 * sysdeps/sh/bits/atomic.h: New file.
1802 * sysdeps/sh/pthread_spin_init.c: New file.
1803 * sysdeps/sh/pthread_spin_lock.c: New file.
1804 * sysdeps/sh/pthread_spin_trylock.S: New file.
1805 * sysdeps/sh/pthread_spin_unlock.S: New file.
1806 * sysdeps/sh/pthreaddef.h: New file.
1807 * sysdeps/sh/tcb-offsets.sym: New file.
1808 * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
1809 * sysdeps/sh/tls.h: New file.
1810 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
1811 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
1812 * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
1813 * sysdeps/unix/sysv/linux/sh/fork.c: New file.
1814 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
1815 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
1816 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
1817 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
1818 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
1819 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
1820 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
1821 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
1822 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
1823 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
1824 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
1825 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
1826 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
1827 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
1828 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
1829 * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
1830 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
1831 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
1832 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
1833 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
1834 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
1835 * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
1836 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
1837 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
1838 * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
1839 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
1841 2003-02-08 Ulrich Drepper <drepper@redhat.com>
1843 * tst-cond2.c: Rearrange code to not rely on behavior undefined
1846 * tst-basic2.c (do_test): Lock mutex before creating the thread.
1848 2003-02-07 Ulrich Drepper <drepper@redhat.com>
1850 * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
1851 (TLS_GET_FS): New #define.
1852 (TLS_SET_FS): New #define.
1853 Correct value of __NR_set_thread_area.
1855 * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
1857 2003-02-06 Ulrich Drepper <drepper@redhat.com>
1859 * Makefile (tests): Add tst-popen1.
1860 * tst-popen1.c: New file.
1862 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
1863 but inactive generalization.
1864 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1865 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
1866 Minor optimization, remove one instruction.
1867 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
1869 2003-02-04 Martin Schwidefsky <schwidefsky@de.ibm.com>
1871 * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
1873 2003-01-31 Martin Schwidefsky <schwidefsky@de.ibm.com>
1875 * init.c (__NR_set_tid_address): Add #ifdef for s390.
1876 * sysdeps/pthread/pthread_barrier_wait.c: New file.
1877 * sysdeps/pthread/pthread_cond_broadcast.c: New file.
1878 * sysdeps/pthread/pthread_cond_signal.c: New file.
1879 * sysdeps/pthread/pthread_cond_timedwait.c: New file.
1880 * sysdeps/pthread/pthread_cond_wait.c: New file.
1881 * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
1882 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
1883 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
1884 * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
1885 * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
1886 * sysdeps/s390/Makefile: New file.
1887 * sysdeps/s390/bits/atomic.h: New file.
1888 * sysdeps/s390/pthread_spin_init.c: New file.
1889 * sysdeps/s390/pthread_spin_lock.c: New file.
1890 * sysdeps/s390/pthread_spin_trylock.c: New file.
1891 * sysdeps/s390/pthread_spin_unlock.c: New file.
1892 * sysdeps/s390/pthreaddef.h: New file.
1893 * sysdeps/s390/tcb-offsets.sym: New file.
1894 * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
1895 * sysdeps/s390/tls.h: New file.
1896 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
1897 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
1898 * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
1899 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
1900 * sysdeps/unix/sysv/linux/s390/fork.c: New file.
1901 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
1902 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
1903 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
1904 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
1905 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
1906 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
1907 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
1908 * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
1909 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
1910 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
1911 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
1912 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
1913 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
1914 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
1915 * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
1916 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
1917 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
1918 * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
1920 2003-02-04 Ulrich Drepper <drepper@redhat.com>
1922 * atomic.h: Add a couple more default implementations.
1923 (atomic_compare_and_exchange_acq): Use
1924 __arch_compare_and_exchange_32_acq in return value definition. It
1926 (atomic_bit_set): Renamed from atomic_set_bit.
1927 Add missing atomic_ prefixes.
1929 * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
1930 thread library is available, use correct value to mark initialized
1933 2003-02-03 Ulrich Drepper <drepper@redhat.com>
1935 * allocatestack.c (allocate_stack): Use __getpagesize instead of
1936 __sysconf to determine pagesize.
1938 * pthread_create.c: Include <atomic.h>.
1939 * allocatestack.c (allocate_stack): Implement coloring of the
1940 allocated stack memory. Rename pagesize to pagesize_m1. It's the
1941 size minus one. Adjust users.
1942 * sysdeps/i386/i686/Makefile: New file.
1944 2003-02-02 Ulrich Drepper <drepper@redhat.com>
1946 * allocatestack.c: Improve comment throughout the file.
1948 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1949 (__lll_lock_wait): Add branch prediction.
1950 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
1951 (__lll_lock_wait): Likewise.
1952 (lll_unlock_wake_cb): Removed.
1954 2003-01-31 Ulrich Drepper <drepper@redhat.com>
1956 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
1957 _POSIX_THREAD_PRIORITY_SCHEDULING.
1959 2003-01-30 Jakub Jelinek <jakub@redhat.com>
1961 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1962 Fix return type of ptr___pthread_getspecific.
1964 2003-01-29 Ulrich Drepper <drepper@redhat.com>
1966 * Makefile (tests): Add tst-umask1.
1967 (tst-umask1-ARGS): Define.
1968 * tst-umask1.c: New file.
1970 2003-01-28 Ulrich Drepper <drepper@redhat.com>
1972 * Makefile (libpthread-routines): Remove lowlevelrwlock. Add
1973 pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
1974 pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
1975 pthread_rwlock_unlock.
1976 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
1977 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
1978 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
1979 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
1980 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1982 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
1983 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1985 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
1986 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
1987 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
1989 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
1990 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
1992 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
1993 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
1994 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
1996 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
1997 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
1999 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
2001 * Makefile (libpthread-routines): Remove lowlevelcond and
2002 lowlevelsem. Add sem_wait, sem_trywait, sem_timedwait, sem_post,
2003 pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
2004 and pthread_cond_broadcast.
2005 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
2006 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
2007 * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
2008 * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
2009 * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
2010 * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
2011 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
2012 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
2013 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
2014 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
2015 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
2016 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
2017 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
2018 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
2019 * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
2020 * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
2021 * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
2022 * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
2023 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
2024 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
2025 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
2026 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
2027 * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
2028 * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
2029 * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
2030 * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
2031 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
2032 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
2033 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
2034 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
2035 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
2037 * sysdeps/unix/sysv/linux/i386/createthread.c: Define
2038 PREPARE_CREATE and TLS_VALUE with x86-specific bits. All the rest
2039 of the code is moved to ...
2040 * sysdeps/pthread/createthread.c: ...here. New file.
2042 2003-01-27 Ulrich Drepper <drepper@redhat.com>
2044 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
2045 (__new_sem_post): Clear %eax before returning.
2046 Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
2048 * Makefile (tests): Add tst-cleanup2.
2049 * tst-cleanup2.c: New file.
2051 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
2052 Interpret first parameter correctly.
2054 2003-01-17 Ulrich Drepper <drepper@redhat.com>
2056 * Makefile (headers): Add bits/semaphore.h.
2058 2003-01-16 Jakub Jelinek <jakub@redhat.com>
2060 * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
2063 2003-01-14 Ulrich Drepper <drepper@redhat.com>
2065 * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
2066 must be used and mapping failed.
2067 Reported by Luke Elliott <luke.elliott@activfinancial.com>.
2069 * Makefile (CFLAGS-pthread_self.os): Define this, not
2070 CFLAGS-pthread_self.c.
2072 2003-01-13 Ulrich Drepper <drepper@redhat.com>
2074 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
2077 * Makefile (libpthread-routines): Add version. Add rules to build
2078 version.os and banner.h.
2079 * version.c: New file.
2081 2003-01-13 Jakub Jelinek <jakub@redhat.com>
2083 * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
2084 the alias unconditional.
2085 * pthread_mutex_unlock.c (__pthread_mutex_unlock_internal): Likewise.
2087 2003-01-13 Ulrich Drepper <drepper@redhat.com>
2089 * Makefile (CFLAGS-pthread_self.c): New definition.
2091 2003-01-06 Jakub Jelinek <jakub@redhat.com>
2093 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
2094 INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
2095 * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
2096 * init.c (__pthread_initialize_minimal_internal): Likewise.
2098 2003-01-07 Jakub Jelinek <jakub@redhat.com>
2100 * pthreadP.h (__pthread_cond_timedwait): Add prototype.
2102 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
2103 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
2104 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
2105 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
2106 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
2107 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
2109 2003-01-06 Jakub Jelinek <jakub@redhat.com>
2111 * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
2112 * pt-system.c (LIBC_CANCEL_HANDLED): Add.
2113 * tst-cancel-wrappers.sh: Remove all exceptions.
2115 2003-01-05 Ulrich Drepper <drepper@redhat.com>
2117 * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
2118 features. Reported by Marijn Ros <marijn@mad.scientist.com>.
2120 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
2121 Use __libc_pthread_functions array if SHARED.
2123 * pthreadP.h: Move pthread_cond_2_0_t definition to...
2124 * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
2126 * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
2127 (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
2128 __libc_key_create, __libc_getspecific, __libc_setspecific): Use
2129 __libc_ptf_call instead of __libc_maybe_call.
2131 (__libc_cleanup_region_start): Wrap function name with PTF call.
2132 (__libc_cleanup_region_end): Likewise.
2133 (__libc_cleanup_end): Likewise.
2135 * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
2136 * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
2137 * pthread_key_create.c: Add __pthread_key_create_internal alias.
2138 * pthreadP.h: Add prototypes.
2140 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
2141 __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
2142 __pthread_rwlock_unlock aliases.
2143 * pthreadP.h: Add prototypes for new aliases.
2145 * pthreadP.h (struct pthead_functions): Moved to...
2146 * sysdeps/pthread/pthread-functions.h: ...here. New file.
2147 * init.c (pthread_functions): Add initializers for new elements.
2149 * cleanup_defer.c: Add __pthread_cleanup_push_defer and
2150 __pthread_cleanup_pop_restore aliases.
2151 * pthreadP.h: Add prototypes.
2153 * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
2154 and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
2155 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
2156 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
2157 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
2158 * pthreadP.h: Adjust prototypes and callers.
2160 2003-01-04 Ulrich Drepper <drepper@redhat.com>
2162 * Makefile (tests): Add tst-cancel7.
2163 (tst-cancel7-ARGS): New variable.
2164 * tst-cancel7.c: New file.
2166 * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
2167 around gcc defficiencies.
2168 * old_pthread_cond_signal.c: Likewise.
2169 * old_pthread_cond_timedwait.c: Likewise.
2170 * old_pthread_cond_wait.c: Likewise.
2172 * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
2174 2003-01-03 Ulrich Drepper <drepper@redhat.com>
2176 * Makefile (tests): Add tst-cond7.
2177 * tst-cond7.c: New file.
2179 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
2180 (condvar_cleanup): Get condvar address from the right place.
2182 * atomic.h: Correct definitions of atomic_full_barrier,
2183 atomic_read_barrier, atomic_write_barrier.
2185 * old_pthread_cond_broadcast.c: Make memory allocate and initialization
2187 * old_pthread_cond_signal.c: Likewise.
2188 * old_pthread_cond_timedwait.c: Likewise.
2189 * old_pthread_cond_wait.c: Likewise.
2191 2003-01-03 Jakub Jelinek <jakub@redhat.com>
2193 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
2195 2003-01-03 Ulrich Drepper <drepper@redhat.com>
2197 * pthreadP.h (pthread_cond_2_0_t): New type.
2198 (struct pthread_functions): Use new type for 2.0 condvar callbacks.
2199 Use new type for the 2.0 condvar function prototypes.
2200 * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
2201 * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
2203 * old_pthread_cond_destroy.c: Likewise.
2204 * old_pthread_cond_broadcast.c: Likewise. Lock appropriately.
2205 * old_pthread_cond_signal.c: Likewise.
2206 * old_pthread_cond_timedwait.c: Likewise.
2207 * old_pthread_cond_wait.c: Likewise.
2209 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
2210 (__pthread_cond_wait): Don't save cancellation mode and seq value
2213 * herrno.c (__h_errno_location): Don't define as weak.
2215 2003-01-02 Jakub Jelinek <jakub@redhat.com>
2217 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
2218 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
2219 and pthread_cond_wait.
2220 * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
2222 (__pthread_cond_broadcast_2_0): ... this.
2223 * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
2225 (__pthread_cond_destroy_2_0): ... this.
2226 * old_pthread_cond_init.c (__old_pthread_cond_init):
2228 (__pthread_cond_init_2_0): ... this.
2229 * old_pthread_cond_signal.c (__old_pthread_cond_signal):
2231 (__pthread_cond_signal_2_0): ... this.
2232 * old_pthread_cond_wait.c (__old_pthread_cond_wait):
2234 (__pthread_cond_wait_2_0): ... this.
2235 * pthread_cond_destroy.c: Include shlib-compat.h.
2236 (pthread_cond_destroy): Change strong_alias into versioned_symbol.
2237 * pthread_cond_init.c: Include shlib-compat.h.
2238 (pthread_cond_init): Change strong_alias into versioned_symbol.
2239 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
2240 fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
2242 (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
2243 __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
2244 __pthread_cond_wait_2_0): New prototypes.
2245 (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
2246 __old_pthread_cond_init, __old_pthread_cond_signal,
2247 __old_pthread_cond_wait): Removed.
2248 * init.c: Include shlib-compat.h.
2249 (pthread_functions): Guard ptr___pthread_attr_init_2_0
2250 initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
2251 Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
2252 ptr___pthread_cond_*_2_0 fields.
2253 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
2254 pthread_cond_*@GLIBC_2.0 compatibility symbols.
2256 * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
2257 LIBC_SIGACTION was not yet defined.
2258 [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
2259 [!defined LIBC_SIGACTION] (__sigaction): New function and
2261 [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
2262 [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
2264 2003-01-02 Jakub Jelinek <jakub@redhat.com>
2266 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
2268 2003-01-02 Ulrich Drepper <drepper@redhat.com>
2270 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
2271 New, larger type definition.
2272 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
2274 * Versions [libpthread]: Add definitions for new pthread_cond_*
2275 interfaces for version GLIBC_2.3.2.
2276 * pthread_cond_init.c: Update initialization for new type definition.
2277 * Makefile (libpthread-routines): Remove pthread_cond_wait,
2278 pthread_cond_timedwait, pthread_cond_signal, and
2279 pthread_cond_broadcast. Add old_pthread_cond_init,
2280 old_pthread_cond_destroy, old_pthread_cond_wait,
2281 old_pthread_cond_timedwait, old_pthread_cond_signal, and
2282 old_pthread_cond_broadcast.
2283 * old_pthread_cond_broadcast.c: New file.
2284 * old_pthread_cond_destroy.c: New file.
2285 * old_pthread_cond_init.c: New file.
2286 * old_pthread_cond_signal.c: New file.
2287 * old_pthread_cond_timedwait.c: New file.
2288 * old_pthread_cond_wait.c: New file.
2289 * pthreadP.h: Add prototypes for the compatibility interfaces.
2291 * pthread_cond_destroy.c: Don't include <errno.h>.
2293 2003-01-01 Ulrich Drepper <drepper@redhat.com>
2295 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
2296 unnecessary zero offset when addressing MUTEX.
2298 2002-12-31 Ulrich Drepper <drepper@redhat.com>
2300 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
2302 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
2303 for __register_atfork.
2305 2002-12-31 Jakub Jelinek <jakub@redhat.com>
2307 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
2308 instead of ASSEMBLER test macro.
2310 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
2311 __libc_current_sigrtmax): Add libc_hidden_def.
2313 * sysdeps/pthread/list.h: Remove assert.h include.
2315 2002-12-31 Ulrich Drepper <drepper@redhat.com>
2317 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
2318 __pthread_initialize_minimal_internal not
2319 __pthread_initialize_minimal.
2321 2002-12-30 Ulrich Drepper <drepper@redhat.com>
2323 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
2324 __pthread_initialize_minimal as hidden.
2326 * init.c (__pthread_initialize_minimal_internal): Don't mark as
2329 2002-12-31 Jakub Jelinek <jakub@redhat.com>
2331 * Makefile ($(inst_libdir)/libpthread.so): Depend on
2332 $(common-objpfx)format.lds, include that into the output script.
2334 (extra-B-pthread.so): Change linuxthreads/ into nptl/.
2336 2002-12-28 Andreas Jaeger <aj@suse.de>
2338 * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
2339 nsec resolution changes.
2340 (xstat64_conv): Likewise.
2341 (xstat32_conv): Likewise.
2342 * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
2344 * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
2345 structs stat and stat64.
2346 * time/time.h (__timespec_defined): Define for __USE_MISC.
2347 * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
2349 2002-12-30 Jakub Jelinek <jakub@redhat.com>
2351 * forward.c (FORWARD2): Renamed from FORWARD3. Remove unused export
2353 (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
2354 (pthread_exit): Use strong_alias to avoid warnings.
2355 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
2356 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
2357 ptr___pthread_attr_init_2_*.
2358 * init.c (pthread_functions): Adjust.
2360 2002-12-29 Ulrich Drepper <drepper@redhat.com>
2362 * forward.c: Make all functions available by default again. It
2363 caused too much trouble.
2365 * pt-siglongjmp.c: Removed.
2367 2002-12-28 Jakub Jelinek <jakub@redhat.com>
2369 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
2370 (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
2371 * sysdeps/i386/Makefile: New file.
2372 * sysdeps/i386/tcb-offsets.sym: New file.
2373 * sysdeps/pthread/tcb-offsets.h: New file.
2374 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
2375 Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
2377 * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
2378 __register_atfork...
2379 (GLIBC_2.3.2): ...here.
2381 2002-12-28 Ulrich Drepper <drepper@redhat.com>
2383 * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
2384 pthread_attr_setstackaddr with __attribute_deprecated__.
2386 2002-12-27 Jakub Jelinek <jakub@redhat.com>
2388 * pt-system.c (system): Remove cancellation handling.
2389 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
2390 cancellation routines.
2392 2002-12-28 Ulrich Drepper <drepper@redhat.com>
2394 * descr.h: Include <dl-sysdep.h>.
2395 (struct pthread): Move header.data.list to the back of the struct.
2396 * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
2397 (MULTIPLE_THREADS_OFFSET): Adjust offset.
2398 (SYSINFO_OFFSEET): Likewise.
2400 2002-12-27 Jakub Jelinek <jakub@redhat.com>
2402 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
2404 (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
2405 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
2406 DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
2407 (USE_DL_SYSINFO): Undef.
2409 2002-12-22 Jakub Jelinek <jakub@redhat.com>
2411 * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
2412 $(common-objpfx)libc.so.
2413 * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
2414 it is bigger than pipe buffer size even on arches with bigger
2416 (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
2418 2002-12-25 Ulrich Drepper <drepper@redhat.com>
2420 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
2421 correct errno access for case that USE___THREAD is not defined.
2423 2002-12-24 Ulrich Drepper <drepper@redhat.com>
2425 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
2426 Patch by Marijn Ros <marijn@mad.scientist.com>.
2428 2002-12-22 Roland McGrath <roland@redhat.com>
2430 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
2432 2002-12-20 Ulrich Drepper <drepper@redhat.com>
2434 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
2436 2002-12-19 Ulrich Drepper <drepper@redhat.com>
2438 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
2439 NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
2440 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
2442 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
2444 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
2445 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
2446 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
2447 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2448 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
2449 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
2450 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
2451 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
2453 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
2455 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
2457 * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
2459 * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
2461 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
2462 that sysinfo is properly initialized.
2463 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
2464 to 1 only for ld.so.
2466 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
2467 RTLD_CORRECT_DYNAMIC_WEAK.
2469 2002-12-19 Jakub Jelinek <jakub@redhat.com>
2471 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
2472 Use return 0 as 6th argument to FORWARD4.
2473 * pthread_equal.c: Include pthreadP.h instead of pthread.h.
2475 2002-12-18 Ulrich Drepper <drepper@redhat.com>
2477 * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
2478 * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
2479 Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
2480 (INIT_SYSINFO): New #define.
2481 (TLS_TP_INIT): Use INIT_SYSINFO.
2482 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
2483 At test to make sure SYSINFO_OFFSET value is correct.
2484 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
2486 2002-12-18 Jakub Jelinek <jakub@redhat.com>
2488 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
2489 * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
2490 * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
2491 [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
2492 __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
2493 __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
2494 __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
2496 2002-12-18 Ulrich Drepper <drepper@redhat.com>
2498 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
2499 macro instead of using int $0x80 directly.
2501 * sysdeps/pthread/bits/stdio-lock.h: New file.
2502 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
2503 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
2504 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
2505 * Makefile (routines): Add libc-lowlevelmutex.
2507 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
2508 __i686.get_pc_thunk.dx.
2510 2002-12-17 Jakub Jelinek <jakub@redhat.com>
2512 * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
2513 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
2514 ($(objpfx)tst-cancel-wrappers.out): New rule.
2515 * tst-cancel-wrappers.sh: New test.
2516 * tst-locale1.c: Include signal.h.
2517 (uselocale): Test static linking of __libc_current_sigrt*.
2519 2002-12-17 Ulrich Drepper <drepper@redhat.com>
2521 * Makefile (tests): Add tst-cancel6.
2522 * tst-cancel6.c: New file
2524 2002-12-17 Jakub Jelinek <jakub@redhat.com>
2526 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
2527 Define meaningfully for assembler as well.
2528 * pthreadP.h (struct pthread_functions): Remove
2529 ptr_pthread_attr_init field. Add ptr_pthread_attr_init_2_0
2530 and ptr_pthread_attr_init_2_1 fields.
2531 * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
2532 and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
2533 * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
2534 (FORWARD3): Define using FORWARD4.
2535 (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
2537 * pt-system.c: Remove duplicate stdlib.h include.
2539 2002-12-16 Ulrich Drepper <drepper@redhat.com>
2541 * sem_init.c: Define sem_init@GLIBC_2.0.
2542 * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
2543 * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
2545 * flockfile.c: Moved to...
2546 * sysdeps/pthread/flockfile.c: ...here. New file.
2547 * funlockfile.c: Moved to...
2548 * sysdeps/pthread/funlockfile.c: ...here. New file.
2549 * ftrylockfile.c: Moved to...
2550 * sysdeps/pthread/ftrylockfile.c: ...here. New file.
2552 2002-12-16 Jakub Jelinek <jakub@redhat.com>
2554 * libc-cancellation.c: Guard both function with
2555 #if !defined NOT_IN_libc.
2556 * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
2557 automatically provided pthread wrappers.
2558 * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
2559 CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
2561 * pt-open.c: Removed.
2562 * pt-fcntl.c: Removed.
2563 * pt-fsync.c: Removed.
2564 * pt-lseek.c: Removed.
2565 * pt-msgrcv.c: Removed.
2566 * pt-msgsnd.c: Removed.
2567 * pt-msync.c: Removed.
2568 * pt-nanosleep.c: Removed.
2569 * pt-open64.c: Removed.
2570 * pt-pause.c: Removed.
2571 * pt-pread.c: Removed.
2572 * pt-pread64.c: Removed.
2573 * pt-pwrite.c: Removed.
2574 * pt-pwrite64.c: Removed.
2575 * pt-read.c: Removed.
2576 * pt-recv.c: Removed.
2577 * pt-recvfrom.c: Removed.
2578 * pt-recvmsg.c: Removed.
2579 * pt-send.c: Removed.
2580 * pt-sendto.c: Removed.
2581 * pt-sigtimedwait.c: Removed.
2582 * pt-sigwait.c: Removed.
2583 * pt-wait.c: Removed.
2584 * pt-waitpid.c: Removed.
2585 * pt-write.c: Removed.
2586 * pt-accept.c: Removed.
2587 * pt-close.c: Removed.
2588 * pt-connect.c: Removed.
2589 * pt-lseek64.c: Removed.
2590 * pt-sendmsg.c: Removed.
2591 * pt-tcdrain.c: Removed.
2593 2002-12-15 Ulrich Drepper <drepper@redhat.com>
2595 * init.c (__pthread_initialize_minimal_internal): Renamed from
2596 __pthread_initialize_minimal. Make old name an alias. This
2597 converts a normal relocation into a relative relocation.
2599 * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
2601 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
2602 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
2603 * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
2604 pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
2605 pt-sigwaitinfo, pt-waitid, and pt-writev.
2606 * pt-creat.c: Removed.
2607 * pt-poll.c: Removed.
2608 * pt-pselect.c: Removed.
2609 * pt-readv.c: Removed.
2610 * pt-select.c: Removed.
2611 * pt-sigpause.c: Removed.
2612 * pt-sigsuspend.c: Removed.
2613 * pt-sigwaitinfo.c: Removed.
2614 * pt-waitid.c: Removed.
2615 * pt-writev.c: Removed.
2617 * init.c (pthread_functions): New variable.
2618 (__pthread_initialize_minimal): Pass pointer to pthread_functions
2619 (or NULL) to __libc_pthread_init.
2620 * forward.c: Rewrite to use __libc:pthread_functions array to get
2622 * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
2624 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
2625 Take new parameter. Copy content of variable pointed to by it
2626 to __libc_pthread_init.
2628 * pthreadP.h (struct pthread_functions): New type.
2629 (__libc_pthread_init): Declare.
2631 * pthread_attr_destroy.c: Add namespace protected alias.
2632 * pthread_attr_getdetachstate.c: Likewise.
2633 * pthread_attr_getinheritsched.c: Likewise.
2634 * pthread_attr_getschedparam.c: Likewise.
2635 * pthread_attr_getschedpolicy.c: Likewise.
2636 * pthread_attr_getscope.c: Likewise.
2637 * pthread_attr_setdetachstate.c: Likewise.
2638 * pthread_attr_setinheritsched.c: Likewise.
2639 * pthread_attr_setschedparam.c: Likewise.
2640 * pthread_attr_setschedpolicy.c: Likewise.
2641 * pthread_attr_setscope.c: Likewise.
2642 * pthread_cond_broadcast.c: Likewise.
2643 * pthread_cond_destroy.c: Likewise.
2644 * pthread_cond_init.c: Likewise.
2645 * pthread_cond_signal.c: Likewise.
2646 * pthread_cond_wait.c: Likewise.
2647 * pthread_condattr_destroy.c: Likewise.
2648 * pthread_condattr_init.c: Likewise.
2649 * pthread_equal.c: Likewise.
2650 * pthread_exit.c: Likewise.
2651 * pthread_getschedparam.c: Likewise.
2652 * pthread_self.c: Likewise.
2653 * pthread_setcancelstate.c: Likewise.
2654 * pthread_setschedparam.c: Likewise.
2655 * pthread_mutex_destroy.c: Likewise.
2656 * pthread_mutex_init.c: Likewise.
2657 * pthreadP.h: Add prototypes for the aliases.
2659 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
2660 multiple_threads member in correct TCB to 1.
2662 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
2663 SINGLE_THREAD_P. If in libc or libpthread examine multiple_thread
2664 member of thread decriptor, otherwise return unconditionally 1.
2666 2002-12-14 Ulrich Drepper <drepper@redhat.com>
2668 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
2669 regular Linux version. Remove file.
2670 * sysdeps/unix/sysv/linux/connect.S: Likewise. Remove file.
2671 * sysdeps/unix/sysv/linux/llseek.c: Likewise. Remove file.
2672 * sysdeps/unix/sysv/linux/msgrcv.c: Likewise. Remove file.
2673 * sysdeps/unix/sysv/linux/msgsnd.c: Likewise. Remove file.
2674 * sysdeps/unix/sysv/linux/open64.c: Likewise. Remove file.
2675 * sysdeps/unix/sysv/linux/poll.c: Likewise. Remove file.
2676 * sysdeps/unix/sysv/linux/pread.c: Likewise. Remove file.
2677 * sysdeps/unix/sysv/linux/pread64.c: Likewise. Remove file.
2678 * sysdeps/unix/sysv/linux/pselect.c: Likewise. Remove file.
2679 * sysdeps/unix/sysv/linux/pwrite.c: Likewise. Remove file.
2680 * sysdeps/unix/sysv/linux/pwrite64.c: Likewise. Remove file.
2681 * sysdeps/unix/sysv/linux/readv.c: Likewise. Remove file.
2682 * sysdeps/unix/sysv/linux/recv.S: Likewise. Remove file.
2683 * sysdeps/unix/sysv/linux/recvfrom.S: Likewise. Remove file.
2684 * sysdeps/unix/sysv/linux/recvmsg.S: Likewise. Remove file.
2685 * sysdeps/unix/sysv/linux/send.S: Likewise. Remove file.
2686 * sysdeps/unix/sysv/linux/sendmsg.S: Likewise. Remove file.
2687 * sysdeps/unix/sysv/linux/sendto.S: Likewise. Remove file.
2688 * sysdeps/unix/sysv/linux/sigpause.c: Likewise. Remove file.
2689 * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise. Remove file.
2690 * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise. Remove file.
2691 * sysdeps/unix/sysv/linux/sigwait.c: Likewise. Remove file.
2692 * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise. Remove file.
2693 * sysdeps/unix/sysv/linux/system.c: Likewise. Remove file.
2694 * sysdeps/unix/sysv/linux/tcdrain.c: Likewise. Remove file.
2695 * sysdeps/unix/sysv/linux/wait.c: Likewise. Remove file.
2696 * sysdeps/unix/sysv/linux/waitid.c: Likewise. Remove file.
2697 * sysdeps/unix/sysv/linux/waitpid.c: Likewise. Remove file.
2698 * sysdeps/unix/sysv/linux/writev.c: Likewise. Remove file.
2699 * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise. Remove file.
2701 2002-12-14 Jakub Jelinek <jakub@redhat.com>
2703 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
2704 * sysdeps/unix/sysv/linux/open.c: Removed.
2705 * sysdeps/unix/sysv/linux/fsync.c: Removed.
2706 * sysdeps/unix/sysv/linux/lseek.c: Removed.
2707 * sysdeps/unix/sysv/linux/msync.c: Removed.
2708 * sysdeps/unix/sysv/linux/read.c: Removed.
2709 * sysdeps/unix/sysv/linux/close.c: Removed.
2710 * sysdeps/unix/sysv/linux/creat.c: Removed.
2711 * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
2712 * sysdeps/unix/sysv/linux/pause.c: Removed.
2713 * sysdeps/unix/sysv/linux/select.c: Removed.
2714 * sysdeps/unix/sysv/linux/write.c: Removed.
2716 2002-12-14 Ulrich Drepper <drepper@redhat.com>
2718 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
2719 element in TCB to see whether locking is needed.
2721 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
2722 MULTIPLE_THREADS_OFFSET value is correct.
2724 * sysdeps/unix/sysv/linux/close.c: New file.
2725 * sysdeps/unix/sysv/linux/connect.S: New file.
2726 * sysdeps/unix/sysv/linux/creat.c: New file.
2727 * sysdeps/unix/sysv/linux/fsync.c: New file.
2728 * sysdeps/unix/sysv/linux/llseek.c: New file.
2729 * sysdeps/unix/sysv/linux/lseek.c: New file.
2730 * sysdeps/unix/sysv/linux/msgrcv.c: New file.
2731 * sysdeps/unix/sysv/linux/msgsnd.c: New file.
2732 * sysdeps/unix/sysv/linux/msync.c: New file.
2733 * sysdeps/unix/sysv/linux/nanosleep.c: New file.
2734 * sysdeps/unix/sysv/linux/open.c: New file.
2735 * sysdeps/unix/sysv/linux/open64.c: New file.
2736 * sysdeps/unix/sysv/linux/pause.c: New file.
2737 * sysdeps/unix/sysv/linux/poll.c: New file.
2738 * sysdeps/unix/sysv/linux/pread.c: New file.
2739 * sysdeps/unix/sysv/linux/pread64.c: New file.
2740 * sysdeps/unix/sysv/linux/pselect.c: New file.
2741 * sysdeps/unix/sysv/linux/pwrite.c: New file.
2742 * sysdeps/unix/sysv/linux/pwrite64.c: New file.
2743 * sysdeps/unix/sysv/linux/readv.c: New file.
2744 * sysdeps/unix/sysv/linux/recv.S: New file.
2745 * sysdeps/unix/sysv/linux/recvfrom.S: New file.
2746 * sysdeps/unix/sysv/linux/recvmsg.S: New file.
2747 * sysdeps/unix/sysv/linux/select.c: New file.
2748 * sysdeps/unix/sysv/linux/send.S: New file.
2749 * sysdeps/unix/sysv/linux/sendmsg.S: New file.
2750 * sysdeps/unix/sysv/linux/sendto.S: New file.
2751 * sysdeps/unix/sysv/linux/sigpause.c: New file.
2752 * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
2753 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
2754 * sysdeps/unix/sysv/linux/sigwait.c: New file.
2755 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
2756 * sysdeps/unix/sysv/linux/system.c: New file.
2757 * sysdeps/unix/sysv/linux/tcdrain.c: New file.
2758 * sysdeps/unix/sysv/linux/wait.c: New file.
2759 * sysdeps/unix/sysv/linux/waitid.c: New file.
2760 * sysdeps/unix/sysv/linux/waitpid.c: New file.
2761 * sysdeps/unix/sysv/linux/writev.c: New file.
2762 * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
2764 * pt-readv.c: Fix comment.
2766 2002-12-14 Jakub Jelinek <jakub@redhat.com>
2768 * tst-cleanup1.c: Include stdlib.h.
2770 * tst-cancel5.c: New test.
2771 * Makefile (tests): Add tst-cancel5.
2772 (tst-cancel5): Link against libc.so libpthread.so in that order.
2774 2002-12-13 Ulrich Drepper <drepper@redhat.com>
2776 * forward.c (test_loaded): Prevent recursive calls.
2778 * Makefile (routines): Add libc-cancellation.
2779 * libc-cancellation.c: New file.
2780 * descr.h (struct pthread): Add multiple_threads field.
2781 * allocatestack.c (allocate_stack): Initialize multiple_header field of
2782 new thread descriptor to 1.
2783 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
2784 Initialize multiple_thread field after successful thread creation.
2785 * cancellation.c (__do_cancel): Move to pthreadP.h.
2786 (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
2787 (__pthread_disable_asynccancel): Add internal_function attribute.
2788 * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
2789 * pthread_setcancelstate.c: Likewise.
2790 * pthread_setcanceltype.c: Likewise.
2791 * pthread_exit.c: Likewise.
2792 * pthreadP.h (CANCELLATION_P): Likewise.
2793 (__do_cancel): Define as static inline.
2794 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
2795 (__libc_enable_asynccancel, __libc_disable_asynccancel): New
2797 * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
2798 fields. Define MULTIPLE_THREADS_OFFSET.
2799 * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
2801 * sysdeps/unix/sysv/linux/accept.S: New file.
2802 * sysdeps/unix/sysv/linux/read.c: New file.
2803 * sysdeps/unix/sysv/linux/write.c: New file.
2804 * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
2805 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
2806 initialization of __libc_locking_needed.
2807 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
2808 __libc_locking_needed, use multiple_threads field in TCB.
2809 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
2811 2002-12-12 Ulrich Drepper <drepper@redhat.com>
2813 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
2815 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
2817 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
2818 access to __libc_locking_needed for PIC.
2820 2002-12-12 Jakub Jelinek <jakub@redhat.com>
2822 * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
2823 declare for libc.so.
2824 (__libc_lock_init, __libc_lock_init_recursive): Change into comma
2826 (__libc_lock_lock): Put into statement expression.
2827 (__libc_lock_unlock): Remove trailing semicolon.
2828 * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
2830 2002-12-12 Roland McGrath <roland@redhat.com>
2832 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
2833 "m" constraint to refer to __libc_locking_needed. Declare it here.
2835 2002-12-12 Ulrich Drepper <drepper@redhat.com>
2837 * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
2838 * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
2839 Initialize __libc_locking_needed.
2840 * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
2841 instead of __register_pthread_fork_handler.
2842 * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
2843 * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
2844 fork-gen with libc_pthread_init.
2845 * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
2846 of __register_pthread_fork_handler.
2847 * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
2848 of __register_pthread_fork_handler.
2849 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
2850 __libc_locking_needed to determine whether lock prefix can be avoided.
2851 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
2853 2002-12-11 Ulrich Drepper <drepper@redhat.com>
2855 * Makefile (tests): Add tst-cleanup1.
2856 * tst-cleanup1.c: New file.
2857 * cancellation.c (__cleanup_thread): Removed.
2858 (__do_cancel): Remove call to __cleanup_thread.
2859 * pthreadP.h: Remove __cleanup_thread prorotype.
2861 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
2862 Remember function and argument even if cancellation handler
2863 function is not available.
2864 (__libc_cleanup_region_end): Execute registered function directly if
2865 pthread functions are not available.
2866 (__libc_cleanup_end): Likewise.
2868 * init.c (__pthread_initialize_minimal): Fix initialization in
2869 static lib by preventing gcc from being too clever.
2871 2002-12-10 Ulrich Drepper <drepper@redhat.com>
2873 * init.c (__pthread_initialize_minimal): Remove unneccesary
2876 * Makefile (tests): We can run tst-locale2 now.
2878 2002-12-09 Ulrich Drepper <drepper@redhat.com>
2880 * Versions: Remove duplicated sigwait entry.
2882 2002-12-08 Ulrich Drepper <drepper@redhat.com>
2884 * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
2887 * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
2889 * pthreadP.h: Declare __pthread_enable_asynccancel and
2890 __pthread_disable_asynccancel.
2891 (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
2892 (CANCEL_RESET): Use __pthread_disable_asynccancel.
2893 * cancellation.c (__pthread_enable_asynccancel): New function.
2894 (__pthread_disable_asynccancel): New function.
2895 * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
2896 * pt-close.c: Likewise.
2897 * pt-connect.c: Likewise.
2898 * pt-creat.c: Likewise.
2899 * pt-fcntl.c: Likewise.
2900 * pt-fsync.c: Likewise.
2901 * pt-lseek.c: Likewise.
2902 * pt-lseek64.c: Likewise.
2903 * pt-msgrcv.c: Likewise.
2904 * pt-msgsnd.c: Likewise.
2905 * pt-msync.c: Likewise.
2906 * pt-nanosleep.c: Likewise.
2907 * pt-open.c: Likewise.
2908 * pt-open64.c: Likewise.
2909 * pt-pause.c: Likewise.
2910 * pt-poll.c: Likewise.
2911 * pt-pread.c: Likewise.
2912 * pt-pread64.c: Likewise.
2913 * pt-pselect.c: Likewise.
2914 * pt-pwrite.c: Likewise.
2915 * pt-pwrite64.c: Likewise.
2916 * pt-read.c: Likewise.
2917 * pt-readv.c: Likewise.
2918 * pt-recv.c: Likewise.
2919 * pt-recvfrom.c: Likewise.
2920 * pt-recvmsg.c: Likewise.
2921 * pt-select.c: Likewise.
2922 * pt-send.c: Likewise.
2923 * pt-sendmsg.c: Likewise.
2924 * pt-sendto.c: Likewise.
2925 * pt-sigpause.c: Likewise.
2926 * pt-sigsuspend.c: Likewise.
2927 * pt-sigtimedwait.c: Likewise.
2928 * pt-sigwait.c: Likewise.
2929 * pt-sigwaitinfo.c: Likewise.
2930 * pt-system.c: Likewise.
2931 * pt-tcdrain.c: Likewise.
2932 * pt-wait.c: Likewise.
2933 * pt-waitid.c: Likewise.
2934 * pt-waitpid.c: Likewise.
2935 * pt-write.c: Likewise.
2936 * pt-writev.c: Likewise.
2937 * pthread_join.c: Likewise.
2938 * pthread_timedjoin.c: Likewise.
2940 * pt-sigpause.c (sigsuspend): Call __sigsuspend.
2941 (__xpg_sigpause): New function.
2942 * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
2944 2002-12-07 Ulrich Drepper <drepper@redhat.com>
2946 * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
2948 * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
2949 _GI_pthread_cleanup_pop to pthreadP.h.
2951 * ftrylockfile.c: Use _IO_lock_trylock instead of
2952 pthread_mutex_trylock.
2954 * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
2955 (CANCEL_RESET): Likewise.
2956 (__pthread_setcanceltype_): Declare.
2957 (__pthread_mutex_lock_internal): Declare.
2958 (__pthread_mutex_unlock_internal): Declare.
2959 (__pthread_once_internal): Declare.
2960 (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
2961 (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
2963 * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
2964 and pthread_mutex_unlock.
2965 * pthread_cond_wait.c: Likewise.
2966 * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
2967 * pthread_mutex_unlock.c: Likewise.
2969 * pthread_setcanceltype.c: Add additional alias
2970 __pthread_setcanceltype.
2972 * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
2973 * sem_open.c (sem_open): Likewise.
2974 Use __libc_open, __libc_write, and __libc_close instead of
2975 open, write, and close respectively.
2977 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
2978 Rewrite as statement expression since it must return a value.
2980 * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
2981 * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
2984 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
2985 alias __pthread_once_internal.
2987 * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
2989 2002-12-06 Ulrich Drepper <drepper@redhat.com>
2991 * Makefile (tests): Add tst-stdio1 and tst-stdio2.
2992 * tst-stdio1.c: New file.
2993 * tst-stdio2.c: New file.
2995 * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
2997 * Makefile (tests): Comment out tst-locale2 for now.
2998 (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
3000 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
3002 * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
3003 Use _IO_lock_init instead of explicit assignment.
3005 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
3006 Define __libc_lock_* and __libc_lock_recursive macros with
3007 lowlevellock macros, not pthread mutexes.
3009 * flockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_lock instead
3010 of pthread_mutex_lock.
3011 * funlockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_unlock
3012 instead of pthread_mutex_unlock.
3014 2002-12-06 Roland McGrath <roland@redhat.com>
3016 * allocatestack.c (__stack_user): Use uninitialized defn.
3017 * init.c (__pthread_initialize_minimal): Initialize it here.
3019 2002-12-05 Roland McGrath <roland@redhat.com>
3021 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
3023 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
3025 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
3028 2002-12-05 Ulrich Drepper <drepper@redhat.com>
3030 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
3032 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
3033 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
3034 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
3035 * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
3036 for __libc_lock_* macros.
3037 * Makefile (routines): Add libc-lowlevellock.
3039 2002-10-09 Roland McGrath <roland@redhat.com>
3041 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
3042 Under [__PIC__], call the function via the pointer fetched for
3043 comparison rather than a call by name that uses the PLT.
3044 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
3045 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
3046 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
3047 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
3048 (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
3050 2002-12-04 Roland McGrath <roland@redhat.com>
3052 * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
3054 * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
3055 * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
3057 * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
3059 2002-12-04 Ulrich Drepper <drepper@redhat.com>
3061 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
3062 a completely opaque, non-integer type.
3063 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3065 2002-12-05 Jakub Jelinek <jakub@redhat.com>
3067 * sysdeps/i386/tls.h: Include stdlib.h.
3068 * sysdeps/x86_64/tls.h: Likewise.
3070 2002-12-04 Ulrich Drepper <drepper@redhat.com>
3072 * Makefile (tests): Add tst-locale2.
3073 (tests-static): Likewise.
3074 * tst-locale2.c: New file.
3076 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
3077 volatile and add memory clobbers to lock operations.
3079 2002-12-03 Ulrich Drepper <drepper@redhat.com>
3081 * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
3082 * sysdeps/i386/i486/bits/atomic.h: New file.
3083 * sysdeps/i386/i586/bits/atomic.h: New file.
3084 * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
3085 include i486 version.
3086 * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
3087 * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
3088 Patch by Marijn Ros <marijn@mad.scientist.com>.
3090 * allocatestack.c (get_cached_stack): Don't crash if we first
3091 found a stack with a larger size then needed.
3092 Reported by Hui Huang <hui.huang@sun.com>.
3094 * Makefile (tests): Add tst-sysconf.
3095 * tst-sysconf.c: New file.
3097 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
3098 PTHREAD_THREADS_MAX.
3100 2002-12-02 Roland McGrath <roland@redhat.com>
3102 * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
3103 Declare using hidden_proto instead of attribute_hidden, so there are
3104 non-.hidden static symbols for gdb to find.
3105 (__pthread_keys): Likewise.
3106 * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
3107 * allocatestack.c (__stack_user): Likewise.
3108 * pthread_create.c (__pthread_keys): Likewise.
3109 (__nptl_threads_events, __nptl_last_event): Make these static instead
3111 * pthread_key_create.c (__pthread_pthread_keys_max,
3112 __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
3114 2002-12-02 Ulrich Drepper <drepper@redhat.com>
3116 * Makefile (tests): Add tst-locale1. If buid-static is yes link
3118 * tst-locale1.c: New file.
3120 * pthread_cond_timedwait.c: Include <stdlib.h>.
3122 * Makefile (tests): Add tst-fork2 and tst-fork3.
3123 * tst-fork2.c: New file.
3124 * tst-fork3.c: New file.
3126 2002-11-28 Ulrich Drepper <drepper@redhat.com>
3128 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
3130 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
3131 require it to 200112L.
3133 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
3134 instruction only if HAVE_CMOV is defined.
3135 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
3137 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
3139 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
3141 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
3143 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
3145 2002-11-27 Ulrich Drepper <drepper@redhat.com>
3147 * sysdeps/x86_64/bits/atomic.h: New file.
3149 * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
3152 * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
3153 possible since gettid cannot fail.
3155 * sysdeps/x86_64/pthreaddef.h: New file.
3157 * sysdeps/i386/pthreaddef.h (gettid): Removed.
3159 * sysdeps/x86_64/pthread_spin_init.c: New file.
3160 * sysdeps/x86_64/pthread_spin_lock.c: New file.
3161 * sysdeps/x86_64/pthread_spin_trylock.c: New file.
3162 * sysdeps/x86_64/pthread_spin_unlock.c: New file.
3164 * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
3165 Add missing lock prefix. Minute optimization.
3167 * tst-spin2.c (main): Also check successful trylock call.
3169 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
3170 syscall. Fix typo in case INTERNAL_SYSCALL is not used.
3172 * sysdeps/i386/pthread_spin_destroy.c: Moved to...
3173 * sysdeps/pthread/pthread_spin_destroy.c: ...here. New file.
3175 * sysdeps/i386/pthread_sigmask.c: Removed. Use the generic code.
3176 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
3177 value in case of an error. Add support for INTERNAL_SYSCALL.
3179 * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
3180 value in case of an error.
3182 * sysdeps/x86_64/tls.h: New file.
3184 2002-11-26 Ulrich Drepper <drepper@redhat.com>
3186 * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface. It now
3187 takes the array member name and the index as parameters.
3188 (THREAD_SETMEM_NC): Likewise.
3189 * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
3190 * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
3193 * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
3194 to decide which code to use.
3195 (THREAD_SETMEM_NC): Likewise.
3197 * allocatestack.c (queue_stack): Don't remove stack from list here.
3198 Do it in the caller. Correct condition to prematurely terminate
3199 loop to free stacks.
3200 (__deallocate_stack): Remove stack from list here.
3202 2002-11-26 Ulrich Drepper <drepper@redhat.com>
3204 * Makefile (tests): Add tst-stack1.
3205 * tst-stack1.c: New file.
3207 * allocatestack.c (allocate_stack): Initialize the TCB on a user
3210 * pthread_attr_getstack.c: Return bottom of the thread area.
3212 2002-11-25 Ulrich Drepper <drepper@redhat.com>
3214 * Makefile (libpthread-routines): Add pt-allocrtsig and
3215 pthread_kill_other_threads.
3216 * pt-allocrtsig.c: New file.
3217 * pthread_kill_other_threads.c: New file.
3218 * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
3219 all three functions.
3220 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
3222 * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
3223 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
3224 and __libc_allocate_rtsig_private.
3225 * Versions (libpthread): Export pthread_kill_other_threads_np,
3226 __libc_current_sigrtmin, and __libc_current_sigrtmax.
3228 2002-11-24 Ulrich Drepper <drepper@redhat.com>
3230 * allocatestack.c (allocate_stack): stackaddr in attribute points to
3231 the end of the stack. Adjust computations.
3232 When mprotect call fails dequeue stack and free it.
3233 * pthread_attr_setstack.c: Store top of the stack in stackaddr
3235 * pthread_getattr_np.c: Likewise.
3237 * descr.h (IS_DETACHED): Add some more parenthesis to prevent
3240 2002-11-23 Ulrich Drepper <drepper@redhat.com>
3242 * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
3243 attribute definitions. Patch by Luca Barbieri <ldb@ldb.ods.org>.
3245 2002-11-22 Ulrich Drepper <drepper@redhat.com>
3247 * pthread_getspecific.c: Optimize access to first 2nd-level array.
3248 * pthread_setspecific.c: Likewise.
3250 2002-11-21 Ulrich Drepper <drepper@redhat.com>
3252 * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
3253 definitions. Get them from the official place.
3254 * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
3256 * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
3257 Use new CLONE_ flags in clone() calls.
3259 * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
3260 * sysdeps/unix/sysv/linux/i386/fork.c: New file.
3262 * Versions: Add pthread_* functions for libc.
3263 * forward.c: New file.
3265 * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
3267 * herrno.c: New file.
3270 * Makefile (libpthread-routines): Remove sem_post, sem_wait,
3271 sem_trywait, and sem_timedwait. Add herrno and res.
3272 * sem_init.c: Don't initialize lock and waiters members.
3273 * sem_open.c: Likewise.
3274 * sem_post.c: Removed.
3275 * sem_wait.c: Removed.
3276 * sem_trywait.c: Removed.
3277 * sem_timedwait.c: Removed.
3278 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
3279 Includes full implementations of sem_post, sem_wait, sem_trywait,
3281 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
3282 for new implementation.
3283 * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
3286 * tst-sem3.c: Improve error message.
3287 * tst-signal3.c: Likewise.
3289 * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
3290 to tell the kernel about the termination futex and to initialize tid
3291 member. Don't initialize main_thread.
3292 * descr.h (struct pthread): Remove main_thread member.
3293 * cancelllation.c (__do_cancel): Remove code handling main thread.
3294 The main thread is not special anymore.
3296 * allocatestack.c (__reclaim_stacks): Mark stacks as unused. Add
3297 size of the stacks to stack_cache_actsize.
3299 * pt-readv.c: Add missing "defined".
3300 * pt-sigwait.c: Likewise.
3301 * pt-writev.c: Likewise.
3303 2002-11-09 Ulrich Drepper <drepper@redhat.com>
3305 * Versions: Export __connect from libpthread.
3306 Patch by Luca Barbieri <ldb@ldb.ods.org>.
3308 * Makefile (libpthread-routines): Add pt-raise.
3309 * sysdeps/unix/sysv/linux/raise.c: New file.
3310 * sysdeps/unix/sysv/linux/pt-raise.c: New file.
3311 * sysdeps/generic/pt-raise.c: New file.
3313 * pthread_cond_init.c: Initialize all data elements of the condvar
3314 structure. Patch by Luca Barbieri <ldb@ldb.ods.org>.
3316 * pthread_attr_init.c: Actually implement 2.0 compatibility version.
3317 * pthread_create.c: Likewise.
3319 * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
3320 * tst-key1.c: New file.
3321 * tst-key2.c: New file.
3322 * tst-key3.c: New file.
3324 * Versions: Export pthread_detach for version GLIBC_2.0.
3325 Reported by Saurabh Desai <sdesai@austin.ibm.com>.
3327 2002-11-08 Ulrich Drepper <drepper@redhat.com>
3329 * pthread_key_create.c: Terminate search after an unused key was found.
3330 Patch by Luca Barbieri <ldb@ldb.ods.org>.
3332 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
3333 Patch by Luca Barbieri <ldb@ldb.ods.org>.
3335 2002-10-10 Ulrich Drepper <drepper@redhat.com>
3337 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
3338 dynamic lookup for errno in PIC.
3340 * allocatestack.c (get_cached_stack): Rearrange code slightly to
3341 release the stack lock as soon as possible.
3342 Call _dl_allocate_tls_init for TCB from the cache to re-initialize
3343 the static TLS block.
3344 (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
3346 * cancellation.c: Renamed from cancelation.c.
3347 * Makefile: Adjust accordingly.
3348 * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
3349 * cleanup_defer.c: Use CANCELLATION_P.
3350 * pthread_testcancel.c: Likewise.
3351 * descr.h: Fix spelling in comments.
3353 * pthread_getattr_np.c: Likewise.
3354 * pthread_getschedparam.c: Likewise.
3355 * pthread_setschedparam.c: Likewise.
3356 * Versions: Likewise.
3358 * pt-pselect.c: New file.
3359 * Makefile (libpthread-routines): Add pt-pselect.
3360 * Versions: Add pselect.
3362 * tst-cancel4.c: New file.
3363 * Makefile (tests): Add tst-cancel4.
3365 2002-10-09 Ulrich Drepper <drepper@redhat.com>
3367 * pthread_mutex_lock.c: Always record lock ownership.
3368 * pthread_mutex_timedlock.c: Likewise.
3369 * pthread_mutex_trylock.c: Likewise.
3371 * pt-readv.c: New file.
3372 * pt-writev.c: New file.
3373 * pt-creat.c: New file.
3374 * pt-msgrcv.c: New file.
3375 * pt-msgsnd.c: New file.
3376 * pt-poll.c: New file.
3377 * pt-select.c: New file.
3378 * pt-sigpause.c: New file.
3379 * pt-sigsuspend.c: New file.
3380 * pt-sigwait.c: New file.
3381 * pt-sigwaitinfo.c: New file.
3382 * pt-waitid.c: New file.
3383 * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
3384 pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
3385 pt-sigwait, pt-sigwaitinfo, and pt-waitid.
3386 * Versions: Add all the new functions.
3388 * tst-exit1.c: New file.
3389 * Makefile (tests): Add tst-exit1.
3391 * sem_timedwait.c: Minor optimization for more optimal fastpath.
3393 2002-10-08 Ulrich Drepper <drepper@redhat.com>
3395 * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
3397 * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
3398 call. pthread_join is an official cancellation point.
3399 * pthread_timedjoin.c: Likewise.
3401 * pthread_cond_wait.c: Revert order in which internal lock are dropped
3402 and the condvar's mutex are retrieved.
3403 * pthread_cond_timedwait.c: Likewise.
3404 Reported by dice@saros.East.Sun.COM.
3406 2002-10-07 Ulrich Drepper <drepper@redhat.com>
3408 * pthreadP.h: Cut out all type definitions and move them...
3409 * sysdeps/unix/sysv/linux/internaltypes.h: ...here. New file.
3410 * pthreadP.h: Include <internaltypes.h>.
3412 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
3415 * sem_trywait.c: Shuffle #includes around to get right order.
3416 * sem_timedwait.c: Likewise.
3417 * sem_post.c: Likewise.
3418 * sem_wait.c: Likewise.
3420 * nptl 0.3 released.
3422 * Makefile (tests): Add tst-signal3.
3423 * tst-signal3.c: New file.
3425 2002-10-05 Ulrich Drepper <drepper@redhat.com>
3427 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
3428 the asms modify the sem object.
3429 (__lll_sem_timedwait): Now takes struct sem* as first parameter.
3431 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
3433 * pthreadP.h (struct sem): New type. Actual semaphore type.
3434 * semaphoreP.h: Include pthreadP.h.
3435 * sem_getvalue.c: Adjust to sem_t change.
3436 * sem_init.c: Likewise.
3437 * sem_open.c: Likewise.
3438 * sem_post.c: Likewise.
3439 * sem_timedwait.c: Likewise.
3440 * sem_trywait.c: Likewise.
3441 * sem_wait.c: Likewise.
3443 2002-10-04 Ulrich Drepper <drepper@redhat.com>
3445 * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
3446 * tst-basic2.c: New file.
3447 * tst-exec1.c: New file.
3448 * tst-exec2.c: New file.
3449 * tst-exec3.c: New file.
3451 * tst-fork1.c: Remove extra */.
3453 * nptl 0.2 released. The API for IA-32 is complete.