1 2006-05-01 Ulrich Drepper <drepper@redhat.com>
3 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
6 2006-04-27 Ulrich Drepper <drepper@redhat.com>
8 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
9 Allocate new object which is passed to timer_sigev_thread so that
10 the timer can be deleted before the new thread is scheduled.
12 2006-04-26 Roland McGrath <roland@redhat.com>
14 * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
16 2006-04-08 Ulrich Drepper <drepper@redhat.com>
18 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
19 suffix for conditional jumps.
20 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
21 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
22 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
23 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
24 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
25 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
27 * init.c (sigcancel_handler): Compare with correct PID even if the
28 thread is in the middle of a fork call.
29 (sighandler_setxid): Likewise.
30 Reported by Suzuki K P <suzuki@in.ibm.com> .
32 2006-04-07 Jakub Jelinek <jakub@redhat.com>
34 * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
36 2006-04-06 Ulrich Drepper <drepper@redhat.com>
38 * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
39 fails [Coverity CID 105].
41 2006-04-05 Ulrich Drepper <drepper@redhat.com>
43 * sysdeps/pthread/pthread.h: Add nonnull attributes.
45 2006-04-03 Steven Munroe <sjmunroe@us.ibm.com>
48 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
49 Define __lll_rel_instr using lwsync.
51 2006-03-27 Ulrich Drepper <drepper@redhat.com>
53 * allocatestack.c (allocate_stack): Always initialize robust_head.
54 * descr.h: Define struct robust_list_head.
55 (struct pthread): Use robust_list_head in robust mutex list definition.
56 Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
57 * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
58 (__pthread_initialize_minimal_internal): Register robust_list with
60 * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
61 Declare __set_robust_list_avail.
62 * pthread_create.c (start_thread): Register robust_list of new thread.
63 [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
65 * pthread_mutex_destroy.c: For robust mutexes don't look at the
66 number of users, it's unreliable.
67 * pthread_mutex_init.c: Allow use of pshared robust mutexes if
68 set_robust_list syscall is available.
69 * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
70 * pthread_mutex_lock.c: Simplify robust mutex code a bit.
71 Set robust_head.list_op_pending before trying to lock a robust mutex.
72 * pthread_mutex_timedlock.c: Likewise.
73 * pthread_mutex_trylock.c: Likewise.
74 * pthread_mutex_unlock.c: Likewise for unlocking.
75 * Makefile (tests): Add tst-robust8.
76 * tst-robust8.c: New file.
78 2006-03-08 Andreas Schwab <schwab@suse.de>
80 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
81 (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
83 2006-03-05 Roland McGrath <roland@redhat.com>
85 * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
86 and $config_os doesn't match *linux*.
88 2006-03-05 David S. Miller <davem@sunset.davemloft.net>
90 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
92 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
93 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
94 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
95 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
96 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
97 * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
99 2006-03-02 Ulrich Drepper <drepper@redhat.com>
101 * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
103 2006-03-01 Ulrich Drepper <drepper@redhat.com>
105 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
106 (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
108 (__lll_robust_timedlock_wait): Likewise.
109 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
110 (__lll_robust_lock_wait): Likewise.
111 (__lll_robust_timedlock_wait): Likewise.
112 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
113 (__lll_robust_lock_wait): Likewise.
114 (__lll_robust_timedlock_wait): Likewise.
116 2006-03-01 Jakub Jelinek <jakub@redhat.com>
118 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
119 lll_robust_mutex_trylock, lll_robust_mutex_lock,
120 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
121 lll_robust_mutex_unlock): Define.
122 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
124 2006-02-28 H.J. Lu <hongjiu.lu@intel.com>
126 * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
127 instead of <clone.S>.
129 2006-02-27 Jakub Jelinek <jakub@redhat.com>
131 * Makefile (libpthread-routines): Add
132 pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
133 and pthread_mutex_[sg]etprioceiling.
134 * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
135 pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
136 pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
137 pthread_mutex_setprioceiling.
138 * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
139 PTHREAD_PRIO_PROTECT): New enum values.
140 (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
141 pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
142 pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
144 * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
145 PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
146 (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
148 (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
149 PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
150 PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
151 (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
152 and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
153 * pthread_mutex_init.c (__pthread_mutex_init): For the time being
154 return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
156 * pthread_mutex_getprioceiling.c: New file.
157 * pthread_mutex_setprioceiling.c: New file.
158 * pthread_mutexattr_getprioceiling.c: New file.
159 * pthread_mutexattr_setprioceiling.c: New file.
160 * pthread_mutexattr_getprotocol.c: New file.
161 * pthread_mutexattr_setprotocol.c: New file.
163 2006-02-27 Daniel Jacobowitz <dan@codesourcery.com>
165 * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
167 2006-02-27 Roland McGrath <roland@redhat.com>
169 * sysdeps/pthread/Subdirs: List nptl here too.
170 * configure (libc_add_on_canonical): New variable.
172 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
174 * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
175 self to get main source tree's file.
176 * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
177 * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
178 * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
179 * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
180 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
181 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
182 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
183 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
184 * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
185 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
186 * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
187 * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
188 * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
190 * Makefile: Use $(sysdirs) in vpath directive.
192 * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
193 (CPPFLAGS-timer_routines.c): Likewise.
195 * Makeconfig (includes): Variable removed.
197 2006-02-26 Roland McGrath <roland@redhat.com>
199 * sysdeps/generic/pt-raise.c: Moved to ...
200 * pt-raise.c: ... here.
201 * sysdeps/generic/lowlevellock.h: Moved to ...
202 * lowlevellock.h: ... here.
204 2006-02-23 Roland McGrath <roland@redhat.com>
206 * descr.h (struct pthread): Add final member `end_padding'.
207 (PTHREAD_STRUCT_END_PADDING): Use it.
209 2006-02-20 Roland McGrath <roland@redhat.com>
211 * sysdeps/mips: Directory removed, saved in ports repository.
212 * sysdeps/unix/sysv/linux/mips: Likewise.
214 2006-02-18 Ulrich Drepper <drepper@redhat.com>
216 * tst-robust1.c: Add second mutex to check that the mutex list is
219 2006-02-17 Jakub Jelinek <jakub@redhat.com>
221 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
222 lll_robust_mutex_trylock, lll_robust_mutex_lock,
223 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
224 lll_robust_mutex_unlock): New macros.
225 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
226 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
227 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
228 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
229 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
231 2006-02-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
233 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
235 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
237 2006-02-17 Ulrich Drepper <drepper@redhat.com>
239 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
240 (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
241 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
242 (lll_robust_mutex_unlock): Likewise.
244 2006-02-13 Jakub Jelinek <jakub@redhat.com>
246 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
247 Set robust_list.__next rather than robust_list.
248 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
249 (__pthread_list_t): New typedef.
250 (pthread_mutex_t): Replace __next and __prev fields with __list.
251 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
252 (__pthread_list_t): New typedef.
253 (pthread_mutex_t): Replace __next and __prev fields with __list.
254 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
255 (__pthread_list_t, __pthread_slist_t): New typedefs.
256 (pthread_mutex_t): Replace __next and __prev fields with __list.
257 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
258 (__pthread_list_t, __pthread_slist_t): New typedefs.
259 (pthread_mutex_t): Replace __next and __prev fields with __list.
260 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
261 (__pthread_list_t, __pthread_slist_t): New typedefs.
262 (pthread_mutex_t): Replace __next and __prev fields with __list.
263 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
264 (__pthread_slist_t): New typedef.
265 (pthread_mutex_t): Replace __next field with __list.
267 2006-02-15 Ulrich Drepper <drepper@redhat.com>
269 * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
270 PTHREAD_MUTEX_OWNERDEAD.
271 (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
272 Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
273 * Makefile (libpthread-routines): Add lowlevelrobustlock.
274 * pthread_create.c (start_thread): Very much simplify robust_list loop.
275 * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
276 to PTHREAD_MUTEX_INCONSISTENT.
277 * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
278 * pthread_mutex_lock.c: Reimplement robust mutex handling.
279 * pthread_mutex_trylock.c: Likewise.
280 * pthread_mutex_timedlock.c: Likewise.
281 * pthread_mutex_unlock.c: Likewise.
282 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
283 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
284 lowlevelrobustlock.sym.
285 * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
286 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
288 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
289 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
290 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
291 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
292 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
294 2006-02-12 Ulrich Drepper <drepper@redhat.com>
296 * allocatestack.c (allocate_stack): Initialize robust_list.
297 * init.c (__pthread_initialize_minimal_internal): Likewise.
298 * descr.h (struct xid_command): Pretty printing.
299 (struct pthread): Use __pthread_list_t or __pthread_slist_t for
300 robust_list. Adjust macros.
301 * pthread_create.c (start_thread): Adjust robust_list handling.
302 * phtread_mutex_unlock.c: Don't allow unlocking from any thread
303 but the owner for all robust mutex types.
304 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
305 __pthread_list_t and __pthread_slist_t. Use them in pthread_mutex_t.
306 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
307 * sysdeps/pthread/pthread.h: Adjust mutex initializers.
309 * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
310 openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
312 2006-02-08 Jakub Jelinek <jakub@redhat.com>
314 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
315 lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
317 2006-01-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
319 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
321 (lll_futex_timed_wait): Define.
323 2006-01-19 Ulrich Drepper <drepper@redhat.com>
325 * tst-cancel4.c: Test ppoll.
327 2006-01-18 Andreas Jaeger <aj@suse.de>
330 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
331 (pthread_mutex_t): Follow changes for other archs. Based on patch
332 by Jim Gifford <patches@jg555.com>.
334 2006-01-13 Richard Henderson <rth@redhat.com>
336 * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
338 2006-01-10 Roland McGrath <roland@redhat.com>
340 * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
341 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
342 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
343 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
344 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
345 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
346 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
347 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
348 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
349 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
351 2006-01-09 Roland McGrath <roland@redhat.com>
353 * tst-initializers1-c89.c: New file.
354 * tst-initializers1-c99.c: New file.
355 * tst-initializers1-gnu89.c: New file.
356 * tst-initializers1-gnu99.c: New file.
357 * Makefile (tests): Add them.
358 (CFLAGS-tst-initializers1-c89.c): New variable.
359 (CFLAGS-tst-initializers1-c99.c): New variable.
360 (CFLAGS-tst-initializers1-gnu89.c): New variable.
361 (CFLAGS-tst-initializers1-gnu99.c): New variable.
363 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
364 Use __extension__ on anonymous union definition.
365 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
366 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
367 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
368 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
369 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
371 2006-01-08 Jakub Jelinek <jakub@redhat.com>
373 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
374 Don't give the union a name because it changes the mangled name.
375 Instead name the struct for __data.
376 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
378 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
381 2006-01-09 Jakub Jelinek <jakub@redhat.com>
383 * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
384 stack bias to mc_ftp field.
386 2006-01-07 Ulrich Drepper <drepper@redhat.com>
388 * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
389 being too clever and reloading the futex value where it shouldn't.
391 2006-01-06 Ulrich Drepper <drepper@redhat.com>
393 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
396 2006-01-06 Jakub Jelinek <jakub@redhat.com>
398 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
401 2006-01-06 Ulrich Drepper <drepper@redhat.com>
403 * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
404 * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
407 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
408 Don't give the union a name because it changes the mangled name.
409 Instead name the struct for __data.
410 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
411 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
412 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
413 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
414 * pthread_create.c (start_thread): Adjust robust mutex free loop.
415 * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
417 2006-01-05 Ulrich Drepper <drepper@redhat.com>
419 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
421 (lll_futex_timed_wait): Define.
422 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
423 * sysdeps/pthread/aio_misc.h: New file.
425 2006-01-03 Joseph S. Myers <joseph@codesourcery.com>
427 * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
429 2006-01-03 Steven Munroe <sjmunroe@us.ibm.com>
431 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
432 (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
433 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
435 2006-01-04 Ulrich Drepper <drepper@redhat.com>
437 * tst-cancel24.cc: Use C headers instead of C++ headers.
439 2006-01-03 Jakub Jelinek <jakub@redhat.com>
441 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
442 sparc-linux configured glibc.
443 (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
444 (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
445 __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
446 atomic_compare_and_exchange_val_24_acq instead of
447 atomic_compare_and_exchange_val_acq.
448 (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
449 instead of atomic_exchange_rel.
450 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
451 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
453 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
455 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
456 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
457 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
458 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
459 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
460 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
462 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
464 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
465 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
466 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
468 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
470 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
472 2006-01-03 Ulrich Drepper <drepper@redhat.com>
474 * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
477 2006-01-02 Jakub Jelinek <jakub@redhat.com>
479 * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
480 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
481 THREAD_COPY_POINTER_GUARD): Define.
482 * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
483 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
485 2006-01-01 Ulrich Drepper <drepper@redhat.com>
487 * version.c: Update copyright year.
489 2005-12-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
491 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
492 .eh_frame section, use cfi_* directives.
493 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
495 2005-12-30 Ulrich Drepper <drepper@redhat.com>
497 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
500 2005-12-29 Ulrich Drepper <drepper@redhat.com>
502 * sysdeps/pthread/sigaction.c: Removed.
503 * sigaction.c: New file.
504 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
506 2005-12-28 Ulrich Drepper <drepper@redhat.com>
508 * Makefile (tests): Add tst-signal7.
509 * tst-signal7.c: New file.
511 2005-12-27 Roland McGrath <roland@redhat.com>
513 * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
514 (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
515 * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
516 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
517 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
518 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
519 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
520 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
521 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
522 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
523 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
525 2005-12-27 Jakub Jelinek <jakub@redhat.com>
527 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
528 and __prev field to pthread_mutex_t.
529 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
530 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
531 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
532 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
533 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
536 2005-12-26 Ulrich Drepper <drepper@redhat.com>
538 * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
539 PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
540 PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
541 PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
542 PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
543 and PTHREAD_MUTEXATTR_FLAG_BITS.
544 * descr.h (struct pthread): Add robust_list field and define
545 ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
546 * pthread_mutexattr_getrobust.c: New file.
547 * pthread_mutexattr_setrobust.c: New file.
548 * pthread_mutex_consistent.c: New file.
549 * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
550 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
551 Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
552 Adjust pthread_mutex_t initializers.
553 * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
554 field to pthread_mutex_t.
555 * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
556 and __prev field to pthread_mutex_t.
557 * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
558 pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
559 * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
560 and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
561 * pthread_mutexattr_gettype.c: Likewise.
562 * pthread_mutexattr_setpshared.c: Likewise.
563 * pthread_mutexattr_settype.c: Likewise.
564 * pthread_mutex_init.c: Reject robust+pshared attribute for now.
565 Initialize mutex kind according to robust flag.
566 * pthread_mutex_lock.c: Implement local robust mutex.
567 * pthread_mutex_timedlock.c: Likewise.
568 * pthread_mutex_trylock.c: Likewise.
569 * pthread_mutex_unlock.c: Likewise.
570 * pthread_create.c (start_thread): Mark robust mutexes which remained
572 * tst-robust1.c: New file.
573 * tst-robust2.c: New file.
574 * tst-robust3.c: New file.
575 * tst-robust4.c: New file.
576 * tst-robust5.c: New file.
577 * tst-robust6.c: New file.
578 * tst-robust7.c: New file.
579 * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
580 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
581 (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
582 tst-robust5, tst-robust6, and tst-robust7.
584 * tst-typesizes.c: New file.
585 * Makefile (tests): Add tst-typesizes.
587 * tst-once3.c: More debug output.
589 2005-12-24 Ulrich Drepper <drepper@redhat.com>
591 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
592 missing after last change.
594 * version.c: Update copyright year.
596 2005-12-23 Ulrich Drepper <drepper@redhat.com>
598 * pthread_mutex_destroy.c: Set mutex type to an invalid value.
599 * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
600 * pthread_mutex_trylock.c: Likewise.
601 * pthread_mutex_timedlock.c: Likewise.
602 * pthread_mutex_unlock.c: Likewise.
604 2005-12-22 Roland McGrath <roland@redhat.com>
606 * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
607 so that #include_next's search location is not reset to the -I..
608 directory where <nptl/...> can be found.
610 2005-12-22 Ulrich Drepper <drepper@redhat.com>
613 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
614 Fix unwind info. Remove useless branch prediction prefix.
615 * tst-cancel24.cc: New file.
616 * Makefile: Add rules to build and run tst-cancel24.
618 2005-12-21 Roland McGrath <roland@redhat.com>
620 * libc-cancellation.c: Use <> rather than "" #includes.
621 * pt-cleanup.c: Likewise.
622 * pthread_create.c: Likewise.
623 * pthread_join.c: Likewise.
624 * pthread_timedjoin.c: Likewise.
625 * pthread_tryjoin.c: Likewise.
626 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
627 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
628 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
629 * unwind.c: Likewise.
631 2005-12-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
633 * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
634 * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
635 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
636 THREAD_COPY_POINTER_GUARD): Define.
638 2005-12-19 Jakub Jelinek <jakub@redhat.com>
640 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
642 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
643 THREAD_COPY_POINTER_GUARD): Define.
644 * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
645 * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
646 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
647 THREAD_COPY_POINTER_GUARD): Define.
648 * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
649 * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
650 THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
651 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
652 Use PTR_DEMANGLE for B0 if defined.
654 2005-12-17 Ulrich Drepper <drepper@redhat.com>
656 * pthread_create.c (__pthread_create_2_1): Use
657 THREAD_COPY_POINTER_GUARD if available.
658 * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
659 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
660 * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
661 Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
662 * sysdeps/x86_64/tls.h: Likewise.
664 2005-12-15 Roland McGrath <roland@redhat.com>
666 * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
668 2005-12-13 Ulrich Drepper <drepper@redhat.com>
670 * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
672 * errno-loc.c: New file.
674 2005-12-12 Roland McGrath <roland@redhat.com>
676 * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
677 adjustments before choosing stack size. Update minimum stack size
678 calculation to match allocate_stack change.
680 2005-12-12 Ulrich Drepper <drepper@redhat.com>
682 * allocatestack.c (allocate_stack): Don't demand that there is an
683 additional full page available on the stack beside guard, TLS, the
686 2005-11-24 Ulrich Drepper <drepper@redhat.com>
688 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
689 (__cleanup_fct_attribute): Use __regparm__ not regparm.
691 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
692 compiling 32-bit code we must define __cleanup_fct_attribute.
694 005-11-24 Jakub Jelinek <jakub@redhat.com>
697 * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
698 __attribute__ instead of __attribute.
699 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
700 (__cleanup_fct_attribute): Likewise.
702 2005-11-17 Jakub Jelinek <jakub@redhat.com>
704 * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
705 a write barrier before writing libgcc_s_getcfa.
707 2005-11-06 Ulrich Drepper <drepper@redhat.com>
709 * sysdeps/unix/sysv/linux/configure: Removed.
711 2005-11-05 Ulrich Drepper <drepper@redhat.com>
713 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
714 optional init_array/fini_array support.
716 2005-10-24 Roland McGrath <roland@redhat.com>
718 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
719 versioned_symbol use.
721 2005-10-16 Roland McGrath <roland@redhat.com>
723 * init.c (__pthread_initialize_minimal_internal): Even when using a
724 compile-time default stack size, apply the minimum that allocate_stack
725 will require, and round up to page size.
727 2005-10-10 Daniel Jacobowitz <dan@codesourcery.com>
729 * Makefile ($(test-modules)): Remove static pattern rule.
731 2005-10-14 Jakub Jelinek <jakub@redhat.com>
732 Ulrich Drepper <drepper@redhat.com>
734 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
735 alignment in callback function.
736 * Makefile: Add rules to build and run tst-align3.
737 * tst-align3.c: New file.
739 2005-10-03 Jakub Jelinek <jakub@redhat.com>
741 * allocatestack.c (setxid_signal_thread): Add
742 INTERNAL_SYSCALL_DECL (err).
744 2005-10-02 Jakub Jelinek <jakub@redhat.com>
746 * allocatestack.c (setxid_signal_thread): Need to use
747 atomic_compare_and_exchange_bool_acq.
749 2005-10-01 Ulrich Drepper <drepper@redhat.com>
750 Jakub Jelinek <jakub@redhat.com>
752 * descr.h: Define SETXID_BIT and SETXID_BITMASK. Adjust
754 (struct pthread): Move specific_used field to avoid padding.
755 Add setxid_futex field.
756 * init.c (sighandler_setxid): Reset setxid flag and release the
758 * allocatestack.c (setxid_signal_thread): New function. Broken
759 out of the bodies of the two loops in __nptl_setxid. For undetached
760 threads check whether they are exiting and if yes, don't send a signal.
761 (__nptl_setxid): Simplify loops by using setxid_signal_thread.
762 * pthread_create.c (start_thread): For undetached threads, check
763 whether setxid bit is set. If yes, wait until signal has been
766 * allocatestack.c (STACK_VARIABLES): Initialize them.
767 * pthread_create.c (__pthread_create_2_1): Initialize pd.
769 2004-09-02 Jakub Jelinek <jakub@redhat.com>
771 * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
772 waiters, awake all waiters on the associated mutex.
774 2005-09-22 Roland McGrath <roland@redhat.com>
776 * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
777 ../sysdeps/x86_64/hp-timing.h).
779 2005-08-29 Jakub Jelinek <jakub@redhat.com>
781 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
782 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
783 (lll_futex_wake_unlock): Define.
784 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
785 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
786 (lll_futex_wake_unlock): Define.
787 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
788 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
789 (lll_futex_wake_unlock): Define.
790 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
791 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
792 (lll_futex_wake_unlock): Define.
793 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
794 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
795 (lll_futex_wake_unlock): Define.
796 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
797 lll_futex_wake_unlock.
798 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
799 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
800 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
801 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
802 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
803 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
805 2005-09-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
807 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
808 Fix typo in register name.
810 2005-08-23 Ulrich Drepper <drepper@redhat.com>
812 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
813 Use __sigfillset. Document that sigfillset does the right thing wrt
816 2005-07-11 Jakub Jelinek <jakub@redhat.com>
819 * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
820 PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
821 PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
822 PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
823 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
824 PTHREAD_COND_INITIALIZER): Supply zeros for all fields
826 * Makefile (tests): Add tst-initializers1.
827 (CFLAGS-tst-initializers1.c): Set.
828 * tst-initializers1.c: New test.
830 2005-07-11 Jakub Jelinek <jakub@redhat.com>
832 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
833 Make sure __flags are located at offset 48 from the start of the
836 2005-07-02 Roland McGrath <roland@redhat.com>
838 * Makeconfig: Comment fix.
840 2005-07-05 Jakub Jelinek <jakub@redhat.com>
842 * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
843 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
844 is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
845 (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
846 TLS_PRE_TCB_SIZE is sizeof (struct pthread).
847 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
848 * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
849 Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
850 * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
851 assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
853 2005-06-25 Jakub Jelinek <jakub@redhat.com>
855 * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
856 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
857 * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
859 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
860 * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
861 field. Put in sysinfo field unconditionally.
862 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
863 * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
864 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
865 * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
867 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
868 * pthread_create.c (__pthread_create_2_1): Use
869 THREAD_COPY_STACK_GUARD macro.
870 * Makefile: Add rules to build and run tst-stackguard1{,-static}
872 * tst-stackguard1.c: New file.
873 * tst-stackguard1-static.c: New file.
875 2005-06-14 Alan Modra <amodra@bigpond.net.au>
877 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
878 Invoke CGOTSETUP and CGOTRESTORE.
879 (CGOTSETUP, CGOTRESTORE): Define.
881 2005-05-29 Richard Henderson <rth@redhat.com>
883 * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
884 (tf_write, tf_writev): Use it.
885 (do_test): Use socketpair instead of pipe. Set SO_SNDBUF to
888 2005-05-23 Jakub Jelinek <jakub@redhat.com>
890 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
891 [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
892 __librt_*_asynccancel@local.
894 2005-05-17 Alan Modra <amodra@bigpond.net.au>
896 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
897 all occurrences of JUMPTARGET. Instead append @local to labels.
899 2005-05-20 Jakub Jelinek <jakub@redhat.com>
901 * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
902 size/alignment of struct pthread rather than tcbhead_t.
903 * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
905 * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
907 * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
910 2005-05-19 Richard Henderson <rth@redhat.com>
912 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
913 __sync_val_compare_and_swap, not explicit _si variant.
914 * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
916 2005-05-03 Ulrich Drepper <drepper@redhat.com>
919 * sysdeps/pthread/pthread.h: Avoid empty initializers.
921 2005-05-03 Jakub Jelinek <jakub@redhat.com>
923 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
924 .eh_frame section, use cfi_* directives.
926 2005-04-27 Jakub Jelinek <jakub@redhat.com>
928 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
931 2005-04-27 Ulrich Drepper <drepper@redhat.com>
934 * tst-cancel17.c (do_test): Add arbitrary factor to make sure
937 2005-04-27 Roland McGrath <roland@redhat.com>
939 * Makefile (tests): Remove tst-clock2.
941 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
942 CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
943 translating to the kernel clockid_t for our own process/thread clock.
945 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
947 2005-04-15 Jakub Jelinek <jakub@redhat.com>
949 * old_pthread_cond_init.c: Include <errno.h>.
950 (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
951 process shared or uses clock other than CLOCK_REALTIME.
952 * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
954 2005-04-13 David S. Miller <davem@davemloft.net>
956 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
957 * sysdeps/sparc/sparc64/clone.S: New file.
959 2005-04-05 Jakub Jelinek <jakub@redhat.com>
962 * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
963 __inline instead of inline.
964 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
966 2005-03-31 Jakub Jelinek <jakub@redhat.com>
968 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
969 functionally equivalent, but shorter instructions.
970 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
971 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
972 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
974 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
975 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
976 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
977 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
978 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
979 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
980 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
982 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
983 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
984 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
985 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
986 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
988 2005-03-28 Daniel Jacobowitz <dan@codesourcery.com>
990 * sysdeps/mips/Makefile: New file.
991 * sysdeps/mips/nptl-sysdep.S: New file.
992 * sysdeps/mips/tcb-offsets.sym: New file.
993 * sysdeps/mips/pthread_spin_lock.S: New file.
994 * sysdeps/mips/pthread_spin_trylock.S: New file.
995 * sysdeps/mips/pthreaddef.h: New file.
996 * sysdeps/mips/tls.h: New file.
997 * sysdeps/mips/jmpbuf-unwind.h: New file.
998 * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
999 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
1000 * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
1001 * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
1002 * sysdeps/unix/sysv/linux/mips/fork.c: New file.
1003 * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
1004 * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
1005 * sysdeps/unix/sysv/linux/mips/clone.S: New file.
1006 * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
1007 * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
1009 2005-03-23 Ulrich Drepper <drepper@redhat.com>
1012 * pthread_create.c (__pthread_create_2_1): Rename syscall error
1015 2005-03-10 Jakub Jelinek <jakub@redhat.com>
1017 * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
1019 2005-02-25 Roland McGrath <roland@redhat.com>
1021 * alloca_cutoff.c: Correct license text.
1022 * tst-unload.c: Likewise.
1023 * sysdeps/pthread/allocalim.h: Likewise.
1024 * sysdeps/pthread/pt-initfini.c: Likewise.
1025 * sysdeps/pthread/bits/libc-lock.h: Likewise.
1026 * sysdeps/pthread/bits/sigthread.h: Likewise.
1027 * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
1028 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
1030 2005-02-16 Roland McGrath <roland@redhat.com>
1032 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1033 Use unsigned int * for ptr_nthreads.
1035 2005-02-14 Alan Modra <amodra@bigpond.net.au>
1038 * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
1041 2005-02-07 Richard Henderson <rth@redhat.com>
1044 * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
1047 2004-11-03 Marcus Brinkmann <marcus@gnu.org>
1049 * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
1050 order of arguments in invocation of atomic_add_zero.
1052 2005-01-26 Jakub Jelinek <jakub@redhat.com>
1055 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
1056 Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
1057 at least gotntpoff relocation and addition.
1058 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1060 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
1062 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
1065 2005-01-06 Ulrich Drepper <drepper@redhat.com>
1067 * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
1068 entry for static tls deallocation fix.
1069 * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
1070 also contains information whether the memory pointed to is static
1072 * sysdeps/i386/tls.h: Likewise.
1073 * sysdeps/ia64/tls.h: Likewise.
1074 * sysdeps/powerpc/tls.h: Likewise.
1075 * sysdeps/s390/tls.h: Likewise.
1076 * sysdeps/sh/tls.h: Likewise.
1077 * sysdeps/sparc/tls.h: Likewise.
1078 * sysdeps/x86_64/tls.h: Likewise.
1080 2004-12-27 Ulrich Drepper <drepper@redhat.com>
1082 * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
1084 2004-12-21 Jakub Jelinek <jakub@redhat.com>
1086 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
1088 * Makefile (tests): Add tst-align2.
1089 * tst-align2.c: New test.
1090 * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
1091 -mpreferred-stack-boundary=4.
1093 2004-12-18 Roland McGrath <roland@redhat.com>
1095 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
1096 New file removed withdrawn for the moment.
1098 2004-12-17 Richard Henderson <rth@redhat.com>
1100 * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
1101 * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
1103 2004-12-16 Ulrich Drepper <drepper@redhat.com>
1105 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
1106 Increased PTHREAD_STACK_MIN.
1108 * tst-context1.c (stacks): Use bigger stack size.
1110 2004-12-16 Jakub Jelinek <jakub@redhat.com>
1112 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
1113 * sysdeps/sparc/tcb-offsets.sym: Add TID.
1115 2004-12-15 Jakub Jelinek <jakub@redhat.com>
1117 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
1118 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
1119 * sysdeps/s390/tcb-offsets.sym (TID): Add.
1121 2004-12-15 Ulrich Drepper <drepper@redhat.com>
1123 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
1125 2004-12-14 Ulrich Drepper <drepper@redhat.com>
1127 * sysdeps/powerpc/tcb-offsets.sym: Add TID.
1128 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
1130 * tst-getpid1.c: If child crashes, report this first. Print which
1133 2004-12-09 Ulrich Drepper <drepper@redhat.com>
1135 * init.c (__pthread_initialize_minimal_internal): Also unblock
1138 2004-12-01 Jakub Jelinek <jakub@redhat.com>
1140 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
1141 _POSIX_THREAD_CPUTIME): Define to 0.
1142 * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
1143 handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
1144 * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
1145 __timer_signal_thread_tclk): Remove.
1146 (init_module): Remove their initialization.
1147 (thread_cleanup): Remove their cleanup assertions.
1148 * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
1149 __timer_signal_thread_tclk): Remove.
1150 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
1151 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
1152 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
1154 2004-12-07 Jakub Jelinek <jakub@redhat.com>
1156 * sysdeps/ia64/tcb-offsets.sym (TID): Add.
1157 * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
1159 * Makefile (tests): Add tst-getpid2.
1160 * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
1161 (do_test): Use it. Use __clone2 instead of clone on ia64.
1162 * tst-getpid2.c: New test.
1164 2004-12-07 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1166 * sysdeps/unix/sysv/linux/sh/clone.S: New file.
1168 2004-12-04 Ulrich Drepper <drepper@redhat.com>
1170 * Makefile (tests): Add tst-getpid1.
1171 * tst-getpid1.c: New file.
1172 * sysdeps/unix/sysv/linux/i386/clone.S: New file.
1173 * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
1175 2004-12-02 Roland McGrath <roland@redhat.com>
1177 * Makefile (libpthread-nonshared): Variable removed.
1178 ($(objpfx)libpthread_nonshared.a): Target removed.
1179 ($(inst_libdir)/libpthread_nonshared.a): Likewise.
1180 These are now handled by generic magic from
1181 libpthread-static-only-routines being set.
1183 2004-11-27 Ulrich Drepper <drepper@redhat.com>
1185 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
1186 _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
1187 _POSIX_THREAD_PRIO_PROTECT): Define.
1188 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1189 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
1190 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
1192 2004-11-26 Jakub Jelinek <jakub@redhat.com>
1194 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
1195 _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
1196 _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
1197 _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
1198 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1199 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
1200 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
1202 2004-11-24 Ulrich Drepper <drepper@redhat.com>
1204 * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
1206 * Makefile (libpthread-routines): Add pthread_setschedprio.
1207 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
1208 * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
1209 * pthread_setschedprio.c: New file.
1211 2004-11-20 Jakub Jelinek <jakub@redhat.com>
1213 * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
1214 * pthread_cancel.c (pthread_create): Likewise.
1216 * Makefile (libpthread-routines): Add vars.
1217 * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
1218 * init.c (__default_stacksize, __is_smp): Remove.
1220 * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
1221 and define a wrapper macro.
1222 (PTHREAD_STATIC_FN_REQUIRE): Define.
1223 * allocatestack.c (__find_thread_by_id): Undefine.
1224 * pthread_create (__pthread_keys): Remove.
1225 (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
1226 pthread_key_create, pthread_setspecific, pthread_getspecific): Add
1227 PTHREAD_STATIC_FN_REQUIRE.
1229 2004-11-18 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1231 * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
1232 parameter to REGISTER macro.
1234 2004-11-17 Roland McGrath <roland@redhat.com>
1236 * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
1237 Make sure SIGCANCEL is blocked as well.
1239 2004-11-10 Jakub Jelinek <jakub@redhat.com>
1241 * sysdeps/pthread/setxid.h: New file.
1242 * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
1243 (struct xid_command): Add forward decl.
1244 (struct pthread_functions): Change return type of __nptl_setxid hook
1246 * pthreadP.h (__nptl_setxid): Change return type to int.
1247 * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
1248 calling thread, return its return value and set errno on failure.
1249 * descr.h (struct xid_command): Change id type to long array.
1251 * Makefile: Add rules to build and test tst-setuid1 and
1253 * tst-setuid1.c: New test.
1254 * tst-setuid1-static.c: New test.
1256 2004-11-10 Jakub Jelinek <jakub@redhat.com>
1258 * Makefile (tests): Add tst-exit3.
1259 * tst-exit3.c: New test.
1261 2004-11-09 Ulrich Drepper <drepper@redhat.com>
1263 * Makefile (tests): Add tst-exit2.
1264 * tst-exit2.c: New file.
1266 2004-11-09 Roland McGrath <roland@redhat.com>
1269 * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
1270 here, before calling clone.
1271 * pthread_create.c (start_thread): Don't do it here.
1273 2004-11-02 Jakub Jelinek <jakub@redhat.com>
1275 * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
1277 2004-10-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1279 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
1280 Set ETIMEDOUT to errno when time is up. Tweak to avoid
1283 2004-10-28 Jakub Jelinek <jakub@redhat.com>
1285 * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
1286 if sched_priority is not between minprio and maxprio.
1288 2004-10-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1290 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
1291 (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
1293 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
1294 (__lll_mutex_timedlock_wait): Fix a bad branch condition.
1296 2004-10-24 Ulrich Drepper <drepper@redhat.com>
1298 * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
1299 not-cancelable I/O functions.
1301 2004-10-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1303 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
1304 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
1305 make sure 2 is stored in the futex and we looked at the old value.
1306 Fix a few other problems to return the correct value.
1308 2004-10-14 Richard Henderson <rth@redhat.com>
1310 * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
1313 2004-10-06 Jakub Jelinek <jakub@redhat.com>
1315 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
1316 of pthread-functions.h and pthreaddef.h.
1317 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
1319 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
1320 Change __data.__nwaiters from int to unsigned int.
1322 * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
1323 sysconf (_SC_THREAD_CPUTIME) returns negative value.
1325 * allocatestack.c (__find_thread_by_id): Move attribute_hidden
1328 * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
1329 (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
1331 2004-10-06 Ulrich Drepper <drepper@redhat.com>
1333 * tst-cancel4.c (tf_msgrcv): Check for failure in msgget. If the
1334 test fails, remove message queue.
1335 (tf_msgsnd): Likewise.
1337 2004-10-05 Jakub Jelinek <jakub@redhat.com>
1339 * tst-clock1.c: Change #ifdef to #if defined.
1340 * tst-clock2.c: Likewise.
1341 * tst-cond11.c: Likewise.
1343 * sysdeps/pthread/timer_create.c (timer_create): Use
1344 defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
1345 defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
1348 2004-10-05 Jakub Jelinek <jakub@redhat.com>
1350 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
1351 _POSIX_THREAD_CPUTIME): Define to 0.
1353 2004-10-04 Ulrich Drepper <drepper@redhat.com>
1355 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
1356 and _POSIX_THREAD_CPUTIME to zero.
1357 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
1358 * tst-barrier2.c: Fix testing for POSIX feature.
1359 * tst-clock1.c: Likewise.
1360 * tst-clock2.c: Likewise.
1361 * tst-cond11.c: Likewise.
1362 * tst-cond4.c: Likewise.
1363 * tst-cond6.c: Likewise.
1364 * tst-flock2.c: Likewise.
1365 * tst-mutex4.c: Likewise.
1366 * tst-mutex9.c: Likewise.
1367 * tst-rwlock12.c: Likewise.
1368 * tst-rwlock4.c: Likewise.
1369 * tst-signal1.c: Likewise.
1370 * tst-spin2.c: Likewise.
1371 * sysdeps/pthread/posix-timer.h: Likewise.
1372 * sysdeps/pthread/timer_create.c: Likewise.
1373 * sysdeps/pthread/timer_routines.c: Likewise.
1375 2004-10-01 Ulrich Drepper <drepper@redhat.com>
1377 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1378 (__lll_mutex_timedlock_wait): Address futex correctly.
1380 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1381 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
1382 make sure 2 is stored in the futex and we looked at the old value.
1383 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1384 (__lll_mutex_timedlock_wait): Likewise. Fix a few other problems
1385 which might very well made the code not working at all before.
1388 2004-09-28 Ulrich Drepper <drepper@redhat.com>
1390 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
1391 allow SIGSETXID to be sent.
1392 * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
1393 for SIGSETXID to be defined.
1394 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
1395 SIGSETXID cannot be blocked.
1397 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
1398 Add __extension__ to long long types.
1399 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
1400 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1401 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1402 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
1403 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
1404 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
1405 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1407 2004-09-25 Ulrich Drepper <drepper@redhat.com>
1409 * descr.h (struct pthread): Add stopped_start field.
1410 * sysdeps/pthread/createthread.c (create_thread): Set
1411 start_stopped flag in descriptor for new thread appropriately.
1412 * pthread_create.c (start_thread): Only take lock to be stopped on
1413 startup if stopped_start flag says so.
1415 2004-09-24 Ulrich Drepper <drepper@redhat.com>
1417 * pthread_create.c (__pthread_create_2_1): Remember whether thread
1418 is created detached and if yes, do not try to free the stack in case
1419 the thread creation failed.
1420 * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
1421 call fails. Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
1422 case there has been no error. [BZ #405]
1424 * pthread_create.c (start_thread): Don't wait for scheduler data
1425 etc to be set at the beginning of the function. The cancellation
1426 infrastructure must have been set up. And enable async
1427 cancellation before potentially going to sleep. [BZ #401]
1429 2004-09-20 Ulrich Drepper <drepper@redhat.com>
1431 * Versions: Remove exports for pthread_set*id_np functions.
1432 * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
1434 * Makefile: Don't build pthread_set*id code for now.
1436 2004-09-19 Ulrich Drepper <drepper@redhat.com>
1438 * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
1440 * allocatestack.c (__nptl_setxid): New function.
1441 * descr.h (struct xid_command): Define type.
1442 * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
1443 (sighandler_setxid): New function.
1444 (__pthread_initialize_minimal): Register sighandler_setxid for
1446 * pt-allocrtsig.c: Update comment.
1447 * pthreadP.h: Define SIGSETXID. Declare __xidcmd variable.
1448 Declare __nptl_setxid.
1449 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
1450 * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
1451 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
1452 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
1453 and pthread_setresuid_np.
1454 * pthread_setgid_np.c: New file.
1455 * pthread_setuid_np.c: New file.
1456 * pthread_setegid_np.c: New file.
1457 * pthread_seteuid_np.c: New file.
1458 * pthread_setregid_np.c: New file.
1459 * pthread_setreuid_np.c: New file.
1460 * pthread_setresgid_np.c: New file.
1461 * pthread_setresuid_np.c: New file.
1462 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
1463 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
1464 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
1465 and pthread_setresuid_np.
1466 * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
1467 pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
1468 pthread_setregid, and pthread_setresgid.
1470 2004-09-18 Ulrich Drepper <drepper@redhat.com>
1472 * allocatestack.c (allocate_stack): Return EAGAIN instead of
1473 ENOMEM when out of memory.
1475 2004-09-10 Roland McGrath <roland@redhat.com>
1478 * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
1479 code, since we don't try to use the broken CLONE_STOPPED any more.
1480 * pthread_create.c (start_thread): Likewise.
1482 2004-09-15 Richard Henderson <rth@redhat.com>
1484 * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
1486 2004-09-01 David Mosberger <davidm@hpl.hp.com>
1488 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
1489 (__libc_unwind_longjmp): Delete macro and declare as function.
1490 * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
1491 __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
1493 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
1494 * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
1495 * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
1497 2004-09-12 Ulrich Drepper <drepper@redhat.com>
1499 * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
1501 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
1502 types also for __USE_XOPEN2K.
1503 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
1504 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
1505 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1506 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1507 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
1508 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
1509 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1512 2004-09-08 Ulrich Drepper <drepper@redhat.com>
1514 * sysdeps/pthread/pthread.h
1515 (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
1516 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
1517 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
1518 (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
1521 2004-09-07 Ulrich Drepper <drepper@redhat.com>
1523 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
1524 PSEUDO to be used with . prefix.
1526 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
1527 Use atomic_increment instead of atomic_exchange_and_add.
1528 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
1530 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
1532 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
1535 * allocatestack.c (allocate_stack): Use atomic_increment_val
1536 instead of atomic_exchange_and_add.
1537 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
1538 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
1540 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
1543 * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
1544 the initialization function might throw.
1546 2005-09-05 Richard Henderson <rth@redhat.com>
1548 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
1549 Move definition inside libpthread, libc, librt check. Provide
1550 definition for rtld.
1552 2004-09-02 Ulrich Drepper <drepper@redhat.com>
1554 * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
1555 * sysdeps/i386/jmpbuf-unwind.h: Likewise
1556 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
1557 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
1558 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
1559 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
1560 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
1561 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
1564 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
1565 Rename __data.__clock to __data.__nwaiters, make it unsigned int.
1566 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
1568 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
1569 Decrement __nwaiters. If pthread_cond_destroy has been called and
1570 this is the last waiter, signal pthread_cond_destroy caller and
1571 avoid using the pthread_cond_t structure after unlock.
1572 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1573 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1574 Read clock type from the least significant bits of __nwaiters instead
1576 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1577 * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
1579 2004-08-31 Jakub Jelinek <jakub@redhat.com>
1582 * Makefile (tests): Add tst-cond20 and tst-cond21.
1583 * tst-cond20.c: New test.
1584 * tst-cond21.c: New test.
1585 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
1586 (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
1588 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
1590 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
1591 (pthread_cond_t): Likewise.
1592 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
1594 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
1596 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
1598 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
1599 (cond_nwaiters): New.
1601 * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
1602 if there are waiters not signalled yet.
1603 Wait until all already signalled waiters wake up.
1604 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
1605 __nwaiters. If pthread_cond_destroy has been called and this is the
1606 last waiter, signal pthread_cond_destroy caller and avoid using
1607 the pthread_cond_t structure after unlock.
1608 (__pthread_cond_wait): Increment __nwaiters in the beginning,
1609 decrement it when leaving. If pthread_cond_destroy has been called
1610 and this is the last waiter, signal pthread_cond_destroy caller.
1611 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
1612 Likewise. Read clock type from the least significant bits of
1613 __nwaiters instead of __clock.
1614 * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
1615 whether clock ID can be encoded in COND_CLOCK_BITS bits.
1616 * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
1617 clock type just from the last COND_CLOCK_BITS bits of value.
1618 * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
1619 instead of __clock, just from second bit of condattr's value.
1621 2004-08-30 Jakub Jelinek <jakub@redhat.com>
1623 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
1624 bits/wordsize.h. Make the header match i386 header when __WORDSIZE
1626 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
1628 2004-08-15 Roland McGrath <roland@frob.com>
1630 * pthread_atfork.c: Update copyright terms including special exception
1631 for these trivial files, which are statically linked into executables
1632 that use dynamic linking for the significant library code.
1634 2004-08-09 Jakub Jelinek <jakub@redhat.com>
1636 * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
1637 pthread_rwlock_rdlock.
1638 * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
1639 Decrease __nr_readers_queued after reacquiring lock.
1640 * sysdeps/pthread/pthread_rwlock_timedrdlock
1641 (pthread_rwlock_timedrdlock): Likewise.
1642 Reported by Bob Cook <bobcook47@hotmail.com>.
1644 2004-08-11 Jakub Jelinek <jakub@redhat.com>
1646 * tst-rwlock14.c (tf): Read main thread handle from *ARG
1647 before pthread_barrier_wait.
1649 2004-08-07 Ulrich Drepper <drepper@redhat.com>
1651 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1652 Remove unnecessary exception handling data.
1654 2004-07-23 Jakub Jelinek <jakub@redhat.com>
1657 * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
1658 instead of clockid_t.
1660 2004-07-21 Roland McGrath <roland@redhat.com>
1662 * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
1664 2004-07-19 Roland McGrath <roland@redhat.com>
1666 * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
1668 2004-07-02 Roland McGrath <roland@redhat.com>
1670 * configure: Don't exit.
1672 2004-07-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1674 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
1675 (__pthread_cond_timedwait): Check for invalid nanosecond in
1678 2004-07-07 Ulrich Drepper <drepper@redhat.com>
1680 * Makefile: Add rules to build and run tst-fini1.
1681 * tst-fini1.c: New file.
1682 * tst-fini1mod.c: New file.
1684 2004-07-05 Ulrich Drepper <drepper@redhat.com>
1686 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
1687 if no cancellation support is needed.
1688 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1689 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
1690 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
1691 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
1692 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
1693 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
1694 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
1695 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
1696 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
1698 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
1699 only if not already defined.
1701 2004-07-05 Jakub Jelinek <jakub@redhat.com>
1703 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
1704 constraint "m" instead of "0" for futex.
1706 * shlib-versions: Add powerpc64-.*-linux.*.
1708 2004-07-04 Jakub Jelinek <jakub@redhat.com>
1710 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
1711 (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
1713 * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
1714 1 billion and 64-bit tv_nsec which is valid when truncated to 32
1717 2004-06-29 Roland McGrath <roland@redhat.com>
1719 * Banner: NPTL no longer has its own version number.
1720 * Makefile (nptl-version): Variable removed.
1721 * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
1722 using $(version), the glibc version number.
1724 2004-06-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1726 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
1727 Fix branch offset for a PLT entry.
1728 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
1730 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
1732 * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
1734 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
1737 2004-06-28 Jakub Jelinek <jakub@redhat.com>
1739 * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
1742 2004-06-28 Jakub Jelinek <jakub@redhat.com>
1744 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
1745 (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
1747 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
1748 (pthread_rwlock_timedrdlock): Likewise.
1750 2004-06-22 Jakub Jelinek <jakub@redhat.com>
1752 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
1753 Set __r7 to val, not mutex.
1755 2004-06-27 Ulrich Drepper <drepper@redhat.com>
1757 * Makefile: Add rules to build tst-rwlock14.
1758 * tst-rwlock14.c: New file.
1760 2004-06-24 Boris Hu <boris.hu@intel.com>
1762 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
1764 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
1766 2004-06-19 Andreas Jaeger <aj@suse.de>
1768 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
1769 assembler in last patch.
1771 2004-06-17 Ulrich Drepper <drepper@redhat.com>
1773 * sysdeps/pthread/pthread_cond_timedwait.c
1774 (__pthread_cond_timedwait): Also check for negativ nanoseconds.
1775 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
1776 (__pthread_cond_timedwait): Check for invalid nanosecond in
1778 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1779 * tst-cond19.c: New file.
1780 * Makefile: Add rules to build and run tst-cond19.
1782 2004-06-15 Steven Munroe <sjmunroe@us.ibm.com>
1784 * tst-context1.c (GUARD_PATTERN): Defined.
1785 (tst_context_t): Define struct containing ucontext_t & guard words.
1786 (ctx): Declare as an array of tst_context_t.
1787 (fct): Verify uc_link & guard words are still valid.
1788 (tf): Initialize guard words in ctx. Adjust ctx refs for new struct.
1790 2004-06-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1792 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
1793 Add __data.__futex field, reshuffle __data.__clock.
1794 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
1795 (__pthread_cond_signal): Increment __futex at the same time as
1796 __wakeup_seq or __total_seq. Pass address of __futex instead of
1797 address of low 32-bits of __wakeup_seq to futex syscall.
1798 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
1799 (__pthread_cond_wait): Likewise. Pass __futex value from before
1800 releasing internal lock to FUTEX_WAIT.
1801 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
1802 (__pthread_cond_timedwait): Likewise.
1803 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
1804 (FUTEX_CMP_REQUEUE): Define.
1805 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
1806 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
1807 Pass __futex value from before the unlock and __futex address instead
1808 of address of low 32-bits of __wakeup_seq to futex syscall.
1809 Fallback to FUTEX_WAKE all on any errors.
1811 2004-06-08 Jakub Jelinek <jakub@redhat.com>
1813 * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
1815 * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
1816 * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
1817 * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
1818 * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
1819 Likewise. Reported by Bob Cook <bobcook47@hotmail.com>.
1821 2004-06-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
1823 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
1824 Add memory clobber to inline assembly.
1825 (__lll_mutex_trylock): Likewise.
1826 (__lll_mutex_cond_trylock): Likewise.
1828 2004-06-07 Martin Schwidefsky <schwidefsky@de.ibm.com>
1830 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
1831 Pass val argument as 6th system call argument in %r7.
1833 2004-05-21 Jakub Jelinek <jakub@redhat.com>
1835 * Makefile (tests): Add tst-cond16.
1836 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
1837 * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
1838 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
1839 Add __data.__futex field, reshuffle __data.__clock.
1840 * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
1841 (__pthread_cond_signal): Increment __futex at the same time as
1842 __wakeup_seq or __total_seq. Pass address of __futex instead of
1843 address of low 32-bits of __wakeup_seq to futex syscall.
1844 * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
1845 (__pthread_cond_wait): Likewise. Pass __futex value from before
1846 releasing internal lock to FUTEX_WAIT.
1847 * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
1848 (__pthread_cond_timedwait): Likewise.
1849 * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
1850 (FUTEX_CMP_REQUEUE): Define.
1851 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
1852 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
1853 Pass __futex value from before the unlock and __futex address instead
1854 of address of low 32-bits of __wakeup_seq to futex syscall.
1855 Fallback to FUTEX_WAKE all on any errors.
1856 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
1858 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
1859 internally. Return non-zero if error, zero if success.
1860 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
1861 Add __data.__futex field, reshuffle __data.__clock.
1862 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
1864 (lll_futex_requeue): Add val argument, return 1 unconditionally
1866 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
1867 Add __data.__futex field, reshuffle __data.__clock.
1868 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
1870 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
1871 internally. Return non-zero if error, zero if success.
1872 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
1873 (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
1874 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
1876 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
1877 internally. Return non-zero if error, zero if success.
1878 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
1879 Add __data.__futex field, reshuffle __data.__clock.
1880 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
1882 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
1883 internally. Return non-zero if error, zero if success.
1884 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
1885 Add __data.__futex field, reshuffle __data.__clock.
1886 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
1887 Add __data.__futex field, reshuffle __data.__clock.
1888 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
1889 Increment __futex at the same time as __wakeup_seq or __total_seq.
1890 Pass address of __futex instead of address of low 32-bits of
1891 __wakeup_seq to futex syscall.
1892 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
1893 Pass __futex value from before releasing internal lock
1895 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
1896 Likewise. Avoid unnecessary shadowing of variables.
1897 * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
1898 Set __futex to 2 * __total_seq. Pass __futex value from before the
1899 unlock and __futex address instead of address of low 32-bits of
1900 __wakeup_seq to futex_requeue macro, adjust for new return value
1902 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
1903 (__pthread_cond_signal): Increment __futex at the same time as
1904 __wakeup_seq or __total_seq. Pass address of __futex instead of
1905 address of low 32-bits of __wakeup_seq to futex syscall.
1906 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1907 (__pthread_cond_wait): Likewise. Pass __futex value from before
1908 releasing internal lock to FUTEX_WAIT.
1909 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1910 (__pthread_cond_timedwait): Likewise.
1911 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
1912 (FUTEX_CMP_REQUEUE): Define.
1913 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
1914 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
1915 Pass __futex value from before the unlock and __futex address instead
1916 of address of low 32-bits of __wakeup_seq to futex syscall.
1917 Fallback to FUTEX_WAKE all on any errors.
1919 2004-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1921 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
1922 Add nop to align the end of critical section.
1923 (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
1925 2004-06-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1927 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
1928 Add __broadcast_seq field.
1929 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
1930 all waiters as woken with woken_seq and bump broadcast counter.
1931 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
1932 __broadcast_seq. Increment __woken_seq correctly when cleanuped.
1933 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
1934 Comment typo fixes. Avoid returning -ETIMEDOUT.
1936 2004-06-01 Ulrich Drepper <drepper@redhat.com>
1938 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
1939 (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
1940 Reported by Kaz Kojima.
1942 2004-05-25 Jakub Jelinek <jakub@redhat.com>
1944 * sysdeps/unix/sysv/linux/aio_misc.h: New file.
1946 2004-05-21 Jakub Jelinek <jakub@redhat.com>
1948 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
1949 __broadcast_seq with bc_seq after acquiring internal lock instead of
1952 2004-05-18 Jakub Jelinek <jakub@redhat.com>
1954 * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
1956 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
1957 (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
1958 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
1959 (pthread_cond_t): Add __data.__broadcast_seq field.
1960 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1961 (FRAME_SIZE): Define.
1962 (__pthread_cond_timedwait): Use it. Store/check broadcast_seq.
1964 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
1966 (__pthread_cond_wait): Use it. Store/check broadcast_seq. Comment
1968 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
1969 (__pthread_cond_broadcast): Increment broadcast_seq. Comment typo
1972 2004-05-18 Ulrich Drepper <drepper@redhat.com>
1974 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
1975 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
1976 Add __broadcast_seq field.
1977 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1978 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1979 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
1980 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
1981 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
1982 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
1983 all waiters as woken with woken_seq and bump broadcast counter.
1984 * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
1985 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
1986 __broadcast_seq field.
1987 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1988 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
1989 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
1990 * pthread_cond_init.c: Initialize __broadcast_seq field.
1991 * Makefile (tests): Add tst-cond17 and tst-cond18.
1992 Add .NOTPARALLEL goal.
1993 * tst-cond16.c: New file. From Jakub.
1994 * tst-cond17.c: New file. From Jakub.
1995 * tst-cond18.c: New file. From Jakub.
1997 2004-05-16 Ulrich Drepper <drepper@redhat.com>
1999 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
2002 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
2003 Parametrize frame size. Correct some unwind info.
2004 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2006 2004-05-04 Jakub Jelinek <jakub@redhat.com>
2008 * tst-stack3.c: Note testing functionality beyond POSIX.
2010 2004-05-04 Jakub Jelinek <jakub@redhat.com>
2012 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
2013 Change conditional from ifdef to if.
2015 2004-04-23 Jakub Jelinek <jakub@redhat.com>
2017 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
2018 SYSDEP_CANCEL_ERROR): Define.
2021 2004-05-01 Jakub Jelinek <jakub@redhat.com>
2023 * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
2025 2004-04-20 Jakub Jelinek <jakub@redhat.com>
2027 * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
2029 2004-04-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2031 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
2032 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
2033 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
2034 info. Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
2036 2004-04-19 Ulrich Drepper <drepper@redhat.com>
2038 * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
2039 thread has all signals blocked.
2041 2004-04-18 Andreas Jaeger <aj@suse.de>
2043 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
2044 (SEM_VALUE_MAX): Add missing brace.
2046 2004-04-17 Jakub Jelinek <jakub@redhat.com>
2048 * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
2050 (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
2051 * sysdeps/pthread/tst-mqueue8x.c: New test.
2052 * tst-cancel4.c: Update comment about message queues.
2054 * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
2055 return it_value { 0, 0 }.
2056 * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
2058 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
2059 assertion for SIGEV_NONE.
2060 (thread_attr_compare): Compare all attributes, not just a partial
2063 2004-04-17 Jakub Jelinek <jakub@redhat.com>
2065 * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
2067 2004-04-17 Ulrich Drepper <drepper@redhat.com>
2069 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
2070 Just use a plain number.
2071 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
2072 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
2073 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
2074 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
2075 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
2076 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
2077 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
2079 2004-04-16 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2081 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
2083 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2085 2004-04-15 Jakub Jelinek <jakub@redhat.com>
2087 * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
2088 (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
2089 of calling sigwaitinfo.
2091 2004-04-16 Ulrich Drepper <drepper@redhat.com>
2093 * allocatestack.c (allocate_stack): Set reported_guardsize
2095 * pthread_getattr_np.c (pthread_getattr_np): Use
2096 reported_guardsize instead of guardsize.
2097 * descr.h (struct pthread): Add reported_guardsize field.
2099 2004-04-13 Jakub Jelinek <jakub@redhat.com>
2101 * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
2103 2004-04-12 Ulrich Drepper <drepper@redhat.com>
2105 * sysdeps/unix/sysv/linux/mq-notify.c: New file.
2107 2004-04-08 Jakub Jelinek <jakub@redhat.com>
2109 * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
2110 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
2111 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
2112 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
2113 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
2115 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
2116 (_POSIX_MESSAGE_PASSING): Define.
2117 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
2118 (_POSIX_MESSAGE_PASSING): Define.
2119 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
2120 (_POSIX_MESSAGE_PASSING): Define.
2122 2004-04-04 Ulrich Drepper <drepper@redhat.com>
2124 * tst-context1.c (fct): Check whether correct stack is used.
2126 2004-04-03 Ulrich Drepper <drepper@redhat.com>
2128 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
2129 matching constraints for asm mem parameters.
2131 * tst-clock2.c (tf): Don't define unless needed.
2133 2004-03-30 H.J. Lu <hongjiu.lu@intel.com>
2135 * Makefile (link-libc-static): Use $(static-gnulib) instead of
2138 2004-03-30 Ulrich Drepper <drepper@redhat.com>
2140 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
2141 * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
2142 * pthreadP.h: Declare __nptl_deallocate_tsd.
2143 * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
2146 * Makefile (tests): Add tst-tsd5.
2147 * tst-tsd5.c: New file.
2149 2004-03-29 Ulrich Drepper <drepper@redhat.com>
2151 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
2152 (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
2153 is SHLIB_COMPAT check.
2154 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
2155 (__pthread_attr_getaffinity_old): Likewise.
2156 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
2157 (__pthread_getaffinity_old): Likewise.
2158 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2159 (__pthread_setaffinity_old): Likewise.
2161 2004-03-26 Ulrich Drepper <drepper@redhat.com>
2163 * allocatestack.c (_make_stacks_executable): Call
2164 _dl_make_stack_executable first.
2166 2004-03-24 Roland McGrath <roland@redhat.com>
2168 * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
2169 constraint instead of "0".
2171 2004-03-24 Ulrich Drepper <drepper@redhat.com>
2173 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
2174 (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
2176 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
2177 code to avoid warning.
2179 2004-03-24 Andreas Jaeger <aj@suse.de>
2181 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
2182 (__pthread_attr_setaffinity_old): Remove const.
2184 2004-03-23 Ulrich Drepper <drepper@redhat.com>
2186 * sysdeps/unix/sysv/linux/smp.h: New file.
2187 * sysdeps/unix/sysv/linux/sh/smp.h: New file.
2188 * init.c: Define __is_smp.
2189 (__pthread_initialize_minimal_internal): Call is_smp_system to
2190 initialize __is_smp.
2191 * pthreadP.h: Declare __is_smp.
2192 Define MAX_ADAPTIVE_COUNT is necessary.
2193 * pthread_mutex_init.c: Add comment regarding __spins field.
2194 * pthread_mutex_lock.c: Implement adaptive mutex type.
2195 * pthread_mutex_timedlock.c: Likewise.
2196 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
2197 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
2199 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
2200 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2201 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2202 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
2203 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2204 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2205 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2206 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
2207 lll_mutex_cond_trylock.
2208 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2209 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
2210 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2211 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2212 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
2213 Define BUSY_WAIT_NOP.
2214 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2215 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2217 * tst-mutex5.c: Add support for testing adaptive mutexes.
2218 * tst-mutex7.c: Likewise.
2219 * tst-mutex5a.c: New file.
2220 * tst-mutex7a.c: New file.
2221 * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
2223 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2224 (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
2225 vgettimeofday call might destroy the content.
2227 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
2230 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
2231 No need to restrict type of ret. Make it int. Add comment.
2233 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
2234 Remove unnecessary setne instruction.
2236 2004-03-22 Jakub Jelinek <jakub@redhat.com>
2238 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
2239 (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
2240 * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
2241 If realloc fails, break out of the loop.
2243 2004-03-20 Andreas Jaeger <aj@suse.de>
2245 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2246 (__pthread_setaffinity_old): Fix interface.
2247 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
2248 (__pthread_getaffinity_old): Likewise.
2250 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2251 (__pthread_setaffinity_new): Remove duplicate declaration.
2253 2004-03-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2255 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
2256 the return value to a safe register.
2257 (CDISABLE): Set the function argument correctly.
2259 2004-03-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2261 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
2262 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
2263 Rewrite so that only one locked memory operation per round is needed.
2264 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
2265 (pthread_barrier_wait): After wakeup, release lock only when the
2266 last thread stopped using the barrier object.
2267 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
2268 (__pthread_cond_wait): Don't store mutex address if the current
2269 value is ~0l. Add correct cleanup support and unwind info.
2270 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2271 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
2272 (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
2273 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
2274 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
2275 Add correct cleanup support and unwind info.
2276 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
2277 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
2278 information for syscall wrappers.
2280 2004-03-18 Ulrich Drepper <drepper@redhat.com>
2282 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
2283 cpusetsize field, remove next.
2284 * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
2285 parameter for size of the CPU set.
2286 (pthread_setaffinity_np): Likewise.
2287 (pthread_attr_getaffinity_np): Likewise.
2288 (pthread_attr_setaffinity_np): Likewise.
2289 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
2290 interface change, keep compatibility code.
2291 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
2292 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
2293 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
2294 * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np. Declare
2295 __pthread_getaffinity_np.
2296 * Versions: Add version for changed interfaces.
2297 * tst-attr3.c: Adjust test for interface change.
2298 * pthread_getattr_np.c: Query the kernel about the affinity mask with
2299 increasing buffer sizes.
2300 * pthread_attr_destroy.c: Remove unused list handling.
2301 * pthread_attr_init.c: Likewise.
2303 2004-03-17 Roland McGrath <roland@redhat.com>
2305 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
2306 first argument to clock_getres so we ever enable kernel timers.
2308 2004-03-15 Ulrich Weigand <uweigand@de.ibm.com>
2310 * init.c (nptl_version): Add __attribute_used__ to nptl_version.
2312 2004-03-12 Richard Henderson <rth@redhat.com>
2314 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
2315 oldvalue from CENABLE to CDISABLE.
2317 2004-03-12 Ulrich Drepper <drepper@redhat.com>
2319 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
2320 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
2321 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
2322 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
2324 2004-03-11 Richard Henderson <rth@redhat.com>
2326 * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
2327 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
2328 * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
2330 2004-03-11 Jakub Jelinek <jakub@redhat.com>
2332 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
2333 instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
2334 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
2336 2004-03-11 Jakub Jelinek <jakub@redhat.com>
2338 * forward.c (__pthread_cond_broadcast_2_0,
2339 __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
2340 __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
2341 __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
2343 2004-03-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2345 * sysdeps/sh/tcb-offsets.sym: Add PID.
2346 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
2347 * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
2349 2004-03-10 Ulrich Drepper <drepper@redhat.com>
2351 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
2352 include <sysdep-cancel.h>, vfork is no cancellation point.
2353 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
2354 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
2355 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
2357 2004-03-10 Jakub Jelinek <jakub@redhat.com>
2359 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
2361 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
2362 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
2364 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
2366 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
2367 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
2368 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
2369 * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
2370 of DO_CALL_VIA_BREAK. Work around a gas problem.
2372 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
2373 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
2374 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
2375 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
2376 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
2377 * sysdeps/powerpc/tcb-offsets.sym: Add PID.
2379 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
2380 a local register for saving old PID. Negate PID in parent upon exit.
2382 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
2384 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
2385 before syscall, set to the old value in the parent afterwards.
2386 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
2387 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
2389 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
2390 before syscall, set to the old value in the parent afterwards.
2391 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
2392 * sysdeps/s390/tcb-offsets.sym: Add PID.
2394 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
2395 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
2396 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
2397 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
2398 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
2399 * sysdeps/sparc/tcb-offsets.sym: Add PID.
2401 2004-03-10 Andreas Schwab <schwab@suse.de>
2403 * sysdeps/ia64/tcb-offsets.sym: Add PID.
2404 * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
2405 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
2407 2004-03-09 Jakub Jelinek <jakub@redhat.com>
2409 * tst-cancel20.c (do_one_test): Clear in_sh_body first.
2410 * tst-cancel21.c (do_one_test): Likewise.
2411 Reported by Gordon Jin <gordon.jin@intel.com>.
2413 2004-02-09 Jakub Jelinek <jakub@redhat.com>
2415 * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
2416 if non-zero and set to INT_MIN if zero.
2417 * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
2418 * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
2419 (SAVE_PID, RESTORE_PID): Define.
2421 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
2422 Use relative path to avoid including NPTL i386/vfork.S.
2423 (SAVE_PID, RESTORE_PID): Define.
2424 * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
2425 (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
2426 * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
2428 (tests-reverse): Add tst-vfork1x and tst-vfork2x.
2429 * tst-vfork1.c: New test.
2430 * tst-vfork2.c: New test.
2431 * tst-vfork1x.c: New test.
2432 * tst-vfork2x.c: New test.
2434 2004-03-08 Ulrich Drepper <drepper@redhat.com>
2436 * sysdeps/i386/tcb-offsets.sym: Add PID.
2437 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
2438 * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
2439 * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
2441 2004-03-08 Steven Munroe <sjmunroe@us.ibm.com>
2443 * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
2445 2004-03-08 H.J. Lu <hongjiu.lu@intel.com>
2447 * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
2450 2004-03-07 Ulrich Drepper <drepper@redhat.com>
2452 * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
2455 * tst-once4.c: Remove unnecessary macro definition.
2457 * tst-mutex7.c (do_test): Limit thread stack size.
2458 * tst-once2.c (do_test): Likewise.
2459 * tst-tls3.c (do_test): Likewise.
2460 * tst-tls1.c (do_test): Likewise.
2461 * tst-signal3.c (do_test): Likewise.
2462 * tst-kill6.c (do_test): Likewise.
2463 * tst-key4.c (do_test): Likewise.
2464 * tst-join4.c (do_test): Likewise.
2465 * tst-fork1.c (do_test): Likewise.
2466 * tst-context1.c (do_test): Likewise.
2467 * tst-cond2.c (do_test): Likewise.
2468 * tst-cond10.c (do_test): Likewise.
2469 * tst-clock2.c (do_test): Likewise.
2470 * tst-cancel10.c (do_test): Likewise.
2471 * tst-basic2.c (do_test): Likewise.
2472 * tst-barrier4.c (do_test): Likewise.
2474 2004-03-05 Ulrich Drepper <drepper@redhat.com>
2476 * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
2478 2004-03-01 Ulrich Drepper <drepper@redhat.com>
2480 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2481 (__pthread_cond_timedwait): Optimize wakeup test.
2482 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
2483 (__pthread_cond_wait): Likewise.
2484 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
2485 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
2488 2004-02-29 Ulrich Drepper <drepper@redhat.com>
2490 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
2491 (__lll_mutex_lock_wait): Optimize a bit more. Just one copy of
2492 the atomic instruction needed.
2493 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2494 (__lll_mutex_lock_wait): Likewise.
2496 2004-02-28 Ulrich Drepper <drepper@redhat.com>
2498 * Makefile (tests): Add tst-cond14 and tst-cond15.
2499 * tst-cond14.c: New file.
2500 * tst-cond15.c: New file.
2502 2004-02-27 Ulrich Drepper <drepper@redhat.com>
2504 * sysdeps/pthread/createthread.c (create_thread): Remove use of
2505 CLONE_STOPPED. We cannot use SIGCONT which means CLONE_STOPPED
2506 needs to be implemented differently to be useful.
2508 2004-02-26 Ulrich Drepper <drepper@redhat.com>
2510 * pthread_attr_setschedparam.c: Don't test priority against limits
2511 here. Set ATTR_FLAG_SCHED_SET flag.
2512 * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
2513 * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
2514 from parent thread to child. If attribute is used and scheduling
2515 parameters are not inherited, copy parameters from attribute or
2516 compute them. Check priority value.
2517 * pthread_getschedparam.c: If the parameters aren't known yet get
2518 them from the kernel.
2519 * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
2520 ATTR_FLAG_POLICY_SET flag for thread.
2521 * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
2522 and ATTR_FLAG_POLICY_SET.
2524 * sysdeps/pthread/createthread.c: Use tgkill if possible.
2526 * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
2527 fail if stack address hasn't been set. Just return 0.
2529 2004-02-25 Ulrich Drepper <drepper@redhat.com>
2531 * Makefile (tests-nolibpthread): Add tst-unload. Don't link with
2532 libpthread for the files in this list.
2533 (CFLAGS-tst-unload): Removed.
2534 * tst-unload.c (do_test): Don't use complete path for
2537 * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
2540 2004-02-22 Ulrich Drepper <drepper@redhat.com>
2542 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
2543 (__lll_mutex_lock_wait): Rewrite so that only one locked memory
2544 operation per round is needed.
2545 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2546 (__lll_mutex_lock_wait): Likewise.
2548 2004-02-20 Ulrich Drepper <drepper@redhat.com>
2550 * tst-cancel9.c (cleanup): Don't print to stderr.
2552 2004-02-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2554 * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
2556 2004-02-20 Jakub Jelinek <jakub@redhat.com>
2558 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
2559 (__syscall_error_handler2): Call CDISABLE.
2560 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
2561 (__syscall_error_handler2): Call CDISABLE.
2563 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
2564 Release lock before the loop, don't reacquire it.
2566 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
2568 2004-02-19 Andreas Schwab <schwab@suse.de>
2570 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
2573 2004-02-18 Ulrich Drepper <drepper@redhat.com>
2575 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
2576 (pthread_barrier_wait): After wakeup, release lock only when the
2577 last thread stopped using the barrier object.
2578 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
2579 (pthread_barrier_wait): Likewise.
2580 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
2582 * Makefile (tests): Add tst-barrier4.
2583 * tst-barrier4.c: New file.
2585 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2586 (__pthread_cond_timedwait): Perform timeout test while holding
2587 internal lock to prevent wakeup race.
2588 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
2589 * sysdeps/pthread/pthread_cond_timedwait.c
2590 (__pthread_cond_timedwait): Likewise.
2591 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2592 (__pthread_cond_timedwait): Likewise.
2594 2004-02-18 Jakub Jelinek <jakub@redhat.com>
2596 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
2597 (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
2598 * Makefile (tests): Add tst-rwlock13.
2599 * tst-rwlock13.c: New test.
2601 2004-02-16 Ulrich Drepper <drepper@redhat.com>
2603 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2604 (__condvar_tw_cleanup): Little optimization.
2605 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
2607 2004-02-16 Steven Munroe <sjmunroe@us.ibm.com>
2609 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
2610 libpthread as "lib" parameter to SHLIB_COMPAT.
2611 (__novmx_siglongjmp): Fix typo in function name.
2612 (__novmx_longjmp): Fix typo in function name.
2614 2004-02-13 Ulrich Drepper <drepper@redhat.com>
2616 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
2619 * sysdeps/generic/pt-longjmp.c: Moved to...
2620 * sysdeps/pthread/pt-longjmp.c: ...here. New file.
2622 2004-01-29 Steven Munroe <sjmunroe@us.ibm.com>
2624 * Makefile (libpthread-routines): Add pt-cleanup.
2625 * pt-longjmp.c: Removed.
2626 * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
2627 * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
2628 * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
2629 Version longjmp, siglongjmp for GLIBC_2.3.4.
2630 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
2632 2004-02-13 Ulrich Drepper <drepper@redhat.com>
2634 * sysdeps/pthread/pthread_cond_timedwait.c
2635 (__pthread_cond_timedwait): Optimize. Drop internal lock earlier.
2636 Reuse code. Add __builtin_expects.
2638 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2639 (__pthread_cond_timedwait): Get internal lock in case timeout has
2640 passed before the futex syscall.
2641 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2643 2004-01-20 Ulrich Drepper <drepper@redhat.com>
2645 * allocatestack.c: Pretty printing.
2647 * sysdeps/pthread/createthread.c (create_thread): Don't add
2648 CLONE_DETACHED bit if it is not necessary.
2650 2004-01-16 Ulrich Drepper <drepper@redhat.com>
2652 * pthread_getattr_np.c: Include ldsodefs.h.
2654 2004-01-16 Richard Henderson <rth@redhat.com>
2656 * allocatestack.c: Don't declare __libc_stack_end.
2657 * init.c (__pthread_initialize_minimal_internal): Likewise.
2658 * pthread_getattr_np.c (pthread_getattr_np): Likewise.
2660 2004-01-15 Richard Henderson <rth@redhat.com>
2662 * sysdeps/alpha/tls.h (tcbhead_t): Add private.
2663 (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
2664 TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
2665 GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
2666 (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
2667 (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
2668 (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
2669 * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
2671 2004-01-14 Ulrich Drepper <drepper@redhat.com>
2673 * init.c (pthread_functions): Make array const.
2675 2004-01-13 Ulrich Drepper <drepper@redhat.com>
2677 * allocatestack.c (__make_stacks_executable): Change interface.
2678 Check parameters. Pass parameter on to libc counterpart.
2679 * pthreadP.h: Change declaration.
2681 2004-01-13 Richard Henderson <rth@redhat.com>
2683 * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
2685 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
2688 * sysdeps/alpha/Makefile: New file.
2689 * sysdeps/alpha/tcb-offsets.sym: New file.
2690 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
2691 Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
2693 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
2696 2004-01-08 Jakub Jelinek <jakub@redhat.com>
2698 * Makefile (tests): Add tst-backtrace1.
2699 * tst-backtrace1.c: New test.
2701 2003-12-11 Ulrich Weigand <uweigand@de.ibm.com>
2703 * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
2704 register as second parameter to the REGISTER macro.
2705 * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
2706 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
2707 * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
2708 * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
2709 * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
2710 of thread register as second parameter to REGISTER macro in 64 case.
2712 2004-01-03 Ulrich Drepper <drepper@redhat.com>
2714 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
2715 (CFLAGS-getpid.o): Defined.
2716 (CFLAGS-getpid.os): Defined.
2718 2003-12-31 Ulrich Drepper <drepper@redhat.com>
2720 * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
2721 returned for main thread does not overlap with any other VMA.
2722 Patch by Jakub Jelinek.
2724 2003-12-29 Jakub Jelinek <jakub@redhat.com>
2726 * tst-raise1.c: Include stdio.h.
2728 2003-12-23 Jakub Jelinek <jakub@redhat.com>
2730 * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
2731 setting with __ASSUME_TGKILL || defined __NR_tgkill.
2732 If pid is 0, set it to selftid.
2733 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
2734 Don't set self->pid but self->tid. If self->pid == 0 and self->tid
2735 != 0, return self->tid without doing a syscall.
2736 * descr.h (struct pthread): Move pid field after tid.
2738 * Makefile (tests): Add tst-raise1.
2739 * tst-raise1.c: New file.
2741 2003-12-23 Roland McGrath <roland@redhat.com>
2743 * tst-oddstacklimit.c: New file.
2744 * Makefile (tests): Add it.
2745 (tst-oddstacklimit-ENV): New variable.
2747 * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
2748 value up to page size for __default_stacksize.
2750 2003-12-21 Ulrich Drepper <drepper@redhat.com>
2752 * Makefile (tests): Add tst-eintr5.
2753 * tst-eintr5.c: New file.
2755 * eintr.c (eintr_source): Prevent sending signal to self.
2757 * tst-eintr2.c (tf1): Improve error message.
2759 2003-12-20 Ulrich Drepper <drepper@redhat.com>
2761 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
2762 * sysdeps/unix/sysv/linux/getpid.c: New file.
2763 * pthread_cancel.c: Add comment explaining use of PID field.
2764 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
2765 * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
2766 * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
2767 temporarily to signal the field must not be relied on and updated
2769 * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
2770 temporarily negative.
2771 * sysdeps/unix/sysv/linux/raise.c: Likewise.
2773 2003-12-19 Ulrich Drepper <drepper@redhat.com>
2775 * eintr.c (setup_eintr): Add new parameter. Pass to thread function.
2776 (eintr_source): If ARG != NULL, use pthread_kill.
2777 * tst-eintr1.c: Adjust for this change.
2778 * tst-eintr2.c: Likewise.
2779 * Makefile (tests): Add tst-eintr3 and tst-eintr4.
2780 * tst-eintr3.c: New file.
2781 * tst-eintr4.c: New file.
2783 2003-12-19 Jakub Jelinek <jakub@redhat.com>
2785 * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
2786 if CANCELSTATE_BITMASK is set.
2787 * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
2790 * Makefile (tests): Add tst-cancel22 and tst-cancel23.
2791 (tests-reverse): Add tst-cancel23.
2792 * tst-cancel22.c: New test.
2793 * tst-cancel23.c: New test.
2795 2003-12-18 Ulrich Drepper <drepper@redhat.com>
2797 * tst-eintr1.c: Better error messages.
2799 * Makefile (tests): Add tst-eintr2.
2800 * tst-eintr2.c: New file.
2802 2003-12-18 Jakub Jelinek <jakub@redhat.com>
2804 * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
2805 (CFLAGS-tst-cancelx21.c): Set.
2806 * tst-cancel21.c: New test.
2807 * tst-cancelx21.c: New test.
2809 * unwind.c (FRAME_LEFT): Add adj argument. Subtract it from each
2811 (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
2812 _JMPBUF_CFA_UNWINDS. Adjust FRAME_LEFT invocations.
2813 * pt-longjmp.c: Include jmpbuf-unwind.h.
2814 (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
2815 _JMPBUF_UNWINDS. Adjust compared pointers.
2816 * init.c (__pthread_initialize_minimal_internal): Initialize
2817 pd->stackblock_size.
2818 * sysdeps/pthread/jmpbuf-unwind.h: Removed.
2819 * sysdeps/alpha/jmpbuf-unwind.h: New file.
2820 * sysdeps/i386/jmpbuf-unwind.h: New file.
2821 * sysdeps/powerpc/jmpbuf-unwind.h: New file.
2822 * sysdeps/s390/jmpbuf-unwind.h: New file.
2823 * sysdeps/sh/jmpbuf-unwind.h: New file.
2824 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
2825 * sysdeps/x86_64/jmpbuf-unwind.h: New file.
2826 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
2827 (_JMPBUF_CFA_UNWINDS): Remove.
2828 (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
2830 2003-12-12 Jakub Jelinek <jakub@redhat.com>
2832 * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
2833 (CFLAGS-tst-cancelx20.c): Set.
2834 * tst-cancel20.c: New test.
2835 * tst-cancelx20.c: New test.
2837 2003-12-17 Ulrich Drepper <drepper@redhat.com>
2839 * init.c (__pthread_initialize_minimal_internal): Don't treat
2840 architectures with separate register stack special here when
2841 computing default stack size.
2843 2003-12-17 Roland McGrath <roland@redhat.com>
2845 * Makefile (tst-cancelx7-ARGS): New variable.
2846 Reportd by Greg Schafer <gschafer@zip.com.au>.
2848 2003-12-17 Jakub Jelinek <jakub@redhat.com>
2850 * Makefile (tests): Add tst-stack3. Depend on $(objpfx)tst-stack3-mem.
2851 (generated): Add tst-stack3.mtrace and tst-stack3-mem.
2852 (tst-stack3-ENV): Set.
2853 ($(objpfx)tst-stack3-mem): New.
2854 * tst-stack3.c: New test.
2856 2003-12-10 David Mosberger <davidm@hpl.hp.com>
2858 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
2859 Add unwind directives. Drop unused .regstk directive.
2860 (_fini_EPILOG_BEGINS): Add unwind directives.
2862 2003-12-11 Ulrich Drepper <drepper@redhat.com>
2864 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
2865 Assume parameter is a pointer.
2866 (lll_futex_wake): Likewise.
2867 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
2869 (lll_futex_wake): Likewise.
2870 Reported by Boris Hu.
2871 * sysdeps/unix/sysv/linux/unregister-atfork.c
2872 (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
2874 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
2876 2003-12-10 Ulrich Drepper <drepper@redhat.com>
2878 * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
2879 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
2880 __rtld_lock_initialize for ld.so lock.
2881 Patch in part by Adam Li <adam.li@intel.com>.
2883 2003-12-02 David Mosberger <davidm@hpl.hp.com>
2885 * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
2886 in $(gnulib). Also, remove stale comment.
2888 2003-11-12 David Mosberger <davidm@hpl.hp.com>
2890 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
2891 advantage of new syscall stub and optimize accordingly.
2893 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
2894 from SYS_futex, to match expectations of
2895 sysdep.h:DO_INLINE_SYSCALL.
2896 (lll_futex_clobbers): Remove.
2897 (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
2898 (lll_futex_wake): Likewise.
2899 (lll_futex_requeue): Likewise.
2900 (__lll_mutex_trylock): Rewrite to a macro, so we can include this
2901 file before DO_INLINE_SYSCALL is defined (proposed by Jakub
2903 (__lll_mutex_lock): Likewise.
2904 (__lll_mutex_cond_lock): Likewise.
2905 (__lll_mutex_timed_lock): Likewise.
2906 (__lll_mutex_unlock): Likewise.
2907 (__lll_mutex_unlock_force): Likewise.
2909 * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
2910 comes before the include of <sysdep.h>.
2911 (THREAD_SELF_SYSINFO): New macro.
2912 (THREAD_SYSINFO): Likewise.
2913 (INIT_SYSINFO): New macro.
2914 (TLS_INIT_TP): Call INIT_SYSINFO.
2916 * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
2918 * sysdeps/pthread/createthread.c (create_thread): Use
2919 THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
2920 * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
2921 THREAD_SELF_SYSINFO instead of open code.
2922 * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
2923 (THREAD_SYSINFO): Likewise.
2925 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
2927 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
2929 2003-12-06 Ulrich Drepper <drepper@redhat.com>
2931 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
2932 instead of .init. Patch by David Mosberger.
2934 2003-11-30 Thorsten Kukuk <kukuk@suse.de>
2936 * sysdeps/pthread/configure.in: Remove broken declaration in C
2937 cleanup handling check.
2939 2003-11-30 Andreas Jaeger <aj@suse.de>
2941 * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
2942 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
2945 2003-11-27 Jakub Jelinek <jakub@redhat.com>
2947 * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
2948 * pthread_attr_destroy.c: Include shlib-compat.h.
2949 (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
2950 is set in iattr->flags.
2951 * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
2953 2003-11-21 Jakub Jelinek <jakub@redhat.com>
2955 * Makefile (distribute): Add tst-cleanup4aux.c.
2957 * tst-cond12.c (prepare): Add prototype. Move after test-skeleton.c
2960 2003-11-21 Ulrich Drepper <drepper@redhat.com>
2962 * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
2963 pthread_cond_signal.
2965 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
2966 store mutex address if the current value is ~0l.
2967 * sysdeps/pthread/pthread_cond_timedwait.c
2968 (__pthread_cond_timedwait): Likewise.
2969 * sysdeps/pthread/pthread_cond_broadcast.c
2970 (__pthread_cond_broadcast): Don't use requeue for pshared
2973 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2974 (__pthread_cond_wait): Don't store mutex address if the current
2976 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2977 (__pthread_cond_timedwait): Likewise.
2978 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2979 (__pthread_cond_broadcast): Don't use requeue for pshared
2982 * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
2983 element with ~0l for pshared condvars, with NULL otherwise.
2985 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
2986 (__pthread_cond_wait): Don't store mutex address if the current
2988 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2989 (__pthread_cond_timedwait): Likewise.
2990 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
2991 (__pthread_cond_broadcast): Don't use requeue for pshared
2994 * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
2995 * tst-cond12.c: New file.
2996 * tst-cond13.c: New file.
2998 2003-11-17 Ulrich Drepper <drepper@redhat.com>
3000 * sysdeps/pthread/configure.in: Make missing forced unwind support
3003 2003-11-11 Ulrich Drepper <drepper@redhat.com>
3005 * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
3007 2003-11-06 Ulrich Drepper <drepper@redhat.com>
3009 * Makefile: Add magic to clean up correctly.
3011 2003-11-05 Jakub Jelinek <jakub@redhat.com>
3013 * unwind.c (FRAME_LEFT): Define.
3014 (unwind_stop): Handle old style cleanups here.
3015 (__pthread_unwind): Handle old style cleanups only if
3016 !HAVE_FORCED_UNWIND.
3017 * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
3018 (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
3019 ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
3020 ($(objpfx)tst-cleanupx4): Likewise.
3021 * tst-cleanup4.c: New test.
3022 * tst-cleanup4aux.c: New.
3023 * tst-cleanupx4.c: New test.
3025 2003-11-04 Ulrich Drepper <drepper@redhat.com>
3027 * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
3028 lll_mutex_*lock macros to skip atomic operations on some archs.
3030 2003-11-03 Ulrich Drepper <drepper@redhat.com>
3032 * sysdeps/pthread/tst-timer.c (main): Initialize
3033 sigev2.sigev_value as well.
3035 2003-10-15 Roland McGrath <roland@redhat.com>
3037 * sysdeps/pthread/configure.in: Barf if visibility attribute support
3039 * sysdeps/pthread/configure: Regenerated.
3041 2003-10-09 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3043 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
3044 locking macros. No distinction between normal and mutex locking
3046 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
3047 Merge bits from lowlevelmutex.S we still need.
3048 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
3049 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
3050 * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
3051 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
3052 new mutex implementation.
3053 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
3054 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
3055 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
3056 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
3057 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
3058 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
3059 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
3060 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
3061 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
3062 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
3063 symbol for entry point to avoid cancellation.
3065 2003-10-07 Jakub Jelinek <jakub@redhat.com>
3067 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
3069 (SAVE_OLDTYPE_0): Fix a typo.
3071 2003-10-03 Ulrich Drepper <drepper@redhat.com>
3073 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
3074 Check __sigsetjmp return value. Reported by Daniel Jacobowitz.
3076 2003-10-02 Ulrich Drepper <drepper@redhat.com>
3078 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
3081 2003-10-02 Jakub Jelinek <jakub@redhat.com>
3083 * Makefile (tests): Add tst-cancel19.
3084 * tst-cancel19.c: New test.
3086 2003-10-02 Ulrich Drepper <drepper@redhat.com>
3088 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
3089 restoring of the old cancellation type.
3091 2003-09-30 Jakub Jelinek <jakub@redhat.com>
3093 * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
3095 2003-09-27 Wolfram Gloger <wg@malloc.de>
3097 * sysdeps/pthread/malloc-machine.h: New file
3099 2003-09-24 Roland McGrath <roland@redhat.com>
3101 * allocatestack.c (__make_stacks_executable): Don't ignore return
3102 value from _dl_make_stack_executable.
3104 2003-09-24 Ulrich Drepper <drepper@redhat.com>
3106 * allocatestack.c (__make_stacks_executable): Also change
3107 permission of the currently unused stacks.
3109 * allocatestack.c (change_stack_perm): Split out from
3110 __make_stacks_executable.
3111 (allocate_stack): If the required permission changed between the time
3112 we started preparing the stack and queueing it, change the permission.
3113 (__make_stacks_executable): Call change_stack_perm.
3115 * Makefile: Build tst-execstack-mod locally.
3116 * tst-execstack-mod.c: New file.
3118 2003-09-23 Jakub Jelinek <jakub@redhat.com>
3120 * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
3122 2003-09-23 Roland McGrath <roland@redhat.com>
3124 * tst-execstack.c: New file.
3125 * Makefile (tests): Add it.
3126 ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
3127 (LDFLAGS-tst-execstack): New variable.
3129 * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
3130 whether to use PROT_EXEC for stack mmap.
3131 (__make_stacks_executable): New function.
3132 * pthreadP.h: Declare it.
3133 * init.c (__pthread_initialize_minimal_internal): Set
3134 GL(dl_make_stack_executable_hook) to that.
3136 2003-09-22 Ulrich Drepper <drepper@redhat.com>
3138 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
3139 recommendation from AMD re avoidance of lock prefix.
3141 2003-09-22 Jakub Jelinek <jakub@redhat.com>
3143 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
3144 lll_futex_timed_wait instead of lll_futex_wait.
3145 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
3146 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
3147 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
3148 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
3149 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
3150 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
3151 * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
3152 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
3153 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
3154 Completely revamp the locking macros. No distinction between
3155 normal and mutex locking anymore.
3156 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
3157 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
3158 __lll_lock_timedwait): Fix prototypes.
3159 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
3160 __lll_lock_timedwait): Likewise.
3161 (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
3162 macros, add __builtin_expect.
3163 (lll_mutex_timedlock): Likewise. Fix return value.
3164 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
3165 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
3166 * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
3167 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
3168 * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
3169 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
3170 * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
3171 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
3173 2003-09-22 Ulrich Drepper <drepper@redhat.com>
3175 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
3176 (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
3177 operation if possible.
3179 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
3180 like jumping over the lock prefix.
3182 2003-09-21 Ulrich Drepper <drepper@redhat.com>
3184 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
3185 locking macros. No distinction between normal and mutex locking
3187 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3188 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3189 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3190 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
3191 locking. Merge bits from lowlevelmutex.S we still need.
3192 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
3193 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
3194 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
3195 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
3196 * Makefile (routines): Remove libc-lowlevelmutex.
3197 (libpthread-rountines): Remove lowlevelmutex.
3198 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
3199 for new mutex implementation.
3200 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
3201 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3202 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3203 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
3204 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3206 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3208 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
3209 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
3210 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
3211 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
3212 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3213 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3214 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3215 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3217 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3219 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
3220 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3221 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
3223 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
3224 * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
3226 2003-09-20 Ulrich Drepper <drepper@redhat.com>
3228 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
3229 in parameters of asm with output parameters.
3231 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
3232 type of DECR parameter to int.
3233 * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
3235 2003-09-18 Jakub Jelinek <jakub@redhat.com>
3237 * tst-attr3.c (tf, do_test): Print stack start/end/size and
3238 guardsize for each thread.
3240 2003-09-17 Jakub Jelinek <jakub@redhat.com>
3242 * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
3243 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
3244 (pthread_attr_setaffinity_np): Handle cpuset == NULL.
3246 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
3247 (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
3249 * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
3250 * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
3251 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
3252 (pthread_getaffinity_np): Add hidden_def.
3254 * Makefile (tests): Add tst-attr3.
3255 * tst-attr3.c: New test.
3257 * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
3259 2003-09-15 Jakub Jelinek <jakub@redhat.com>
3261 * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
3262 CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
3264 2003-09-17 Jakub Jelinek <jakub@redhat.com>
3266 * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
3267 * tst-align.c: Include tst-stack-align.h.
3268 (tf, do_test): Use TEST_STACK_ALIGN macro.
3270 2003-09-17 Ulrich Drepper <drepper@redhat.com>
3272 * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
3275 2003-09-16 Ulrich Drepper <drepper@redhat.com>
3277 * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
3278 stack-related values for the initial thread.
3280 2003-09-15 Jakub Jelinek <jakub@redhat.com>
3282 * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
3284 2003-09-11 Ulrich Drepper <drepper@redhat.com>
3286 * pthread_mutex_lock.c: Minor code rearrangements.
3288 2003-09-05 Roland McGrath <roland@redhat.com>
3290 * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
3291 Instead, include ../nptl_db/db_info.c to do its magic.
3292 * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
3293 (__pthread_pthread_key_2ndlevel_size): Likewise.
3294 * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
3295 * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
3296 * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
3297 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
3298 * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
3299 * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
3300 * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
3301 * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
3302 * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
3303 * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
3304 * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
3305 * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
3306 * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
3307 * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
3308 * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
3309 * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
3310 * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
3312 2003-09-08 Ulrich Drepper <drepper@redhat.com>
3314 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
3315 of pthread_t to be compatible with LT.
3316 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3317 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
3318 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3319 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3320 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
3321 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3322 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
3324 2003-09-04 Ulrich Drepper <drepper@redhat.com>
3326 * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
3328 2003-09-04 Jakub Jelinek <jakub@redhat.com>
3330 * unwind-forcedunwind.c: Move to...
3331 * sysdeps/pthread/unwind-forcedunwind.c: ...here.
3332 (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
3333 * sysdeps/pthread/jmpbuf-unwind.h: New file.
3334 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
3335 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
3336 * unwind.c: Include jmpbuf-unwind.h.
3337 (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
3339 2003-09-02 Jakub Jelinek <jakub@redhat.com>
3341 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
3342 * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
3343 pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
3344 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
3345 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
3346 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
3347 * sysdeps/unix/sysv/linux/sparc/Versions: New file.
3348 * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
3349 (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
3350 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
3351 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
3353 (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
3354 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
3355 * Makefile (tests): Add tst-stack2.
3356 * tst-stack2.c: New test.
3357 * tst-stack1.c: Include limits.h and sys/param.h.
3358 (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
3360 * pthread_condattr_setpshared.c: Include errno.h.
3361 (pthread_condattr_setpshared): Return EINVAL if pshared
3362 is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
3364 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
3365 defined symbol for entry point to avoid cancellation.
3366 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
3368 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
3370 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
3372 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
3374 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
3376 * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
3377 __close_nocancel, __read_nocancel, __write_nocancel,
3378 __waitpid_nocancel): Add attribute_hidden. If not in libc.so,
3379 libpthread.so or librt.so, define to corresponding function
3380 without _nocancel suffix.
3381 * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
3382 * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
3383 * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
3385 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
3387 2003-09-02 Ulrich Drepper <drepper@redhat.com>
3389 * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
3390 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
3392 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
3393 in subsections has a symbol associated with it.
3395 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
3396 defined symbol for entry point to avoid cancellation.
3397 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
3399 2003-09-01 Jakub Jelinek <jakub@redhat.com>
3401 * Makefile (tests): Add tst-tls5.
3402 (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
3403 ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
3404 ($(objpfx)tst-tls5): New.
3405 ($(objpfx)tst-tls6.out): Likewise.
3406 (tests): Depend on $(objpfx)tst-tls6.out.
3407 * tst-tls3.c: Include stdint.h and pthreaddef.h.
3408 (do_test): Check pthread_self () return value alignment.
3409 * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
3410 (tf): Check pthread_self () return value alignment.
3411 * tst-tls5.c: New test.
3413 * tst-tls5mod.c: New.
3414 * tst-tls5moda.c: New.
3415 * tst-tls5modb.c: New.
3416 * tst-tls5modc.c: New.
3417 * tst-tls5modd.c: New.
3418 * tst-tls5mode.c: New.
3419 * tst-tls5modf.c: New.
3420 * tst-tls6.sh: New test.
3422 * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
3423 ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
3424 * init.c (pthread_functions): Initialize them.
3425 * forward.c (pthread_cond_timedwait@GLIBC_2.0,
3426 pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
3427 * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
3428 pthread_cond_timedwait@@GLIBC_2.3.2.
3430 2003-09-01 Jakub Jelinek <jakub@redhat.com>
3432 * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
3433 * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
3434 * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
3435 * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
3436 * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
3437 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
3439 * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
3441 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
3442 _POSIX_THREAD_PRIORITY_SCHEDULING.
3443 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3445 2003-08-31 Ulrich Drepper <drepper@redhat.com>
3447 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
3448 nested function, use static inline function from libio.h.
3449 Code by Richard Henderson.
3451 * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
3454 2003-08-30 Jakub Jelinek <jakub@redhat.com>
3456 * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
3457 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
3458 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
3459 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
3460 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
3461 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
3462 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
3463 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
3464 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
3465 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
3466 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
3467 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
3468 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
3469 * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
3470 * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
3471 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
3472 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
3473 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
3474 * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
3475 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
3476 * sysdeps/sparc/sparc32/pthreaddef.h: New file.
3477 * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
3478 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
3479 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
3480 * sysdeps/sparc/sparc64/pthreaddef.h: New file.
3481 * sysdeps/sparc/tls.h: New file.
3482 * sysdeps/sparc/tcb-offsets.sym: New file.
3483 * sysdeps/sparc/Makefile: New file.
3484 * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
3485 * init.c [__sparc__] (__NR_set_tid_address): Define.
3487 2003-08-29 Jakub Jelinek <jakub@redhat.com>
3489 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
3490 _IO_release_lock): Define.
3492 2003-08-29 Jakub Jelinek <jakuB@redhat.com>
3494 * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
3495 sigemptyset before sigaddset. Reported by jreiser@BitWagon.com.
3497 2003-08-27 Ulrich Drepper <drepper@redhat.com>
3499 * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
3500 (__pthread_cleanup_class): Add missing return types of member
3503 2003-08-26 Steven Munroe <sjmunroe@us.ibm.com>
3505 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3506 (lll_mutex_unlock_force): Add memory barrier between store and futex
3509 2003-08-25 Ulrich Drepper <drepper@redhat.com>
3511 * tst-cancel4.c (do_test): Also unlink tempfname and remove
3512 tempmsg in first loop.
3514 2003-08-18 Ulrich Drepper <drepper@redhat.com>
3516 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
3517 _POSIX_THREAD_PRIORITY_SCHEDULING.
3518 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3520 2003-08-07 Jakub Jelinek <jakub@redhat.com>
3522 * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
3523 (__rtld_lock_default_lock_recursive,
3524 __rtld_lock_default_unlock_recursive): Define.
3525 [_LIBC && SHARED] (__rtld_lock_lock_recursive,
3526 __rtld_lock_unlock_recursive): Define using
3527 GL(_dl_rtld_*lock_recursive).
3528 * init.c (__pthread_initialize_minimal_internal): Initialize
3529 _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
3530 Lock GL(_dl_load_lock) the same number of times as
3531 GL(_dl_load_lock) using non-mt implementation was nested.
3533 * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
3534 * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
3536 2003-08-06 Jakub Jelinek <jakub@redhat.com>
3538 * tst-cancel17.c (do_test): Make len2 maximum of page size and
3541 2003-08-07 Jakub Jelinek <jakub@redhat.com>
3543 * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
3545 2003-08-03 Jakub Jelinek <jakub@redhat.com>
3547 * sysdeps/pthread/createthread.c (do_clone): Move error handling
3548 to first syscall error check. Move syscall error check for tkill
3549 into __ASSUME_CLONE_STOPPED #ifdef.
3551 2003-08-02 Ulrich Drepper <drepper@redhat.com>
3553 * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
3554 is not defined, do explicit synchronization.
3555 (create_thread): Do not lock pd->lock here. If __ASSUME_CLONE_STOPPED
3556 is not defined also unlock pd->lock for non-debugging case in case
3558 * pthread_create.c (start_thread): Always get and release pd->lock
3559 if __ASSUME_CLONE_STOPPED is not defined.
3560 (start_thread_debug): Removed. Adjust users.
3561 * allocatestack.c (allocate_stack): Always initialize lock if
3562 __ASSUME_CLONE_STOPPED is not defined.
3563 * Makefile (tests): Add tst-sched1.
3564 * tst-sched1.c: New file.
3566 * sysdeps/pthread/createthread.c (do_clone): Only use
3567 sched_setschduler and pass correct parameters.
3569 2003-07-31 Jakub Jelinek <jakub@redhat.com>
3571 * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
3572 pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
3573 PTHREAD_STACK_MIN in comments.
3575 2003-07-31 Jakub Jelinek <jakub@redhat.com>
3577 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
3578 Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
3580 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
3581 * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
3582 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
3583 (__pthread_cleanup_upto): Fix prototype.
3584 (_longjmp_unwind): Adjust caller.
3585 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
3586 Change second argument to const struct pointer.
3587 * tst-sem8.c (main): Remove unused s2 and s3 variables.
3588 * tst-sem9.c (main): Likewise.
3589 * unwind.c: Include string.h for strlen prototype.
3591 2003-07-31 Ulrich Drepper <drepper@redhat.com>
3593 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
3594 (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
3595 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
3597 Patch by Nicholas Miell <nmiell@attbi.com>.
3599 2003-07-30 Jakub Jelinek <jakub@redhat.com>
3601 * init.c (__pthread_initialize_minimal_internal): Initialize
3602 GL(dl_init_static_tls).
3603 * pthreadP.h (__pthread_init_static_tls): New prototype.
3604 * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
3606 * Makefile (tests): Add tst-tls4.
3607 (modules-names): Add tst-tls4moda and tst-tls4modb.
3608 ($(objpfx)tst-tls4): Link against libdl and libpthread.
3609 ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
3611 * tst-tls4.c: New file.
3612 * tst-tls4moda.c: New file.
3613 * tst-tls4modb.c: New file.
3615 2003-06-19 Daniel Jacobowitz <drow@mvista.com>
3617 * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
3618 before __timer_dealloc.
3619 * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
3620 Don't call list_unlink.
3622 2003-07-29 Roland McGrath <roland@redhat.com>
3624 * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
3626 2003-07-25 Jakub Jelinek <jakub@redhat.com>
3628 * tst-cancel17.c (do_test): Check if aio_cancel failed.
3629 Don't reuse struct aiocb A if it failed.
3630 Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
3631 not just one byte, as that does not block.
3633 2003-07-22 Jakub Jelinek <jakub@redhat.com>
3635 * sysdeps/pthread/unwind-resume.c: New file.
3636 * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
3637 unwind-resume in csu subdir.
3638 (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
3640 (librt-sysdep_routines, librt-shared-only-routines): Add
3642 * sysdeps/pthread/rt-unwind-resume.c: New file.
3643 * unwind-forcedunwind.c: New file.
3644 * Makefile (libpthread-routines): Add unwind-forcedunwind.
3645 (libpthread-shared-only-routines): Likewise.
3646 (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
3647 * pthreadP.h (pthread_cancel_init): New prototype.
3648 * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
3650 * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
3651 attr argument const struct pthread_attr *.
3653 * res.c (__res_state): Return __resp.
3654 * descr.h: Include resolv.h.
3655 (struct pthread): Add res field.
3656 * pthread_create.c: Include resolv.h.
3657 (start_thread): Initialize __resp.
3658 * Makefile (tests): Add tst-_res1.
3659 (module-names): Add tst-_res1mod1, tst-_res1mod2.
3660 ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
3661 ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
3663 * tst-_res1.c: New file.
3664 * tst-_res1mod1.c: New file.
3665 * tst-_res1mod2.c: New file.
3667 2003-07-21 Ulrich Drepper <drepper@redhat.com>
3669 * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
3671 * Makefile: Define various *-no-z-defs variables for test DSOs
3672 which has undefined symbols.
3674 2003-07-21 Steven Munroe <sjmunroe@us.ibm.com>
3676 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
3677 Retry if the stwcx fails to store once_control.
3679 2003-07-20 Ulrich Drepper <drepper@redhat.com>
3681 * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
3682 pthread_attr_setaffinity.
3683 * Versions [libpthread] (GLIBC_2.3.3): Likewise.
3684 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
3685 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
3686 * pthread_attr_destroy.c: Free cpuset element if allocated.
3687 * pthread_create.c: Pass iattr as additional parameter to
3689 * sysdeps/pthread/createthread.c: If attribute is provided and
3690 a new thread is created with affinity set or scheduling parameters,
3691 start thread with CLONE_STOPPED.
3692 * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
3693 pthread_attr_setaffinity.
3694 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
3697 2003-07-15 Ulrich Drepper <drepper@redhat.com>
3699 * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
3701 2003-07-14 Ulrich Drepper <drepper@redhat.com>
3703 * sysdeps/pthread/configure.in: Require CFI directives also for
3706 2003-07-15 Jakub Jelinek <jakub@redhat.com>
3708 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
3711 2003-07-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3713 * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
3715 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
3716 registers as variables. Call __pthread_mutex_unlock_usercnt.
3717 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
3718 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
3719 not self pointer in __writer. Compare with TID to determine
3721 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
3722 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
3724 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
3726 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
3727 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
3728 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
3729 macros also when compiling librt.
3731 2003-07-11 Jakub Jelinek <jakub@redhat.com>
3733 * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
3734 -fasynchronous-unwind-tables.
3735 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3736 (PSEUDO): Add cfi directives.
3737 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
3739 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
3742 2003-07-08 Jakub Jelinek <jakub@redhat.com>
3744 * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
3745 __pthread_unregister_cancel): Add prototypes and hidden_proto.
3746 * unwind.c (__pthread_unwind_next): Add hidden_def.
3747 * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
3749 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
3750 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
3751 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
3753 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
3754 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
3756 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
3757 HIDDEN_JUMPTARGET to call __pthread_register_cancel,
3758 __pthread_unregister_cancel and __pthread_unwind_next.
3760 2003-07-04 Jakub Jelinek <jakub@redhat.com>
3762 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
3763 different symbol for the cancellation syscall wrapper and
3764 non-cancellation syscall wrapper.
3765 (PSEUDO_END): Define.
3767 2003-07-05 Richard Henderson <rth@redhat.com>
3769 * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
3770 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
3771 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
3772 return actual return value from the syscall, not 0.
3774 2003-07-07 Ulrich Drepper <drepper@redhat.com>
3776 * descr.h (struct pthread): Add pid field.
3777 * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
3778 (__reclaim_stacks): Likewise.
3779 * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
3780 also check for PID of the signal source.
3781 (__pthread_initialize_minimal_internal): Also initialize pid field
3782 of initial thread's descriptor.
3783 * pthread_cancel.c: Use tgkill instead of tkill if possible.
3784 * sysdeps/unix/sysv/linux/fork.c: Likewise.
3785 * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
3786 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
3787 * sysdeps/unix/sysv/linux/raise.c: Likewise.
3789 2003-07-05 Ulrich Drepper <drepper@redhat.com>
3791 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
3792 Fix use of parameter.
3793 (__libc_cleanup_pop): Likewise.
3795 2003-07-04 Ulrich Drepper <drepper@redhat.com>
3797 * init.c (sigcancel_handler): Change parameters to match handler
3798 for SA_SIGACTION. Check signal number and code to recognize
3799 invalid invocations.
3801 2003-07-03 Roland McGrath <roland@redhat.com>
3803 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
3804 Apply sizeof (struct pthread) bias to r13 value.
3806 2003-07-03 Ulrich Drepper <drepper@redhat.com>
3808 * sysdeps/pthread/configure.in: Require CFI directives.
3810 * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
3812 * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
3813 libpthread compilation.
3814 * unwind.c (__pthread_unwind): Add hidden_def.
3815 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
3817 2003-07-01 Ulrich Drepper <drepper@redhat.com>
3819 * libc-cancellation.c (__libc_cleanup_routine): Define.
3820 * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
3821 (__pthread_cleanup_pop): Define.
3823 2003-07-01 Richard Henderson <rth@redhat.com>
3825 * sysdeps/alpha/elf/pt-initfini.c: New file.
3826 * sysdeps/alpha/pthread_spin_lock.S: New file.
3827 * sysdeps/alpha/pthread_spin_trylock.S: New file.
3828 * sysdeps/alpha/pthreaddef.h: New file.
3829 * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
3830 * sysdeps/alpha/tls.h: New file.
3831 * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
3832 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
3833 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
3834 * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
3835 * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
3836 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
3837 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
3838 * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
3839 * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
3840 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
3842 2003-07-01 Ulrich Drepper <drepper@redhat.com>
3844 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
3845 cleanup support and unwind info.
3847 2003-06-30 Ulrich Drepper <drepper@redhat.com>
3849 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
3850 Use correct cleanup handler registration. Add unwind info.
3851 * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
3852 * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
3853 * tst-once3.c: Add cleanup handler and check it is called.
3854 * tst-once4.c: Likewise.
3855 * tst-oncex3.c: New file.
3856 * tst-oncex4.c: New file.
3857 * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
3859 2003-06-29 Ulrich Drepper <drepper@redhat.com>
3861 * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
3863 2003-06-27 Ulrich Drepper <drepper@redhat.com>
3865 * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
3866 (tf_msgsnd): Likewise.
3868 * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
3869 premature returns a bit more.
3871 2003-06-26 Ulrich Drepper <drepper@redhat.com>
3873 * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
3874 definition to the front.
3876 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
3877 the cleanup functions to make the names unique. Fix dwarf opcode
3879 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
3880 functions to make the names unique. Fix CFA offset for two blocks.
3882 2003-06-25 Ulrich Drepper <drepper@redhat.com>
3884 * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
3885 missing closing braces.
3886 Patch by Christophe Saout <christophe@saout.de>.
3888 2003-06-24 Roland McGrath <roland@redhat.com>
3890 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
3892 2003-06-24 Ulrich Drepper <drepper@redhat.com>
3894 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
3895 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
3897 * pthreadP.h: Declare __find_thread_by_id.
3898 * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
3899 * pthread_clock_gettime.c: Allow using other thread's clock.
3900 * pthread_clock_settime.c: Likewise.
3901 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
3902 * Makefile: Add rules to build and run tst-clock2.
3903 * tst-clock2.c: New file.
3905 2003-06-23 Ulrich Drepper <drepper@redhat.com>
3907 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
3908 to use exception-based cleanup handler.
3909 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3911 * tst-cond8.c (ch): Announce that we are done.
3913 * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
3915 * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
3916 Also test aio_suspend with timeout value.
3918 2003-06-22 Ulrich Drepper <drepper@redhat.com>
3920 * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
3921 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
3924 * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
3925 (__pthread_mutex_lock_internal): Likewise.
3926 (__pthread_mutex_unlock_internal): Likewise.
3927 (__pthread_mutex_unlock_usercnt): Declare.
3928 * pthread_mutex_destroy.c: Always fail if used in any way.
3929 * pthread_mutex_init.c: Update comment.
3930 * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
3931 * pthread_mutex_timedlock.c: Adjust __nusers.
3932 * pthread_mutex_trylock.c: Adjust __nusers.
3933 * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
3934 and public interfaces are wrapper with pass additional parameter.
3935 __pthread_mutex_unlock_usercnt does not adjust __nusers if second
3937 * tst-mutex8.c: New file.
3938 * Makefile (tests): Add tst-mutex8.
3939 * sysdeps/pthread/pthread_cond_timedwait.c: Call
3940 __pthread_mutex_unlock_usercnt.
3941 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
3942 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3943 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3944 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3945 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3946 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
3947 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
3949 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3950 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3951 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3952 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
3953 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3955 * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
3956 * pthread_mutex_timedlock.c: Likewise.
3957 * pthread_mutex_trylock.c: Adjust __nusers.
3958 * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
3959 * tst-mutex9.c: New file.
3960 * Makefile (tests): Add tst-mutex9.
3961 * sysdeps/i386/tls.h: Remove THREAD_ID definition.
3962 * sysdeps/ia64/tls.h: Likewise.
3963 * sysdeps/powerpc/tls.h: Likewise.
3964 * sysdeps/s390/tls.h: Likewise.
3965 * sysdeps/sh/tls.h: Likewise.
3966 * sysdeps/x86_64/tls.h: Likewise.
3967 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
3968 Change type of __owner.
3969 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3970 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3971 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3972 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
3973 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3975 2003-06-19 Jakub Jelinek <jakub@redhat.com>
3977 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
3978 * sysdeps/unix/sysv/linux/sem_post.c: ...here.
3980 * sysdeps/unix/sysv/linux/sem_post.c: Move to...
3981 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here. Pass nr + 1
3982 instead of nr to lll_futex_wake. Only set errno and return -1
3985 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
3986 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
3987 return actual return value from the syscall, not 0.
3989 2003-06-18 Ulrich Drepper <drepper@redhat.com>
3991 * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
3992 find a random value.
3993 (tf_msgrcv): Likewise. Also don't report msgrcv returns if
3996 * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
3997 compat_timer_settime.
3998 * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
3999 compat_timer_gettime.
4000 * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
4001 compat_timer_getoverrun.
4002 * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
4003 compat_timer_delete.
4005 * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
4006 error-checking mutex detect busy mutexes.
4008 2003-06-17 Ulrich Drepper <drepper@redhat.com>
4010 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
4011 Add ax to clobber list.
4012 (lll_mutex_cond_lock): Likewise.
4013 (lll_mutex_unlock): Likewise.
4014 (lll_lock): Likewise.
4015 (lll_unlock): Likewise.
4017 * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
4018 * tst-cancel18.c: New file.
4019 * tst-cancelx18.c: New file.
4021 * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
4024 * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
4025 * tst-cancel17.c: New file.
4026 * tst-cancelx17.c: New file.
4028 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
4029 * sysdeps/unix/sysv/linux/sigwait.c: New file.
4030 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
4032 * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
4034 2003-06-16 Jakub Jelinek <jakub@redhat.com>
4036 * sysdeps/pthread/createthread.c (create_thread): Set
4037 header.multiple_threads unconditionally.
4038 * allocatestack.c (allocate_stack): Likewise.
4039 * descr.h (struct pthread): Add header.multiple_threads
4041 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
4042 Define for librt. #error if neither libpthread, libc nor librt.
4043 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
4045 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
4046 CDISABLE): Likewise.
4047 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
4048 CDISABLE): Likewise.
4049 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
4050 CDISABLE): Likewise.
4051 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
4052 CDISABLE): Likewise. Access header.multiple_threads outside of
4053 libc and libpthread.
4054 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
4056 * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
4057 * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
4059 2003-06-17 Ulrich Drepper <drepper@redhat.com>
4061 * tst-cancel4.c: Add tests for the socket and signal functions, pause.
4062 Also test early cancellation before the thread reaches the cancellation
4065 * Makefile: Compile forward.c with exceptions.
4067 * sysdeps/unix/sysv/linux/sleep.c: New file.
4069 2003-06-16 Ulrich Drepper <drepper@redhat.com>
4071 * Makefile: Add CFLAGS definition to compile function wrappers
4072 duplicated from libc with exceptions.
4073 * tst-cancel4.c: Also check cancellation handlers.
4075 * Makefile: Add rules to build and run tst-cancel16 and
4076 tst-cancelx16. Add missing CFLAGS definitions.
4077 * tst-cancel16.c: New file.
4078 * tst-cancelx16.c: New file.
4080 2003-06-15 Ulrich Drepper <drepper@redhat.com>
4082 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
4083 (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
4084 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
4085 (DL_SYSINFO_IMPLEMENTATION): Likewise.
4087 * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
4088 (LIBC_CANCEL_RESET): Likewise.
4089 Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
4090 * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
4092 (CFLAGS-libcrt-cancellation.c): Define.
4093 * sysdeps/pthread/librt-cancellation.c: New file.
4094 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
4095 macros also when compiling librt.
4096 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
4097 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
4098 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4099 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
4100 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
4101 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
4102 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
4104 * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
4105 compat_timer_create.
4107 2003-06-14 Ulrich Drepper <drepper@redhat.com>
4109 * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
4111 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
4113 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
4114 Add libc_hidden_def.
4116 2003-06-13 Roland McGrath <roland@redhat.com>
4118 * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
4119 constant from <sys/reg.h> to ps_get_thread_area, not register contents.
4121 2003-06-11 Ulrich Drepper <drepper@redhat.com>
4123 * allocatestack.c (queue_stack): Always inline.
4124 * ptreadhP.h (__do_cancel): Likewise.
4126 2003-06-10 Jakub Jelinek <jakub@redhat.com>
4128 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
4131 2003-06-10 Ulrich Drepper <drepper@redhat.com>
4133 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
4134 (__pthread_cond_signal): Remove incorrect second addition for
4137 2003-06-09 Ulrich Drepper <drepper@redhat.com>
4139 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
4140 (__pthread_cond_signal): Use correct futex pointer in
4141 __lll_mutex_lock_wait call.
4143 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
4144 (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
4146 2003-06-08 Ulrich Drepper <drepper@redhat.com>
4148 * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
4150 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
4153 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
4154 hand-written CFI generation code. Since ENTRY/END also initiated
4155 CFI frames this caused two CFI sets to be generated.
4157 2003-06-07 Ulrich Drepper <drepper@redhat.com>
4159 * cleanup_routine.c: New file.
4160 * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
4161 * sysdeps/pthread/pthread.h: Add support for fully exception-based
4163 * Makefile (libpthread-routines): Add cleanup_routine.
4164 Add more CFLAGS variables to compile with exceptions. Add comments
4165 why which file needs unwind tables.
4166 (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
4168 * tst-cancelx1.c: New file.
4169 * tst-cancelx2.c: New file.
4170 * tst-cancelx3.c: New file.
4171 * tst-cancelx4.c: New file.
4172 * tst-cancelx5.c: New file.
4173 * tst-cancelx6.c: New file.
4174 * tst-cancelx7.c: New file.
4175 * tst-cancelx8.c: New file.
4176 * tst-cancelx9.c: New file.
4177 * tst-cancelx10.c: New file.
4178 * tst-cancelx11.c: New file.
4179 * tst-cancelx12.c: New file.
4180 * tst-cancelx13.c: New file.
4181 * tst-cancelx14.c: New file.
4182 * tst-cancelx15.c: New file.
4183 * tst-cleanupx0.c: New file.
4184 * tst-cleanupx0.expect: New file.
4185 * tst-cleanupx1.c: New file.
4186 * tst-cleanupx2.c: New file.
4187 * tst-cleanupx3.c: New file.
4189 * tst-cleanup0.c: Make standard compliant.
4190 * tst-cleanup1.c: Likewise.
4192 * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
4193 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
4194 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
4195 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
4196 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
4197 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
4198 * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
4200 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
4201 * tst-cancel12.c: New file.
4202 * tst-cancel13.c: New file.
4203 * tst-cancel14.c: New file.
4204 * tst-cancel15.c: New file.
4205 * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
4208 * tst-cancel1.c: Add some comments.
4210 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
4213 2003-06-06 Ulrich Drepper <drepper@redhat.com>
4215 * Makefile (CFLAGS-pthread_cancel.c): Define.
4217 2003-06-05 Ulrich Drepper <drepper@redhat.com>
4219 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
4220 Change type of __writer element to int.
4221 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4222 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4223 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4224 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4225 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4226 * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
4227 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
4228 * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
4229 Compare with TID to determine deadlocks.
4230 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
4231 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
4232 * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
4233 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
4234 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
4235 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
4237 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
4239 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
4240 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
4241 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
4243 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
4245 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
4246 * Makefile (tests): Add tst-rwlock12.
4247 * tst-rwlock12.c: New file.
4249 2003-06-05 Jakub Jelinek <jakub@redhat.com>
4251 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
4252 __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
4253 Remove bogus hidden_proto.
4254 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
4256 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
4257 lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
4258 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
4259 ___lll_mutex_timedlock): Likewise.
4261 2003-06-04 Ulrich Drepper <drepper@redhat.com>
4263 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
4264 (__pthread_cond_signal): Add some code to eventually handle
4267 2003-06-01 Ulrich Drepper <drepper@redhat.com>
4269 * Makefile (tests): Add tst-exec4.
4270 (tst-exec4-ARGS): Define.
4271 * tst-exec4.c: New file.
4273 2003-05-31 Ulrich Drepper <drepper@redhat.com>
4275 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
4276 Also fail if tv_nsec < 0.
4277 (__lll_timedwait_tid): Likewise.
4278 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
4279 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
4281 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
4283 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
4285 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
4287 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
4289 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
4292 * Makefile (tests): Add tst-sem8 and tst-sem9.
4293 * tst-sem8.c: New file.
4294 * tst-sem9.c: New file.
4295 * sem_open.c: Fix creation of in_use record if the file exists but
4298 * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
4301 * sysdeps/pthread/timer_create.c (timer_create): In case
4302 evp==NULL, assign timer ID to sival_ptr.
4304 * descr.h (struct pthread_unwind_buf): Change type of prev element to
4305 struct pthread_unwind_buf *.
4306 (struct pthread): Likewise for cleanup_jmp_buf element.
4308 * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
4309 * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
4310 * unwind.c (__pthread_unwind_next): Likewise.
4312 2003-05-30 Ulrich Drepper <drepper@redhat.com>
4314 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
4315 (lll_futex_timed_wait): Use int for futex value parameter.
4316 (lll_futex_wake): Likewise.
4317 (lll_futex_requeue): Likewise.
4319 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
4320 Replace one memory operation with one register operation.
4322 * tst-join4.c (do_test): Fix error message.
4324 * tst-rwlock6.c (do_test): Use correct format specifier.
4326 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
4327 (__lll_mutex_lock_wait): Replace one memory operation with one
4329 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
4330 (__lll_mutex_lock_wait): Likewise.
4332 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
4333 (__lll_mutex_cond_lock): Add one to value parameter of
4334 __lll_lock_wait to reflect reality in the futex syscall.
4335 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
4336 (lll_mutex_cond_lock): Likewise.
4338 2003-05-30 Jakub Jelinek <jakub@redhat.com>
4340 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
4342 (lll_mutex_cond_lock): Define.
4344 2003-05-29 Ulrich Drepper <drepper@redhat.com>
4346 * Makefile (tests): Add tst-signal6.
4347 * tst-signal6.c: New file.
4349 * sysdeps/unix/sysv/linux/s390/lowlevellock.h
4350 (__lll_mutex_unlock_force): New function
4351 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
4353 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
4354 (__lll_mutex_unlock_force): New function.
4355 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
4357 * tst-rwlock7.c (do_test): Use correct format specifier.
4359 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
4360 Find break parameter in correct asm argument.
4362 2003-05-27 Jakub Jelinek <jakub@redhat.com>
4364 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
4366 (lll_futex_requeue): Fix __o3 constraint, return negative errno if
4368 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4370 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
4371 lll_futex_requeue, lll_mutex_unlock_force): Define.
4373 2003-05-30 Jakub Jelinek <jakub@redhat.com>
4375 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4376 (pthread_cond_t): Add __mutex.
4377 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
4378 lll_futex_requeue, lll_mutex_unlock_force): Define.
4380 2003-05-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4382 * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
4383 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4385 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
4387 (lll_futex_wait, lll_futex_wake): Define.
4388 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
4389 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
4390 FUTEX_REQUEUE instead of FUTEX_WAIT.
4391 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
4392 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
4393 mutex which was used in condvar structure. Call
4394 __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
4395 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
4397 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
4398 include tcb-offsets.h. Read wakeup value in locked region.
4399 Use the value of gbr register as THREAD_ID.
4400 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
4401 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
4402 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
4404 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
4407 2003-05-28 Ulrich Drepper <drepper@redhat.com>
4409 * sysdeps/pthread/pthread_cond_broadcast.c
4410 (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
4412 2003-05-26 Ulrich Drepper <drepper@redhat.com>
4414 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
4415 typo in register name.
4416 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
4417 correctly. Actually use requeue. Little optimization.
4418 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
4419 mutex address early. Handle cancellation state as 32-bit value.
4420 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4421 Remove unnecessary label.
4423 2003-05-25 Ulrich Drepper <drepper@redhat.com>
4425 * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
4426 instead of FUTEX_WAIT.
4427 * sysdeps/pthread/pthread_cond_signal.c: Likewise.
4428 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
4429 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
4430 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
4431 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
4432 * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
4433 used in condvar structure. Call __pthread_mutex_cond_lock instead
4434 of __pthread_mutex_lock_internal.
4435 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4436 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4437 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
4438 (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
4439 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4440 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4441 * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
4442 Add pthread_mutex_cond_lock.
4443 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
4444 * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
4445 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
4446 lll_mutex_cond_lock.
4447 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
4448 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4449 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4451 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4452 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4454 * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
4455 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
4457 * pthreadP.h: Declare __pthread_mutex_cond_lock.
4458 * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
4459 Use it instead of lll_mutex_lock. If __pthread_mutex_lock is a
4460 macro don't define aliases.
4462 * cancellation.c: Remove __pthread_enable_asynccancel_2.
4463 * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
4464 * sysdeps/pthread/pthread_cond_timedwait.c: Use
4465 __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
4466 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4467 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4468 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
4469 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4470 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4472 2003-05-17 Ulrich Drepper <drepper@redhat.com>
4474 * sem_open.c: Fix one endless loop. Implement correct semantics
4475 wrt opening the same semaphore more then once.
4476 * sem_close.c: Adjust for sem_open change.
4477 * semaphoreP.h: Include <semaphore.h>. Define struct inuse_sem.
4478 Declare __sem_mappings, __sem_mappings_lock, __sem_search.
4479 * Makefile (tests): Add tst-sem7.
4480 * tst-sem7.c: New file.
4482 2003-05-16 Roland McGrath <roland@redhat.com>
4484 * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
4485 uninitialized variable braino.
4487 2003-05-16 Ulrich Drepper <drepper@redhat.com>
4489 * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
4490 test for syscall availability.
4492 * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
4493 __no_posix_timers to -1 if the syscalls don't exist.
4495 * pthread_join.c (pthread_join): Set tid field of the joined
4496 thread to -1. This isn't necessary but helps to recognize some
4497 error conditions with almost no cost.
4499 * allocatestack.c (FREE_P): Also negative values indicate an
4502 * unwind.c: Include <unistd.h>.
4504 2003-05-14 Ulrich Drepper <drepper@redhat.com>
4506 * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
4508 2003-05-14 Jakub Jelinek <jakub@redhat.com>
4510 * Makefile (crti-objs, crtn-objs): New variables.
4511 (omit-deps, extra-objs): Add crtn.
4512 ($(objpfx)libpthread.so): Depend on both crti and crtn
4513 and links to them in multidir.
4514 ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
4516 2003-05-12 Steven Munroe <sjmunroe@us.ibm.com>
4518 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
4519 (lll_mutex_unlock): Use atomic_exchange_rel.
4521 2003-05-11 Ulrich Drepper <drepper@redhat.com>
4523 * cond-perf.c (cons): Add missing locking around setting of alldone.
4525 2003-05-10 Ulrich Drepper <drepper@redhat.com>
4527 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
4529 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
4531 2003-05-09 Ulrich Drepper <drepper@redhat.com>
4533 * tst-sem6.c: New file.
4534 * Makefile (tests): Add tst-sem6.
4536 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
4537 Use atomic_exchange_rel instead of atomic_exchange.
4538 * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
4541 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
4542 code for lll_futex_wait and lll_futex_wake in static apps. Use
4543 vsyscall is possible.
4545 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
4546 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
4547 * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
4548 pthread_setaffinity_np.
4549 * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
4550 and pthread_setaffinity_np.
4551 * Makefile (libpthread-routines): Add pthread_getaffinity and
4552 pthread_setaffinity.
4554 * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
4555 use it in case mmap to allocate the stack fails.
4556 * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
4557 ARCH_MAP_FLAGS here.
4558 * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
4561 2003-05-08 Ulrich Drepper <drepper@redhat.com>
4563 * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
4564 handler implementation. It is now lockless in fork().
4565 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
4566 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
4567 * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>. Don't
4568 declare the __fork_*_lists.
4569 (struct fork_handler): Include pointers to all three functions.
4570 Add next, refcntr and need_signal elements.
4571 (__fork_handlers): New declaration.
4572 (__register_atfork_malloc): Remove declaration.
4573 (HAVE_register_atfork_malloc): Remove definition.
4574 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
4575 __pthread_child_handler variable.
4576 (__libc_pthread_init): Use __register_atfork instead of explicitly
4578 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
4580 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4582 * unwind.c (unwind_cleanup): Print error message and then abort. This
4583 function must never be reached.
4585 * cond-perf.c: New file.
4587 2003-05-05 Ulrich Drepper <drepper@redhat.com>
4589 * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
4591 2003-05-04 Roland McGrath <roland@redhat.com>
4593 * Makefile ($(objpfx)../libc.so): New target.
4595 2003-05-02 Ulrich Drepper <drepper@redhat.com>
4597 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4598 (pthread_condattr_t): Size is only an int, don't use long for
4600 (pthread_mutexattr_t): Likewise.
4601 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4602 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4603 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4605 2003-05-01 Ulrich Drepper <drepper@redhat.com>
4607 * sysdeps/i386/tls.h: Define THREAD_ID.
4608 * sysdeps/ia64/tls.h: Likewise.
4609 * sysdeps/powerpc/tls.h: Likewise.
4610 * sysdeps/s390/tls.h: Likewise.
4611 * sysdeps/sh/tls.h: Likewise.
4612 * sysdeps/x86_64/tls.h: Likewise.
4613 * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
4615 * pthread_mutex_timedlock.c: Likewise.
4616 * pthread_mutex_trylock.c: Likewise.
4617 * pthread_mutex_unlock.c: Likewise.
4618 * pthread_rwlock_trywrlock.c: Likewise.
4619 * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
4620 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
4621 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
4622 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
4624 * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
4627 2003-04-29 Jakub Jelinek <jakub@redhat.com>
4629 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
4630 (__SIZEOF_PTHREAD_COND_T): Define to 48.
4631 (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
4632 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4633 Make __align long long instead of long.
4634 (pthread_rwlock_t): Formatting.
4635 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
4636 (pthread_rwlock_t): Formatting.
4637 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4638 (pthread_cond_t): Make __align long long instead of long.
4639 (pthread_rwlock_t): Move __flags field to the same position as in
4642 2003-04-30 Ulrich Drepper <drepper@redhat.com>
4644 * tst-rwlock6.c (do_test): Use correct printf format specifiers.
4645 * tst-rwlock7.c (do_test): Likewise.
4647 2003-04-26 Roland McGrath <roland@redhat.com>
4649 * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
4651 2003-04-22 Jakub Jelinek <jakub@redhat.com>
4653 * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
4654 sizeof (struct pthread).
4655 (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
4657 * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
4659 (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
4661 (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
4663 (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
4665 (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
4667 (NO_TLS_OFFSET): Define.
4668 * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
4669 add TLS_TCB_SIZE unnecessarily.
4671 2003-04-22 Roland McGrath <roland@redhat.com>
4673 * Makeconfig (shared-thread-library): Reverse link order to work
4676 2003-04-22 Ulrich Drepper <drepper@redhat.com>
4678 * semaphore.h: Fix typo in comment.
4680 2003-04-21 Ulrich Drepper <drepper@redhat.com>
4682 * sysdeps/pthread/sigfillset.c: New file.
4684 * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
4685 * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
4686 * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
4687 * sysdeps/pthread/sigaction.c: Likewise.
4688 * sysdeps/pthread/sigprocmask.c: New file.
4689 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
4691 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
4692 Block SIGTIMER. Also handle SI_TKILL events and terminate thread
4695 2003-04-19 Ulrich Drepper <drepper@redhat.com>
4697 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
4698 (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
4700 * sysdeps/unix/sysv/linux/unregister-atfork.c
4701 (__unregister_atfork): Don't free memory not allocated dynamically.
4703 * semaphore.h: Remove __THROW marker from cancellation points.
4704 * nptl/sysdeps/pthread/pthread.h: Likewise.
4706 2003-04-18 Ulrich Drepper <drepper@redhat.com>
4708 * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
4709 pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
4712 2003-04-16 Jakub Jelinek <jakub@redhat.com>
4714 * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
4716 2003-04-15 Roland McGrath <roland@redhat.com>
4718 * forward.c (__pthread_unwind): Tweak to avoid warning.
4720 2003-04-15 Ulrich Drepper <drepper@redhat.com>
4722 * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
4724 2003-04-14 Ulrich Drepper <drepper@redhat.com>
4726 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
4727 overflow CFA advance instructions.
4728 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4730 2003-04-14 Jakub Jelinek <jakub@redhat.com>
4732 * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
4733 * sysdeps/i386/pthread_spin_lock.c: Likewise.
4734 * sysdeps/x86_64/tls.h: Likewise. Define LOCK_PREFIX if not already
4737 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
4738 DW_CFA_advance_loc2 for .Laddl-.Lsubl.
4739 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
4740 DW_CFA_advance_loc for .Laddl-.Lsubl.
4742 2003-04-13 Ulrich Drepper <drepper@redhat.com>
4744 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
4745 position-independent unwind data for static libraries.
4746 Add missing unwind info. Add comments.
4748 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
4749 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4750 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4751 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4753 2003-04-12 Ulrich Drepper <drepper@redhat.com>
4755 * Makefile: Make sure all cancellation points are compiled with
4756 exception and asynchronous unwind tables.
4758 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
4759 which mishandles loading of global object addresses in PIC.
4760 (THREAD_SETMEM_NC): Likewise.
4762 2003-04-11 Ulrich Drepper <drepper@redhat.com>
4764 * pthread.h: Define new data structure for cleanup buffer. Declare
4765 new cleanup handler interfaces.
4766 * descr.h: Include <unwind.h> if necessary. Define pthread_unwind_buf.
4767 (struct pthread): Add cleanup_jmp_buf pointer. Define
4768 HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
4769 * pthreadP.h: Declare __pthread_unwind. Define __do_cancel to use
4770 it. Declare old cleanup handler installation functions.
4771 * cleanup.c: Rewrite. Install handler for unwind-based cleanup
4773 * cleanup_defer.c: Likewise.
4774 * cleanup_compat.c: New file. Old cleanup code.
4775 * cleanup_def_compat.c: New file. Old cleanup code.
4776 * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
4777 if own thread descriptor.
4778 * unwind.c: New file.
4779 * forward.c: Add __pthread_unwind.
4780 * init.c (pthread_functions): Add __pthread_unwind.
4781 * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
4782 Add ptr___pthread_unwind.
4783 * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
4784 and unwind function.
4785 * Makefile (libpthread-routines): Add cleanup_compat,
4786 cleanup_def_compat, and unwind. Define CFLAGS to enable unwind
4787 table generation if necessary.
4788 * version.c: Record whether unwind support is compiled in.
4789 * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
4790 * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
4792 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
4793 complication to generate unwind information for syscall wrappers.
4794 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
4795 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
4796 __cleanup_fct_attribute.
4798 * Makefile: Add rules to build and run tst-cleanup0.
4799 * tst-cleanup0.c: New file.
4800 * tst-cleanup0.expect: New file.
4802 * pthread_create.c (deallocate_tsd): Don't take parameter. Adjust
4803 caller. Optimize to avoid often unecessary local variable.
4805 2003-04-11 Roland McGrath <roland@redhat.com>
4807 * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
4808 sets variable `multidir'; include that.
4809 (generated): Add it.
4810 ($(objpfx)$(multidir)/crti.o): New target.
4811 [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
4813 2003-04-11 Ulrich Drepper <drepper@redhat.com>
4815 * tst-attr2.c (do_test): Add cast to avoid warning.
4816 * tst-mutex4.c (do_test): Likewise.
4818 2003-04-10 Ulrich Drepper <drepper@redhat.com>
4820 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
4823 2003-04-09 Ulrich Drepper <drepper@redhat.com>
4825 * Makefile (tests): Add tst-detach1.
4826 * tst-detach1.c: New file.
4828 2003-04-08 Ulrich Drepper <drepper@redhat.com>
4830 * sysdeps/pthread/pthread.h: Remove duplicate
4831 pthread_cleanup_{push,pop} definitions.
4833 * tst-barrier2.c: Eliminate warnings.
4834 * tst-cancel4.c: Likewise.
4835 * tst-cond4.c: Likewise.
4836 * tst-cond6.c: Likewise.
4837 * tst-detach1.c: Likewise.
4838 * tst-rwlock4.c: Likewise.
4839 * tst-rwlock6.c: Likewise.
4840 * tst-rwlock7.c: Likewise.
4841 * tst-sem3.c: Likewise.
4842 * tst-spin2.c: Likewise.
4843 * tst-umask1.c: Likewise.
4845 2003-04-07 Ulrich Drepper <drepper@redhat.com>
4847 * pthread_detach.c (pthread_detach): Fix test for invalid TID.
4849 2003-04-06 Ulrich Drepper <drepper@redhat.com>
4851 * descr.h (struct pthread): Move cancelhandling member to the front.
4853 2003-04-05 Ulrich Drepper <drepper@redhat.com>
4855 * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
4856 malloc_parent, and malloc_child statically.
4857 (__register_atfork_malloc): New function.
4858 (free_mem): Don't free any of the malloc_* variables on the list.
4859 * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
4860 Define HAVE_register_atfork_malloc.
4862 2003-04-04 Ulrich Drepper <drepper@redhat.com>
4864 * sysdeps/pthread/createthread.c (create_thread): Add some more
4865 comments explaining when to set multiple_threads and when not.
4867 * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
4868 THREAD_ATOMIC_BIT_SET if not already defined.
4869 * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
4870 THREAD_ATOMIC_BIT_SET:
4871 * sysdeps/x86_64/tls.h: Likewise.
4872 * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
4873 THREAD_ATOMIC_CMPXCHG_VAL.
4874 (_pthread_cleanup_pop_restore): Likewise.
4875 * cancellation.c (__pthread_enable_asynccancel): Likewise.
4876 (__pthread_enable_asynccancel_2): Likewise.
4877 (__pthread_disable_asynccancel): Likewise.
4878 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
4879 (__libc_disable_asynccancel): Likewise.
4880 * init.c (sigcancel_handler): Likewise.
4881 * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
4882 * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
4884 2003-04-03 Ulrich Drepper <drepper@redhat.com>
4886 * init.c (sigcancel_handler): Don't set EXITING_BIT here.
4887 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
4888 * pthreadP.h (__do_cancel): Set EXITING_BIT here.
4889 * Makefile (tests): Add tst-cancel11.
4890 * tst-cancel11.c: New file.
4892 2003-04-01 Ulrich Drepper <drepper@redhat.com>
4894 * pthread_create.c (deallocate_tsd): Clear/free memory after the last
4895 round, not the first. Use specific_used flag instead of local
4896 found_nonzero variable. Use THREAD_[SG]ETMEM where possible.
4897 (__free_tcb): Don't call deallocate_tsd here.
4898 (start_thread): Call deallocate_tsd here.
4899 * pthread_setspecific.c: Set specific_used flag really only when
4901 * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
4902 * tst-tsd3.c: New file.
4903 * tst-tsd4.c: New file.
4905 2003-03-31 Ulrich Drepper <drepper@redhat.com>
4907 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
4908 Use atomic_exchange_and_add instead of __lll_add.
4909 (__lll_mutex_timedlock): Likewise.
4910 Patch by Ian Wienand.
4912 2003-03-24 Steven Munroe <sjmunroe@us.ibm.com>
4914 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
4915 (SINGLE_THREAD_P): Fix typo.
4916 * tst-cancel-wrappers.sh: Handle '.'ed symbols.
4918 2003-03-31 Ulrich Drepper <drepper@redhat.com>
4920 * Makefile (tests): Add tst-align.
4921 * tst-align.c: New file.
4922 * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
4924 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
4927 * tst-tsd2.c: Add casts to avoid warnings.
4929 2003-03-30 Ulrich Drepper <drepper@redhat.com>
4931 * descr.h (struct pthread): Move most often used elements to the front.
4933 2003-03-29 Ulrich Drepper <drepper@redhat.com>
4935 * Makefile (libpthread-routines): Add pthread_atfork.
4936 (libpthread-static-only-routines): Add pthread_atfork.
4938 2003-03-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4940 * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
4942 (INSTALL_DTV): Add parens.
4943 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
4944 Use passed descr instead of THREAD_SELF.
4945 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
4946 (__lll_mutex_timedlock_wait): Correct expected value after
4948 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
4949 Release lock before waking up the waiters.
4950 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
4951 criteria. Reorderstruct passed to cleanup handler. Fix
4952 handling of cancellation and failung pthread_mutex_unlock call.
4953 Use __pthread_enable_asynccancel_2 instead of
4954 __pthread_enable_asynccancel.
4955 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4956 Return result of lock re-get if it fails.
4957 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
4958 for __pthread_cleanup_push.
4959 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
4960 completely broken rwlock implementation.
4961 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
4962 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
4963 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
4964 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
4965 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
4966 * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value. Use
4967 versioned_symbol macro.
4968 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
4969 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
4971 2003-03-27 Ulrich Drepper <drepper@redhat.com>
4973 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
4974 __timer_helper_thread. Declare __start_helper_thread, __helper_once,
4976 (struct timer): Remove th and bar field.
4977 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
4978 debugging code. Create only one helper thread.
4979 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
4981 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
4982 Renamed. Define statically. Use thread info from siginfo.
4983 (__helper_once): New variable.
4984 (__helper_tid): New variable.
4985 (__reset_helper_control): New function.
4986 (__start_helper_thread): New function.
4988 * pthread_create.c (start_thread): Don't use setjmp inside
4989 __builtin_expect to work around gcc bug.
4991 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
4992 timer_delete syscall fails, but not with ENOSYS, set
4995 * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
4996 (timer_settime): Fix typo.
4997 * sysdeps/unix/sysv/linux/timer_getoverr.c
4998 [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
5000 2003-03-27 Jakub Jelinek <jakub@redhat.com>
5002 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
5003 offset of cleanupbuf.__prev.
5005 2003-03-26 Jakub Jelinek <jakub@redhat.com>
5007 * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
5010 2003-03-26 Ulrich Drepper <drepper@redhat.com>
5012 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
5013 NULL provide default definition to syscall.
5015 2003-03-25 Roland McGrath <roland@redhat.com>
5017 * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
5018 (timer_id2ptr): Fix typo.
5020 2003-03-25 Ulrich Drepper <drepper@redhat.com>
5022 * pthreadP.h: Define SIGCANCEL and SIGTIMER.
5023 * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
5024 * sysdeps/ia64/pthreaddef.h: Likewise.
5025 * sysdeps/powerpc/pthreaddef.h: Likewise.
5026 * sysdeps/s390/pthreaddef.h: Likewise.
5027 * sysdeps/sh/pthreaddef.h: Likewise.
5028 * sysdeps/x86_64/pthreaddef.h: Likewise.
5029 * init.c (__pthread_initialize_minimal): Block SIGTIMER.
5030 * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
5032 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
5033 SIGTIMER is not unblocked.
5034 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
5036 * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
5038 * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
5039 pass pointer through as ID.
5040 * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
5041 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
5042 * sysdeps/unix/sysv/linux/timer_create.c: New file.
5043 * sysdeps/unix/sysv/linux/timer_delete.c: New file.
5044 * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
5045 * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
5046 * sysdeps/unix/sysv/linux/timer_routines.c: New file.
5047 * sysdeps/unix/sysv/linux/timer_settime.c: New file.
5048 * sysdeps/unix/sysv/linux/ia64/Versions: New file.
5049 * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
5050 * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
5051 * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
5052 * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
5053 * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
5054 * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
5055 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
5056 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
5057 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
5058 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
5059 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
5060 * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
5061 * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
5062 * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
5063 * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
5064 * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
5065 * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
5066 * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
5067 * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
5068 * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
5069 * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
5070 * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
5071 * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
5072 * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
5074 * pthreadP.h: Remove FRAME_LEFT definition.
5075 * cleanup.c (_pthread_cleanup_push): Don't check for reference to
5076 already left frame. Programs which have this problem are not POSIX
5078 * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
5080 2003-03-24 Ulrich Drepper <drepper@redhat.com>
5082 * sysdeps/pthread/tst-timer.c: Check return values of the
5085 2003-03-23 Roland McGrath <roland@redhat.com>
5087 * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
5088 * tst-tls3mod.c: Likewise.
5089 * tst-tls1.c: Likewise.
5090 * tst-tls2.c: Likewise.
5092 * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
5095 * tst-join5.c (tf1, tf2): Add a cast.
5097 * Makeconfig (includes): Append -I$(..)nptl to this variable.
5099 * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
5100 Don't test anything.
5101 * tst-cond4.c: Likewise.
5102 * tst-cond6.c: Likewise.
5103 * tst-flock2.c: Likewise.
5104 * tst-mutex4.c: Likewise.
5105 * tst-rwlock4.c: Likewise.
5106 * tst-signal1.c: Likewise.
5107 * tst-spin2.c: Likewise.
5108 * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
5110 * tst-mutex4.c: Use test-skeleton.c.
5111 * tst-spin2.c: Likewise.
5112 * tst-sysconf.c: Likewise.
5113 * tst-barrier2.c: Likewise.
5114 * tst-cond4.c: Likewise.
5115 * tst-cond6.c: Likewise.
5116 * tst-rwlock4.c: Likewise.
5117 * tst-unload.c: Likewise.
5118 * tst-flock2.c (do_test): Use return instead of exit.
5120 2003-03-22 Jakub Jelinek <jakub@redhat.com>
5122 * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
5124 2003-03-21 Ulrich Drepper <drepper@redhat.com>
5126 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
5127 (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
5128 instead of __lll_compare_and_swap.
5129 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
5131 Removed definition if __lll_compare_and_swap.
5133 * cancellation.c: Adjust for new form of compare&exchange macros.
5134 * cleanup_defer.c: Likewise.
5136 * libc-cancellation.c: Likewise.
5137 * old_pthread_cond_broadcast.c: Likewise.
5138 * old_pthread_cond_signal.c: Likewise.
5139 * old_pthread_cond_timedwait.c: Likewise.
5140 * old_pthread_cond_wait.c: Likewise.
5141 * pthread_cancel.c: Likewise.
5142 * pthread_create.c: Likewise.
5143 * pthread_detach.c: Likewise.
5144 * pthread_join.c: Likewise.
5145 * pthread_key_delete.c: Likewise.
5146 * pthread_setcancelstate.c: Likewise.
5147 * pthread_setcanceltype.c: Likewise.
5148 * pthread_timedjoin.c: Likewise.
5149 * pthread_tryjoin.c: Likewise.
5150 * sysdeps/pthread/createthread.c: Likewise.
5152 2003-03-20 Ulrich Drepper <drepper@redhat.com>
5154 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
5155 Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
5156 definitions. Replace uses with calls to atomic_* functions.
5157 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
5158 * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
5159 __lll_test_and_set calls with atomic_exchange_and_add and
5160 atomic_exchange calls respectively.
5161 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
5162 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
5163 * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
5164 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
5165 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
5166 * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
5167 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
5169 * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
5170 returns the old value.
5172 2003-03-20 Martin Schwidefsky <sky@mschwid3.boeblingen.de.ibm.com>
5174 * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
5175 int for variable OLDVAL and correct inline assembler contraint.
5176 * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
5177 type int for variable OLD.
5179 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
5181 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
5182 (SINGLE_THREAD_P): Use global variable __local_multiple_threads
5183 instead of multiple_threads field in the TCB.
5185 2003-03-19 Ulrich Drepper <drepper@redhat.com>
5187 * sysdeps/i386/i686/bits/atomic.h: Removed.
5188 * sysdeps/i386/i586/bits/atomic.h: Removed.
5189 * sysdeps/i386/i486/bits/atomic.h: Removed. Moved to glibc.
5190 * sysdeps/x86_64/bits/atomic.h: Removed. Moved to glibc.
5191 * sysdeps/s390/bits/atomic.h: Removed. Moved to glibc.
5192 * sysdeps/sh/bits/atomic.h: Removed. Moved to glibc.
5193 * sysdeps/ia64/bits/atomic.h: Removed. Moved to glibc.
5194 * sysdeps/powerpc/bits/atomic.h: Removed. Moved to glibc.
5195 * atomic.h: Removed. Moved to glibc.
5197 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
5198 support for clock selection.
5200 * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
5203 2003-03-18 Roland McGrath <roland@redhat.com>
5205 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
5206 Add __lll_rel_instr first. Add memory clobber.
5207 (lll_mutex_unlock): Use __lll_test_and_set.
5208 From Paul Mackerras <paulus@samba.org>.
5210 * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
5212 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
5213 (SINGLE_THREAD_P): Add `header.' prefix.
5214 From Paul Mackerras <paulus@samba.org>.
5216 * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
5217 pthread_timedjoin_np to ...
5218 (libpthread: GLIBC_2.3.3): ... here.
5219 (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
5221 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5222 Avoid shadowing VAL variable.
5224 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
5227 2003-03-18 Ulrich Drepper <drepper@redhat.com>
5229 * Makefile (tests): Add tst-cond11.
5230 * tst-cond11.c: New file.
5232 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
5233 struct passed to cleanup handler to eliminate one more
5235 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5237 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
5238 (pthrad_cond_t): Replace __unused field with __clock.
5240 * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
5241 waken all waiters in cleanup handler.
5242 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5243 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5245 * pthread_condattr_getclock.c: New file.
5246 * pthread_condattr_setclock.c: New file.
5247 * sysdeps/pthread/pthread.h: Declare these new functions.
5248 * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
5249 * Makefile (libpthread-routines): Add the new functions.
5250 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
5251 Renamed field to value. Document use of the bits.
5252 * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
5254 * pthread_condattr_setpshared.c: Likewise.
5255 * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
5256 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
5257 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
5259 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5260 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5261 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5262 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5263 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
5264 Implement clock selection.
5265 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
5266 * pthread-errnos.sym: Add ENOSYS.
5267 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
5268 _POSIX_CLOCK_SELECTION.
5269 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5271 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
5272 invalid .size directive.
5274 2003-03-17 Roland McGrath <roland@redhat.com>
5276 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
5279 2003-03-17 Ulrich Drepper <drepper@redhat.com>
5281 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
5282 Use __lll_add instead of spelling it out. Use protected symbol names.
5283 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
5285 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
5286 Renamed from lll_compare_and_swap. Use new name where necessary.
5287 (__lll_add): Defined.
5288 (__lll_dec_if_positive): Defined.
5289 (__lll_test_and_set): Defined.
5290 * sysdeps/ia64/pthread_spin_init.c: Removed.
5291 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
5292 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
5293 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
5294 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
5295 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
5296 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
5297 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
5298 * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
5299 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
5300 __sync_lock_release_si.
5301 Patch by Jakub Jelinek.
5303 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
5304 Fix timeout handling.
5305 (__lll_timedwait_tid): Likewise.
5306 (lll_unlock_wake_cb): Wake up other waiters if necessary.
5307 Patch by Jakub Jelinek.
5309 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
5311 2003-03-17 Roland McGrath <roland@redhat.com>
5313 PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
5314 * sysdeps/pthread/pthread_spin_init.c: New file.
5315 * sysdeps/pthread/pthread_spin_unlock.c: New file.
5316 * sysdeps/powerpc/Makefile: New file.
5317 * sysdeps/powerpc/pthread_spin_lock.c: New file.
5318 * sysdeps/powerpc/pthread_spin_trylock.c: New file.
5319 * sysdeps/powerpc/pthreaddef.h: New file.
5320 * sysdeps/powerpc/tcb-offsets.sym: New file.
5321 * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
5322 * sysdeps/powerpc/tls.h: New file.
5323 * sysdeps/powerpc/bits/atomic.h: New file.
5324 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
5325 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
5326 * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
5328 * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
5329 * sysdeps/unix/sysv/linux/sem_post.c: New file.
5330 * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
5331 * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
5332 * sysdeps/unix/sysv/linux/sem_wait.c: New file.
5333 * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
5334 * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
5335 * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
5336 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
5337 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
5338 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
5339 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
5340 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
5341 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
5342 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
5344 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
5346 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
5347 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
5348 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
5349 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
5350 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
5352 2003-03-17 Ulrich Drepper <drepper@redhat.com>
5354 * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
5355 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
5356 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5357 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5358 Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
5360 2003-03-16 Roland McGrath <roland@redhat.com>
5362 * tst-fork4.c: Include <string.h>.
5363 * tst-signal2.c: Likewise.
5364 * tst-mutex5.c (do_test): exit -> return.
5365 * tst-mutex2.c: Include <stdlib.h>.
5367 2003-03-16 Ulrich Drepper <drepper@redhat.com>
5369 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
5370 (__lll_mutex_timedlock_wait): Correct expected value after
5371 spurious wakeup. Otherwise we would never wait again.
5373 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
5374 zone versus inline asm stupidity. Use correct instructions.
5376 * tst-rwlock6.c: Add some more status output.
5378 2003-03-15 Roland McGrath <roland@redhat.com>
5380 * sysdeps/pthread/configure.in: New file.
5381 * sysdeps/pthread/configure: New file (generated).
5383 2003-03-15 Ulrich Drepper <drepper@redhat.com>
5385 * allocatestack.c (allocate_stack): Store the exact stack size of
5386 user allocated stacks.
5388 2003-03-15 Jakub Jelinek <jakub@redhat.com>
5390 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
5391 (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
5392 * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
5393 * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
5394 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
5395 Use `header.' prefix.
5396 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
5398 2003-03-15 Ulrich Drepper <drepper@redhat.com>
5400 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
5401 __builtin_frame_address, use stack pointer.
5403 * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
5404 instead of __builtin_frame_pointer.
5406 2003-03-14 Ulrich Drepper <drepper@redhat.com>
5408 * tst-basic1.c (do_test): Add cast to avoid warning.
5409 * tst-basic2.c (do_test): Likewise.
5411 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
5412 amount of stack correction.
5414 * tst-fork4.c: Use test-skeleton.c.
5416 2003-03-14 Roland McGrath <roland@redhat.com>
5418 * init.c: Fix typo "#eli" for "#else".
5420 2003-03-14 Steven Munroe <sjmunroe@us.ibm.com>
5422 * allocatestack.c (__stack_user): Use hidden_data_def.
5423 * pthread_create.c (__pthread_keys): Likewise.
5425 * init.c [__powerpc__] (__NR_set_tid_address): Define it.
5427 2003-03-14 Roland McGrath <roland@redhat.com>
5429 * tst-fork4.c: New file.
5430 * Makefile (tests): Add it.
5432 * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
5433 we always define the padding space.
5434 [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
5435 stopped supporting its own extensions fully.
5436 [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
5437 struct also called `header', so `header.multiple_threads' is the field
5438 name to use on all machines.
5439 * allocatestack.c (allocate_stack): Use `header.' prefix.
5440 * sysdeps/pthread/createthread.c (create_thread): Likewise.
5441 * pthread_create.c (__pthread_create_2_1): Likewise.
5442 * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
5443 (THREAD_SELF): Likewise.
5444 * sysdeps/x86_64/tls.h: Likewise.
5445 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
5446 (SINGLE_THREAD_P): Likewise.
5447 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
5448 (SINGLE_THREAD_P): Likewise.
5449 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
5450 (SINGLE_THREAD_P): Likewise.
5452 * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
5455 2003-03-14 Ulrich Drepper <drepper@redhat.com>
5457 * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
5458 * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
5460 * pthread_create.c (start_thread): setjmp is expected to return 0.
5462 * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
5463 (THREAD_GETMEM_NC): Likewise.
5465 2003-03-13 Ulrich Drepper <drepper@redhat.com>
5467 * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
5468 and the size of the stack which must be allocated is a multiple,
5469 allocate one more page.
5470 * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
5471 MULTI_PAGE_ALIASING.
5473 2003-03-13 Roland McGrath <roland@redhat.com>
5475 * pthread_create.c (start_thread): Set EXITING_BIT after the
5476 event-reporting (and destructors), not before.
5478 2003-03-13 Jakub Jelinek <jakub@redhat.com>
5480 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
5481 lll_futex_wake): Declare register variables as long int instead of
5482 unsigned long int. Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
5483 Make syscall arguments clobbered by the syscall.
5484 (lll_futex_wait): Define using lll_futex_timed_wait.
5486 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
5489 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
5492 * allocatestack.c (nptl_ncreated): Only declare if
5493 COLORING_INCREMENT != 0.
5495 * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
5496 (__libc_enable_asynccancel_2): Remove prototype.
5498 * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
5499 ctid to match kernel.
5501 2003-03-12 Ulrich Drepper <drepper@redhat.com>
5503 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
5504 libc_multiple_threads.
5505 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
5506 __libc_multiple_threads to...
5507 * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here. New file.
5509 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
5511 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
5512 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
5514 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
5515 (__pthread_once_internal): Define.
5517 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
5518 macros instead of .symver directly.
5519 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
5520 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
5522 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
5523 * sysdeps/x86_64/tcb-offsets.sym: New file.
5524 * sysdeps/x86_64/Makefile: New file.
5526 * sysdeps/i386/tcb-offsets.sym: Add SELF.
5527 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
5528 to access own pthread_t in TCB.
5529 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
5531 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
5533 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
5535 2003-03-12 Roland McGrath <roland@redhat.com>
5537 * pthread-errnos.sym: New file.
5538 * Makefile (gen-as-const-headers): New variable, list that file.
5539 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
5540 header <pthread-errnos.h> instead of defining errno values here.
5541 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
5542 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
5543 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
5544 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
5545 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
5547 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
5549 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
5550 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5551 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
5552 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
5553 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
5554 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
5555 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
5556 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
5557 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5558 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
5559 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
5560 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
5561 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
5562 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
5563 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
5564 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5565 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
5566 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
5567 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5568 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
5569 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
5570 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
5571 * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
5572 * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
5573 * sysdeps/sh/pthread_spin_trylock.S: Likewise.
5574 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
5575 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
5577 * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
5578 CLONE_CHILD_SETTID worked.
5580 2003-03-12 Ulrich Drepper <drepper@redhat.com>
5582 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
5584 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
5587 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
5588 (pthread_cond_t): Add padding.
5590 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
5591 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
5592 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
5594 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
5595 (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
5596 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
5597 (__pthread_rwlock_timedrdlock): Likewise.
5598 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
5599 (__pthread_rwlock_wrlock): Likewise.
5600 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
5601 (__pthread_rwlock_rdlock): Likewise.
5603 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
5605 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
5606 result of lock re-get if it fails.
5608 2003-03-11 Ulrich Drepper <drepper@redhat.com>
5610 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
5611 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
5612 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
5613 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
5614 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5615 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
5616 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
5617 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
5618 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
5619 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
5621 * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
5622 THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
5624 * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
5625 Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
5626 * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
5627 (create_thread): Likewise.
5628 Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
5629 * init.c (__pthread_initialize_minimal_internal): Initialize
5630 __libc_multiple_threads_ptr if necessary.
5631 * pthreadP.h: Adjust prototype for __libc_pthread_init. Declare
5632 __pthread_multiple_threads and __libc_multiple_threads_ptr.
5633 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
5634 __libc_multiple_threads.
5635 (__libc_pthread_init): Return pointer to __libc_pthread_init if
5638 * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
5639 (THREAD_SETMEM_NC): Likewise.
5641 * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
5642 * sysdeps/x86_64/pthread_spin_trylock.S: New file.
5643 * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
5644 * sysdeps/x86_64/pthread_spin_unlock.S: New file.
5646 * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
5647 Eliminate one entire instruction.
5649 * cancellation.c (__pthread_enable_asynccancel_2): New function.
5650 * pthreadP.h: Declare __pthread_enable_asynccancel_2.
5651 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5652 (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
5653 instead of __pthread_enable_asynccancel.
5654 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5655 (__pthread_cond_wait): Likewise.
5656 * sysdeps/pthread/pthread_cond_timedwait.c
5657 (__pthread_cond_timedwait): Likewise.
5658 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
5660 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5661 (__condvar_cleanup): Wake up all waiters in case we got signaled
5662 after being woken up but before disabling asynchronous
5664 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
5665 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
5666 (__condvar_cleanup): Likewise.
5668 * init.c (__NR_set_tid_address): If already defined, don't redefine.
5669 Make it an error if architecture has no #if case. Add x86-64.
5671 * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
5672 pt-initfini.s generation.
5674 * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
5675 (TLS_INIT_TP): Fix typo.
5677 2003-03-11 Jakub Jelinek <jakub@redhat.com>
5679 * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
5680 3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
5682 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
5683 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
5684 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
5685 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
5686 * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
5687 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
5688 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
5689 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
5691 2003-03-11 Ulrich Drepper <drepper@redhat.com>
5693 * sysdeps/pthread/pthread_cond_timedwait.c
5694 (__pthread_cond_timedwait): Return the result of the final
5695 locking. If it succeeds, the regular function return value.
5697 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
5698 Return result of the final locking.
5699 * version.c (__nptl_main): Work around problems with the strange
5700 INTERNAL_SYSCALL macro on ppc32.
5701 * init.c (__pthread_initialize_minimal_internal): Unblock
5702 SIGCANCEL in case the parent blocked it.
5703 Reported by Paul Mackerras <paulus@samba.org>.
5705 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
5706 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
5707 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
5709 2003-03-11 Jakub Jelinek <jakub@redhat.com>
5711 * sysdeps/pthread/pthread_cond_timedwait.c
5712 (__pthread_cond_timedwait): Unlock and fail if
5713 __pthread_mutex_unlock_internal failed.
5715 * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
5716 (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
5718 * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
5719 [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
5720 STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
5721 ALLOCATE_STACK): New macros.
5722 (TLS_TPADJ): New macro.
5723 (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
5724 (allocate_stack): Handle TLS_DTV_AT_TP and
5725 NEED_SEPARATE_REGISTER_STACK. Use TLS_TPADJ.
5726 * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
5728 * init.c [__ia64__] (__NR_set_tid_address): Define.
5730 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
5731 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
5732 * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
5733 * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
5734 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
5735 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
5736 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
5737 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
5738 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
5739 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
5740 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
5741 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
5742 * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
5743 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
5744 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
5745 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
5746 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
5747 * sysdeps/ia64/bits/atomic.h: New file.
5748 * sysdeps/ia64/Makefile: New file.
5749 * sysdeps/ia64/pthread_spin_init.c: New file.
5750 * sysdeps/ia64/pthread_spin_lock.c: New file.
5751 * sysdeps/ia64/pthread_spin_trylock.c: New file.
5752 * sysdeps/ia64/pthread_spin_unlock.c: New file.
5753 * sysdeps/ia64/pthreaddef.h: New file.
5754 * sysdeps/ia64/tcb-offsets.sym: New file.
5755 * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
5756 * sysdeps/ia64/tls.h: New file.
5758 * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
5759 to syscall instead of no arguments.
5761 2003-03-10 Ulrich Drepper <drepper@redhat.com>
5763 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
5764 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
5765 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
5766 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
5768 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
5771 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
5773 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
5774 lowlevelbarrier.sym.
5775 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
5776 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
5777 Include lowlevelbarrier.h and don't define offsets locally.
5778 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
5780 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
5781 (__lll_mutex_lock_wait): Reverse order of first two parameters.
5782 (__lll_mutex_timedlock_wait): Likewise.
5783 (lll_mutex_lock): Adjust asm for that.
5784 (lll_mutex_timedlock): Likewise. Mark cx, cc, r10 as clobbered.
5785 (lll_lock): Adjust asm for operand order change.
5786 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
5787 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
5789 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
5790 Reverse order of parameters.
5791 (__lll_timedwait_tid): Remove regparms attribute.
5792 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
5793 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
5795 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5796 (__lll_timedwait_tid): Remove one unnecessary instruction.
5798 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
5799 __lll_mutex_timedlock_wait only for NOT_IN_libc.
5800 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
5803 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
5804 lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
5806 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
5809 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
5810 LOCK is already defined. Don't define __lll_mutex_timedlock_wait
5812 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
5813 define LOCK here (if UP is not defined). The actual code is in
5816 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
5817 LOCK is already defined. Don't define lll_unlock_wake_cb and
5818 __lll_timedwait_tid for libc.so.
5819 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
5820 define LOCK here (if UP is not defined). The actual code is in
5823 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
5824 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
5825 * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
5826 instead of lowlevelsem.h.
5827 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
5828 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
5829 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
5831 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
5833 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
5834 * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
5835 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
5837 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
5839 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
5842 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
5844 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
5845 of __libc_locking_needed.
5846 (lll_trylock): Initialize %eax to zero.
5848 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
5849 pthread_cond_t definition.
5851 2003-03-10 Roland McGrath <roland@redhat.com>
5853 * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
5854 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
5855 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
5856 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
5857 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
5859 * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
5860 Instead of setting PD->multiple_threads, set globals
5861 __pthread_multiple_threads and __libc_multiple_threads.
5862 * sysdeps/pthread/createthread.c (create_thread): Likewise.
5863 * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
5864 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
5866 * descr.h (struct pthread): Conditionalize first member on
5867 [!TLS_DTV_AT_TP]. Replace the `header' member with an anonymous union
5868 containing an anonymous tcbhead_t. Move `list' member out.
5869 [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
5870 * allocatestack.c: Remove use of `header.data.' prefix.
5871 * pthread_create.c: Likewise.
5872 * init.c (__pthread_initialize_minimal_internal): Likewise.
5873 * sysdeps/pthread/createthread.c (create_thread): Likewise.
5874 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
5875 (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
5876 * sysdeps/x86_64/tls.h: Likewise.
5877 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
5878 (SINGLE_THREAD_P): Likewise.
5879 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
5880 (SINGLE_THREAD_P): Likewise.
5881 * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
5882 * sysdeps/s390/tls.h (tcbhead_t): Likewise.
5884 2003-03-09 Ulrich Drepper <drepper@redhat.com>
5886 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
5888 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
5889 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
5891 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
5892 leftovers from the ia32 code.
5894 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
5896 (clear_once_control): Don't load %esi.
5898 * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
5901 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
5903 * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
5904 * sysdeps/unix/sysv/linux/createthread.c: ...here.
5906 * Makefile (tests): Add tst-cond10.
5907 * tst-cond10.c: New file.
5909 2003-03-08 Ulrich Drepper <drepper@redhat.com>
5911 * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
5912 * tst-signal3.c (do_test): Likewise.
5913 * tst-sem5.c (do_test): Likewise.
5914 * tst-kill6.c (do_test): Likewise.
5915 * tst-tls3.c (do_test): Likewise. Include <errno.h>.
5917 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
5919 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
5920 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
5921 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
5922 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
5923 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
5924 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
5925 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
5927 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
5929 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
5930 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5931 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5932 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
5933 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
5934 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
5935 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
5936 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
5938 * allocatestack.c (allocate_stack): If mprotect() fails free the
5941 2003-03-07 Ulrich Drepper <drepper@redhat.com>
5943 * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
5945 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
5946 lll_wake_tid. This was used only to work around kernel limits in
5948 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
5949 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
5950 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
5951 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
5953 * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
5954 (__pthread_initialize_minimal_internal): Change initialization of
5955 __static_tls_align_m1 appropriately.
5956 * pthreadP.h (__static_tls_align_m1): Renamed from
5958 * allocatestack.c (allocate_stack): Use __static_tls_align_m1
5959 instead of __static_tls_align-1.
5961 2003-03-04 Ulrich Drepper <drepper@redhat.com>
5963 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
5965 * pthread_create.c: Define __pthread_keys using nocommon
5966 attribute, not by placing it explicitly in bss.
5967 Remove DEFINE_DEALLOC definition. Not needed anymore.
5969 * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
5970 Use it in mmap call to allocate stacks.
5972 * sysdeps/pthread/createthread.c (create_thread): Fix comment.
5974 * pthread_create.c (start_thread): Use THREAD_SETMEM to store
5975 result of the thread function.
5977 2003-03-03 Ulrich Drepper <drepper@redhat.com>
5979 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed. The generic
5980 version is just fine.
5982 * sysdeps/unix/sysv/linux/libc_pthread_init.c
5983 (__pthread_child_handler): Renamed from pthread_child_handler,
5984 exported, and marked hidden. Change all users.
5985 * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
5986 free __pthread_child_handler from child list.
5988 2003-03-03 Martin Schwidefsky <schwidefsky@de.ibm.com>
5990 * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
5992 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5993 Fix handling of cancellation and failing pthread_mutex_unlock call.
5994 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
5995 (__pthread_cond_wait): Likewise.
5997 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
5998 (pthread_rwlock_timedrdlock): Fix clobber of result variable by
5999 lll_futex_timed_wait call.
6000 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
6001 (pthread_rwlock_timedwrlock): Likewise.
6003 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
6004 Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
6005 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
6007 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
6008 check of lll_futex_wake return value.
6010 2003-03-03 Roland McGrath <roland@redhat.com>
6012 * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
6014 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
6015 Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
6016 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
6018 2003-03-02 Ulrich Drepper <drepper@redhat.com>
6020 * sysdeps/pthread/timer_create.c (timer_create): Return correct
6021 error for CPU clocks.
6023 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
6024 _POSIX_MONOTONIC_CLOCK.
6025 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
6027 * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
6030 2003-03-01 Ulrich Drepper <drepper@redhat.com>
6032 * descr.h (struct pthread): Move cleanup field to the front.
6034 2003-03-01 Roland McGrath <roland@redhat.com>
6036 * sem_open.c (sem_open): Braino fix.
6038 2003-03-01 Ulrich Drepper <drepper@redhat.com>
6040 * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
6041 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
6042 __pthread_cleanup_pop functionality.
6043 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6045 * descr.h (struct pthread): Move tid field to the front now that
6048 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
6049 (__lll_mutex_timedlock_wait): Remove.
6050 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
6051 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
6052 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
6053 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6054 (lll_unlock_wake_cb): Don't save and restore %esi.
6055 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
6057 (__lll_timedwait_tid): Add alignment.
6058 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
6059 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
6061 (__lll_timedwait_tid): Removed.
6062 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
6063 (__pthread_cond_broadcast): Don't save, load, and restore %esi.
6064 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
6065 (pthread_barrier_wait): Don't save, load, and restore %esi for
6067 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6068 (__pthread_cond_signal): Don't save, load, and restore %esi.
6069 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
6070 (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
6071 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
6072 Don't save, load, and restore %esi.
6074 2003-02-27 Ulrich Drepper <drepper@redhat.com>
6076 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
6077 Release lock before waking up the waiters.
6079 * tst-exit1.c (do_test): Don't start more than one thread in parallel.
6081 * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
6082 (reader_thread): Likewise.
6084 * sysdeps/pthread/pthread_rwlock_unlock.c
6085 (__pthread_rwlock_unlock): Release internal lock early. Don't try
6086 to wake up readers if there are none.
6088 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
6089 Release internal lock before wake threads.
6091 2003-02-26 Ulrich Drepper <drepper@redhat.com>
6093 * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
6094 * tst-rwlock8.c: Initialize lock with INIT. Allow INIT to be
6096 * tst-rwlock9.c: Likewise.
6097 * tst-rwlock10.c: New file.
6098 * tst-rwlock11.c: New file.
6100 * Makefile (tests): Add tst-dlsym1.
6101 * tst-dlsym1.c: New file.
6103 * init.c (__pthread_initialize_minimal_internal): Set
6104 GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
6105 * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
6107 2003-02-24 Ulrich Drepper <drepper@redhat.com>
6109 * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
6111 * tst-cond2.c: Fix sychronization with child.
6113 * tst-rwlock8.c (reader_thread): Remove unused variable.
6115 * Makefile: Add rules to build and run tst-tls3.
6116 * tst-tls3.c: New file.
6117 * tst-tls3mod.c: New file.
6119 * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
6120 * tst-rwlock8.c: New file.
6121 * tst-rwlock9.c: New file.
6122 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
6123 complete broken rwlock implementation.
6124 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6126 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6128 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
6129 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6130 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
6131 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
6132 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
6133 * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
6134 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
6136 2003-02-23 Roland McGrath <roland@redhat.com>
6138 * Makefile (nptl-version): Change regexp so case sensitivity is ok.
6140 2003-02-23 Ulrich Drepper <drepper@redhat.com>
6142 * Makefile (tests): Add tst-context1.
6143 * tst-context1.c: New file.
6145 * Makefile (tests): Add tst-tls1 and tst-tls2.
6146 * tst-tls1.c: New file.
6147 * tst-tls2.c: New file.
6149 * libc-cancellation.c (__libc_enable_asynccancel): Correct test
6152 * pthread_create.c (start_thread): Set EXITING_BIT early.
6154 * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
6155 (THREAD_GETMEM_NC): Likewise.
6157 2003-02-22 Ulrich Drepper <drepper@redhat.com>
6159 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
6160 off 3 more bytes by using offset-less instructions when possible.
6162 * Makefile: Add dependency for $(objpfx)version.d.
6164 * eintr.c (eintr_source): Add unnecessary return but the compiler
6167 * tst-kill3.c: Include <unistd.h>.
6169 2003-02-21 Roland McGrath <roland@redhat.com>
6171 * pthread_create.c (start_thread): Call __libc_thread_freeres.
6173 2003-02-21 Ulrich Drepper <drepper@redhat.com>
6175 * Makefile (tests): Add tst-eintr1.
6176 (distribute): Add eintr.c.
6177 * tst-eintr1.c: New file.
6178 * eintr.c: New file.
6180 * pthread_cancel.c (pthread_cancel): Use tkill directly.
6182 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
6183 Disallow sending SIGCANCEL.
6185 * Makefile (tests): Remove tst-basic7. Add tst-kill1, tst-kill2,
6186 tst-kill3, tst-kill4, tst-kill5, tst-kill6.
6187 * tst-kill1.c: New file.
6188 * tst-kill2.c: New file.
6189 * tst-kill3.c: New file.
6190 * tst-kill5.c: New file.
6191 * tst-kill6.c: New file.
6192 * tst-basic7.c: Renamed to...
6193 * tst-kill4.c: ...this.
6195 2003-02-21 Roland McGrath <roland@redhat.com>
6197 * Makefile (install-lib-ldscripts): New variable.
6199 2003-02-21 Ulrich Drepper <drepper@redhat.com>
6201 * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
6202 * pthread_cancel.c: Use INVALID_TD_P.
6203 * pthread_detach.c: Likewise.
6204 * pthread_getschedparam.c: Likewise.
6205 * pthread_setschedparam.c: Likewise.
6206 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
6207 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
6208 * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
6209 * pthread_timedjoin.c: Likewise.
6211 * tst-basic7.c: Include <signal.h>.
6213 * pthread_join.c (pthread_join): Limited checking for invalid
6215 * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
6217 2003-02-20 Ulrich Drepper <drepper@redhat.com>
6219 * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
6220 beginning of the loop. Clear the entire first block of TSD.
6221 * Makefile (tests): Add tst-key4.
6222 * tst-key4.c: New file.
6224 2003-02-18 Ulrich Drepper <drepper@redhat.com>
6226 * Makefile (tests): Add tst-basic7.
6227 * tst-basic7.c: New file.
6229 * pthread_create.c (deallocate_tsd): Mark as internal_function.
6230 Add some more __builtin_expect.
6232 * pthreadP.h: Define dummy version of DEBUGGING_P.
6234 2003-02-17 Ulrich Drepper <drepper@redhat.com>
6236 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
6237 _POSIX_THREAD_PRIORITY_SCHEDULING.
6238 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
6239 _XOPEN_REALTIME_THREADS.
6240 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
6242 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
6243 kernel returns EINVAL for PID <= 0, work around it.
6245 * Makefile (tests): Add tst-signal5.
6246 * tst-signal5.c: New file.
6248 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
6251 * tst-cancel1.c (tf): Block all signals.
6253 * Makefile (tests): Add tst-basic6.
6254 * tst-basic6.c: New file.
6256 * tst-basic1.c: Add test for process ID.
6258 * Makefile (tests): Add tst-cancel10.
6259 * tst-cancel10.c: New file.
6261 * Makefile (tests): Add tst-signal4.
6262 * tst-signal4.c: New file.
6264 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
6265 __sigismember instead of sigismember. Add __builtin_expect.
6267 2003-02-16 Ulrich Drepper <drepper@redhat.com>
6269 * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
6270 pthread_setcancelstate, and pthread_rwlock_setpshared.
6272 * tst-cancel7.c (do_test): Make sure the pid file exists before
6273 canceling the thread.
6275 * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
6276 pthread_rwlock_timedrdlock tests.
6277 * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
6278 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6279 Check for invalid tv_nsec field.
6280 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6283 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
6284 recursive mutex of overflow.
6286 * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
6288 * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
6289 going into an endless loop.
6290 * Makefile (tests): Add tst-cancel9.
6291 * tst-cancel9.c: New file.
6293 * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
6295 2003-02-15 Ulrich Drepper <drepper@redhat.com>
6297 * tst-mutex5.c (do_test): Add more timedlock tests.
6299 * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
6300 * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
6302 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
6303 use INLINE_SYSCALL. Error number is returned, not -1.
6305 * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
6306 and __deallocate_stack with internal_function.
6307 * pthread_create.c: Adjust definitions appropriately.
6308 * allocatestack.c: Likewise.
6310 * pthread_join.c: Add one more __builtin_expect.
6311 * pthread_timedjoin.c: Likewise.
6313 * pthread_getspecific.c (__pthread_getspecific): Clear data->data
6314 not data of sequence number does not match.
6315 Add one __builtin_expect.
6317 * Makefile (tests): Add tst-clock1.
6318 * tst-clock1.c: New file.
6320 * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
6322 * Makefile (tests): Add tst-basic5.
6323 * tst-basic5.c: New file.
6325 2003-02-14 Ulrich Drepper <drepper@redhat.com>
6327 * Makefile (tests): Add tst-basic4.
6328 * tst-basic4.c: New file.
6330 * pthreadP.h: Add declaraction for __nptl_nthreads.
6331 * pthread_create.c: Define __nptl_nthreads
6332 (start_thread): Increment __nptl_nthreads at beginning. Decrement
6333 after thread is done. If then zero, call exit(0).
6334 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
6335 Add ptr_nthreads. Define HAVE_PTR_NTHREADS.
6336 * init.c (pthread_functions): Initialize ptr_nthreads.
6337 * allocatestack.c (nptl_nthreads): Remove definition and all uses.
6338 (__reclaim_stacks): Decrement __nptl_nthreads.
6339 * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
6341 * Makefile (tests): Add tst-basic3.
6342 * tst-basic3.c: New file.
6344 * descr.h: Define CANCELING_BIT and CANCELING_BITMASK. Introduce
6345 after CANCELTYPE_BIT, move the other bits up. Update CANCEL_RESTMASK.
6346 * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
6347 * pthread_cancel.c (pthread_cancel): Likewise. Also set CANCELING_BIT
6348 if asynchronous canceling is enabled.
6349 * pthread_join.c (pthread_join): When recognizing circular joins,
6350 take into account the other thread might be already canceled.
6351 * Makefile (tests): Add tst-join5.
6352 * tst-join5.c: New file.
6354 * Makefile (tests): Add tst-join4.
6355 * tst-join4.c: New file.
6357 2003-02-13 Ulrich Drepper <drepper@redhat.com>
6359 * tst-cond4.c (main): Add test of pthread_attr_getpshared.
6361 2003-02-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
6363 * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
6364 THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
6365 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
6367 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
6369 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
6370 error if lll_futex_wake failed.
6372 2003-02-13 Ulrich Drepper <drepper@redhat.com>
6374 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
6375 handling of cancellation and failung pthread_mutex_unlock call.
6376 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6377 * Makefile (tests): Add tst-cond8 and tst-cond9.
6378 * tst-cond8.c: New file.
6379 * tst-cond9.c: New file.
6381 * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
6383 * sysdeps/pthread/pthread.h: Add missing initializers. Protect
6384 non-standard initializers with __USE_GNU.
6386 * Makefile (tests): Add tst-cleanup3.
6387 * tst-cleanup3.c: New file.
6389 2003-02-12 Ulrich Drepper <drepper@redhat.com>
6391 * Makefile (tests): Add tst-attr1 and tst-attr2.
6392 * tst-attr1.c: New file.
6393 * tst-attr2.c: New file.
6395 * Makefile: Add rules to build and run tst-atfork2 test.
6396 * tst-atfork2.c: New file.
6397 * tst-atfork2mod.c: New file.
6399 * sysdeps/unix/sysv/linux/unregister-atfork.c
6400 (__unregister_atfork): Free the memory allocated for the handlers
6401 after removing them from the lists.
6403 * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
6406 * tst-atfork1.c (do_test): Wait for the child we forked.
6407 Report error in child.
6409 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
6411 * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
6413 2003-02-10 Ulrich Drepper <drepper@redhat.com>
6415 * Makefile (tests): Add tst-cancel8.
6416 * tst-cancel8.c: New file.
6418 * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
6419 clearing of control variable.
6420 * Makefile (tests): Add tst-once3 and tst-once4.
6421 * tst-once3.c: New file.
6422 * tst-once4.c: New file.
6424 2003-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
6426 * sysdeps/sh/Makefile: New file.
6427 * sysdeps/sh/bits/atomic.h: New file.
6428 * sysdeps/sh/pthread_spin_init.c: New file.
6429 * sysdeps/sh/pthread_spin_lock.c: New file.
6430 * sysdeps/sh/pthread_spin_trylock.S: New file.
6431 * sysdeps/sh/pthread_spin_unlock.S: New file.
6432 * sysdeps/sh/pthreaddef.h: New file.
6433 * sysdeps/sh/tcb-offsets.sym: New file.
6434 * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
6435 * sysdeps/sh/tls.h: New file.
6436 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
6437 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
6438 * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
6439 * sysdeps/unix/sysv/linux/sh/fork.c: New file.
6440 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
6441 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
6442 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
6443 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
6444 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
6445 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
6446 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
6447 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
6448 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
6449 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
6450 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
6451 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
6452 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
6453 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
6454 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
6455 * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
6456 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
6457 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
6458 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
6459 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
6460 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
6461 * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
6462 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
6463 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
6464 * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
6465 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
6467 2003-02-08 Ulrich Drepper <drepper@redhat.com>
6469 * tst-cond2.c: Rearrange code to not rely on behavior undefined
6472 * tst-basic2.c (do_test): Lock mutex before creating the thread.
6474 2003-02-07 Ulrich Drepper <drepper@redhat.com>
6476 * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
6477 (TLS_GET_FS): New #define.
6478 (TLS_SET_FS): New #define.
6479 Correct value of __NR_set_thread_area.
6481 * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
6483 2003-02-06 Ulrich Drepper <drepper@redhat.com>
6485 * Makefile (tests): Add tst-popen1.
6486 * tst-popen1.c: New file.
6488 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
6489 but inactive generalization.
6490 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6491 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
6492 Minor optimization, remove one instruction.
6493 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
6495 2003-02-04 Martin Schwidefsky <schwidefsky@de.ibm.com>
6497 * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
6499 2003-01-31 Martin Schwidefsky <schwidefsky@de.ibm.com>
6501 * init.c (__NR_set_tid_address): Add #ifdef for s390.
6502 * sysdeps/pthread/pthread_barrier_wait.c: New file.
6503 * sysdeps/pthread/pthread_cond_broadcast.c: New file.
6504 * sysdeps/pthread/pthread_cond_signal.c: New file.
6505 * sysdeps/pthread/pthread_cond_timedwait.c: New file.
6506 * sysdeps/pthread/pthread_cond_wait.c: New file.
6507 * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
6508 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
6509 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
6510 * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
6511 * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
6512 * sysdeps/s390/Makefile: New file.
6513 * sysdeps/s390/bits/atomic.h: New file.
6514 * sysdeps/s390/pthread_spin_init.c: New file.
6515 * sysdeps/s390/pthread_spin_lock.c: New file.
6516 * sysdeps/s390/pthread_spin_trylock.c: New file.
6517 * sysdeps/s390/pthread_spin_unlock.c: New file.
6518 * sysdeps/s390/pthreaddef.h: New file.
6519 * sysdeps/s390/tcb-offsets.sym: New file.
6520 * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
6521 * sysdeps/s390/tls.h: New file.
6522 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
6523 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
6524 * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
6525 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
6526 * sysdeps/unix/sysv/linux/s390/fork.c: New file.
6527 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
6528 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
6529 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
6530 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
6531 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
6532 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
6533 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
6534 * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
6535 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
6536 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
6537 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
6538 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
6539 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
6540 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
6541 * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
6542 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
6543 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
6544 * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
6546 2003-02-04 Ulrich Drepper <drepper@redhat.com>
6548 * atomic.h: Add a couple more default implementations.
6549 (atomic_compare_and_exchange_acq): Use
6550 __arch_compare_and_exchange_32_acq in return value definition. It
6552 (atomic_bit_set): Renamed from atomic_set_bit.
6553 Add missing atomic_ prefixes.
6555 * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
6556 thread library is available, use correct value to mark initialized
6559 2003-02-03 Ulrich Drepper <drepper@redhat.com>
6561 * allocatestack.c (allocate_stack): Use __getpagesize instead of
6562 __sysconf to determine pagesize.
6564 * pthread_create.c: Include <atomic.h>.
6565 * allocatestack.c (allocate_stack): Implement coloring of the
6566 allocated stack memory. Rename pagesize to pagesize_m1. It's the
6567 size minus one. Adjust users.
6568 * sysdeps/i386/i686/Makefile: New file.
6570 2003-02-02 Ulrich Drepper <drepper@redhat.com>
6572 * allocatestack.c: Improve comment throughout the file.
6574 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6575 (__lll_lock_wait): Add branch prediction.
6576 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
6577 (__lll_lock_wait): Likewise.
6578 (lll_unlock_wake_cb): Removed.
6580 2003-01-31 Ulrich Drepper <drepper@redhat.com>
6582 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
6583 _POSIX_THREAD_PRIORITY_SCHEDULING.
6585 2003-01-30 Jakub Jelinek <jakub@redhat.com>
6587 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
6588 Fix return type of ptr___pthread_getspecific.
6590 2003-01-29 Ulrich Drepper <drepper@redhat.com>
6592 * Makefile (tests): Add tst-umask1.
6593 (tst-umask1-ARGS): Define.
6594 * tst-umask1.c: New file.
6596 2003-01-28 Ulrich Drepper <drepper@redhat.com>
6598 * Makefile (libpthread-routines): Remove lowlevelrwlock. Add
6599 pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
6600 pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
6601 pthread_rwlock_unlock.
6602 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
6603 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
6604 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
6605 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
6606 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6608 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
6609 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6611 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
6612 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
6613 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
6615 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
6616 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
6618 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
6619 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
6620 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
6622 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
6623 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
6625 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
6627 * Makefile (libpthread-routines): Remove lowlevelcond and
6628 lowlevelsem. Add sem_wait, sem_trywait, sem_timedwait, sem_post,
6629 pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
6630 and pthread_cond_broadcast.
6631 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
6632 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
6633 * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
6634 * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
6635 * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
6636 * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
6637 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
6638 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
6639 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
6640 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
6641 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
6642 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
6643 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
6644 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
6645 * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
6646 * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
6647 * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
6648 * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
6649 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
6650 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
6651 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
6652 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
6653 * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
6654 * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
6655 * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
6656 * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
6657 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
6658 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
6659 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
6660 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
6661 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
6663 * sysdeps/unix/sysv/linux/i386/createthread.c: Define
6664 PREPARE_CREATE and TLS_VALUE with x86-specific bits. All the rest
6665 of the code is moved to ...
6666 * sysdeps/pthread/createthread.c: ...here. New file.
6668 2003-01-27 Ulrich Drepper <drepper@redhat.com>
6670 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
6671 (__new_sem_post): Clear %eax before returning.
6672 Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
6674 * Makefile (tests): Add tst-cleanup2.
6675 * tst-cleanup2.c: New file.
6677 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
6678 Interpret first parameter correctly.
6680 2003-01-17 Ulrich Drepper <drepper@redhat.com>
6682 * Makefile (headers): Add bits/semaphore.h.
6684 2003-01-16 Jakub Jelinek <jakub@redhat.com>
6686 * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
6689 2003-01-14 Ulrich Drepper <drepper@redhat.com>
6691 * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
6692 must be used and mapping failed.
6693 Reported by Luke Elliott <luke.elliott@activfinancial.com>.
6695 * Makefile (CFLAGS-pthread_self.os): Define this, not
6696 CFLAGS-pthread_self.c.
6698 2003-01-13 Ulrich Drepper <drepper@redhat.com>
6700 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
6703 * Makefile (libpthread-routines): Add version. Add rules to build
6704 version.os and banner.h.
6705 * version.c: New file.
6707 2003-01-13 Jakub Jelinek <jakub@redhat.com>
6709 * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
6710 the alias unconditional.
6711 * pthread_mutex_unlock.c (__pthread_mutex_unlock_internal): Likewise.
6713 2003-01-13 Ulrich Drepper <drepper@redhat.com>
6715 * Makefile (CFLAGS-pthread_self.c): New definition.
6717 2003-01-06 Jakub Jelinek <jakub@redhat.com>
6719 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
6720 INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
6721 * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
6722 * init.c (__pthread_initialize_minimal_internal): Likewise.
6724 2003-01-07 Jakub Jelinek <jakub@redhat.com>
6726 * pthreadP.h (__pthread_cond_timedwait): Add prototype.
6728 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
6729 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
6730 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
6731 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
6732 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
6733 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
6735 2003-01-06 Jakub Jelinek <jakub@redhat.com>
6737 * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
6738 * pt-system.c (LIBC_CANCEL_HANDLED): Add.
6739 * tst-cancel-wrappers.sh: Remove all exceptions.
6741 2003-01-05 Ulrich Drepper <drepper@redhat.com>
6743 * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
6744 features. Reported by Marijn Ros <marijn@mad.scientist.com>.
6746 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
6747 Use __libc_pthread_functions array if SHARED.
6749 * pthreadP.h: Move pthread_cond_2_0_t definition to...
6750 * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
6752 * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
6753 (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
6754 __libc_key_create, __libc_getspecific, __libc_setspecific): Use
6755 __libc_ptf_call instead of __libc_maybe_call.
6757 (__libc_cleanup_region_start): Wrap function name with PTF call.
6758 (__libc_cleanup_region_end): Likewise.
6759 (__libc_cleanup_end): Likewise.
6761 * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
6762 * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
6763 * pthread_key_create.c: Add __pthread_key_create_internal alias.
6764 * pthreadP.h: Add prototypes.
6766 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
6767 __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
6768 __pthread_rwlock_unlock aliases.
6769 * pthreadP.h: Add prototypes for new aliases.
6771 * pthreadP.h (struct pthead_functions): Moved to...
6772 * sysdeps/pthread/pthread-functions.h: ...here. New file.
6773 * init.c (pthread_functions): Add initializers for new elements.
6775 * cleanup_defer.c: Add __pthread_cleanup_push_defer and
6776 __pthread_cleanup_pop_restore aliases.
6777 * pthreadP.h: Add prototypes.
6779 * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
6780 and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
6781 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
6782 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
6783 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
6784 * pthreadP.h: Adjust prototypes and callers.
6786 2003-01-04 Ulrich Drepper <drepper@redhat.com>
6788 * Makefile (tests): Add tst-cancel7.
6789 (tst-cancel7-ARGS): New variable.
6790 * tst-cancel7.c: New file.
6792 * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
6793 around gcc defficiencies.
6794 * old_pthread_cond_signal.c: Likewise.
6795 * old_pthread_cond_timedwait.c: Likewise.
6796 * old_pthread_cond_wait.c: Likewise.
6798 * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
6800 2003-01-03 Ulrich Drepper <drepper@redhat.com>
6802 * Makefile (tests): Add tst-cond7.
6803 * tst-cond7.c: New file.
6805 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
6806 (condvar_cleanup): Get condvar address from the right place.
6808 * atomic.h: Correct definitions of atomic_full_barrier,
6809 atomic_read_barrier, atomic_write_barrier.
6811 * old_pthread_cond_broadcast.c: Make memory allocate and initialization
6813 * old_pthread_cond_signal.c: Likewise.
6814 * old_pthread_cond_timedwait.c: Likewise.
6815 * old_pthread_cond_wait.c: Likewise.
6817 2003-01-03 Jakub Jelinek <jakub@redhat.com>
6819 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
6821 2003-01-03 Ulrich Drepper <drepper@redhat.com>
6823 * pthreadP.h (pthread_cond_2_0_t): New type.
6824 (struct pthread_functions): Use new type for 2.0 condvar callbacks.
6825 Use new type for the 2.0 condvar function prototypes.
6826 * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
6827 * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
6829 * old_pthread_cond_destroy.c: Likewise.
6830 * old_pthread_cond_broadcast.c: Likewise. Lock appropriately.
6831 * old_pthread_cond_signal.c: Likewise.
6832 * old_pthread_cond_timedwait.c: Likewise.
6833 * old_pthread_cond_wait.c: Likewise.
6835 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
6836 (__pthread_cond_wait): Don't save cancellation mode and seq value
6839 * herrno.c (__h_errno_location): Don't define as weak.
6841 2003-01-02 Jakub Jelinek <jakub@redhat.com>
6843 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
6844 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
6845 and pthread_cond_wait.
6846 * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
6848 (__pthread_cond_broadcast_2_0): ... this.
6849 * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
6851 (__pthread_cond_destroy_2_0): ... this.
6852 * old_pthread_cond_init.c (__old_pthread_cond_init):
6854 (__pthread_cond_init_2_0): ... this.
6855 * old_pthread_cond_signal.c (__old_pthread_cond_signal):
6857 (__pthread_cond_signal_2_0): ... this.
6858 * old_pthread_cond_wait.c (__old_pthread_cond_wait):
6860 (__pthread_cond_wait_2_0): ... this.
6861 * pthread_cond_destroy.c: Include shlib-compat.h.
6862 (pthread_cond_destroy): Change strong_alias into versioned_symbol.
6863 * pthread_cond_init.c: Include shlib-compat.h.
6864 (pthread_cond_init): Change strong_alias into versioned_symbol.
6865 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
6866 fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
6868 (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
6869 __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
6870 __pthread_cond_wait_2_0): New prototypes.
6871 (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
6872 __old_pthread_cond_init, __old_pthread_cond_signal,
6873 __old_pthread_cond_wait): Removed.
6874 * init.c: Include shlib-compat.h.
6875 (pthread_functions): Guard ptr___pthread_attr_init_2_0
6876 initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
6877 Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
6878 ptr___pthread_cond_*_2_0 fields.
6879 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
6880 pthread_cond_*@GLIBC_2.0 compatibility symbols.
6882 * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
6883 LIBC_SIGACTION was not yet defined.
6884 [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
6885 [!defined LIBC_SIGACTION] (__sigaction): New function and
6887 [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
6888 [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
6890 2003-01-02 Jakub Jelinek <jakub@redhat.com>
6892 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
6894 2003-01-02 Ulrich Drepper <drepper@redhat.com>
6896 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6897 New, larger type definition.
6898 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
6900 * Versions [libpthread]: Add definitions for new pthread_cond_*
6901 interfaces for version GLIBC_2.3.2.
6902 * pthread_cond_init.c: Update initialization for new type definition.
6903 * Makefile (libpthread-routines): Remove pthread_cond_wait,
6904 pthread_cond_timedwait, pthread_cond_signal, and
6905 pthread_cond_broadcast. Add old_pthread_cond_init,
6906 old_pthread_cond_destroy, old_pthread_cond_wait,
6907 old_pthread_cond_timedwait, old_pthread_cond_signal, and
6908 old_pthread_cond_broadcast.
6909 * old_pthread_cond_broadcast.c: New file.
6910 * old_pthread_cond_destroy.c: New file.
6911 * old_pthread_cond_init.c: New file.
6912 * old_pthread_cond_signal.c: New file.
6913 * old_pthread_cond_timedwait.c: New file.
6914 * old_pthread_cond_wait.c: New file.
6915 * pthreadP.h: Add prototypes for the compatibility interfaces.
6917 * pthread_cond_destroy.c: Don't include <errno.h>.
6919 2003-01-01 Ulrich Drepper <drepper@redhat.com>
6921 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
6922 unnecessary zero offset when addressing MUTEX.
6924 2002-12-31 Ulrich Drepper <drepper@redhat.com>
6926 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
6928 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
6929 for __register_atfork.
6931 2002-12-31 Jakub Jelinek <jakub@redhat.com>
6933 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
6934 instead of ASSEMBLER test macro.
6936 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
6937 __libc_current_sigrtmax): Add libc_hidden_def.
6939 * sysdeps/pthread/list.h: Remove assert.h include.
6941 2002-12-31 Ulrich Drepper <drepper@redhat.com>
6943 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
6944 __pthread_initialize_minimal_internal not
6945 __pthread_initialize_minimal.
6947 2002-12-30 Ulrich Drepper <drepper@redhat.com>
6949 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
6950 __pthread_initialize_minimal as hidden.
6952 * init.c (__pthread_initialize_minimal_internal): Don't mark as
6955 2002-12-31 Jakub Jelinek <jakub@redhat.com>
6957 * Makefile ($(inst_libdir)/libpthread.so): Depend on
6958 $(common-objpfx)format.lds, include that into the output script.
6960 (extra-B-pthread.so): Change linuxthreads/ into nptl/.
6962 2002-12-28 Andreas Jaeger <aj@suse.de>
6964 * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
6965 nsec resolution changes.
6966 (xstat64_conv): Likewise.
6967 (xstat32_conv): Likewise.
6968 * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
6970 * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
6971 structs stat and stat64.
6972 * time/time.h (__timespec_defined): Define for __USE_MISC.
6973 * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
6975 2002-12-30 Jakub Jelinek <jakub@redhat.com>
6977 * forward.c (FORWARD2): Renamed from FORWARD3. Remove unused export
6979 (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
6980 (pthread_exit): Use strong_alias to avoid warnings.
6981 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
6982 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
6983 ptr___pthread_attr_init_2_*.
6984 * init.c (pthread_functions): Adjust.
6986 2002-12-29 Ulrich Drepper <drepper@redhat.com>
6988 * forward.c: Make all functions available by default again. It
6989 caused too much trouble.
6991 * pt-siglongjmp.c: Removed.
6993 2002-12-28 Jakub Jelinek <jakub@redhat.com>
6995 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
6996 (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
6997 * sysdeps/i386/Makefile: New file.
6998 * sysdeps/i386/tcb-offsets.sym: New file.
6999 * sysdeps/pthread/tcb-offsets.h: New file.
7000 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
7001 Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
7003 * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
7004 __register_atfork...
7005 (GLIBC_2.3.2): ...here.
7007 2002-12-28 Ulrich Drepper <drepper@redhat.com>
7009 * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
7010 pthread_attr_setstackaddr with __attribute_deprecated__.
7012 2002-12-27 Jakub Jelinek <jakub@redhat.com>
7014 * pt-system.c (system): Remove cancellation handling.
7015 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
7016 cancellation routines.
7018 2002-12-28 Ulrich Drepper <drepper@redhat.com>
7020 * descr.h: Include <dl-sysdep.h>.
7021 (struct pthread): Move header.data.list to the back of the struct.
7022 * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
7023 (MULTIPLE_THREADS_OFFSET): Adjust offset.
7024 (SYSINFO_OFFSEET): Likewise.
7026 2002-12-27 Jakub Jelinek <jakub@redhat.com>
7028 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
7030 (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
7031 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
7032 DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
7033 (USE_DL_SYSINFO): Undef.
7035 2002-12-22 Jakub Jelinek <jakub@redhat.com>
7037 * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
7038 $(common-objpfx)libc.so.
7039 * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
7040 it is bigger than pipe buffer size even on arches with bigger
7042 (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
7044 2002-12-25 Ulrich Drepper <drepper@redhat.com>
7046 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
7047 correct errno access for case that USE___THREAD is not defined.
7049 2002-12-24 Ulrich Drepper <drepper@redhat.com>
7051 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
7052 Patch by Marijn Ros <marijn@mad.scientist.com>.
7054 2002-12-22 Roland McGrath <roland@redhat.com>
7056 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
7058 2002-12-20 Ulrich Drepper <drepper@redhat.com>
7060 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
7062 2002-12-19 Ulrich Drepper <drepper@redhat.com>
7064 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
7065 NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
7066 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
7068 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
7070 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
7071 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
7072 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
7073 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
7074 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
7075 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
7076 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
7077 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
7079 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
7081 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
7083 * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
7085 * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
7087 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
7088 that sysinfo is properly initialized.
7089 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
7090 to 1 only for ld.so.
7092 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
7093 RTLD_CORRECT_DYNAMIC_WEAK.
7095 2002-12-19 Jakub Jelinek <jakub@redhat.com>
7097 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
7098 Use return 0 as 6th argument to FORWARD4.
7099 * pthread_equal.c: Include pthreadP.h instead of pthread.h.
7101 2002-12-18 Ulrich Drepper <drepper@redhat.com>
7103 * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
7104 * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
7105 Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
7106 (INIT_SYSINFO): New #define.
7107 (TLS_TP_INIT): Use INIT_SYSINFO.
7108 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
7109 At test to make sure SYSINFO_OFFSET value is correct.
7110 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
7112 2002-12-18 Jakub Jelinek <jakub@redhat.com>
7114 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
7115 * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
7116 * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
7117 [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
7118 __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
7119 __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
7120 __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
7122 2002-12-18 Ulrich Drepper <drepper@redhat.com>
7124 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
7125 macro instead of using int $0x80 directly.
7127 * sysdeps/pthread/bits/stdio-lock.h: New file.
7128 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
7129 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
7130 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
7131 * Makefile (routines): Add libc-lowlevelmutex.
7133 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
7134 __i686.get_pc_thunk.dx.
7136 2002-12-17 Jakub Jelinek <jakub@redhat.com>
7138 * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
7139 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
7140 ($(objpfx)tst-cancel-wrappers.out): New rule.
7141 * tst-cancel-wrappers.sh: New test.
7142 * tst-locale1.c: Include signal.h.
7143 (uselocale): Test static linking of __libc_current_sigrt*.
7145 2002-12-17 Ulrich Drepper <drepper@redhat.com>
7147 * Makefile (tests): Add tst-cancel6.
7148 * tst-cancel6.c: New file
7150 2002-12-17 Jakub Jelinek <jakub@redhat.com>
7152 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
7153 Define meaningfully for assembler as well.
7154 * pthreadP.h (struct pthread_functions): Remove
7155 ptr_pthread_attr_init field. Add ptr_pthread_attr_init_2_0
7156 and ptr_pthread_attr_init_2_1 fields.
7157 * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
7158 and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
7159 * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
7160 (FORWARD3): Define using FORWARD4.
7161 (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
7163 * pt-system.c: Remove duplicate stdlib.h include.
7165 2002-12-16 Ulrich Drepper <drepper@redhat.com>
7167 * sem_init.c: Define sem_init@GLIBC_2.0.
7168 * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
7169 * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
7171 * flockfile.c: Moved to...
7172 * sysdeps/pthread/flockfile.c: ...here. New file.
7173 * funlockfile.c: Moved to...
7174 * sysdeps/pthread/funlockfile.c: ...here. New file.
7175 * ftrylockfile.c: Moved to...
7176 * sysdeps/pthread/ftrylockfile.c: ...here. New file.
7178 2002-12-16 Jakub Jelinek <jakub@redhat.com>
7180 * libc-cancellation.c: Guard both function with
7181 #if !defined NOT_IN_libc.
7182 * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
7183 automatically provided pthread wrappers.
7184 * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
7185 CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
7187 * pt-open.c: Removed.
7188 * pt-fcntl.c: Removed.
7189 * pt-fsync.c: Removed.
7190 * pt-lseek.c: Removed.
7191 * pt-msgrcv.c: Removed.
7192 * pt-msgsnd.c: Removed.
7193 * pt-msync.c: Removed.
7194 * pt-nanosleep.c: Removed.
7195 * pt-open64.c: Removed.
7196 * pt-pause.c: Removed.
7197 * pt-pread.c: Removed.
7198 * pt-pread64.c: Removed.
7199 * pt-pwrite.c: Removed.
7200 * pt-pwrite64.c: Removed.
7201 * pt-read.c: Removed.
7202 * pt-recv.c: Removed.
7203 * pt-recvfrom.c: Removed.
7204 * pt-recvmsg.c: Removed.
7205 * pt-send.c: Removed.
7206 * pt-sendto.c: Removed.
7207 * pt-sigtimedwait.c: Removed.
7208 * pt-sigwait.c: Removed.
7209 * pt-wait.c: Removed.
7210 * pt-waitpid.c: Removed.
7211 * pt-write.c: Removed.
7212 * pt-accept.c: Removed.
7213 * pt-close.c: Removed.
7214 * pt-connect.c: Removed.
7215 * pt-lseek64.c: Removed.
7216 * pt-sendmsg.c: Removed.
7217 * pt-tcdrain.c: Removed.
7219 2002-12-15 Ulrich Drepper <drepper@redhat.com>
7221 * init.c (__pthread_initialize_minimal_internal): Renamed from
7222 __pthread_initialize_minimal. Make old name an alias. This
7223 converts a normal relocation into a relative relocation.
7225 * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
7227 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
7228 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
7229 * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
7230 pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
7231 pt-sigwaitinfo, pt-waitid, and pt-writev.
7232 * pt-creat.c: Removed.
7233 * pt-poll.c: Removed.
7234 * pt-pselect.c: Removed.
7235 * pt-readv.c: Removed.
7236 * pt-select.c: Removed.
7237 * pt-sigpause.c: Removed.
7238 * pt-sigsuspend.c: Removed.
7239 * pt-sigwaitinfo.c: Removed.
7240 * pt-waitid.c: Removed.
7241 * pt-writev.c: Removed.
7243 * init.c (pthread_functions): New variable.
7244 (__pthread_initialize_minimal): Pass pointer to pthread_functions
7245 (or NULL) to __libc_pthread_init.
7246 * forward.c: Rewrite to use __libc:pthread_functions array to get
7248 * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
7250 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
7251 Take new parameter. Copy content of variable pointed to by it
7252 to __libc_pthread_init.
7254 * pthreadP.h (struct pthread_functions): New type.
7255 (__libc_pthread_init): Declare.
7257 * pthread_attr_destroy.c: Add namespace protected alias.
7258 * pthread_attr_getdetachstate.c: Likewise.
7259 * pthread_attr_getinheritsched.c: Likewise.
7260 * pthread_attr_getschedparam.c: Likewise.
7261 * pthread_attr_getschedpolicy.c: Likewise.
7262 * pthread_attr_getscope.c: Likewise.
7263 * pthread_attr_setdetachstate.c: Likewise.
7264 * pthread_attr_setinheritsched.c: Likewise.
7265 * pthread_attr_setschedparam.c: Likewise.
7266 * pthread_attr_setschedpolicy.c: Likewise.
7267 * pthread_attr_setscope.c: Likewise.
7268 * pthread_cond_broadcast.c: Likewise.
7269 * pthread_cond_destroy.c: Likewise.
7270 * pthread_cond_init.c: Likewise.
7271 * pthread_cond_signal.c: Likewise.
7272 * pthread_cond_wait.c: Likewise.
7273 * pthread_condattr_destroy.c: Likewise.
7274 * pthread_condattr_init.c: Likewise.
7275 * pthread_equal.c: Likewise.
7276 * pthread_exit.c: Likewise.
7277 * pthread_getschedparam.c: Likewise.
7278 * pthread_self.c: Likewise.
7279 * pthread_setcancelstate.c: Likewise.
7280 * pthread_setschedparam.c: Likewise.
7281 * pthread_mutex_destroy.c: Likewise.
7282 * pthread_mutex_init.c: Likewise.
7283 * pthreadP.h: Add prototypes for the aliases.
7285 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
7286 multiple_threads member in correct TCB to 1.
7288 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
7289 SINGLE_THREAD_P. If in libc or libpthread examine multiple_thread
7290 member of thread decriptor, otherwise return unconditionally 1.
7292 2002-12-14 Ulrich Drepper <drepper@redhat.com>
7294 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
7295 regular Linux version. Remove file.
7296 * sysdeps/unix/sysv/linux/connect.S: Likewise. Remove file.
7297 * sysdeps/unix/sysv/linux/llseek.c: Likewise. Remove file.
7298 * sysdeps/unix/sysv/linux/msgrcv.c: Likewise. Remove file.
7299 * sysdeps/unix/sysv/linux/msgsnd.c: Likewise. Remove file.
7300 * sysdeps/unix/sysv/linux/open64.c: Likewise. Remove file.
7301 * sysdeps/unix/sysv/linux/poll.c: Likewise. Remove file.
7302 * sysdeps/unix/sysv/linux/pread.c: Likewise. Remove file.
7303 * sysdeps/unix/sysv/linux/pread64.c: Likewise. Remove file.
7304 * sysdeps/unix/sysv/linux/pselect.c: Likewise. Remove file.
7305 * sysdeps/unix/sysv/linux/pwrite.c: Likewise. Remove file.
7306 * sysdeps/unix/sysv/linux/pwrite64.c: Likewise. Remove file.
7307 * sysdeps/unix/sysv/linux/readv.c: Likewise. Remove file.
7308 * sysdeps/unix/sysv/linux/recv.S: Likewise. Remove file.
7309 * sysdeps/unix/sysv/linux/recvfrom.S: Likewise. Remove file.
7310 * sysdeps/unix/sysv/linux/recvmsg.S: Likewise. Remove file.
7311 * sysdeps/unix/sysv/linux/send.S: Likewise. Remove file.
7312 * sysdeps/unix/sysv/linux/sendmsg.S: Likewise. Remove file.
7313 * sysdeps/unix/sysv/linux/sendto.S: Likewise. Remove file.
7314 * sysdeps/unix/sysv/linux/sigpause.c: Likewise. Remove file.
7315 * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise. Remove file.
7316 * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise. Remove file.
7317 * sysdeps/unix/sysv/linux/sigwait.c: Likewise. Remove file.
7318 * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise. Remove file.
7319 * sysdeps/unix/sysv/linux/system.c: Likewise. Remove file.
7320 * sysdeps/unix/sysv/linux/tcdrain.c: Likewise. Remove file.
7321 * sysdeps/unix/sysv/linux/wait.c: Likewise. Remove file.
7322 * sysdeps/unix/sysv/linux/waitid.c: Likewise. Remove file.
7323 * sysdeps/unix/sysv/linux/waitpid.c: Likewise. Remove file.
7324 * sysdeps/unix/sysv/linux/writev.c: Likewise. Remove file.
7325 * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise. Remove file.
7327 2002-12-14 Jakub Jelinek <jakub@redhat.com>
7329 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
7330 * sysdeps/unix/sysv/linux/open.c: Removed.
7331 * sysdeps/unix/sysv/linux/fsync.c: Removed.
7332 * sysdeps/unix/sysv/linux/lseek.c: Removed.
7333 * sysdeps/unix/sysv/linux/msync.c: Removed.
7334 * sysdeps/unix/sysv/linux/read.c: Removed.
7335 * sysdeps/unix/sysv/linux/close.c: Removed.
7336 * sysdeps/unix/sysv/linux/creat.c: Removed.
7337 * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
7338 * sysdeps/unix/sysv/linux/pause.c: Removed.
7339 * sysdeps/unix/sysv/linux/select.c: Removed.
7340 * sysdeps/unix/sysv/linux/write.c: Removed.
7342 2002-12-14 Ulrich Drepper <drepper@redhat.com>
7344 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
7345 element in TCB to see whether locking is needed.
7347 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
7348 MULTIPLE_THREADS_OFFSET value is correct.
7350 * sysdeps/unix/sysv/linux/close.c: New file.
7351 * sysdeps/unix/sysv/linux/connect.S: New file.
7352 * sysdeps/unix/sysv/linux/creat.c: New file.
7353 * sysdeps/unix/sysv/linux/fsync.c: New file.
7354 * sysdeps/unix/sysv/linux/llseek.c: New file.
7355 * sysdeps/unix/sysv/linux/lseek.c: New file.
7356 * sysdeps/unix/sysv/linux/msgrcv.c: New file.
7357 * sysdeps/unix/sysv/linux/msgsnd.c: New file.
7358 * sysdeps/unix/sysv/linux/msync.c: New file.
7359 * sysdeps/unix/sysv/linux/nanosleep.c: New file.
7360 * sysdeps/unix/sysv/linux/open.c: New file.
7361 * sysdeps/unix/sysv/linux/open64.c: New file.
7362 * sysdeps/unix/sysv/linux/pause.c: New file.
7363 * sysdeps/unix/sysv/linux/poll.c: New file.
7364 * sysdeps/unix/sysv/linux/pread.c: New file.
7365 * sysdeps/unix/sysv/linux/pread64.c: New file.
7366 * sysdeps/unix/sysv/linux/pselect.c: New file.
7367 * sysdeps/unix/sysv/linux/pwrite.c: New file.
7368 * sysdeps/unix/sysv/linux/pwrite64.c: New file.
7369 * sysdeps/unix/sysv/linux/readv.c: New file.
7370 * sysdeps/unix/sysv/linux/recv.S: New file.
7371 * sysdeps/unix/sysv/linux/recvfrom.S: New file.
7372 * sysdeps/unix/sysv/linux/recvmsg.S: New file.
7373 * sysdeps/unix/sysv/linux/select.c: New file.
7374 * sysdeps/unix/sysv/linux/send.S: New file.
7375 * sysdeps/unix/sysv/linux/sendmsg.S: New file.
7376 * sysdeps/unix/sysv/linux/sendto.S: New file.
7377 * sysdeps/unix/sysv/linux/sigpause.c: New file.
7378 * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
7379 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
7380 * sysdeps/unix/sysv/linux/sigwait.c: New file.
7381 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
7382 * sysdeps/unix/sysv/linux/system.c: New file.
7383 * sysdeps/unix/sysv/linux/tcdrain.c: New file.
7384 * sysdeps/unix/sysv/linux/wait.c: New file.
7385 * sysdeps/unix/sysv/linux/waitid.c: New file.
7386 * sysdeps/unix/sysv/linux/waitpid.c: New file.
7387 * sysdeps/unix/sysv/linux/writev.c: New file.
7388 * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
7390 * pt-readv.c: Fix comment.
7392 2002-12-14 Jakub Jelinek <jakub@redhat.com>
7394 * tst-cleanup1.c: Include stdlib.h.
7396 * tst-cancel5.c: New test.
7397 * Makefile (tests): Add tst-cancel5.
7398 (tst-cancel5): Link against libc.so libpthread.so in that order.
7400 2002-12-13 Ulrich Drepper <drepper@redhat.com>
7402 * forward.c (test_loaded): Prevent recursive calls.
7404 * Makefile (routines): Add libc-cancellation.
7405 * libc-cancellation.c: New file.
7406 * descr.h (struct pthread): Add multiple_threads field.
7407 * allocatestack.c (allocate_stack): Initialize multiple_header field of
7408 new thread descriptor to 1.
7409 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
7410 Initialize multiple_thread field after successful thread creation.
7411 * cancellation.c (__do_cancel): Move to pthreadP.h.
7412 (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
7413 (__pthread_disable_asynccancel): Add internal_function attribute.
7414 * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
7415 * pthread_setcancelstate.c: Likewise.
7416 * pthread_setcanceltype.c: Likewise.
7417 * pthread_exit.c: Likewise.
7418 * pthreadP.h (CANCELLATION_P): Likewise.
7419 (__do_cancel): Define as static inline.
7420 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
7421 (__libc_enable_asynccancel, __libc_disable_asynccancel): New
7423 * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
7424 fields. Define MULTIPLE_THREADS_OFFSET.
7425 * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
7427 * sysdeps/unix/sysv/linux/accept.S: New file.
7428 * sysdeps/unix/sysv/linux/read.c: New file.
7429 * sysdeps/unix/sysv/linux/write.c: New file.
7430 * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
7431 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
7432 initialization of __libc_locking_needed.
7433 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
7434 __libc_locking_needed, use multiple_threads field in TCB.
7435 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
7437 2002-12-12 Ulrich Drepper <drepper@redhat.com>
7439 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
7441 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
7443 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
7444 access to __libc_locking_needed for PIC.
7446 2002-12-12 Jakub Jelinek <jakub@redhat.com>
7448 * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
7449 declare for libc.so.
7450 (__libc_lock_init, __libc_lock_init_recursive): Change into comma
7452 (__libc_lock_lock): Put into statement expression.
7453 (__libc_lock_unlock): Remove trailing semicolon.
7454 * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
7456 2002-12-12 Roland McGrath <roland@redhat.com>
7458 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
7459 "m" constraint to refer to __libc_locking_needed. Declare it here.
7461 2002-12-12 Ulrich Drepper <drepper@redhat.com>
7463 * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
7464 * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
7465 Initialize __libc_locking_needed.
7466 * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
7467 instead of __register_pthread_fork_handler.
7468 * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
7469 * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
7470 fork-gen with libc_pthread_init.
7471 * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
7472 of __register_pthread_fork_handler.
7473 * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
7474 of __register_pthread_fork_handler.
7475 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
7476 __libc_locking_needed to determine whether lock prefix can be avoided.
7477 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
7479 2002-12-11 Ulrich Drepper <drepper@redhat.com>
7481 * Makefile (tests): Add tst-cleanup1.
7482 * tst-cleanup1.c: New file.
7483 * cancellation.c (__cleanup_thread): Removed.
7484 (__do_cancel): Remove call to __cleanup_thread.
7485 * pthreadP.h: Remove __cleanup_thread prorotype.
7487 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
7488 Remember function and argument even if cancellation handler
7489 function is not available.
7490 (__libc_cleanup_region_end): Execute registered function directly if
7491 pthread functions are not available.
7492 (__libc_cleanup_end): Likewise.
7494 * init.c (__pthread_initialize_minimal): Fix initialization in
7495 static lib by preventing gcc from being too clever.
7497 2002-12-10 Ulrich Drepper <drepper@redhat.com>
7499 * init.c (__pthread_initialize_minimal): Remove unneccesary
7502 * Makefile (tests): We can run tst-locale2 now.
7504 2002-12-09 Ulrich Drepper <drepper@redhat.com>
7506 * Versions: Remove duplicated sigwait entry.
7508 2002-12-08 Ulrich Drepper <drepper@redhat.com>
7510 * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
7513 * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
7515 * pthreadP.h: Declare __pthread_enable_asynccancel and
7516 __pthread_disable_asynccancel.
7517 (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
7518 (CANCEL_RESET): Use __pthread_disable_asynccancel.
7519 * cancellation.c (__pthread_enable_asynccancel): New function.
7520 (__pthread_disable_asynccancel): New function.
7521 * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
7522 * pt-close.c: Likewise.
7523 * pt-connect.c: Likewise.
7524 * pt-creat.c: Likewise.
7525 * pt-fcntl.c: Likewise.
7526 * pt-fsync.c: Likewise.
7527 * pt-lseek.c: Likewise.
7528 * pt-lseek64.c: Likewise.
7529 * pt-msgrcv.c: Likewise.
7530 * pt-msgsnd.c: Likewise.
7531 * pt-msync.c: Likewise.
7532 * pt-nanosleep.c: Likewise.
7533 * pt-open.c: Likewise.
7534 * pt-open64.c: Likewise.
7535 * pt-pause.c: Likewise.
7536 * pt-poll.c: Likewise.
7537 * pt-pread.c: Likewise.
7538 * pt-pread64.c: Likewise.
7539 * pt-pselect.c: Likewise.
7540 * pt-pwrite.c: Likewise.
7541 * pt-pwrite64.c: Likewise.
7542 * pt-read.c: Likewise.
7543 * pt-readv.c: Likewise.
7544 * pt-recv.c: Likewise.
7545 * pt-recvfrom.c: Likewise.
7546 * pt-recvmsg.c: Likewise.
7547 * pt-select.c: Likewise.
7548 * pt-send.c: Likewise.
7549 * pt-sendmsg.c: Likewise.
7550 * pt-sendto.c: Likewise.
7551 * pt-sigpause.c: Likewise.
7552 * pt-sigsuspend.c: Likewise.
7553 * pt-sigtimedwait.c: Likewise.
7554 * pt-sigwait.c: Likewise.
7555 * pt-sigwaitinfo.c: Likewise.
7556 * pt-system.c: Likewise.
7557 * pt-tcdrain.c: Likewise.
7558 * pt-wait.c: Likewise.
7559 * pt-waitid.c: Likewise.
7560 * pt-waitpid.c: Likewise.
7561 * pt-write.c: Likewise.
7562 * pt-writev.c: Likewise.
7563 * pthread_join.c: Likewise.
7564 * pthread_timedjoin.c: Likewise.
7566 * pt-sigpause.c (sigsuspend): Call __sigsuspend.
7567 (__xpg_sigpause): New function.
7568 * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
7570 2002-12-07 Ulrich Drepper <drepper@redhat.com>
7572 * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
7574 * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
7575 _GI_pthread_cleanup_pop to pthreadP.h.
7577 * ftrylockfile.c: Use _IO_lock_trylock instead of
7578 pthread_mutex_trylock.
7580 * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
7581 (CANCEL_RESET): Likewise.
7582 (__pthread_setcanceltype_): Declare.
7583 (__pthread_mutex_lock_internal): Declare.
7584 (__pthread_mutex_unlock_internal): Declare.
7585 (__pthread_once_internal): Declare.
7586 (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
7587 (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
7589 * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
7590 and pthread_mutex_unlock.
7591 * pthread_cond_wait.c: Likewise.
7592 * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
7593 * pthread_mutex_unlock.c: Likewise.
7595 * pthread_setcanceltype.c: Add additional alias
7596 __pthread_setcanceltype.
7598 * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
7599 * sem_open.c (sem_open): Likewise.
7600 Use __libc_open, __libc_write, and __libc_close instead of
7601 open, write, and close respectively.
7603 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
7604 Rewrite as statement expression since it must return a value.
7606 * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
7607 * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
7610 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
7611 alias __pthread_once_internal.
7613 * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
7615 2002-12-06 Ulrich Drepper <drepper@redhat.com>
7617 * Makefile (tests): Add tst-stdio1 and tst-stdio2.
7618 * tst-stdio1.c: New file.
7619 * tst-stdio2.c: New file.
7621 * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
7623 * Makefile (tests): Comment out tst-locale2 for now.
7624 (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
7626 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
7628 * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
7629 Use _IO_lock_init instead of explicit assignment.
7631 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
7632 Define __libc_lock_* and __libc_lock_recursive macros with
7633 lowlevellock macros, not pthread mutexes.
7635 * flockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_lock instead
7636 of pthread_mutex_lock.
7637 * funlockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_unlock
7638 instead of pthread_mutex_unlock.
7640 2002-12-06 Roland McGrath <roland@redhat.com>
7642 * allocatestack.c (__stack_user): Use uninitialized defn.
7643 * init.c (__pthread_initialize_minimal): Initialize it here.
7645 2002-12-05 Roland McGrath <roland@redhat.com>
7647 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
7649 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
7651 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
7654 2002-12-05 Ulrich Drepper <drepper@redhat.com>
7656 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
7658 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
7659 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
7660 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
7661 * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
7662 for __libc_lock_* macros.
7663 * Makefile (routines): Add libc-lowlevellock.
7665 2002-10-09 Roland McGrath <roland@redhat.com>
7667 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
7668 Under [__PIC__], call the function via the pointer fetched for
7669 comparison rather than a call by name that uses the PLT.
7670 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
7671 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
7672 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
7673 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
7674 (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
7676 2002-12-04 Roland McGrath <roland@redhat.com>
7678 * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
7680 * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
7681 * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
7683 * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
7685 2002-12-04 Ulrich Drepper <drepper@redhat.com>
7687 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
7688 a completely opaque, non-integer type.
7689 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7691 2002-12-05 Jakub Jelinek <jakub@redhat.com>
7693 * sysdeps/i386/tls.h: Include stdlib.h.
7694 * sysdeps/x86_64/tls.h: Likewise.
7696 2002-12-04 Ulrich Drepper <drepper@redhat.com>
7698 * Makefile (tests): Add tst-locale2.
7699 (tests-static): Likewise.
7700 * tst-locale2.c: New file.
7702 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
7703 volatile and add memory clobbers to lock operations.
7705 2002-12-03 Ulrich Drepper <drepper@redhat.com>
7707 * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
7708 * sysdeps/i386/i486/bits/atomic.h: New file.
7709 * sysdeps/i386/i586/bits/atomic.h: New file.
7710 * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
7711 include i486 version.
7712 * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
7713 * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
7714 Patch by Marijn Ros <marijn@mad.scientist.com>.
7716 * allocatestack.c (get_cached_stack): Don't crash if we first
7717 found a stack with a larger size then needed.
7718 Reported by Hui Huang <hui.huang@sun.com>.
7720 * Makefile (tests): Add tst-sysconf.
7721 * tst-sysconf.c: New file.
7723 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
7724 PTHREAD_THREADS_MAX.
7726 2002-12-02 Roland McGrath <roland@redhat.com>
7728 * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
7729 Declare using hidden_proto instead of attribute_hidden, so there are
7730 non-.hidden static symbols for gdb to find.
7731 (__pthread_keys): Likewise.
7732 * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
7733 * allocatestack.c (__stack_user): Likewise.
7734 * pthread_create.c (__pthread_keys): Likewise.
7735 (__nptl_threads_events, __nptl_last_event): Make these static instead
7737 * pthread_key_create.c (__pthread_pthread_keys_max,
7738 __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
7740 2002-12-02 Ulrich Drepper <drepper@redhat.com>
7742 * Makefile (tests): Add tst-locale1. If buid-static is yes link
7744 * tst-locale1.c: New file.
7746 * pthread_cond_timedwait.c: Include <stdlib.h>.
7748 * Makefile (tests): Add tst-fork2 and tst-fork3.
7749 * tst-fork2.c: New file.
7750 * tst-fork3.c: New file.
7752 2002-11-28 Ulrich Drepper <drepper@redhat.com>
7754 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
7756 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
7757 require it to 200112L.
7759 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
7760 instruction only if HAVE_CMOV is defined.
7761 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
7763 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
7765 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
7767 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
7769 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
7771 2002-11-27 Ulrich Drepper <drepper@redhat.com>
7773 * sysdeps/x86_64/bits/atomic.h: New file.
7775 * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
7778 * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
7779 possible since gettid cannot fail.
7781 * sysdeps/x86_64/pthreaddef.h: New file.
7783 * sysdeps/i386/pthreaddef.h (gettid): Removed.
7785 * sysdeps/x86_64/pthread_spin_init.c: New file.
7786 * sysdeps/x86_64/pthread_spin_lock.c: New file.
7787 * sysdeps/x86_64/pthread_spin_trylock.c: New file.
7788 * sysdeps/x86_64/pthread_spin_unlock.c: New file.
7790 * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
7791 Add missing lock prefix. Minute optimization.
7793 * tst-spin2.c (main): Also check successful trylock call.
7795 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
7796 syscall. Fix typo in case INTERNAL_SYSCALL is not used.
7798 * sysdeps/i386/pthread_spin_destroy.c: Moved to...
7799 * sysdeps/pthread/pthread_spin_destroy.c: ...here. New file.
7801 * sysdeps/i386/pthread_sigmask.c: Removed. Use the generic code.
7802 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
7803 value in case of an error. Add support for INTERNAL_SYSCALL.
7805 * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
7806 value in case of an error.
7808 * sysdeps/x86_64/tls.h: New file.
7810 2002-11-26 Ulrich Drepper <drepper@redhat.com>
7812 * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface. It now
7813 takes the array member name and the index as parameters.
7814 (THREAD_SETMEM_NC): Likewise.
7815 * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
7816 * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
7819 * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
7820 to decide which code to use.
7821 (THREAD_SETMEM_NC): Likewise.
7823 * allocatestack.c (queue_stack): Don't remove stack from list here.
7824 Do it in the caller. Correct condition to prematurely terminate
7825 loop to free stacks.
7826 (__deallocate_stack): Remove stack from list here.
7828 2002-11-26 Ulrich Drepper <drepper@redhat.com>
7830 * Makefile (tests): Add tst-stack1.
7831 * tst-stack1.c: New file.
7833 * allocatestack.c (allocate_stack): Initialize the TCB on a user
7836 * pthread_attr_getstack.c: Return bottom of the thread area.
7838 2002-11-25 Ulrich Drepper <drepper@redhat.com>
7840 * Makefile (libpthread-routines): Add pt-allocrtsig and
7841 pthread_kill_other_threads.
7842 * pt-allocrtsig.c: New file.
7843 * pthread_kill_other_threads.c: New file.
7844 * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
7845 all three functions.
7846 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
7848 * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
7849 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
7850 and __libc_allocate_rtsig_private.
7851 * Versions (libpthread): Export pthread_kill_other_threads_np,
7852 __libc_current_sigrtmin, and __libc_current_sigrtmax.
7854 2002-11-24 Ulrich Drepper <drepper@redhat.com>
7856 * allocatestack.c (allocate_stack): stackaddr in attribute points to
7857 the end of the stack. Adjust computations.
7858 When mprotect call fails dequeue stack and free it.
7859 * pthread_attr_setstack.c: Store top of the stack in stackaddr
7861 * pthread_getattr_np.c: Likewise.
7863 * descr.h (IS_DETACHED): Add some more parenthesis to prevent
7866 2002-11-23 Ulrich Drepper <drepper@redhat.com>
7868 * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
7869 attribute definitions. Patch by Luca Barbieri <ldb@ldb.ods.org>.
7871 2002-11-22 Ulrich Drepper <drepper@redhat.com>
7873 * pthread_getspecific.c: Optimize access to first 2nd-level array.
7874 * pthread_setspecific.c: Likewise.
7876 2002-11-21 Ulrich Drepper <drepper@redhat.com>
7878 * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
7879 definitions. Get them from the official place.
7880 * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
7882 * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
7883 Use new CLONE_ flags in clone() calls.
7885 * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
7886 * sysdeps/unix/sysv/linux/i386/fork.c: New file.
7888 * Versions: Add pthread_* functions for libc.
7889 * forward.c: New file.
7891 * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
7893 * herrno.c: New file.
7896 * Makefile (libpthread-routines): Remove sem_post, sem_wait,
7897 sem_trywait, and sem_timedwait. Add herrno and res.
7898 * sem_init.c: Don't initialize lock and waiters members.
7899 * sem_open.c: Likewise.
7900 * sem_post.c: Removed.
7901 * sem_wait.c: Removed.
7902 * sem_trywait.c: Removed.
7903 * sem_timedwait.c: Removed.
7904 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
7905 Includes full implementations of sem_post, sem_wait, sem_trywait,
7907 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
7908 for new implementation.
7909 * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
7912 * tst-sem3.c: Improve error message.
7913 * tst-signal3.c: Likewise.
7915 * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
7916 to tell the kernel about the termination futex and to initialize tid
7917 member. Don't initialize main_thread.
7918 * descr.h (struct pthread): Remove main_thread member.
7919 * cancelllation.c (__do_cancel): Remove code handling main thread.
7920 The main thread is not special anymore.
7922 * allocatestack.c (__reclaim_stacks): Mark stacks as unused. Add
7923 size of the stacks to stack_cache_actsize.
7925 * pt-readv.c: Add missing "defined".
7926 * pt-sigwait.c: Likewise.
7927 * pt-writev.c: Likewise.
7929 2002-11-09 Ulrich Drepper <drepper@redhat.com>
7931 * Versions: Export __connect from libpthread.
7932 Patch by Luca Barbieri <ldb@ldb.ods.org>.
7934 * Makefile (libpthread-routines): Add pt-raise.
7935 * sysdeps/unix/sysv/linux/raise.c: New file.
7936 * sysdeps/unix/sysv/linux/pt-raise.c: New file.
7937 * sysdeps/generic/pt-raise.c: New file.
7939 * pthread_cond_init.c: Initialize all data elements of the condvar
7940 structure. Patch by Luca Barbieri <ldb@ldb.ods.org>.
7942 * pthread_attr_init.c: Actually implement 2.0 compatibility version.
7943 * pthread_create.c: Likewise.
7945 * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
7946 * tst-key1.c: New file.
7947 * tst-key2.c: New file.
7948 * tst-key3.c: New file.
7950 * Versions: Export pthread_detach for version GLIBC_2.0.
7951 Reported by Saurabh Desai <sdesai@austin.ibm.com>.
7953 2002-11-08 Ulrich Drepper <drepper@redhat.com>
7955 * pthread_key_create.c: Terminate search after an unused key was found.
7956 Patch by Luca Barbieri <ldb@ldb.ods.org>.
7958 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
7959 Patch by Luca Barbieri <ldb@ldb.ods.org>.
7961 2002-10-10 Ulrich Drepper <drepper@redhat.com>
7963 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
7964 dynamic lookup for errno in PIC.
7966 * allocatestack.c (get_cached_stack): Rearrange code slightly to
7967 release the stack lock as soon as possible.
7968 Call _dl_allocate_tls_init for TCB from the cache to re-initialize
7969 the static TLS block.
7970 (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
7972 * cancellation.c: Renamed from cancelation.c.
7973 * Makefile: Adjust accordingly.
7974 * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
7975 * cleanup_defer.c: Use CANCELLATION_P.
7976 * pthread_testcancel.c: Likewise.
7977 * descr.h: Fix spelling in comments.
7979 * pthread_getattr_np.c: Likewise.
7980 * pthread_getschedparam.c: Likewise.
7981 * pthread_setschedparam.c: Likewise.
7982 * Versions: Likewise.
7984 * pt-pselect.c: New file.
7985 * Makefile (libpthread-routines): Add pt-pselect.
7986 * Versions: Add pselect.
7988 * tst-cancel4.c: New file.
7989 * Makefile (tests): Add tst-cancel4.
7991 2002-10-09 Ulrich Drepper <drepper@redhat.com>
7993 * pthread_mutex_lock.c: Always record lock ownership.
7994 * pthread_mutex_timedlock.c: Likewise.
7995 * pthread_mutex_trylock.c: Likewise.
7997 * pt-readv.c: New file.
7998 * pt-writev.c: New file.
7999 * pt-creat.c: New file.
8000 * pt-msgrcv.c: New file.
8001 * pt-msgsnd.c: New file.
8002 * pt-poll.c: New file.
8003 * pt-select.c: New file.
8004 * pt-sigpause.c: New file.
8005 * pt-sigsuspend.c: New file.
8006 * pt-sigwait.c: New file.
8007 * pt-sigwaitinfo.c: New file.
8008 * pt-waitid.c: New file.
8009 * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
8010 pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
8011 pt-sigwait, pt-sigwaitinfo, and pt-waitid.
8012 * Versions: Add all the new functions.
8014 * tst-exit1.c: New file.
8015 * Makefile (tests): Add tst-exit1.
8017 * sem_timedwait.c: Minor optimization for more optimal fastpath.
8019 2002-10-08 Ulrich Drepper <drepper@redhat.com>
8021 * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
8023 * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
8024 call. pthread_join is an official cancellation point.
8025 * pthread_timedjoin.c: Likewise.
8027 * pthread_cond_wait.c: Revert order in which internal lock are dropped
8028 and the condvar's mutex are retrieved.
8029 * pthread_cond_timedwait.c: Likewise.
8030 Reported by dice@saros.East.Sun.COM.
8032 2002-10-07 Ulrich Drepper <drepper@redhat.com>
8034 * pthreadP.h: Cut out all type definitions and move them...
8035 * sysdeps/unix/sysv/linux/internaltypes.h: ...here. New file.
8036 * pthreadP.h: Include <internaltypes.h>.
8038 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
8041 * sem_trywait.c: Shuffle #includes around to get right order.
8042 * sem_timedwait.c: Likewise.
8043 * sem_post.c: Likewise.
8044 * sem_wait.c: Likewise.
8046 * nptl 0.3 released.
8048 * Makefile (tests): Add tst-signal3.
8049 * tst-signal3.c: New file.
8051 2002-10-05 Ulrich Drepper <drepper@redhat.com>
8053 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
8054 the asms modify the sem object.
8055 (__lll_sem_timedwait): Now takes struct sem* as first parameter.
8057 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
8059 * pthreadP.h (struct sem): New type. Actual semaphore type.
8060 * semaphoreP.h: Include pthreadP.h.
8061 * sem_getvalue.c: Adjust to sem_t change.
8062 * sem_init.c: Likewise.
8063 * sem_open.c: Likewise.
8064 * sem_post.c: Likewise.
8065 * sem_timedwait.c: Likewise.
8066 * sem_trywait.c: Likewise.
8067 * sem_wait.c: Likewise.
8069 2002-10-04 Ulrich Drepper <drepper@redhat.com>
8071 * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
8072 * tst-basic2.c: New file.
8073 * tst-exec1.c: New file.
8074 * tst-exec2.c: New file.
8075 * tst-exec3.c: New file.
8077 * tst-fork1.c: Remove extra */.
8079 * nptl 0.2 released. The API for IA-32 is complete.