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