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