]> git.ipfire.org Git - thirdparty/glibc.git/blame - nptl/ChangeLog
Update.
[thirdparty/glibc.git] / nptl / ChangeLog
CommitLineData
f9657e88
UD
12003-04-08 Ulrich Drepper <drepper@redhat.com>
2
3 * tst-barrier2.c: Eliminate warnings.
4 * tst-cancel4.c: Likewise.
5 * tst-cond4.c: Likewise.
6 * tst-cond6.c: Likewise.
7 * tst-detach1.c: Likewise.
8 * tst-rwlock4.c: Likewise.
9 * tst-rwlock6.c: Likewise.
10 * tst-rwlock7.c: Likewise.
11 * tst-sem3.c: Likewise.
12 * tst-spin2.c: Likewise.
13 * tst-umask1.c: Likewise.
14
69b35e86
UD
152003-04-07 Ulrich Drepper <drepper@redhat.com>
16
17 * pthread_detach.c (pthread_detach): Fix test for invalid TID.
18
c70ad7d7
UD
192003-04-06 Ulrich Drepper <drepper@redhat.com>
20
21 * descr.h (struct pthread): Move cancelhandling member to the front.
22
54e0138f
UD
232003-04-05 Ulrich Drepper <drepper@redhat.com>
24
25 * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
26 malloc_parent, and malloc_child statically.
27 (__register_atfork_malloc): New function.
28 (free_mem): Don't free any of the malloc_* variables on the list.
29 * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
30 Define HAVE_register_atfork_malloc.
31
b22d701b
UD
322003-04-04 Ulrich Drepper <drepper@redhat.com>
33
34 * sysdeps/pthread/createthread.c (create_thread): Add some more
35 comments explaining when to set multiple_threads and when not.
36
37 * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
38 THREAD_ATOMIC_BIT_SET if not already defined.
39 * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
40 THREAD_ATOMIC_BIT_SET:
41 * sysdeps/x86_64/tls.h: Likewise.
42 * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
43 THREAD_ATOMIC_CMPXCHG_VAL.
44 (_pthread_cleanup_pop_restore): Likewise.
45 * cancellation.c (__pthread_enable_asynccancel): Likewise.
46 (__pthread_enable_asynccancel_2): Likewise.
47 (__pthread_disable_asynccancel): Likewise.
48 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
49 (__libc_disable_asynccancel): Likewise.
50 * init.c (sigcancel_handler): Likewise.
51 * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
52 * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
53
86246935
UD
542003-04-03 Ulrich Drepper <drepper@redhat.com>
55
56 * init.c (sigcancel_handler): Don't set EXITING_BIT here.
57 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
58 * pthreadP.h (__do_cancel): Set EXITING_BIT here.
59 * Makefile (tests): Add tst-cancel11.
60 * tst-cancel11.c: New file.
61
6b4686a5
UD
622003-04-01 Ulrich Drepper <drepper@redhat.com>
63
64 * pthread_create.c (deallocate_tsd): Clear/free memory after the last
65 round, not the first. Use specific_used flag instead of local
66 found_nonzero variable. Use THREAD_[SG]ETMEM where possible.
67 (__free_tcb): Don't call deallocate_tsd here.
68 (start_thread): Call deallocate_tsd here.
69 * pthread_setspecific.c: Set specific_used flag really only when
70 needed.
0d73a73b 71 * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
6b4686a5 72 * tst-tsd3.c: New file.
0d73a73b 73 * tst-tsd4.c: New file.
6b4686a5 74
42b2395d
UD
752003-03-31 Ulrich Drepper <drepper@redhat.com>
76
211d90c5
UD
77 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
78 Use atomic_exchange_and_add instead of __lll_add.
79 (__lll_mutex_timedlock): Likewise.
80 Patch by Ian Wienand.
81
822003-03-24 Steven Munroe <sjmunroe@us.ibm.com>
83
84 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
85 (SINGLE_THREAD_P): Fix typo.
86 * tst-cancel-wrappers.sh: Handle '.'ed symbols.
87
882003-03-31 Ulrich Drepper <drepper@redhat.com>
89
90 * Makefile (tests): Add tst-align.
91 * tst-align.c: New file.
92 * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
211d90c5 93
42b2395d
UD
94 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
95 function correctly.
96
211d90c5
UD
97 * tst-tsd2.c: Add casts to avoid warnings.
98
163b180f
UD
992003-03-30 Ulrich Drepper <drepper@redhat.com>
100
101 * descr.h (struct pthread): Move most often used elements to the front.
102
ea473bad
UD
1032003-03-29 Ulrich Drepper <drepper@redhat.com>
104
105 * Makefile (libpthread-routines): Add pthread_atfork.
106 (libpthread-static-only-routines): Add pthread_atfork.
107
dd731d53
UD
1082003-03-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
109
110 * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
111 of TLS_DTV_AT_TP.
112 (INSTALL_DTV): Add parens.
113 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
114 Use passed descr instead of THREAD_SELF.
115 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
116 (__lll_mutex_timedlock_wait): Correct expected value after
117 spurious wakeup.
118 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
119 Release lock before waking up the waiters.
120 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
121 criteria. Reorderstruct passed to cleanup handler. Fix
122 handling of cancellation and failung pthread_mutex_unlock call.
123 Use __pthread_enable_asynccancel_2 instead of
124 __pthread_enable_asynccancel.
125 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
126 Return result of lock re-get if it fails.
127 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
128 for __pthread_cleanup_push.
129 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
130 completely broken rwlock implementation.
131 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
132 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
133 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
134 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
135 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
136 * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value. Use
137 versioned_symbol macro.
138 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
139 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
140
c75d02f0
UD
1412003-03-27 Ulrich Drepper <drepper@redhat.com>
142
5f5004df
UD
143 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
144 __timer_helper_thread. Declare __start_helper_thread, __helper_once,
145 and __helper_tid.
146 (struct timer): Remove th and bar field.
147 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
148 debugging code. Create only one helper thread.
149 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
150 helper thread.
151 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
152 Renamed. Define statically. Use thread info from siginfo.
153 (__helper_once): New variable.
154 (__helper_tid): New variable.
155 (__reset_helper_control): New function.
156 (__start_helper_thread): New function.
157
18d009ca
UD
158 * pthread_create.c (start_thread): Don't use setjmp inside
159 __builtin_expect to work around gcc bug.
160
c75d02f0
UD
161 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
162 timer_delete syscall fails, but not with ENOSYS, set
163 __no_posix_timers.
164
165 * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
166 (timer_settime): Fix typo.
28cf3058
UD
167 * sysdeps/unix/sysv/linux/timer_getoverr.c
168 [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
c75d02f0 169
049ac259
JJ
1702003-03-27 Jakub Jelinek <jakub@redhat.com>
171
172 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
173 offset of cleanupbuf.__prev.
174
f93d39dd
JJ
1752003-03-26 Jakub Jelinek <jakub@redhat.com>
176
177 * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
178 of included file.
179
f064e4c5
UD
1802003-03-26 Ulrich Drepper <drepper@redhat.com>
181
182 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
183 NULL provide default definition to syscall.
184
83e886a3
RM
1852003-03-25 Roland McGrath <roland@redhat.com>
186
187 * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
188 (timer_id2ptr): Fix typo.
189
09402f5b
UD
1902003-03-25 Ulrich Drepper <drepper@redhat.com>
191
192 * pthreadP.h: Define SIGCANCEL and SIGTIMER.
193 * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
194 * sysdeps/ia64/pthreaddef.h: Likewise.
195 * sysdeps/powerpc/pthreaddef.h: Likewise.
196 * sysdeps/s390/pthreaddef.h: Likewise.
197 * sysdeps/sh/pthreaddef.h: Likewise.
198 * sysdeps/x86_64/pthreaddef.h: Likewise.
199 * init.c (__pthread_initialize_minimal): Block SIGTIMER.
200 * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
201 being changed.
202 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
203 SIGTIMER is not unblocked.
204 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
205 RT signal taken.
206 * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
207 be send.
208 * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
209 pass pointer through as ID.
210 * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
211 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
212 * sysdeps/unix/sysv/linux/timer_create.c: New file.
213 * sysdeps/unix/sysv/linux/timer_delete.c: New file.
214 * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
215 * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
216 * sysdeps/unix/sysv/linux/timer_routines.c: New file.
217 * sysdeps/unix/sysv/linux/timer_settime.c: New file.
218 * sysdeps/unix/sysv/linux/ia64/Versions: New file.
219 * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
220 * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
221 * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
222 * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
223 * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
224 * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
225 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
226 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
227 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
228 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
229 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
230 * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
231 * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
232 * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
233 * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
234 * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
235 * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
236 * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
237 * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
238 * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
239 * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
240 * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
241 * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
242 * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
243
244 * pthreadP.h: Remove FRAME_LEFT definition.
245 * cleanup.c (_pthread_cleanup_push): Don't check for reference to
246 already left frame. Programs which have this problem are not POSIX
247 compliant.
248 * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
249
5e826ab5
UD
2502003-03-24 Ulrich Drepper <drepper@redhat.com>
251
252 * sysdeps/pthread/tst-timer.c: Check return values of the
253 functions we test.
254
b910f788
RM
2552003-03-23 Roland McGrath <roland@redhat.com>
256
3045a1fe
RM
257 * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
258 * tst-tls3mod.c: Likewise.
259 * tst-tls1.c: Likewise.
260 * tst-tls2.c: Likewise.
261
85047fe3
RM
262 * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
263 undefined behavior.
264
b910f788
RM
265 * tst-join5.c (tf1, tf2): Add a cast.
266
267 * Makeconfig (includes): Append -I$(..)nptl to this variable.
268
269 * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
270 Don't test anything.
271 * tst-cond4.c: Likewise.
272 * tst-cond6.c: Likewise.
273 * tst-flock2.c: Likewise.
274 * tst-mutex4.c: Likewise.
275 * tst-rwlock4.c: Likewise.
276 * tst-signal1.c: Likewise.
277 * tst-spin2.c: Likewise.
278 * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
279
280 * tst-mutex4.c: Use test-skeleton.c.
281 * tst-spin2.c: Likewise.
282 * tst-sysconf.c: Likewise.
283 * tst-barrier2.c: Likewise.
284 * tst-cond4.c: Likewise.
285 * tst-cond6.c: Likewise.
286 * tst-rwlock4.c: Likewise.
287 * tst-unload.c: Likewise.
288 * tst-flock2.c (do_test): Use return instead of exit.
289
4baa087a
RM
2902003-03-22 Jakub Jelinek <jakub@redhat.com>
291
292 * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
293
5a3ab2fc
UD
2942003-03-21 Ulrich Drepper <drepper@redhat.com>
295
9f07eae2
UD
296 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
297 (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
298 instead of __lll_compare_and_swap.
299 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
300 Likewise.
301 Removed definition if __lll_compare_and_swap.
302
5a3ab2fc
UD
303 * cancellation.c: Adjust for new form of compare&exchange macros.
304 * cleanup_defer.c: Likewise.
305 * init.c: Likewise.
306 * libc-cancellation.c: Likewise.
307 * old_pthread_cond_broadcast.c: Likewise.
308 * old_pthread_cond_signal.c: Likewise.
309 * old_pthread_cond_timedwait.c: Likewise.
310 * old_pthread_cond_wait.c: Likewise.
311 * pthread_cancel.c: Likewise.
312 * pthread_create.c: Likewise.
313 * pthread_detach.c: Likewise.
314 * pthread_join.c: Likewise.
315 * pthread_key_delete.c: Likewise.
316 * pthread_setcancelstate.c: Likewise.
317 * pthread_setcanceltype.c: Likewise.
318 * pthread_timedjoin.c: Likewise.
319 * pthread_tryjoin.c: Likewise.
320 * sysdeps/pthread/createthread.c: Likewise.
321
b1aea098
UD
3222003-03-20 Ulrich Drepper <drepper@redhat.com>
323
324 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
4baa087a 325 Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
b1aea098
UD
326 definitions. Replace uses with calls to atomic_* functions.
327 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
328 * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
329 __lll_test_and_set calls with atomic_exchange_and_add and
330 atomic_exchange calls respectively.
331 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
332 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
333 * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
334 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
335 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
336 * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
337 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
338
339 * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
340 returns the old value.
341
100a7100
RM
3422003-03-20 Martin Schwidefsky <sky@mschwid3.boeblingen.de.ibm.com>
343
344 * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
345 int for variable OLDVAL and correct inline assembler contraint.
346 * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
347 type int for variable OLD.
348
349 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
350 only for s390-32.
351 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
352 (SINGLE_THREAD_P): Use global variable __local_multiple_threads
353 instead of multiple_threads field in the TCB.
354
95767b36
UD
3552003-03-19 Ulrich Drepper <drepper@redhat.com>
356
4009bf40
UD
357 * sysdeps/i386/i686/bits/atomic.h: Removed.
358 * sysdeps/i386/i586/bits/atomic.h: Removed.
359 * sysdeps/i386/i486/bits/atomic.h: Removed. Moved to glibc.
360 * sysdeps/x86_64/bits/atomic.h: Removed. Moved to glibc.
361 * sysdeps/s390/bits/atomic.h: Removed. Moved to glibc.
362 * sysdeps/sh/bits/atomic.h: Removed. Moved to glibc.
363 * sysdeps/ia64/bits/atomic.h: Removed. Moved to glibc.
364 * sysdeps/powerpc/bits/atomic.h: Removed. Moved to glibc.
365 * atomic.h: Removed. Moved to glibc.
366
560a784f
UD
367 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
368 support for clock selection.
369
95767b36
UD
370 * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
371 signalling waiters.
372
043ad426
RM
3732003-03-18 Roland McGrath <roland@redhat.com>
374
94659495
RM
375 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
376 Add __lll_rel_instr first. Add memory clobber.
377 (lll_mutex_unlock): Use __lll_test_and_set.
378 From Paul Mackerras <paulus@samba.org>.
379
380 * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
381 unconditionally.
382 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
383 (SINGLE_THREAD_P): Add `header.' prefix.
384 From Paul Mackerras <paulus@samba.org>.
385
043ad426
RM
386 * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
387 pthread_timedjoin_np to ...
388 (libpthread: GLIBC_2.3.3): ... here.
389 (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
390
391 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
392 Avoid shadowing VAL variable.
393
394 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
395 New macro.
396
86a9ee5e
UD
3972003-03-18 Ulrich Drepper <drepper@redhat.com>
398
ac9e0aa1
UD
399 * Makefile (tests): Add tst-cond11.
400 * tst-cond11.c: New file.
401
a14b373c
UD
402 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
403 struct passed to cleanup handler to eliminate one more
404 instruction.
405 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
406
24a49f38
UD
407 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
408 (pthrad_cond_t): Replace __unused field with __clock.
409
410 * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
411 waken all waiters in cleanup handler.
412 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
413 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
414
86a9ee5e
UD
415 * pthread_condattr_getclock.c: New file.
416 * pthread_condattr_setclock.c: New file.
417 * sysdeps/pthread/pthread.h: Declare these new functions.
418 * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
419 * Makefile (libpthread-routines): Add the new functions.
420 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
421 Renamed field to value. Document use of the bits.
422 * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
423 change.
424 * pthread_condattr_setpshared.c: Likewise.
d5cb8389 425 * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
86a9ee5e
UD
426 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
427 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
428 Add __clock field.
429 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
430 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
431 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
432 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
433 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
434 Implement clock selection.
435 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
436 * pthread-errnos.sym: Add ENOSYS.
437 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
438 _POSIX_CLOCK_SELECTION.
439 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
440
441 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
442 invalid .size directive.
443
98054a05
RM
4442003-03-17 Roland McGrath <roland@redhat.com>
445
446 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
447 Formatting tweaks.
448
001bea71
UD
4492003-03-17 Ulrich Drepper <drepper@redhat.com>
450
4773086e
UD
451 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
452 Use __lll_add instead of spelling it out. Use protected symbol names.
453 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
454 Use __lll_add.
455 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
456 Renamed from lll_compare_and_swap. Use new name where necessary.
457 (__lll_add): Defined.
458 (__lll_dec_if_positive): Defined.
459 (__lll_test_and_set): Defined.
460 * sysdeps/ia64/pthread_spin_init.c: Removed.
461 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
462 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
463 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
464 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
465 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
466 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
467 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
001bea71
UD
468 * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
469 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
470 __sync_lock_release_si.
471 Patch by Jakub Jelinek.
472
473 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
474 Fix timeout handling.
475 (__lll_timedwait_tid): Likewise.
476 (lll_unlock_wake_cb): Wake up other waiters if necessary.
477 Patch by Jakub Jelinek.
478
479 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
480
de4471dd
RM
4812003-03-17 Roland McGrath <roland@redhat.com>
482
483 PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
484 * sysdeps/pthread/pthread_spin_init.c: New file.
485 * sysdeps/pthread/pthread_spin_unlock.c: New file.
486 * sysdeps/powerpc/Makefile: New file.
487 * sysdeps/powerpc/pthread_spin_lock.c: New file.
488 * sysdeps/powerpc/pthread_spin_trylock.c: New file.
489 * sysdeps/powerpc/pthreaddef.h: New file.
490 * sysdeps/powerpc/tcb-offsets.sym: New file.
491 * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
492 * sysdeps/powerpc/tls.h: New file.
493 * sysdeps/powerpc/bits/atomic.h: New file.
494 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
495 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
496 * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
98054a05 497
de4471dd
RM
498 * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
499 * sysdeps/unix/sysv/linux/sem_post.c: New file.
500 * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
501 * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
502 * sysdeps/unix/sysv/linux/sem_wait.c: New file.
503 * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
504 * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
505 * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
506 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
507 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
508 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
509 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
510 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
511 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
512 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
513
514 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
515 not gettimeofday.
516 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
517 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
518 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
519 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
520 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
521
5778033f
UD
5222003-03-17 Ulrich Drepper <drepper@redhat.com>
523
524 * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
525 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
526 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
527 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
528 Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
529
796038f8
RM
5302003-03-16 Roland McGrath <roland@redhat.com>
531
532 * tst-fork4.c: Include <string.h>.
533 * tst-signal2.c: Likewise.
534 * tst-mutex5.c (do_test): exit -> return.
535 * tst-mutex2.c: Include <stdlib.h>.
536
51d0678c
UD
5372003-03-16 Ulrich Drepper <drepper@redhat.com>
538
5778033f
UD
539 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
540 (__lll_mutex_timedlock_wait): Correct expected value after
541 spurious wakeup. Otherwise we would never wait again.
542
b6e2f87a
UD
543 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
544 zone versus inline asm stupidity. Use correct instructions.
545
51d0678c
UD
546 * tst-rwlock6.c: Add some more status output.
547
8112cc70
RM
5482003-03-15 Roland McGrath <roland@redhat.com>
549
550 * sysdeps/pthread/configure.in: New file.
551 * sysdeps/pthread/configure: New file (generated).
552
49773c19
UD
5532003-03-15 Ulrich Drepper <drepper@redhat.com>
554
555 * allocatestack.c (allocate_stack): Store the exact stack size of
556 user allocated stacks.
557
eec0ca9f
JJ
5582003-03-15 Jakub Jelinek <jakub@redhat.com>
559
560 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
561 (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
562 * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
563 * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
564 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
565 Use `header.' prefix.
566 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
567
a87731e2
UD
5682003-03-15 Ulrich Drepper <drepper@redhat.com>
569
570 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
571 __builtin_frame_address, use stack pointer.
572
573 * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
574 instead of __builtin_frame_pointer.
575
e22a221d
UD
5762003-03-14 Ulrich Drepper <drepper@redhat.com>
577
92ed3daf
UD
578 * tst-basic1.c (do_test): Add cast to avoid warning.
579 * tst-basic2.c (do_test): Likewise.
580
9b89567d
UD
581 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
582 amount of stack correction.
583
e22a221d
UD
584 * tst-fork4.c: Use test-skeleton.c.
585
2e49caba
RM
5862003-03-14 Roland McGrath <roland@redhat.com>
587
588 * init.c: Fix typo "#eli" for "#else".
589
415ef7d8
RM
5902003-03-14 Steven Munroe <sjmunroe@us.ibm.com>
591
592 * allocatestack.c (__stack_user): Use hidden_data_def.
593 * pthread_create.c (__pthread_keys): Likewise.
594
595 * init.c [__powerpc__] (__NR_set_tid_address): Define it.
596
52287505
RM
5972003-03-14 Roland McGrath <roland@redhat.com>
598
415ef7d8
RM
599 * tst-fork4.c: New file.
600 * Makefile (tests): Add it.
601
52287505
RM
602 * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
603 we always define the padding space.
604 [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
605 stopped supporting its own extensions fully.
606 [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
607 struct also called `header', so `header.multiple_threads' is the field
608 name to use on all machines.
609 * allocatestack.c (allocate_stack): Use `header.' prefix.
610 * sysdeps/pthread/createthread.c (create_thread): Likewise.
611 * pthread_create.c (__pthread_create_2_1): Likewise.
612 * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
613 (THREAD_SELF): Likewise.
614 * sysdeps/x86_64/tls.h: Likewise.
615 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
616 (SINGLE_THREAD_P): Likewise.
617 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
618 (SINGLE_THREAD_P): Likewise.
619 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
620 (SINGLE_THREAD_P): Likewise.
621
622 * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
623 value directly.
624
c44bf9aa
UD
6252003-03-14 Ulrich Drepper <drepper@redhat.com>
626
e22a221d
UD
627 * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
628 * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
629
0eb18281
UD
630 * pthread_create.c (start_thread): setjmp is expected to return 0.
631
c44bf9aa
UD
632 * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
633 (THREAD_GETMEM_NC): Likewise.
634
564cd8b6
UD
6352003-03-13 Ulrich Drepper <drepper@redhat.com>
636
637 * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
638 and the size of the stack which must be allocated is a multiple,
639 allocate one more page.
640 * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
641 MULTI_PAGE_ALIASING.
642
6461e577
RM
6432003-03-13 Roland McGrath <roland@redhat.com>
644
645 * pthread_create.c (start_thread): Set EXITING_BIT after the
646 event-reporting (and destructors), not before.
647
b5ec5617
UD
6482003-03-13 Jakub Jelinek <jakub@redhat.com>
649
6461e577
RM
650 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
651 lll_futex_wake): Declare register variables as long int instead of
652 unsigned long int. Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
653 Make syscall arguments clobbered by the syscall.
654 (lll_futex_wait): Define using lll_futex_timed_wait.
655
656 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
657 to void *.
658
659 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
660 PPID if [! NDEBUG].
661
662 * allocatestack.c (nptl_ncreated): Only declare if
663 COLORING_INCREMENT != 0.
664
665 * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
666 (__libc_enable_asynccancel_2): Remove prototype.
667
b5ec5617
UD
668 * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
669 ctid to match kernel.
670
d0369fb8
UD
6712003-03-12 Ulrich Drepper <drepper@redhat.com>
672
7588880f
UD
673 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
674 libc_multiple_threads.
675 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
676 __libc_multiple_threads to...
677 * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here. New file.
678
679 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
680 versioning.
681 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
682 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
683
684 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
685 (__pthread_once_internal): Define.
686
687 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
688 macros instead of .symver directly.
689 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
690 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
691
d0369fb8
UD
692 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
693 * sysdeps/x86_64/tcb-offsets.sym: New file.
694 * sysdeps/x86_64/Makefile: New file.
695
696 * sysdeps/i386/tcb-offsets.sym: Add SELF.
697 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
698 to access own pthread_t in TCB.
699 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
700 Likewise.
701 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
702 Likewise.
703 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
704
0bb2ac85
RM
7052003-03-12 Roland McGrath <roland@redhat.com>
706
707 * pthread-errnos.sym: New file.
708 * Makefile (gen-as-const-headers): New variable, list that file.
709 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
710 header <pthread-errnos.h> instead of defining errno values here.
711 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
712 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
713 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
714 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
715 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
716 Likewise.
717 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
718 Likewise.
719 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
720 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
721 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
722 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
723 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
724 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
725 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
726 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
727 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
728 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
729 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
730 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
731 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
732 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
733 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
734 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
735 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
736 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
737 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
738 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
739 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
740 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
741 * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
742 * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
743 * sysdeps/sh/pthread_spin_trylock.S: Likewise.
744 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
745 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
746
747 * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
748 CLONE_CHILD_SETTID worked.
749
35e148cb
UD
7502003-03-12 Ulrich Drepper <drepper@redhat.com>
751
d0369fb8
UD
752 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
753 file.
754 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
755 file.
756
757 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
758 (pthread_cond_t): Add padding.
759
da49194d
UD
760 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
761 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
762 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
763
35e148cb
UD
764 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
765 (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
766 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
767 (__pthread_rwlock_timedrdlock): Likewise.
768 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
769 (__pthread_rwlock_wrlock): Likewise.
770 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
771 (__pthread_rwlock_rdlock): Likewise.
772
773 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
774
775 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
776 result of lock re-get if it fails.
777
3e976b96
UD
7782003-03-11 Ulrich Drepper <drepper@redhat.com>
779
5a03acfe
UD
780 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
781 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
782 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
783 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
784 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
785 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
786 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
787 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
788 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
789 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
790
791 * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
792 THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
793
794 * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
795 Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
796 * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
797 (create_thread): Likewise.
798 Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
799 * init.c (__pthread_initialize_minimal_internal): Initialize
800 __libc_multiple_threads_ptr if necessary.
801 * pthreadP.h: Adjust prototype for __libc_pthread_init. Declare
802 __pthread_multiple_threads and __libc_multiple_threads_ptr.
803 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
804 __libc_multiple_threads.
805 (__libc_pthread_init): Return pointer to __libc_pthread_init if
806 necessary.
807
808 * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
809 (THREAD_SETMEM_NC): Likewise.
810
811 * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
812 * sysdeps/x86_64/pthread_spin_trylock.S: New file.
813 * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
814 * sysdeps/x86_64/pthread_spin_unlock.S: New file.
815
816 * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
817 Eliminate one entire instruction.
818
32a589b1
UD
819 * cancellation.c (__pthread_enable_asynccancel_2): New function.
820 * pthreadP.h: Declare __pthread_enable_asynccancel_2.
821 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
822 (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
823 instead of __pthread_enable_asynccancel.
824 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
825 (__pthread_cond_wait): Likewise.
826 * sysdeps/pthread/pthread_cond_timedwait.c
827 (__pthread_cond_timedwait): Likewise.
828 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
829
3e976b96
UD
830 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
831 (__condvar_cleanup): Wake up all waiters in case we got signaled
832 after being woken up but before disabling asynchronous
833 cancellation.
834 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
835 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
836 (__condvar_cleanup): Likewise.
837
838 * init.c (__NR_set_tid_address): If already defined, don't redefine.
839 Make it an error if architecture has no #if case. Add x86-64.
840
841 * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
842 pt-initfini.s generation.
843
844 * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
845 (TLS_INIT_TP): Fix typo.
846
6c477888
UD
8472003-03-11 Jakub Jelinek <jakub@redhat.com>
848
849 * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
850 3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
851
852 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
853 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
854 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
855 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
856 * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
857 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
858 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
859 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
860
ea694823
UD
8612003-03-11 Ulrich Drepper <drepper@redhat.com>
862
6c477888
UD
863 * sysdeps/pthread/pthread_cond_timedwait.c
864 (__pthread_cond_timedwait): Return the result of the final
865 locking. If it succeeds, the regular function return value.
866
867 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
868 Return result of the final locking.
869 * version.c (__nptl_main): Work around problems with the strange
870 INTERNAL_SYSCALL macro on ppc32.
871 * init.c (__pthread_initialize_minimal_internal): Unblock
872 SIGCANCEL in case the parent blocked it.
873 Reported by Paul Mackerras <paulus@samba.org>.
874
ea694823
UD
875 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
876 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
877 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
878
b33e6163
RM
8792003-03-11 Jakub Jelinek <jakub@redhat.com>
880
881 * sysdeps/pthread/pthread_cond_timedwait.c
882 (__pthread_cond_timedwait): Unlock and fail if
883 __pthread_mutex_unlock_internal failed.
884
885 * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
886 (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
887 Use ARCH_CLONE.
888 * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
889 [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
890 STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
891 ALLOCATE_STACK): New macros.
892 (TLS_TPADJ): New macro.
893 (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
894 (allocate_stack): Handle TLS_DTV_AT_TP and
895 NEED_SEPARATE_REGISTER_STACK. Use TLS_TPADJ.
896 * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
897 Don't set PD->self.
898 * init.c [__ia64__] (__NR_set_tid_address): Define.
899
900 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
901 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
902 * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
903 * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
904 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
905 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
906 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
907 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
908 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
909 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
910 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
911 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
912 * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
913 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
914 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
915 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
916 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
917 * sysdeps/ia64/bits/atomic.h: New file.
918 * sysdeps/ia64/Makefile: New file.
919 * sysdeps/ia64/pthread_spin_init.c: New file.
920 * sysdeps/ia64/pthread_spin_lock.c: New file.
921 * sysdeps/ia64/pthread_spin_trylock.c: New file.
922 * sysdeps/ia64/pthread_spin_unlock.c: New file.
923 * sysdeps/ia64/pthreaddef.h: New file.
924 * sysdeps/ia64/tcb-offsets.sym: New file.
925 * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
926 * sysdeps/ia64/tls.h: New file.
927
928 * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
929 to syscall instead of no arguments.
930
2b30b2e5
UD
9312003-03-10 Ulrich Drepper <drepper@redhat.com>
932
db5f2fc9
UD
933 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
934 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
935 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
936 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
937
938 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
939 unused code.
940
6a4263e3
UD
941 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
942
3de7c2a9
UD
943 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
944 lowlevelbarrier.sym.
945 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
946 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
947 Include lowlevelbarrier.h and don't define offsets locally.
6a4263e3 948 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
3de7c2a9 949
2a544d82
UD
950 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
951 (__lll_mutex_lock_wait): Reverse order of first two parameters.
952 (__lll_mutex_timedlock_wait): Likewise.
953 (lll_mutex_lock): Adjust asm for that.
954 (lll_mutex_timedlock): Likewise. Mark cx, cc, r10 as clobbered.
955 (lll_lock): Adjust asm for operand order change.
956 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
957 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
958
ec06436c
UD
959 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
960 Reverse order of parameters.
961 (__lll_timedwait_tid): Remove regparms attribute.
962 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
963 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
964
3273832c
UD
965 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
966 (__lll_timedwait_tid): Remove one unnecessary instruction.
967
51f32ab8
UD
968 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
969 __lll_mutex_timedlock_wait only for NOT_IN_libc.
970 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
971 lowlevelmutex.S.
972
973 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
974 lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
975 for NOT_IN_libc.
976 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
977 lowlevellock.S.
978
fad48d9e
UD
979 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
980 LOCK is already defined. Don't define __lll_mutex_timedlock_wait
981 for libc.so.
982 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
983 define LOCK here (if UP is not defined). The actual code is in
984 lowlevelmutex.S.
985
9356d063
UD
986 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
987 LOCK is already defined. Don't define lll_unlock_wake_cb and
988 __lll_timedwait_tid for libc.so.
989 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
990 define LOCK here (if UP is not defined). The actual code is in
991 lowlevellock.S.
992
ebf0cbc5 993 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
106f6f9d
UD
994 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
995 * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
996 instead of lowlevelsem.h.
997 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
998 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
999 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
0be8ee21 1000
c915e5ad
UD
1001 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
1002 lowlevelrwlock.sym.
1003 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
1004 * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
146fa1ee 1005 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
c915e5ad 1006
4c3c2e8a
UD
1007 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
1008 register loading.
1009 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
1010 last changed. D'oh.
1011
2b30b2e5
UD
1012 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
1013
1014 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
1015 of __libc_locking_needed.
1016 (lll_trylock): Initialize %eax to zero.
1017
2b30b2e5
UD
1018 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
1019 pthread_cond_t definition.
1020
e48f9638
RM
10212003-03-10 Roland McGrath <roland@redhat.com>
1022
1023 * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
1024 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
1025 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
1026 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
1027 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
1028
1029 * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
1030 Instead of setting PD->multiple_threads, set globals
1031 __pthread_multiple_threads and __libc_multiple_threads.
1032 * sysdeps/pthread/createthread.c (create_thread): Likewise.
1033 * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
1034 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
1035
1036 * descr.h (struct pthread): Conditionalize first member on
1037 [!TLS_DTV_AT_TP]. Replace the `header' member with an anonymous union
1038 containing an anonymous tcbhead_t. Move `list' member out.
1039 [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
1040 * allocatestack.c: Remove use of `header.data.' prefix.
1041 * pthread_create.c: Likewise.
1042 * init.c (__pthread_initialize_minimal_internal): Likewise.
1043 * sysdeps/pthread/createthread.c (create_thread): Likewise.
1044 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
1045 (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
1046 * sysdeps/x86_64/tls.h: Likewise.
1047 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
1048 (SINGLE_THREAD_P): Likewise.
1049 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
1050 (SINGLE_THREAD_P): Likewise.
1051 * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
1052 * sysdeps/s390/tls.h (tcbhead_t): Likewise.
1053
c37cae9e
UD
10542003-03-09 Ulrich Drepper <drepper@redhat.com>
1055
d38c777e
RM
1056 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
1057
7b44a5e0 1058 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
2b30b2e5 1059 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
7b44a5e0 1060
c2e5e085
UD
1061 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
1062 leftovers from the ia32 code.
1063
1064 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
1065 memory load.
1066 (clear_once_control): Don't load %esi.
1067
1068 * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
1069 handling.
1070
1071 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
1072
cd4b2a55
UD
1073 * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
1074 * sysdeps/unix/sysv/linux/createthread.c: ...here.
1075
c37cae9e
UD
1076 * Makefile (tests): Add tst-cond10.
1077 * tst-cond10.c: New file.
1078
d130a341
UD
10792003-03-08 Ulrich Drepper <drepper@redhat.com>
1080
ccf1d573
UD
1081 * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
1082 * tst-signal3.c (do_test): Likewise.
1083 * tst-sem5.c (do_test): Likewise.
1084 * tst-kill6.c (do_test): Likewise.
1085 * tst-tls3.c (do_test): Likewise. Include <errno.h>.
1086
1087 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
1088 of inc/dec.
1089 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
1090 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
1091 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1092 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1093 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1094 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1095 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1096 Likewise.
1097 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1098 Likewise.
1099 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1100 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1101 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1102 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
1103 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
1104 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
1105 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
1106 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1107
d130a341
UD
1108 * allocatestack.c (allocate_stack): If mprotect() fails free the
1109 TLS memory.
1110
bc6389ad
UD
11112003-03-07 Ulrich Drepper <drepper@redhat.com>
1112
41d4d223
UD
1113 * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
1114
1115 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
1116 lll_wake_tid. This was used only to work around kernel limits in
1117 the early days.
1118 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1119 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
1120 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
1121 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
1122
bc6389ad
UD
1123 * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
1124 (__pthread_initialize_minimal_internal): Change initialization of
1125 __static_tls_align_m1 appropriately.
1126 * pthreadP.h (__static_tls_align_m1): Renamed from
1127 __static_tls_align.
1128 * allocatestack.c (allocate_stack): Use __static_tls_align_m1
1129 instead of __static_tls_align-1.
1130
cc775edf
UD
11312003-03-04 Ulrich Drepper <drepper@redhat.com>
1132
0de28d5c 1133 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
6245b6ae 1134
518b5308
UD
1135 * pthread_create.c: Define __pthread_keys using nocommon
1136 attribute, not by placing it explicitly in bss.
1137 Remove DEFINE_DEALLOC definition. Not needed anymore.
1138
1139 * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
1140 Use it in mmap call to allocate stacks.
1141
1142 * sysdeps/pthread/createthread.c (create_thread): Fix comment.
1143
cc775edf
UD
1144 * pthread_create.c (start_thread): Use THREAD_SETMEM to store
1145 result of the thread function.
1146
4f6f0a8f
UD
11472003-03-03 Ulrich Drepper <drepper@redhat.com>
1148
f04a2721
UD
1149 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed. The generic
1150 version is just fine.
1151
4f6f0a8f
UD
1152 * sysdeps/unix/sysv/linux/libc_pthread_init.c
1153 (__pthread_child_handler): Renamed from pthread_child_handler,
1154 exported, and marked hidden. Change all users.
1155 * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
1156 free __pthread_child_handler from child list.
1157
7ce5c164
UD
11582003-03-03 Martin Schwidefsky <schwidefsky@de.ibm.com>
1159
1160 * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
1161
1162 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
1163 Fix handling of cancellation and failing pthread_mutex_unlock call.
1164 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
1165 (__pthread_cond_wait): Likewise.
1166
1167 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
1168 (pthread_rwlock_timedrdlock): Fix clobber of result variable by
1169 lll_futex_timed_wait call.
1170 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
1171 (pthread_rwlock_timedwrlock): Likewise.
1172
1173 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
1174 Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
1175 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
1176
1177 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
1178 check of lll_futex_wake return value.
1179
ea6a015b
RM
11802003-03-03 Roland McGrath <roland@redhat.com>
1181
1182 * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
1183
1184 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1185 Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
1186 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
1187
4adacf57
UD
11882003-03-02 Ulrich Drepper <drepper@redhat.com>
1189
1be3d664
UD
1190 * sysdeps/pthread/timer_create.c (timer_create): Return correct
1191 error for CPU clocks.
1192
885bafa1
UD
1193 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1194 _POSIX_MONOTONIC_CLOCK.
1195 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1196
4adacf57
UD
1197 * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
1198 recent kernels.
1199
86bfff4d
UD
12002003-03-01 Ulrich Drepper <drepper@redhat.com>
1201
1202 * descr.h (struct pthread): Move cleanup field to the front.
1203
d1149385
RM
12042003-03-01 Roland McGrath <roland@redhat.com>
1205
1206 * sem_open.c (sem_open): Braino fix.
1207
bd8bb78b
UD
12082003-03-01 Ulrich Drepper <drepper@redhat.com>
1209
748bec08
UD
1210 * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
1211 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
1212 __pthread_cleanup_pop functionality.
1213 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1214
bd8bb78b
UD
1215 * descr.h (struct pthread): Move tid field to the front now that
1216 it is often used.
1217
1218 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
1219 (__lll_mutex_timedlock_wait): Remove.
1220 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
1221 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
1222 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
1223 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1224 (lll_unlock_wake_cb): Don't save and restore %esi.
1225 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
1226 %esi.
1227 (__lll_timedwait_tid): Add alignment.
1228 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
1229 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
1230 %esi.
1231 (__lll_timedwait_tid): Removed.
1232 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
1233 (__pthread_cond_broadcast): Don't save, load, and restore %esi.
1234 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
1235 (pthread_barrier_wait): Don't save, load, and restore %esi for
1236 last thread.
1237 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
1238 (__pthread_cond_signal): Don't save, load, and restore %esi.
1239 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
1240 (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
1241 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
1242 Don't save, load, and restore %esi.
1243
d2637c70
UD
12442003-02-27 Ulrich Drepper <drepper@redhat.com>
1245
567fb22a
UD
1246 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
1247 Release lock before waking up the waiters.
1248
427f5fa1
UD
1249 * tst-exit1.c (do_test): Don't start more than one thread in parallel.
1250
a2d83cfb
UD
1251 * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
1252 (reader_thread): Likewise.
1253
d2637c70
UD
1254 * sysdeps/pthread/pthread_rwlock_unlock.c
1255 (__pthread_rwlock_unlock): Release internal lock early. Don't try
1256 to wake up readers if there are none.
1257
1258 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
1259 Release internal lock before wake threads.
1260
b1531183
UD
12612003-02-26 Ulrich Drepper <drepper@redhat.com>
1262
dbf6131c
UD
1263 * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
1264 * tst-rwlock8.c: Initialize lock with INIT. Allow INIT to be
1265 predefined.
1266 * tst-rwlock9.c: Likewise.
1267 * tst-rwlock10.c: New file.
1268 * tst-rwlock11.c: New file.
1269
695799fe
UD
1270 * Makefile (tests): Add tst-dlsym1.
1271 * tst-dlsym1.c: New file.
1272
b1531183
UD
1273 * init.c (__pthread_initialize_minimal_internal): Set
1274 GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
1275 * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
1276
3724f268
UD
12772003-02-24 Ulrich Drepper <drepper@redhat.com>
1278
3857ca78
UD
1279 * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
1280
80d80779
UD
1281 * tst-cond2.c: Fix sychronization with child.
1282
86371308
UD
1283 * tst-rwlock8.c (reader_thread): Remove unused variable.
1284
ffeb4481
UD
1285 * Makefile: Add rules to build and run tst-tls3.
1286 * tst-tls3.c: New file.
1287 * tst-tls3mod.c: New file.
1288
3724f268
UD
1289 * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
1290 * tst-rwlock8.c: New file.
1291 * tst-rwlock9.c: New file.
1292 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
1293 complete broken rwlock implementation.
1294 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1295 Likewise.
1296 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1297 Likewise.
1298 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1299 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
18a53579
UD
1300 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
1301 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
1302 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
1303 * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
1304 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
3724f268 1305
8915cc40
RM
13062003-02-23 Roland McGrath <roland@redhat.com>
1307
1308 * Makefile (nptl-version): Change regexp so case sensitivity is ok.
1309
fd1a0d0c
UD
13102003-02-23 Ulrich Drepper <drepper@redhat.com>
1311
ecf28959
UD
1312 * Makefile (tests): Add tst-context1.
1313 * tst-context1.c: New file.
1314
5e47b76b
UD
1315 * Makefile (tests): Add tst-tls1 and tst-tls2.
1316 * tst-tls1.c: New file.
1317 * tst-tls2.c: New file.
1318
5a6bbb41
UD
1319 * libc-cancellation.c (__libc_enable_asynccancel): Correct test
1320 for failed cmpxchg.
1321
fd1a0d0c
UD
1322 * pthread_create.c (start_thread): Set EXITING_BIT early.
1323
1324 * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
1325 (THREAD_GETMEM_NC): Likewise.
1326
757f9fcb
UD
13272003-02-22 Ulrich Drepper <drepper@redhat.com>
1328
b1b8e747
UD
1329 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
1330 off 3 more bytes by using offset-less instructions when possible.
1331
c780aa21 1332 * Makefile: Add dependency for $(objpfx)version.d.
757f9fcb
UD
1333
1334 * eintr.c (eintr_source): Add unnecessary return but the compiler
1335 insists.
1336
1337 * tst-kill3.c: Include <unistd.h>.
1338
5148559c
RM
13392003-02-21 Roland McGrath <roland@redhat.com>
1340
1341 * pthread_create.c (start_thread): Call __libc_thread_freeres.
1342
ab2d98e3
UD
13432003-02-21 Ulrich Drepper <drepper@redhat.com>
1344
71028edd
UD
1345 * Makefile (tests): Add tst-eintr1.
1346 (distribute): Add eintr.c.
1347 * tst-eintr1.c: New file.
1348 * eintr.c: New file.
1349
e814f748
UD
1350 * pthread_cancel.c (pthread_cancel): Use tkill directly.
1351
1352 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
1353 Disallow sending SIGCANCEL.
1354
ab2d98e3 1355 * Makefile (tests): Remove tst-basic7. Add tst-kill1, tst-kill2,
9c03686d 1356 tst-kill3, tst-kill4, tst-kill5, tst-kill6.
e814f748
UD
1357 * tst-kill1.c: New file.
1358 * tst-kill2.c: New file.
1359 * tst-kill3.c: New file.
1360 * tst-kill5.c: New file.
9c03686d 1361 * tst-kill6.c: New file.
e814f748
UD
1362 * tst-basic7.c: Renamed to...
1363 * tst-kill4.c: ...this.
ab2d98e3 1364
59fed0e2
RM
13652003-02-21 Roland McGrath <roland@redhat.com>
1366
1367 * Makefile (install-lib-ldscripts): New variable.
1368
49dc759f
UD
13692003-02-21 Ulrich Drepper <drepper@redhat.com>
1370
8c2e9a29
UD
1371 * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
1372 * pthread_cancel.c: Use INVALID_TD_P.
1373 * pthread_detach.c: Likewise.
1374 * pthread_getschedparam.c: Likewise.
1375 * pthread_setschedparam.c: Likewise.
1376 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
1377 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
1378 * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
1379 * pthread_timedjoin.c: Likewise.
1380
1381 * tst-basic7.c: Include <signal.h>.
1382
49dc759f
UD
1383 * pthread_join.c (pthread_join): Limited checking for invalid
1384 descriptors.
1385 * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
1386
df5803bf
UD
13872003-02-20 Ulrich Drepper <drepper@redhat.com>
1388
c5acd3d7
UD
1389 * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
1390 beginning of the loop. Clear the entire first block of TSD.
df5803bf
UD
1391 * Makefile (tests): Add tst-key4.
1392 * tst-key4.c: New file.
1393
729924a0
UD
13942003-02-18 Ulrich Drepper <drepper@redhat.com>
1395
2f7dc594
UD
1396 * Makefile (tests): Add tst-basic7.
1397 * tst-basic7.c: New file.
1398
ba25bb0f
UD
1399 * pthread_create.c (deallocate_tsd): Mark as internal_function.
1400 Add some more __builtin_expect.
1401
12fd3c5f 1402 * pthreadP.h: Define dummy version of DEBUGGING_P.
729924a0 1403
5430d926
UD
14042003-02-17 Ulrich Drepper <drepper@redhat.com>
1405
b0db7fbe
UD
1406 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
1407 _POSIX_THREAD_PRIORITY_SCHEDULING.
1408 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
1409 _XOPEN_REALTIME_THREADS.
1410 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
1411
1412 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
1413 kernel returns EINVAL for PID <= 0, work around it.
1414
ecfda9bd
UD
1415 * Makefile (tests): Add tst-signal5.
1416 * tst-signal5.c: New file.
1417
7d78ab99
UD
1418 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
1419 and LOGIN_NAME_MAX.
1420
371a2972
UD
1421 * tst-cancel1.c (tf): Block all signals.
1422
5430d926
UD
1423 * Makefile (tests): Add tst-basic6.
1424 * tst-basic6.c: New file.
1425
1426 * tst-basic1.c: Add test for process ID.
1427
1428 * Makefile (tests): Add tst-cancel10.
1429 * tst-cancel10.c: New file.
1430
1431 * Makefile (tests): Add tst-signal4.
1432 * tst-signal4.c: New file.
1433
1434 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
1435 __sigismember instead of sigismember. Add __builtin_expect.
1436
1564916a
UD
14372003-02-16 Ulrich Drepper <drepper@redhat.com>
1438
179ff175
UD
1439 * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
1440 pthread_setcancelstate, and pthread_rwlock_setpshared.
1441
e4335f9a
UD
1442 * tst-cancel7.c (do_test): Make sure the pid file exists before
1443 canceling the thread.
1444
0a37669a
UD
1445 * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
1446 pthread_rwlock_timedrdlock tests.
1447 * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
1448 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1449 Check for invalid tv_nsec field.
1450 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1451 Likewise.
1452
1453 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
1454 recursive mutex of overflow.
1455
1456 * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
1457
e4335f9a 1458 * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
1564916a
UD
1459 going into an endless loop.
1460 * Makefile (tests): Add tst-cancel9.
1461 * tst-cancel9.c: New file.
1462
1463 * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
1464
b270b548
UD
14652003-02-15 Ulrich Drepper <drepper@redhat.com>
1466
1c82b97f
UD
1467 * tst-mutex5.c (do_test): Add more timedlock tests.
1468
b2f05465 1469 * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
c3bb9ee1
UD
1470 * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
1471
e798b60f
UD
1472 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
1473 use INLINE_SYSCALL. Error number is returned, not -1.
1474
90491dc4
UD
1475 * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
1476 and __deallocate_stack with internal_function.
1477 * pthread_create.c: Adjust definitions appropriately.
1478 * allocatestack.c: Likewise.
1479
1480 * pthread_join.c: Add one more __builtin_expect.
1481 * pthread_timedjoin.c: Likewise.
1482
1483 * pthread_getspecific.c (__pthread_getspecific): Clear data->data
1484 not data of sequence number does not match.
1485 Add one __builtin_expect.
1486
c6247c9d
UD
1487 * Makefile (tests): Add tst-clock1.
1488 * tst-clock1.c: New file.
1489
b270b548
UD
1490 * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
1491 negative arguments.
1492 * Makefile (tests): Add tst-basic5.
1493 * tst-basic5.c: New file.
1494
700bf7af
UD
14952003-02-14 Ulrich Drepper <drepper@redhat.com>
1496
757de559
UD
1497 * Makefile (tests): Add tst-basic4.
1498 * tst-basic4.c: New file.
1499
47202270
UD
1500 * pthreadP.h: Add declaraction for __nptl_nthreads.
1501 * pthread_create.c: Define __nptl_nthreads
1502 (start_thread): Increment __nptl_nthreads at beginning. Decrement
b270b548 1503 after thread is done. If then zero, call exit(0).
47202270
UD
1504 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1505 Add ptr_nthreads. Define HAVE_PTR_NTHREADS.
1506 * init.c (pthread_functions): Initialize ptr_nthreads.
1507 * allocatestack.c (nptl_nthreads): Remove definition and all uses.
1508 (__reclaim_stacks): Decrement __nptl_nthreads.
1509 * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
1510 Define.
1511 * Makefile (tests): Add tst-basic3.
1512 * tst-basic3.c: New file.
1513
e320ef46
UD
1514 * descr.h: Define CANCELING_BIT and CANCELING_BITMASK. Introduce
1515 after CANCELTYPE_BIT, move the other bits up. Update CANCEL_RESTMASK.
1516 * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
1517 * pthread_cancel.c (pthread_cancel): Likewise. Also set CANCELING_BIT
1518 if asynchronous canceling is enabled.
1519 * pthread_join.c (pthread_join): When recognizing circular joins,
1520 take into account the other thread might be already canceled.
1521 * Makefile (tests): Add tst-join5.
1522 * tst-join5.c: New file.
1523
700bf7af
UD
1524 * Makefile (tests): Add tst-join4.
1525 * tst-join4.c: New file.
1526
15272003-02-13 Ulrich Drepper <drepper@redhat.com>
1528
1529 * tst-cond4.c (main): Add test of pthread_attr_getpshared.
1530
dac0f772
UD
15312003-02-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
1532
1533 * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
1534 THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
1535 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
1536 warning.
1537 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
1538 to avoid warning.
1539 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
1540 error if lll_futex_wake failed.
1541
e8cda341
UD
15422003-02-13 Ulrich Drepper <drepper@redhat.com>
1543
a7720b5e
UD
1544 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
1545 handling of cancellation and failung pthread_mutex_unlock call.
1546 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1547 * Makefile (tests): Add tst-cond8 and tst-cond9.
1548 * tst-cond8.c: New file.
1549 * tst-cond9.c: New file.
1550
a1ea4c06
UD
1551 * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
1552
1553 * sysdeps/pthread/pthread.h: Add missing initializers. Protect
1554 non-standard initializers with __USE_GNU.
1555
e8cda341
UD
1556 * Makefile (tests): Add tst-cleanup3.
1557 * tst-cleanup3.c: New file.
1558
2067577c
UD
15592003-02-12 Ulrich Drepper <drepper@redhat.com>
1560
89e78a95
UD
1561 * Makefile (tests): Add tst-attr1 and tst-attr2.
1562 * tst-attr1.c: New file.
1563 * tst-attr2.c: New file.
1564
dfdd294a
UD
1565 * Makefile: Add rules to build and run tst-atfork2 test.
1566 * tst-atfork2.c: New file.
1567 * tst-atfork2mod.c: New file.
1568
1569 * sysdeps/unix/sysv/linux/unregister-atfork.c
1570 (__unregister_atfork): Free the memory allocated for the handlers
1571 after removing them from the lists.
1572
1573 * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
1574 cleanup function.
1575
1576 * tst-atfork1.c (do_test): Wait for the child we forked.
1577 Report error in child.
1578
1579 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
1580
2067577c
UD
1581 * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
1582
2a8a8a84
UD
15832003-02-10 Ulrich Drepper <drepper@redhat.com>
1584
d9dd121e
UD
1585 * Makefile (tests): Add tst-cancel8.
1586 * tst-cancel8.c: New file.
1587
2a8a8a84
UD
1588 * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
1589 clearing of control variable.
defd1870 1590 * Makefile (tests): Add tst-once3 and tst-once4.
2a8a8a84 1591 * tst-once3.c: New file.
defd1870 1592 * tst-once4.c: New file.
2a8a8a84 1593
a54e8d33
UD
15942003-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
1595
1596 * sysdeps/sh/Makefile: New file.
1597 * sysdeps/sh/bits/atomic.h: New file.
1598 * sysdeps/sh/pthread_spin_init.c: New file.
1599 * sysdeps/sh/pthread_spin_lock.c: New file.
1600 * sysdeps/sh/pthread_spin_trylock.S: New file.
1601 * sysdeps/sh/pthread_spin_unlock.S: New file.
1602 * sysdeps/sh/pthreaddef.h: New file.
1603 * sysdeps/sh/tcb-offsets.sym: New file.
1604 * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
1605 * sysdeps/sh/tls.h: New file.
1606 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
1607 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
1608 * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
1609 * sysdeps/unix/sysv/linux/sh/fork.c: New file.
1610 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
1611 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
1612 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
1613 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
1614 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
1615 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
1616 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
1617 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
1618 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
1619 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
1620 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
1621 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
1622 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
1623 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
1624 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
1625 * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
1626 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
1627 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
1628 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
1629 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
1630 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
1631 * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
1632 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
1633 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
1634 * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
1635 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
1636
696e556e
UD
16372003-02-08 Ulrich Drepper <drepper@redhat.com>
1638
1639 * tst-cond2.c: Rearrange code to not rely on behavior undefined
1640 according to POSIX.
1641
1642 * tst-basic2.c (do_test): Lock mutex before creating the thread.
1643
fef710d6
UD
16442003-02-07 Ulrich Drepper <drepper@redhat.com>
1645
c6180643
UD
1646 * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
1647 (TLS_GET_FS): New #define.
1648 (TLS_SET_FS): New #define.
1649 Correct value of __NR_set_thread_area.
1650
fef710d6
UD
1651 * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
1652
11090a99
UD
16532003-02-06 Ulrich Drepper <drepper@redhat.com>
1654
65c68990
UD
1655 * Makefile (tests): Add tst-popen1.
1656 * tst-popen1.c: New file.
1657
11090a99
UD
1658 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
1659 but inactive generalization.
1660 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1661 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
1662 Minor optimization, remove one instruction.
1663 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
1664
a88c9263
UD
16652003-02-04 Martin Schwidefsky <schwidefsky@de.ibm.com>
1666
1667 * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
1668
16692003-01-31 Martin Schwidefsky <schwidefsky@de.ibm.com>
1670
1671 * init.c (__NR_set_tid_address): Add #ifdef for s390.
1672 * sysdeps/pthread/pthread_barrier_wait.c: New file.
1673 * sysdeps/pthread/pthread_cond_broadcast.c: New file.
1674 * sysdeps/pthread/pthread_cond_signal.c: New file.
1675 * sysdeps/pthread/pthread_cond_timedwait.c: New file.
1676 * sysdeps/pthread/pthread_cond_wait.c: New file.
1677 * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
1678 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
1679 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
1680 * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
1681 * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
1682 * sysdeps/s390/Makefile: New file.
1683 * sysdeps/s390/bits/atomic.h: New file.
1684 * sysdeps/s390/pthread_spin_init.c: New file.
1685 * sysdeps/s390/pthread_spin_lock.c: New file.
1686 * sysdeps/s390/pthread_spin_trylock.c: New file.
1687 * sysdeps/s390/pthread_spin_unlock.c: New file.
1688 * sysdeps/s390/pthreaddef.h: New file.
1689 * sysdeps/s390/tcb-offsets.sym: New file.
1690 * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
1691 * sysdeps/s390/tls.h: New file.
1692 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
1693 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
1694 * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
1695 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
1696 * sysdeps/unix/sysv/linux/s390/fork.c: New file.
1697 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
1698 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
1699 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
1700 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
1701 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
1702 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
1703 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
1704 * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
1705 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
1706 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
1707 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
1708 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
1709 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
1710 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
1711 * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
1712 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
1713 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
1714 * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
1715
6f1cff95
UD
17162003-02-04 Ulrich Drepper <drepper@redhat.com>
1717
ec609a8e
UD
1718 * atomic.h: Add a couple more default implementations.
1719 (atomic_compare_and_exchange_acq): Use
d45e8740
UD
1720 __arch_compare_and_exchange_32_acq in return value definition. It
1721 always exists.
1722 (atomic_bit_set): Renamed from atomic_set_bit.
0289bef9 1723 Add missing atomic_ prefixes.
e3ec8904 1724
6f1cff95
UD
1725 * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
1726 thread library is available, use correct value to mark initialized
1727 once variable.
1728
4f088329
UD
17292003-02-03 Ulrich Drepper <drepper@redhat.com>
1730
6f1cff95
UD
1731 * allocatestack.c (allocate_stack): Use __getpagesize instead of
1732 __sysconf to determine pagesize.
1733
3e4fc359 1734 * pthread_create.c: Include <atomic.h>.
4f088329
UD
1735 * allocatestack.c (allocate_stack): Implement coloring of the
1736 allocated stack memory. Rename pagesize to pagesize_m1. It's the
1737 size minus one. Adjust users.
3e4fc359 1738 * sysdeps/i386/i686/Makefile: New file.
4f088329 1739
2f42e8be
UD
17402003-02-02 Ulrich Drepper <drepper@redhat.com>
1741
4301f7e2
UD
1742 * allocatestack.c: Improve comment throughout the file.
1743
2f42e8be 1744 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
a37818b3 1745 (__lll_lock_wait): Add branch prediction.
2f42e8be
UD
1746 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
1747 (__lll_lock_wait): Likewise.
1748 (lll_unlock_wake_cb): Removed.
1749
4a7d6545
UD
17502003-01-31 Ulrich Drepper <drepper@redhat.com>
1751
1752 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
1753 _POSIX_THREAD_PRIORITY_SCHEDULING.
1754
886d5973
UD
17552003-01-30 Jakub Jelinek <jakub@redhat.com>
1756
1757 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1758 Fix return type of ptr___pthread_getspecific.
1759
e474ca78
UD
17602003-01-29 Ulrich Drepper <drepper@redhat.com>
1761
1762 * Makefile (tests): Add tst-umask1.
1763 (tst-umask1-ARGS): Define.
1764 * tst-umask1.c: New file.
1765
e6ebd2e4
UD
17662003-01-28 Ulrich Drepper <drepper@redhat.com>
1767
6cf26f41
UD
1768 * Makefile (libpthread-routines): Remove lowlevelrwlock. Add
1769 pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
1770 pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
1771 pthread_rwlock_unlock.
1772 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
1773 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
1774 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
1775 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
1776 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1777 New file.
1778 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
1779 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1780 New file.
1781 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
1782 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
1783 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
1784 New file.
1785 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
1786 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
1787 New file.
1788 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
1789 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
1790 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
1791 New file.
1792 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
1793 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
1794 New file.
1795 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
1796
1d087a7e
UD
1797 * Makefile (libpthread-routines): Remove lowlevelcond and
1798 lowlevelsem. Add sem_wait, sem_trywait, sem_timedwait, sem_post,
1799 pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
1800 and pthread_cond_broadcast.
4a99d160
UD
1801 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
1802 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
1803 * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
1804 * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
1805 * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
1806 * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
1807 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
1808 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
1809 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
1810 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
1811 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
1812 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
1813 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
1814 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
1815 * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
1816 * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
1817 * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
1818 * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
1819 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
1820 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
1821 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
1822 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
1823 * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
1824 * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
1825 * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
1826 * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
1827 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
1828 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
1829 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
1830 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
1831 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
1d087a7e 1832
e6ebd2e4
UD
1833 * sysdeps/unix/sysv/linux/i386/createthread.c: Define
1834 PREPARE_CREATE and TLS_VALUE with x86-specific bits. All the rest
1835 of the code is moved to ...
1836 * sysdeps/pthread/createthread.c: ...here. New file.
1837
a15698cb
UD
18382003-01-27 Ulrich Drepper <drepper@redhat.com>
1839
0566b130
UD
1840 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
1841 (__new_sem_post): Clear %eax before returning.
1842 Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
1843
e6fb8846
UD
1844 * Makefile (tests): Add tst-cleanup2.
1845 * tst-cleanup2.c: New file.
1846
a15698cb
UD
1847 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
1848 Interpret first parameter correctly.
1849
8824b0a1
UD
18502003-01-17 Ulrich Drepper <drepper@redhat.com>
1851
1852 * Makefile (headers): Add bits/semaphore.h.
1853
850dcfca
UD
18542003-01-16 Jakub Jelinek <jakub@redhat.com>
1855
1856 * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
1857 if not SHARED.
1858
574b892e
UD
18592003-01-14 Ulrich Drepper <drepper@redhat.com>
1860
a8d87c92
UD
1861 * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
1862 must be used and mapping failed.
1863 Reported by Luke Elliott <luke.elliott@activfinancial.com>.
1864
574b892e
UD
1865 * Makefile (CFLAGS-pthread_self.os): Define this, not
1866 CFLAGS-pthread_self.c.
1867
fb48047a
UD
18682003-01-13 Ulrich Drepper <drepper@redhat.com>
1869
47805511
UD
1870 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
1871 lll_unlock_wake_cb.
1872
fb48047a
UD
1873 * Makefile (libpthread-routines): Add version. Add rules to build
1874 version.os and banner.h.
1875 * version.c: New file.
1876
115bb61d
UD
18772003-01-13 Jakub Jelinek <jakub@redhat.com>
1878
1879 * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
1880 the alias unconditional.
1881 * pthread_mutex_unlock.c (__pthread_mutex_unlock_internal): Likewise.
1882
18832003-01-13 Ulrich Drepper <drepper@redhat.com>
1884
1885 * Makefile (CFLAGS-pthread_self.c): New definition.
1886
6aca81bb
UD
18872003-01-06 Jakub Jelinek <jakub@redhat.com>
1888
1889 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
1890 INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
1891 * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
1892 * init.c (__pthread_initialize_minimal_internal): Likewise.
1893
e9c7764e
UD
18942003-01-07 Jakub Jelinek <jakub@redhat.com>
1895
b5facfda
UD
1896 * pthreadP.h (__pthread_cond_timedwait): Add prototype.
1897
e9c7764e
UD
1898 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
1899 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
1900 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
1901 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
1902 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
1903 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
1904
bef1e42f
UD
19052003-01-06 Jakub Jelinek <jakub@redhat.com>
1906
1907 * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
1908 * pt-system.c (LIBC_CANCEL_HANDLED): Add.
1909 * tst-cancel-wrappers.sh: Remove all exceptions.
1910
bbd17455
UD
19112003-01-05 Ulrich Drepper <drepper@redhat.com>
1912
a73ab6df
UD
1913 * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
1914 features. Reported by Marijn Ros <marijn@mad.scientist.com>.
1915
bbd17455
UD
1916 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
1917 Use __libc_pthread_functions array if SHARED.
1918
1919 * pthreadP.h: Move pthread_cond_2_0_t definition to...
1920 * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
1921
1922 * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
1923 (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
1924 __libc_key_create, __libc_getspecific, __libc_setspecific): Use
1925 __libc_ptf_call instead of __libc_maybe_call.
1926 (PTF): New #define.
1927 (__libc_cleanup_region_start): Wrap function name with PTF call.
1928 (__libc_cleanup_region_end): Likewise.
1929 (__libc_cleanup_end): Likewise.
1930
1931 * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
1932 * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
1933 * pthread_key_create.c: Add __pthread_key_create_internal alias.
1934 * pthreadP.h: Add prototypes.
1935
1936 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
1937 __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
1938 __pthread_rwlock_unlock aliases.
1939 * pthreadP.h: Add prototypes for new aliases.
1940
1941 * pthreadP.h (struct pthead_functions): Moved to...
1942 * sysdeps/pthread/pthread-functions.h: ...here. New file.
1943 * init.c (pthread_functions): Add initializers for new elements.
1944
1945 * cleanup_defer.c: Add __pthread_cleanup_push_defer and
1946 __pthread_cleanup_pop_restore aliases.
1947 * pthreadP.h: Add prototypes.
1948
1949 * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
1950 and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
1951 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
1952 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
1953 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
1954 * pthreadP.h: Adjust prototypes and callers.
1955
d27a78be
UD
19562003-01-04 Ulrich Drepper <drepper@redhat.com>
1957
b74121ae
UD
1958 * Makefile (tests): Add tst-cancel7.
1959 (tst-cancel7-ARGS): New variable.
bbd17455 1960 * tst-cancel7.c: New file.
b74121ae 1961
29bc410c
UD
1962 * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
1963 around gcc defficiencies.
1964 * old_pthread_cond_signal.c: Likewise.
1965 * old_pthread_cond_timedwait.c: Likewise.
1966 * old_pthread_cond_wait.c: Likewise.
1967
d27a78be
UD
1968 * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
1969
733f25e6
UD
19702003-01-03 Ulrich Drepper <drepper@redhat.com>
1971
7edb2ae3
UD
1972 * Makefile (tests): Add tst-cond7.
1973 * tst-cond7.c: New file.
1974
b1151300
UD
1975 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
1976 (condvar_cleanup): Get condvar address from the right place.
1977
733f25e6
UD
1978 * atomic.h: Correct definitions of atomic_full_barrier,
1979 atomic_read_barrier, atomic_write_barrier.
1980
1981 * old_pthread_cond_broadcast.c: Make memory allocate and initialization
1982 race-free.
1983 * old_pthread_cond_signal.c: Likewise.
1984 * old_pthread_cond_timedwait.c: Likewise.
1985 * old_pthread_cond_wait.c: Likewise.
1986
686b7223
UD
19872003-01-03 Jakub Jelinek <jakub@redhat.com>
1988
1989 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
1990
0e07706e
UD
19912003-01-03 Ulrich Drepper <drepper@redhat.com>
1992
997256dd
UD
1993 * pthreadP.h (pthread_cond_2_0_t): New type.
1994 (struct pthread_functions): Use new type for 2.0 condvar callbacks.
1995 Use new type for the 2.0 condvar function prototypes.
1996 * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
1997 * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
1998 parameter.
1999 * old_pthread_cond_destroy.c: Likewise.
2000 * old_pthread_cond_broadcast.c: Likewise. Lock appropriately.
2001 * old_pthread_cond_signal.c: Likewise.
2002 * old_pthread_cond_timedwait.c: Likewise.
2003 * old_pthread_cond_wait.c: Likewise.
2004
842d2817
UD
2005 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
2006 (__pthread_cond_wait): Don't save cancellation mode and seq value
2007 in same location.
2008
0e07706e
UD
2009 * herrno.c (__h_errno_location): Don't define as weak.
2010
bf293afe
UD
20112003-01-02 Jakub Jelinek <jakub@redhat.com>
2012
2013 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
2014 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
2015 and pthread_cond_wait.
2016 * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
2017 Renamed to...
2018 (__pthread_cond_broadcast_2_0): ... this.
2019 * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
2020 Renamed to...
2021 (__pthread_cond_destroy_2_0): ... this.
2022 * old_pthread_cond_init.c (__old_pthread_cond_init):
2023 Renamed to...
2024 (__pthread_cond_init_2_0): ... this.
2025 * old_pthread_cond_signal.c (__old_pthread_cond_signal):
2026 Renamed to...
2027 (__pthread_cond_signal_2_0): ... this.
2028 * old_pthread_cond_wait.c (__old_pthread_cond_wait):
2029 Renamed to...
2030 (__pthread_cond_wait_2_0): ... this.
2031 * pthread_cond_destroy.c: Include shlib-compat.h.
2032 (pthread_cond_destroy): Change strong_alias into versioned_symbol.
2033 * pthread_cond_init.c: Include shlib-compat.h.
2034 (pthread_cond_init): Change strong_alias into versioned_symbol.
2035 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
2036 fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
2037 fields.
2038 (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
2039 __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
2040 __pthread_cond_wait_2_0): New prototypes.
2041 (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
2042 __old_pthread_cond_init, __old_pthread_cond_signal,
2043 __old_pthread_cond_wait): Removed.
2044 * init.c: Include shlib-compat.h.
2045 (pthread_functions): Guard ptr___pthread_attr_init_2_0
2046 initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
2047 Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
2048 ptr___pthread_cond_*_2_0 fields.
2049 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
2050 pthread_cond_*@GLIBC_2.0 compatibility symbols.
2051
2052 * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
2053 LIBC_SIGACTION was not yet defined.
2054 [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
2055 [!defined LIBC_SIGACTION] (__sigaction): New function and
2056 libc_hidden_weak.
2057 [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
2058 [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
2059
20602003-01-02 Jakub Jelinek <jakub@redhat.com>
2061
2062 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
2063
05df18c3
UD
20642003-01-02 Ulrich Drepper <drepper@redhat.com>
2065
2066 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
2067 New, larger type definition.
2068 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
2069 implementation.
2070 * Versions [libpthread]: Add definitions for new pthread_cond_*
2071 interfaces for version GLIBC_2.3.2.
2072 * pthread_cond_init.c: Update initialization for new type definition.
2073 * Makefile (libpthread-routines): Remove pthread_cond_wait,
2074 pthread_cond_timedwait, pthread_cond_signal, and
2075 pthread_cond_broadcast. Add old_pthread_cond_init,
2076 old_pthread_cond_destroy, old_pthread_cond_wait,
2077 old_pthread_cond_timedwait, old_pthread_cond_signal, and
2078 old_pthread_cond_broadcast.
2079 * old_pthread_cond_broadcast.c: New file.
2080 * old_pthread_cond_destroy.c: New file.
2081 * old_pthread_cond_init.c: New file.
2082 * old_pthread_cond_signal.c: New file.
2083 * old_pthread_cond_timedwait.c: New file.
2084 * old_pthread_cond_wait.c: New file.
2085 * pthreadP.h: Add prototypes for the compatibility interfaces.
2086
2087 * pthread_cond_destroy.c: Don't include <errno.h>.
2088
fd8979e4
UD
20892003-01-01 Ulrich Drepper <drepper@redhat.com>
2090
2091 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
2092 unnecessary zero offset when addressing MUTEX.
2093
6d6ee629
UD
20942002-12-31 Ulrich Drepper <drepper@redhat.com>
2095
2096 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
2097 __register_atfork.
2098 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
2099 for __register_atfork.
2100
a4baf360
UD
21012002-12-31 Jakub Jelinek <jakub@redhat.com>
2102
2103 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
2104 instead of ASSEMBLER test macro.
2105
2106 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
2107 __libc_current_sigrtmax): Add libc_hidden_def.
2108
2109 * sysdeps/pthread/list.h: Remove assert.h include.
2110
e9395a94
UD
21112002-12-31 Ulrich Drepper <drepper@redhat.com>
2112
2113 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
2114 __pthread_initialize_minimal_internal not
2115 __pthread_initialize_minimal.
2116
89d6e444
UD
21172002-12-30 Ulrich Drepper <drepper@redhat.com>
2118
416d2de6
UD
2119 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
2120 __pthread_initialize_minimal as hidden.
2121
89d6e444
UD
2122 * init.c (__pthread_initialize_minimal_internal): Don't mark as
2123 constructor.
2124
21252002-12-31 Jakub Jelinek <jakub@redhat.com>
2126
2127 * Makefile ($(inst_libdir)/libpthread.so): Depend on
2128 $(common-objpfx)format.lds, include that into the output script.
2129 Fix comment.
2130 (extra-B-pthread.so): Change linuxthreads/ into nptl/.
2131
8cac677c
UD
21322002-12-28 Andreas Jaeger <aj@suse.de>
2133
2134 * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
2135 nsec resolution changes.
2136 (xstat64_conv): Likewise.
2137 (xstat32_conv): Likewise.
2138 * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
2139 struct kernel_stat.
2140 * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
2141 structs stat and stat64.
2142 * time/time.h (__timespec_defined): Define for __USE_MISC.
89d6e444 2143 * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
8cac677c 2144
49e9f864
UD
21452002-12-30 Jakub Jelinek <jakub@redhat.com>
2146
2147 * forward.c (FORWARD2): Renamed from FORWARD3. Remove unused export
2148 argument.
2149 (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
2150 (pthread_exit): Use strong_alias to avoid warnings.
2151 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
2152 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
2153 ptr___pthread_attr_init_2_*.
2154 * init.c (pthread_functions): Adjust.
2155
bab09b26
UD
21562002-12-29 Ulrich Drepper <drepper@redhat.com>
2157
598d7a42
UD
2158 * forward.c: Make all functions available by default again. It
2159 caused too much trouble.
2160
bab09b26
UD
2161 * pt-siglongjmp.c: Removed.
2162
3b7ed871
UD
21632002-12-28 Jakub Jelinek <jakub@redhat.com>
2164
2165 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
2166 (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
2167 * sysdeps/i386/Makefile: New file.
2168 * sysdeps/i386/tcb-offsets.sym: New file.
2169 * sysdeps/pthread/tcb-offsets.h: New file.
2170 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
2171 Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
2172
2173 * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
2174 __register_atfork...
2175 (GLIBC_2.3.2): ...here.
2176
21772002-12-28 Ulrich Drepper <drepper@redhat.com>
2178
2179 * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
2180 pthread_attr_setstackaddr with __attribute_deprecated__.
2181
270d9d47
UD
21822002-12-27 Jakub Jelinek <jakub@redhat.com>
2183
2184 * pt-system.c (system): Remove cancellation handling.
2185 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
2186 cancellation routines.
2187
131fd126
UD
21882002-12-28 Ulrich Drepper <drepper@redhat.com>
2189
afb2e954
UD
2190 * descr.h: Include <dl-sysdep.h>.
2191 (struct pthread): Move header.data.list to the back of the struct.
131fd126
UD
2192 * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
2193 (MULTIPLE_THREADS_OFFSET): Adjust offset.
2194 (SYSINFO_OFFSEET): Likewise.
2195
21962002-12-27 Jakub Jelinek <jakub@redhat.com>
2197
2198 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
2199 Define.
2200 (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
2201 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
2202 DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
2203 (USE_DL_SYSINFO): Undef.
2204
22052002-12-22 Jakub Jelinek <jakub@redhat.com>
2206
2207 * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
2208 $(common-objpfx)libc.so.
2209 * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
2210 it is bigger than pipe buffer size even on arches with bigger
2211 page size.
2212 (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
2213
a218c9cf
UD
22142002-12-25 Ulrich Drepper <drepper@redhat.com>
2215
2216 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
2217 correct errno access for case that USE___THREAD is not defined.
2218
015a2dc9
UD
22192002-12-24 Ulrich Drepper <drepper@redhat.com>
2220
2221 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
2222 Patch by Marijn Ros <marijn@mad.scientist.com>.
2223
5220f9ac
RM
22242002-12-22 Roland McGrath <roland@redhat.com>
2225
2226 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
2227
1561bf63
UD
22282002-12-20 Ulrich Drepper <drepper@redhat.com>
2229
2230 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
2231
3325198e
UD
22322002-12-19 Ulrich Drepper <drepper@redhat.com>
2233
057c823f
UD
2234 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
2235 NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
2236 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
2237
097eca29
UD
2238 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
2239 of int $0x80.
2240 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
2241 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
2242 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
2243 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2244 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
2245 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
2246 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
2247 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
2248
2249 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
2250 sysenter.
2251 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
2252
2253 * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
2254
5f5843e3
UD
2255 * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
2256 in new TCB.
2257 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
2258 that sysinfo is properly initialized.
2259 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
2260 to 1 only for ld.so.
2261
3325198e
UD
2262 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
2263 RTLD_CORRECT_DYNAMIC_WEAK.
2264
74e8f2dc
UD
22652002-12-19 Jakub Jelinek <jakub@redhat.com>
2266
2267 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
2268 Use return 0 as 6th argument to FORWARD4.
2269 * pthread_equal.c: Include pthreadP.h instead of pthread.h.
2270
df45b31e
UD
22712002-12-18 Ulrich Drepper <drepper@redhat.com>
2272
2273 * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
2274 * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
2275 Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
2276 (INIT_SYSINFO): New #define.
2277 (TLS_TP_INIT): Use INIT_SYSINFO.
2278 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
2279 At test to make sure SYSINFO_OFFSET value is correct.
2280 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
2281
3d539579
UD
22822002-12-18 Jakub Jelinek <jakub@redhat.com>
2283
2284 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
2285 * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
2286 * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
2287 [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
2288 __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
2289 __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
2290 __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
2291
d7913e0e
UD
22922002-12-18 Ulrich Drepper <drepper@redhat.com>
2293
f051627f
UD
2294 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
2295 macro instead of using int $0x80 directly.
2296
d7913e0e
UD
2297 * sysdeps/pthread/bits/stdio-lock.h: New file.
2298 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
2299 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
2300 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
2301 * Makefile (routines): Add libc-lowlevelmutex.
2302
2303 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
2304 __i686.get_pc_thunk.dx.
2305
f077a4a9
UD
23062002-12-17 Jakub Jelinek <jakub@redhat.com>
2307
2308 * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
2309 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
2310 ($(objpfx)tst-cancel-wrappers.out): New rule.
2311 * tst-cancel-wrappers.sh: New test.
2312 * tst-locale1.c: Include signal.h.
2313 (uselocale): Test static linking of __libc_current_sigrt*.
2314
23152002-12-17 Ulrich Drepper <drepper@redhat.com>
2316
2317 * Makefile (tests): Add tst-cancel6.
2318 * tst-cancel6.c: New file
2319
bd499a3b
UD
23202002-12-17 Jakub Jelinek <jakub@redhat.com>
2321
2322 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
2323 Define meaningfully for assembler as well.
2324 * pthreadP.h (struct pthread_functions): Remove
2325 ptr_pthread_attr_init field. Add ptr_pthread_attr_init_2_0
2326 and ptr_pthread_attr_init_2_1 fields.
2327 * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
2328 and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
2329 * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
2330 (FORWARD3): Define using FORWARD4.
2331 (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
2332 versions.
2333 * pt-system.c: Remove duplicate stdlib.h include.
2334
0a1063f4
UD
23352002-12-16 Ulrich Drepper <drepper@redhat.com>
2336
87d60668
UD
2337 * sem_init.c: Define sem_init@GLIBC_2.0.
2338 * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
2339 * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
2340
0a1063f4
UD
2341 * flockfile.c: Moved to...
2342 * sysdeps/pthread/flockfile.c: ...here. New file.
2343 * funlockfile.c: Moved to...
2344 * sysdeps/pthread/funlockfile.c: ...here. New file.
2345 * ftrylockfile.c: Moved to...
2346 * sysdeps/pthread/ftrylockfile.c: ...here. New file.
2347
9634cf9d
UD
23482002-12-16 Jakub Jelinek <jakub@redhat.com>
2349
2350 * libc-cancellation.c: Guard both function with
2351 #if !defined NOT_IN_libc.
2352 * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
2353 automatically provided pthread wrappers.
2354 * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
2355 CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
2356 nor in libpthread.
2357 * pt-open.c: Removed.
2358 * pt-fcntl.c: Removed.
2359 * pt-fsync.c: Removed.
2360 * pt-lseek.c: Removed.
2361 * pt-msgrcv.c: Removed.
2362 * pt-msgsnd.c: Removed.
2363 * pt-msync.c: Removed.
2364 * pt-nanosleep.c: Removed.
2365 * pt-open64.c: Removed.
2366 * pt-pause.c: Removed.
2367 * pt-pread.c: Removed.
2368 * pt-pread64.c: Removed.
2369 * pt-pwrite.c: Removed.
2370 * pt-pwrite64.c: Removed.
2371 * pt-read.c: Removed.
2372 * pt-recv.c: Removed.
2373 * pt-recvfrom.c: Removed.
2374 * pt-recvmsg.c: Removed.
2375 * pt-send.c: Removed.
2376 * pt-sendto.c: Removed.
2377 * pt-sigtimedwait.c: Removed.
2378 * pt-sigwait.c: Removed.
2379 * pt-wait.c: Removed.
2380 * pt-waitpid.c: Removed.
2381 * pt-write.c: Removed.
2382 * pt-accept.c: Removed.
2383 * pt-close.c: Removed.
2384 * pt-connect.c: Removed.
2385 * pt-lseek64.c: Removed.
2386 * pt-sendmsg.c: Removed.
2387 * pt-tcdrain.c: Removed.
2388
6ee8d334
UD
23892002-12-15 Ulrich Drepper <drepper@redhat.com>
2390
81fa9371
UD
2391 * init.c (__pthread_initialize_minimal_internal): Renamed from
2392 __pthread_initialize_minimal. Make old name an alias. This
2393 converts a normal relocation into a relative relocation.
2394
f3015aa5
UD
2395 * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
2396
4cbc1950
UD
2397 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
2398 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
2399 * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
2400 pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
2401 pt-sigwaitinfo, pt-waitid, and pt-writev.
2402 * pt-creat.c: Removed.
2403 * pt-poll.c: Removed.
2404 * pt-pselect.c: Removed.
2405 * pt-readv.c: Removed.
2406 * pt-select.c: Removed.
2407 * pt-sigpause.c: Removed.
2408 * pt-sigsuspend.c: Removed.
2409 * pt-sigwaitinfo.c: Removed.
2410 * pt-waitid.c: Removed.
2411 * pt-writev.c: Removed.
2412
8454830b
UD
2413 * init.c (pthread_functions): New variable.
2414 (__pthread_initialize_minimal): Pass pointer to pthread_functions
2415 (or NULL) to __libc_pthread_init.
2416 * forward.c: Rewrite to use __libc:pthread_functions array to get
2417 function addresses.
2418 * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
2419 prototype.
2420 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
2421 Take new parameter. Copy content of variable pointed to by it
2422 to __libc_pthread_init.
2423
2424 * pthreadP.h (struct pthread_functions): New type.
2425 (__libc_pthread_init): Declare.
2426
2427 * pthread_attr_destroy.c: Add namespace protected alias.
2428 * pthread_attr_getdetachstate.c: Likewise.
2429 * pthread_attr_getinheritsched.c: Likewise.
2430 * pthread_attr_getschedparam.c: Likewise.
2431 * pthread_attr_getschedpolicy.c: Likewise.
2432 * pthread_attr_getscope.c: Likewise.
2433 * pthread_attr_setdetachstate.c: Likewise.
2434 * pthread_attr_setinheritsched.c: Likewise.
2435 * pthread_attr_setschedparam.c: Likewise.
2436 * pthread_attr_setschedpolicy.c: Likewise.
2437 * pthread_attr_setscope.c: Likewise.
2438 * pthread_cond_broadcast.c: Likewise.
2439 * pthread_cond_destroy.c: Likewise.
2440 * pthread_cond_init.c: Likewise.
2441 * pthread_cond_signal.c: Likewise.
2442 * pthread_cond_wait.c: Likewise.
2443 * pthread_condattr_destroy.c: Likewise.
2444 * pthread_condattr_init.c: Likewise.
2445 * pthread_equal.c: Likewise.
2446 * pthread_exit.c: Likewise.
2447 * pthread_getschedparam.c: Likewise.
2448 * pthread_self.c: Likewise.
2449 * pthread_setcancelstate.c: Likewise.
2450 * pthread_setschedparam.c: Likewise.
2451 * pthread_mutex_destroy.c: Likewise.
2452 * pthread_mutex_init.c: Likewise.
2453 * pthreadP.h: Add prototypes for the aliases.
2454
0d5f4929
UD
2455 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
2456 multiple_threads member in correct TCB to 1.
2457
6ee8d334
UD
2458 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
2459 SINGLE_THREAD_P. If in libc or libpthread examine multiple_thread
2460 member of thread decriptor, otherwise return unconditionally 1.
2461
2fb6444d
UD
24622002-12-14 Ulrich Drepper <drepper@redhat.com>
2463
2464 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
2465 regular Linux version. Remove file.
2466 * sysdeps/unix/sysv/linux/connect.S: Likewise. Remove file.
2467 * sysdeps/unix/sysv/linux/llseek.c: Likewise. Remove file.
2468 * sysdeps/unix/sysv/linux/msgrcv.c: Likewise. Remove file.
2469 * sysdeps/unix/sysv/linux/msgsnd.c: Likewise. Remove file.
2470 * sysdeps/unix/sysv/linux/open64.c: Likewise. Remove file.
2471 * sysdeps/unix/sysv/linux/poll.c: Likewise. Remove file.
2472 * sysdeps/unix/sysv/linux/pread.c: Likewise. Remove file.
2473 * sysdeps/unix/sysv/linux/pread64.c: Likewise. Remove file.
2474 * sysdeps/unix/sysv/linux/pselect.c: Likewise. Remove file.
2475 * sysdeps/unix/sysv/linux/pwrite.c: Likewise. Remove file.
2476 * sysdeps/unix/sysv/linux/pwrite64.c: Likewise. Remove file.
2477 * sysdeps/unix/sysv/linux/readv.c: Likewise. Remove file.
2478 * sysdeps/unix/sysv/linux/recv.S: Likewise. Remove file.
2479 * sysdeps/unix/sysv/linux/recvfrom.S: Likewise. Remove file.
2480 * sysdeps/unix/sysv/linux/recvmsg.S: Likewise. Remove file.
2481 * sysdeps/unix/sysv/linux/send.S: Likewise. Remove file.
2482 * sysdeps/unix/sysv/linux/sendmsg.S: Likewise. Remove file.
2483 * sysdeps/unix/sysv/linux/sendto.S: Likewise. Remove file.
2484 * sysdeps/unix/sysv/linux/sigpause.c: Likewise. Remove file.
2485 * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise. Remove file.
2486 * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise. Remove file.
2487 * sysdeps/unix/sysv/linux/sigwait.c: Likewise. Remove file.
2488 * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise. Remove file.
2489 * sysdeps/unix/sysv/linux/system.c: Likewise. Remove file.
2490 * sysdeps/unix/sysv/linux/tcdrain.c: Likewise. Remove file.
2491 * sysdeps/unix/sysv/linux/wait.c: Likewise. Remove file.
2492 * sysdeps/unix/sysv/linux/waitid.c: Likewise. Remove file.
2493 * sysdeps/unix/sysv/linux/waitpid.c: Likewise. Remove file.
2494 * sysdeps/unix/sysv/linux/writev.c: Likewise. Remove file.
2495 * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise. Remove file.
2496
86b2dc40
UD
24972002-12-14 Jakub Jelinek <jakub@redhat.com>
2498
2499 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
2500 * sysdeps/unix/sysv/linux/open.c: Removed.
2501 * sysdeps/unix/sysv/linux/fsync.c: Removed.
2502 * sysdeps/unix/sysv/linux/lseek.c: Removed.
2503 * sysdeps/unix/sysv/linux/msync.c: Removed.
2504 * sysdeps/unix/sysv/linux/read.c: Removed.
2505 * sysdeps/unix/sysv/linux/close.c: Removed.
2506 * sysdeps/unix/sysv/linux/creat.c: Removed.
2507 * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
2508 * sysdeps/unix/sysv/linux/pause.c: Removed.
2509 * sysdeps/unix/sysv/linux/select.c: Removed.
2510 * sysdeps/unix/sysv/linux/write.c: Removed.
2511
9d263d72
UD
25122002-12-14 Ulrich Drepper <drepper@redhat.com>
2513
2514 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
2515 element in TCB to see whether locking is needed.
2516
2517 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
2518 MULTIPLE_THREADS_OFFSET value is correct.
2519
2520 * sysdeps/unix/sysv/linux/close.c: New file.
2521 * sysdeps/unix/sysv/linux/connect.S: New file.
2522 * sysdeps/unix/sysv/linux/creat.c: New file.
2523 * sysdeps/unix/sysv/linux/fsync.c: New file.
2524 * sysdeps/unix/sysv/linux/llseek.c: New file.
2525 * sysdeps/unix/sysv/linux/lseek.c: New file.
2526 * sysdeps/unix/sysv/linux/msgrcv.c: New file.
2527 * sysdeps/unix/sysv/linux/msgsnd.c: New file.
2528 * sysdeps/unix/sysv/linux/msync.c: New file.
2529 * sysdeps/unix/sysv/linux/nanosleep.c: New file.
2530 * sysdeps/unix/sysv/linux/open.c: New file.
2531 * sysdeps/unix/sysv/linux/open64.c: New file.
2532 * sysdeps/unix/sysv/linux/pause.c: New file.
2533 * sysdeps/unix/sysv/linux/poll.c: New file.
2534 * sysdeps/unix/sysv/linux/pread.c: New file.
2535 * sysdeps/unix/sysv/linux/pread64.c: New file.
2536 * sysdeps/unix/sysv/linux/pselect.c: New file.
2537 * sysdeps/unix/sysv/linux/pwrite.c: New file.
2538 * sysdeps/unix/sysv/linux/pwrite64.c: New file.
2539 * sysdeps/unix/sysv/linux/readv.c: New file.
2540 * sysdeps/unix/sysv/linux/recv.S: New file.
2541 * sysdeps/unix/sysv/linux/recvfrom.S: New file.
2542 * sysdeps/unix/sysv/linux/recvmsg.S: New file.
2543 * sysdeps/unix/sysv/linux/select.c: New file.
2544 * sysdeps/unix/sysv/linux/send.S: New file.
2545 * sysdeps/unix/sysv/linux/sendmsg.S: New file.
2546 * sysdeps/unix/sysv/linux/sendto.S: New file.
2547 * sysdeps/unix/sysv/linux/sigpause.c: New file.
2548 * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
2549 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
2550 * sysdeps/unix/sysv/linux/sigwait.c: New file.
2551 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
2552 * sysdeps/unix/sysv/linux/system.c: New file.
2553 * sysdeps/unix/sysv/linux/tcdrain.c: New file.
2554 * sysdeps/unix/sysv/linux/wait.c: New file.
2555 * sysdeps/unix/sysv/linux/waitid.c: New file.
2556 * sysdeps/unix/sysv/linux/waitpid.c: New file.
2557 * sysdeps/unix/sysv/linux/writev.c: New file.
2558 * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
2559
2560 * pt-readv.c: Fix comment.
2561
25622002-12-14 Jakub Jelinek <jakub@redhat.com>
2563
2564 * tst-cleanup1.c: Include stdlib.h.
2565
2566 * tst-cancel5.c: New test.
2567 * Makefile (tests): Add tst-cancel5.
2568 (tst-cancel5): Link against libc.so libpthread.so in that order.
2569
9ae0909b
UD
25702002-12-13 Ulrich Drepper <drepper@redhat.com>
2571
b7bdd9c4
UD
2572 * forward.c (test_loaded): Prevent recursive calls.
2573
9ae0909b
UD
2574 * Makefile (routines): Add libc-cancellation.
2575 * libc-cancellation.c: New file.
2576 * descr.h (struct pthread): Add multiple_threads field.
2577 * allocatestack.c (allocate_stack): Initialize multiple_header field of
2578 new thread descriptor to 1.
2579 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
2580 Initialize multiple_thread field after successful thread creation.
2581 * cancellation.c (__do_cancel): Move to pthreadP.h.
2582 (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
2583 (__pthread_disable_asynccancel): Add internal_function attribute.
2584 * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
2585 * pthread_setcancelstate.c: Likewise.
2586 * pthread_setcanceltype.c: Likewise.
2587 * pthread_exit.c: Likewise.
2588 * pthreadP.h (CANCELLATION_P): Likewise.
2589 (__do_cancel): Define as static inline.
2590 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
2591 (__libc_enable_asynccancel, __libc_disable_asynccancel): New
2592 declarations.
2593 * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
2594 fields. Define MULTIPLE_THREADS_OFFSET.
2595 * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
2596 declaration.
2597 * sysdeps/unix/sysv/linux/accept.S: New file.
2598 * sysdeps/unix/sysv/linux/read.c: New file.
2599 * sysdeps/unix/sysv/linux/write.c: New file.
2600 * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
2601 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
2602 initialization of __libc_locking_needed.
2603 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
2604 __libc_locking_needed, use multiple_threads field in TCB.
2605 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
2606
22f20674
UD
26072002-12-12 Ulrich Drepper <drepper@redhat.com>
2608
2ad2e1e7
UD
2609 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
2610 version.
2611 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
2612
22f20674
UD
2613 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
2614 access to __libc_locking_needed for PIC.
2615
aa80bf86
UD
26162002-12-12 Jakub Jelinek <jakub@redhat.com>
2617
2618 * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
2619 declare for libc.so.
2620 (__libc_lock_init, __libc_lock_init_recursive): Change into comma
2621 expression.
2622 (__libc_lock_lock): Put into statement expression.
2623 (__libc_lock_unlock): Remove trailing semicolon.
2624 * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
2625
24021373
RM
26262002-12-12 Roland McGrath <roland@redhat.com>
2627
2628 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
2629 "m" constraint to refer to __libc_locking_needed. Declare it here.
2630
14e7aece
UD
26312002-12-12 Ulrich Drepper <drepper@redhat.com>
2632
2633 * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
2634 * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
2635 Initialize __libc_locking_needed.
2636 * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
2637 instead of __register_pthread_fork_handler.
2638 * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
2639 * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
2640 fork-gen with libc_pthread_init.
2641 * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
2642 of __register_pthread_fork_handler.
2643 * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
2644 of __register_pthread_fork_handler.
2645 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
2646 __libc_locking_needed to determine whether lock prefix can be avoided.
2647 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
2648
85631c8e
UD
26492002-12-11 Ulrich Drepper <drepper@redhat.com>
2650
da63009e
UD
2651 * Makefile (tests): Add tst-cleanup1.
2652 * tst-cleanup1.c: New file.
2653 * cancellation.c (__cleanup_thread): Removed.
2654 (__do_cancel): Remove call to __cleanup_thread.
2655 * pthreadP.h: Remove __cleanup_thread prorotype.
2656
000160a2
UD
2657 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
2658 Remember function and argument even if cancellation handler
2659 function is not available.
2660 (__libc_cleanup_region_end): Execute registered function directly if
2661 pthread functions are not available.
2662 (__libc_cleanup_end): Likewise.
2663
85631c8e
UD
2664 * init.c (__pthread_initialize_minimal): Fix initialization in
2665 static lib by preventing gcc from being too clever.
2666
dce8f2b6
UD
26672002-12-10 Ulrich Drepper <drepper@redhat.com>
2668
34a075be
UD
2669 * init.c (__pthread_initialize_minimal): Remove unneccesary
2670 sigaddset call.
2671
dce8f2b6
UD
2672 * Makefile (tests): We can run tst-locale2 now.
2673
e5e45b53
UD
26742002-12-09 Ulrich Drepper <drepper@redhat.com>
2675
2676 * Versions: Remove duplicated sigwait entry.
2677
bdb04f92
UD
26782002-12-08 Ulrich Drepper <drepper@redhat.com>
2679
1e506629
UD
2680 * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
2681 inside libpthread.
2682
a3957dd5
UD
2683 * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
2684
bdb04f92
UD
2685 * pthreadP.h: Declare __pthread_enable_asynccancel and
2686 __pthread_disable_asynccancel.
2687 (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
2688 (CANCEL_RESET): Use __pthread_disable_asynccancel.
2689 * cancellation.c (__pthread_enable_asynccancel): New function.
2690 (__pthread_disable_asynccancel): New function.
2691 * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
2692 * pt-close.c: Likewise.
2693 * pt-connect.c: Likewise.
2694 * pt-creat.c: Likewise.
2695 * pt-fcntl.c: Likewise.
2696 * pt-fsync.c: Likewise.
2697 * pt-lseek.c: Likewise.
2698 * pt-lseek64.c: Likewise.
2699 * pt-msgrcv.c: Likewise.
2700 * pt-msgsnd.c: Likewise.
2701 * pt-msync.c: Likewise.
2702 * pt-nanosleep.c: Likewise.
2703 * pt-open.c: Likewise.
2704 * pt-open64.c: Likewise.
2705 * pt-pause.c: Likewise.
2706 * pt-poll.c: Likewise.
2707 * pt-pread.c: Likewise.
2708 * pt-pread64.c: Likewise.
2709 * pt-pselect.c: Likewise.
2710 * pt-pwrite.c: Likewise.
2711 * pt-pwrite64.c: Likewise.
2712 * pt-read.c: Likewise.
2713 * pt-readv.c: Likewise.
2714 * pt-recv.c: Likewise.
2715 * pt-recvfrom.c: Likewise.
2716 * pt-recvmsg.c: Likewise.
2717 * pt-select.c: Likewise.
2718 * pt-send.c: Likewise.
2719 * pt-sendmsg.c: Likewise.
2720 * pt-sendto.c: Likewise.
2721 * pt-sigpause.c: Likewise.
2722 * pt-sigsuspend.c: Likewise.
2723 * pt-sigtimedwait.c: Likewise.
2724 * pt-sigwait.c: Likewise.
2725 * pt-sigwaitinfo.c: Likewise.
2726 * pt-system.c: Likewise.
2727 * pt-tcdrain.c: Likewise.
2728 * pt-wait.c: Likewise.
2729 * pt-waitid.c: Likewise.
2730 * pt-waitpid.c: Likewise.
2731 * pt-write.c: Likewise.
2732 * pt-writev.c: Likewise.
a3957dd5
UD
2733 * pthread_join.c: Likewise.
2734 * pthread_timedjoin.c: Likewise.
bdb04f92
UD
2735
2736 * pt-sigpause.c (sigsuspend): Call __sigsuspend.
2737 (__xpg_sigpause): New function.
2738 * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
2739
6ccb3834
UD
27402002-12-07 Ulrich Drepper <drepper@redhat.com>
2741
09efc3ba
UD
2742 * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
2743
2744 * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
2745 _GI_pthread_cleanup_pop to pthreadP.h.
2746
2747 * ftrylockfile.c: Use _IO_lock_trylock instead of
2748 pthread_mutex_trylock.
2749
2750 * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
2751 (CANCEL_RESET): Likewise.
2752 (__pthread_setcanceltype_): Declare.
2753 (__pthread_mutex_lock_internal): Declare.
2754 (__pthread_mutex_unlock_internal): Declare.
2755 (__pthread_once_internal): Declare.
2756 (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
2757 (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
2758
2759 * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
2760 and pthread_mutex_unlock.
2761 * pthread_cond_wait.c: Likewise.
2762 * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
2763 * pthread_mutex_unlock.c: Likewise.
2764
2765 * pthread_setcanceltype.c: Add additional alias
2766 __pthread_setcanceltype.
2767
2768 * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
2769 * sem_open.c (sem_open): Likewise.
2770 Use __libc_open, __libc_write, and __libc_close instead of
2771 open, write, and close respectively.
2772
2773 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
2774 Rewrite as statement expression since it must return a value.
2775
2776 * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
2777 * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
2778 __pthread_kill.
2779
2780 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
2781 alias __pthread_once_internal.
2782
6ccb3834
UD
2783 * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
2784
d3c9f895
UD
27852002-12-06 Ulrich Drepper <drepper@redhat.com>
2786
4614167a
UD
2787 * Makefile (tests): Add tst-stdio1 and tst-stdio2.
2788 * tst-stdio1.c: New file.
2789 * tst-stdio2.c: New file.
2790
a4548cea
UD
2791 * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
2792
d3c9f895
UD
2793 * Makefile (tests): Comment out tst-locale2 for now.
2794 (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
2795
2796 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
2797 -D_IO_MTSAFE_IO.
2798 * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
2799 Use _IO_lock_init instead of explicit assignment.
2800
2801 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
2802 Define __libc_lock_* and __libc_lock_recursive macros with
2803 lowlevellock macros, not pthread mutexes.
2804
2805 * flockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_lock instead
2806 of pthread_mutex_lock.
2807 * funlockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_unlock
2808 instead of pthread_mutex_unlock.
2809
fde89ad0
RM
28102002-12-06 Roland McGrath <roland@redhat.com>
2811
2812 * allocatestack.c (__stack_user): Use uninitialized defn.
2813 * init.c (__pthread_initialize_minimal): Initialize it here.
2814
11767d47
RM
28152002-12-05 Roland McGrath <roland@redhat.com>
2816
fde89ad0
RM
2817 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
2818 string.
2819 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
2820
11767d47
RM
2821 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
2822 missing & here too.
2823
440d8bc2
UD
28242002-12-05 Ulrich Drepper <drepper@redhat.com>
2825
2826 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
2827 lowlevellock.
2828 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
2829 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
2830 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
2831 * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
2832 for __libc_lock_* macros.
2833 * Makefile (routines): Add libc-lowlevellock.
2834
28352002-10-09 Roland McGrath <roland@redhat.com>
2836
2837 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
2838 Under [__PIC__], call the function via the pointer fetched for
2839 comparison rather than a call by name that uses the PLT.
2840 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
2841 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
2842 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
2843 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
2844 (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
2845
d5ed0118
RM
28462002-12-04 Roland McGrath <roland@redhat.com>
2847
2848 * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
2849
2850 * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
2851 * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
2852
2853 * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
2854
eaa4099f
UD
28552002-12-04 Ulrich Drepper <drepper@redhat.com>
2856
2857 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
2858 a completely opaque, non-integer type.
2859 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2860
33b5d0cc
UD
28612002-12-05 Jakub Jelinek <jakub@redhat.com>
2862
2863 * sysdeps/i386/tls.h: Include stdlib.h.
2864 * sysdeps/x86_64/tls.h: Likewise.
2865
7a5cdb30
UD
28662002-12-04 Ulrich Drepper <drepper@redhat.com>
2867
c4a6d859
UD
2868 * Makefile (tests): Add tst-locale2.
2869 (tests-static): Likewise.
2870 * tst-locale2.c: New file.
2871
7a5cdb30
UD
2872 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
2873 volatile and add memory clobbers to lock operations.
2874
d82d5d12
UD
28752002-12-03 Ulrich Drepper <drepper@redhat.com>
2876
69cae3cf
UD
2877 * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
2878 * sysdeps/i386/i486/bits/atomic.h: New file.
2879 * sysdeps/i386/i586/bits/atomic.h: New file.
2880 * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
2881 include i486 version.
2882 * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
2883 * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
c97c64de 2884 Patch by Marijn Ros <marijn@mad.scientist.com>.
69cae3cf 2885
e4044c01
UD
2886 * allocatestack.c (get_cached_stack): Don't crash if we first
2887 found a stack with a larger size then needed.
2888 Reported by Hui Huang <hui.huang@sun.com>.
2889
d82d5d12
UD
2890 * Makefile (tests): Add tst-sysconf.
2891 * tst-sysconf.c: New file.
2892
2893 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
2894 PTHREAD_THREADS_MAX.
2895
fa9a4ff0
RM
28962002-12-02 Roland McGrath <roland@redhat.com>
2897
2898 * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
2899 Declare using hidden_proto instead of attribute_hidden, so there are
2900 non-.hidden static symbols for gdb to find.
2901 (__pthread_keys): Likewise.
2902 * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
2903 * allocatestack.c (__stack_user): Likewise.
2904 * pthread_create.c (__pthread_keys): Likewise.
2905 (__nptl_threads_events, __nptl_last_event): Make these static instead
2906 of hidden.
2907 * pthread_key_create.c (__pthread_pthread_keys_max,
2908 __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
2909
91949a33
UD
29102002-12-02 Ulrich Drepper <drepper@redhat.com>
2911
c22b52fa
UD
2912 * Makefile (tests): Add tst-locale1. If buid-static is yes link
2913 statically.
2914 * tst-locale1.c: New file.
2915
beb6aa41
UD
2916 * pthread_cond_timedwait.c: Include <stdlib.h>.
2917
91949a33
UD
2918 * Makefile (tests): Add tst-fork2 and tst-fork3.
2919 * tst-fork2.c: New file.
2920 * tst-fork3.c: New file.
2921
654dff90
UD
29222002-11-28 Ulrich Drepper <drepper@redhat.com>
2923
cb0e76b4
UD
2924 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
2925
2926 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
2927 require it to 200112L.
2928
2929 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
2930 instruction only if HAVE_CMOV is defined.
2931 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
2932
975aa229
UD
2933 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
2934
654dff90
UD
2935 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
2936
2937 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
2938
2939 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
2940
a3931336
UD
29412002-11-27 Ulrich Drepper <drepper@redhat.com>
2942
c10c099c
UD
2943 * sysdeps/x86_64/bits/atomic.h: New file.
2944
2945 * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
2946 16-bit operations.
2947
dca99d27
UD
2948 * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
2949 possible since gettid cannot fail.
2950
f78deea6
UD
2951 * sysdeps/x86_64/pthreaddef.h: New file.
2952
2953 * sysdeps/i386/pthreaddef.h (gettid): Removed.
2954
2955 * sysdeps/x86_64/pthread_spin_init.c: New file.
2956 * sysdeps/x86_64/pthread_spin_lock.c: New file.
2957 * sysdeps/x86_64/pthread_spin_trylock.c: New file.
2958 * sysdeps/x86_64/pthread_spin_unlock.c: New file.
2959
2960 * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
2961 Add missing lock prefix. Minute optimization.
2962
2963 * tst-spin2.c (main): Also check successful trylock call.
2964
2965 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
2966 syscall. Fix typo in case INTERNAL_SYSCALL is not used.
2967
2968 * sysdeps/i386/pthread_spin_destroy.c: Moved to...
2969 * sysdeps/pthread/pthread_spin_destroy.c: ...here. New file.
2970
2971 * sysdeps/i386/pthread_sigmask.c: Removed. Use the generic code.
2972 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
2973 value in case of an error. Add support for INTERNAL_SYSCALL.
b54e18eb
UD
2974
2975 * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
2976 value in case of an error.
2977
a3931336
UD
2978 * sysdeps/x86_64/tls.h: New file.
2979
76a50749
UD
29802002-11-26 Ulrich Drepper <drepper@redhat.com>
2981
117c452c
UD
2982 * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface. It now
2983 takes the array member name and the index as parameters.
2984 (THREAD_SETMEM_NC): Likewise.
2985 * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
2986 * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
2987 interfaces.
2988
2989 * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
2990 to decide which code to use.
2991 (THREAD_SETMEM_NC): Likewise.
2992
76a50749
UD
2993 * allocatestack.c (queue_stack): Don't remove stack from list here.
2994 Do it in the caller. Correct condition to prematurely terminate
2995 loop to free stacks.
2996 (__deallocate_stack): Remove stack from list here.
2997
29982002-11-26 Ulrich Drepper <drepper@redhat.com>
2999
3000 * Makefile (tests): Add tst-stack1.
3001 * tst-stack1.c: New file.
3002
3003 * allocatestack.c (allocate_stack): Initialize the TCB on a user
3004 provided stack.
3005
3006 * pthread_attr_getstack.c: Return bottom of the thread area.
3007
30082002-11-25 Ulrich Drepper <drepper@redhat.com>
3009
3010 * Makefile (libpthread-routines): Add pt-allocrtsig and
3011 pthread_kill_other_threads.
3012 * pt-allocrtsig.c: New file.
3013 * pthread_kill_other_threads.c: New file.
3014 * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
3015 all three functions.
3016 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
3017 allocrtsig.
3018 * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
3019 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
3020 and __libc_allocate_rtsig_private.
3021 * Versions (libpthread): Export pthread_kill_other_threads_np,
3022 __libc_current_sigrtmin, and __libc_current_sigrtmax.
3023
30242002-11-24 Ulrich Drepper <drepper@redhat.com>
3025
3026 * allocatestack.c (allocate_stack): stackaddr in attribute points to
3027 the end of the stack. Adjust computations.
3028 When mprotect call fails dequeue stack and free it.
3029 * pthread_attr_setstack.c: Store top of the stack in stackaddr
3030 attribute.
3031 * pthread_getattr_np.c: Likewise.
3032
3033 * descr.h (IS_DETACHED): Add some more parenthesis to prevent
3034 surprises.
3035
30362002-11-23 Ulrich Drepper <drepper@redhat.com>
3037
3038 * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
3039 attribute definitions. Patch by Luca Barbieri <ldb@ldb.ods.org>.
3040
30412002-11-22 Ulrich Drepper <drepper@redhat.com>
3042
3043 * pthread_getspecific.c: Optimize access to first 2nd-level array.
3044 * pthread_setspecific.c: Likewise.
3045
30462002-11-21 Ulrich Drepper <drepper@redhat.com>
3047
3048 * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
3049 definitions. Get them from the official place.
3050 * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
3051
3052 * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
3053 Use new CLONE_ flags in clone() calls.
3054
3055 * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
3056 * sysdeps/unix/sysv/linux/i386/fork.c: New file.
3057
3058 * Versions: Add pthread_* functions for libc.
3059 * forward.c: New file.
3060
3061 * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
3062 errno-loc.
3063 * herrno.c: New file.
3064 * res.c: New file.
3065
3066 * Makefile (libpthread-routines): Remove sem_post, sem_wait,
3067 sem_trywait, and sem_timedwait. Add herrno and res.
3068 * sem_init.c: Don't initialize lock and waiters members.
3069 * sem_open.c: Likewise.
3070 * sem_post.c: Removed.
3071 * sem_wait.c: Removed.
3072 * sem_trywait.c: Removed.
3073 * sem_timedwait.c: Removed.
3074 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
3075 Includes full implementations of sem_post, sem_wait, sem_trywait,
3076 and sem_timedwait.
3077 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
3078 for new implementation.
3079 * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
3080 and waiters fields.
3081
3082 * tst-sem3.c: Improve error message.
3083 * tst-signal3.c: Likewise.
3084
3085 * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
3086 to tell the kernel about the termination futex and to initialize tid
3087 member. Don't initialize main_thread.
3088 * descr.h (struct pthread): Remove main_thread member.
3089 * cancelllation.c (__do_cancel): Remove code handling main thread.
3090 The main thread is not special anymore.
3091
3092 * allocatestack.c (__reclaim_stacks): Mark stacks as unused. Add
3093 size of the stacks to stack_cache_actsize.
3094
3095 * pt-readv.c: Add missing "defined".
3096 * pt-sigwait.c: Likewise.
3097 * pt-writev.c: Likewise.
3098
30992002-11-09 Ulrich Drepper <drepper@redhat.com>
3100
3101 * Versions: Export __connect from libpthread.
3102 Patch by Luca Barbieri <ldb@ldb.ods.org>.
3103
3104 * Makefile (libpthread-routines): Add pt-raise.
3105 * sysdeps/unix/sysv/linux/raise.c: New file.
3106 * sysdeps/unix/sysv/linux/pt-raise.c: New file.
3107 * sysdeps/generic/pt-raise.c: New file.
3108
3109 * pthread_cond_init.c: Initialize all data elements of the condvar
3110 structure. Patch by Luca Barbieri <ldb@ldb.ods.org>.
3111
3112 * pthread_attr_init.c: Actually implement 2.0 compatibility version.
3113 * pthread_create.c: Likewise.
3114
3115 * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
3116 * tst-key1.c: New file.
3117 * tst-key2.c: New file.
3118 * tst-key3.c: New file.
3119
3120 * Versions: Export pthread_detach for version GLIBC_2.0.
3121 Reported by Saurabh Desai <sdesai@austin.ibm.com>.
3122
31232002-11-08 Ulrich Drepper <drepper@redhat.com>
3124
3125 * pthread_key_create.c: Terminate search after an unused key was found.
3126 Patch by Luca Barbieri <ldb@ldb.ods.org>.
3127
3128 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
3129 Patch by Luca Barbieri <ldb@ldb.ods.org>.
3130
31312002-10-10 Ulrich Drepper <drepper@redhat.com>
3132
3133 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
3134 dynamic lookup for errno in PIC.
3135
3136 * allocatestack.c (get_cached_stack): Rearrange code slightly to
3137 release the stack lock as soon as possible.
3138 Call _dl_allocate_tls_init for TCB from the cache to re-initialize
3139 the static TLS block.
3140 (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
3141
3142 * cancellation.c: Renamed from cancelation.c.
3143 * Makefile: Adjust accordingly.
3144 * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
3145 * cleanup_defer.c: Use CANCELLATION_P.
3146 * pthread_testcancel.c: Likewise.
3147 * descr.h: Fix spelling in comments.
3148 * init.c: Likewise.
3149 * pthread_getattr_np.c: Likewise.
3150 * pthread_getschedparam.c: Likewise.
3151 * pthread_setschedparam.c: Likewise.
3152 * Versions: Likewise.
3153
3154 * pt-pselect.c: New file.
3155 * Makefile (libpthread-routines): Add pt-pselect.
3156 * Versions: Add pselect.
3157
3158 * tst-cancel4.c: New file.
3159 * Makefile (tests): Add tst-cancel4.
3160
31612002-10-09 Ulrich Drepper <drepper@redhat.com>
3162
3163 * pthread_mutex_lock.c: Always record lock ownership.
3164 * pthread_mutex_timedlock.c: Likewise.
3165 * pthread_mutex_trylock.c: Likewise.
3166
3167 * pt-readv.c: New file.
3168 * pt-writev.c: New file.
3169 * pt-creat.c: New file.
3170 * pt-msgrcv.c: New file.
3171 * pt-msgsnd.c: New file.
3172 * pt-poll.c: New file.
3173 * pt-select.c: New file.
3174 * pt-sigpause.c: New file.
3175 * pt-sigsuspend.c: New file.
3176 * pt-sigwait.c: New file.
3177 * pt-sigwaitinfo.c: New file.
3178 * pt-waitid.c: New file.
3179 * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
3180 pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
3181 pt-sigwait, pt-sigwaitinfo, and pt-waitid.
3182 * Versions: Add all the new functions.
3183
3184 * tst-exit1.c: New file.
3185 * Makefile (tests): Add tst-exit1.
3186
3187 * sem_timedwait.c: Minor optimization for more optimal fastpath.
3188
31892002-10-08 Ulrich Drepper <drepper@redhat.com>
3190
3191 * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
3192
3193 * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
3194 call. pthread_join is an official cancellation point.
3195 * pthread_timedjoin.c: Likewise.
3196
3197 * pthread_cond_wait.c: Revert order in which internal lock are dropped
3198 and the condvar's mutex are retrieved.
3199 * pthread_cond_timedwait.c: Likewise.
3200 Reported by dice@saros.East.Sun.COM.
3201
32022002-10-07 Ulrich Drepper <drepper@redhat.com>
3203
3204 * pthreadP.h: Cut out all type definitions and move them...
3205 * sysdeps/unix/sysv/linux/internaltypes.h: ...here. New file.
3206 * pthreadP.h: Include <internaltypes.h>.
3207
3208 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
3209 performance tweaks.
3210
3211 * sem_trywait.c: Shuffle #includes around to get right order.
3212 * sem_timedwait.c: Likewise.
3213 * sem_post.c: Likewise.
3214 * sem_wait.c: Likewise.
3215
3216 * nptl 0.3 released.
3217
3218 * Makefile (tests): Add tst-signal3.
3219 * tst-signal3.c: New file.
3220
32212002-10-05 Ulrich Drepper <drepper@redhat.com>
3222
3223 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
3224 the asms modify the sem object.
3225 (__lll_sem_timedwait): Now takes struct sem* as first parameter.
3226
3227 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
3228 the actual members.
3229 * pthreadP.h (struct sem): New type. Actual semaphore type.
3230 * semaphoreP.h: Include pthreadP.h.
3231 * sem_getvalue.c: Adjust to sem_t change.
3232 * sem_init.c: Likewise.
3233 * sem_open.c: Likewise.
3234 * sem_post.c: Likewise.
3235 * sem_timedwait.c: Likewise.
3236 * sem_trywait.c: Likewise.
3237 * sem_wait.c: Likewise.
3238
32392002-10-04 Ulrich Drepper <drepper@redhat.com>
3240
3241 * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
3242 * tst-basic2.c: New file.
3243 * tst-exec1.c: New file.
3244 * tst-exec2.c: New file.
3245 * tst-exec3.c: New file.
3246
3247 * tst-fork1.c: Remove extra */.
3248
3249 * nptl 0.2 released. The API for IA-32 is complete.