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