]> sourceware.org Git - glibc.git/blob - nptl/ChangeLog
Update.
[glibc.git] / nptl / ChangeLog
1 2003-03-11 Ulrich Drepper <drepper@redhat.com>
2
3 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
4 (__condvar_cleanup): Wake up all waiters in case we got signaled
5 after being woken up but before disabling asynchronous
6 cancellation.
7 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
8 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
9 (__condvar_cleanup): Likewise.
10
11 * init.c (__NR_set_tid_address): If already defined, don't redefine.
12 Make it an error if architecture has no #if case. Add x86-64.
13
14 * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
15 pt-initfini.s generation.
16
17 * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
18 (TLS_INIT_TP): Fix typo.
19
20 2003-03-11 Jakub Jelinek <jakub@redhat.com>
21
22 * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
23 3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
24
25 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
26 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
27 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
28 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
29 * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
30 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
31 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
32 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
33
34 2003-03-11 Ulrich Drepper <drepper@redhat.com>
35
36 * sysdeps/pthread/pthread_cond_timedwait.c
37 (__pthread_cond_timedwait): Return the result of the final
38 locking. If it succeeds, the regular function return value.
39
40 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
41 Return result of the final locking.
42 * version.c (__nptl_main): Work around problems with the strange
43 INTERNAL_SYSCALL macro on ppc32.
44 * init.c (__pthread_initialize_minimal_internal): Unblock
45 SIGCANCEL in case the parent blocked it.
46 Reported by Paul Mackerras <paulus@samba.org>.
47
48 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
49 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
50 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
51
52 2003-03-11 Jakub Jelinek <jakub@redhat.com>
53
54 * sysdeps/pthread/pthread_cond_timedwait.c
55 (__pthread_cond_timedwait): Unlock and fail if
56 __pthread_mutex_unlock_internal failed.
57
58 * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
59 (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
60 Use ARCH_CLONE.
61 * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
62 [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
63 STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
64 ALLOCATE_STACK): New macros.
65 (TLS_TPADJ): New macro.
66 (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
67 (allocate_stack): Handle TLS_DTV_AT_TP and
68 NEED_SEPARATE_REGISTER_STACK. Use TLS_TPADJ.
69 * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
70 Don't set PD->self.
71 * init.c [__ia64__] (__NR_set_tid_address): Define.
72
73 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
74 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
75 * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
76 * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
77 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
78 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
79 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
80 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
81 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
82 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
83 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
84 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
85 * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
86 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
87 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
88 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
89 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
90 * sysdeps/ia64/bits/atomic.h: New file.
91 * sysdeps/ia64/Makefile: New file.
92 * sysdeps/ia64/pthread_spin_init.c: New file.
93 * sysdeps/ia64/pthread_spin_lock.c: New file.
94 * sysdeps/ia64/pthread_spin_trylock.c: New file.
95 * sysdeps/ia64/pthread_spin_unlock.c: New file.
96 * sysdeps/ia64/pthreaddef.h: New file.
97 * sysdeps/ia64/tcb-offsets.sym: New file.
98 * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
99 * sysdeps/ia64/tls.h: New file.
100
101 * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
102 to syscall instead of no arguments.
103
104 2003-03-10 Ulrich Drepper <drepper@redhat.com>
105
106 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
107 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
108 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
109 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
110
111 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
112 unused code.
113
114 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
115
116 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
117 lowlevelbarrier.sym.
118 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
119 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
120 Include lowlevelbarrier.h and don't define offsets locally.
121 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
122
123 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
124 (__lll_mutex_lock_wait): Reverse order of first two parameters.
125 (__lll_mutex_timedlock_wait): Likewise.
126 (lll_mutex_lock): Adjust asm for that.
127 (lll_mutex_timedlock): Likewise. Mark cx, cc, r10 as clobbered.
128 (lll_lock): Adjust asm for operand order change.
129 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
130 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
131
132 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
133 Reverse order of parameters.
134 (__lll_timedwait_tid): Remove regparms attribute.
135 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
136 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
137
138 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
139 (__lll_timedwait_tid): Remove one unnecessary instruction.
140
141 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
142 __lll_mutex_timedlock_wait only for NOT_IN_libc.
143 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
144 lowlevelmutex.S.
145
146 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
147 lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
148 for NOT_IN_libc.
149 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
150 lowlevellock.S.
151
152 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
153 LOCK is already defined. Don't define __lll_mutex_timedlock_wait
154 for libc.so.
155 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
156 define LOCK here (if UP is not defined). The actual code is in
157 lowlevelmutex.S.
158
159 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
160 LOCK is already defined. Don't define lll_unlock_wake_cb and
161 __lll_timedwait_tid for libc.so.
162 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
163 define LOCK here (if UP is not defined). The actual code is in
164 lowlevellock.S.
165
166 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
167 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
168 * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
169 instead of lowlevelsem.h.
170 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
171 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
172 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
173
174 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
175 lowlevelrwlock.sym.
176 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
177 * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
178 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
179
180 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
181 register loading.
182 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
183 last changed. D'oh.
184
185 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
186
187 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
188 of __libc_locking_needed.
189 (lll_trylock): Initialize %eax to zero.
190
191 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
192 pthread_cond_t definition.
193
194 2003-03-10 Roland McGrath <roland@redhat.com>
195
196 * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
197 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
198 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
199 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
200 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
201
202 * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
203 Instead of setting PD->multiple_threads, set globals
204 __pthread_multiple_threads and __libc_multiple_threads.
205 * sysdeps/pthread/createthread.c (create_thread): Likewise.
206 * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
207 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
208
209 * descr.h (struct pthread): Conditionalize first member on
210 [!TLS_DTV_AT_TP]. Replace the `header' member with an anonymous union
211 containing an anonymous tcbhead_t. Move `list' member out.
212 [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
213 * allocatestack.c: Remove use of `header.data.' prefix.
214 * pthread_create.c: Likewise.
215 * init.c (__pthread_initialize_minimal_internal): Likewise.
216 * sysdeps/pthread/createthread.c (create_thread): Likewise.
217 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
218 (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
219 * sysdeps/x86_64/tls.h: Likewise.
220 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
221 (SINGLE_THREAD_P): Likewise.
222 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
223 (SINGLE_THREAD_P): Likewise.
224 * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
225 * sysdeps/s390/tls.h (tcbhead_t): Likewise.
226
227 2003-03-09 Ulrich Drepper <drepper@redhat.com>
228
229 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
230
231 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
232 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
233
234 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
235 leftovers from the ia32 code.
236
237 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
238 memory load.
239 (clear_once_control): Don't load %esi.
240
241 * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
242 handling.
243
244 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
245
246 * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
247 * sysdeps/unix/sysv/linux/createthread.c: ...here.
248
249 * Makefile (tests): Add tst-cond10.
250 * tst-cond10.c: New file.
251
252 2003-03-08 Ulrich Drepper <drepper@redhat.com>
253
254 * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
255 * tst-signal3.c (do_test): Likewise.
256 * tst-sem5.c (do_test): Likewise.
257 * tst-kill6.c (do_test): Likewise.
258 * tst-tls3.c (do_test): Likewise. Include <errno.h>.
259
260 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
261 of inc/dec.
262 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
263 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
264 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
265 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
266 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
267 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
268 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
269 Likewise.
270 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
271 Likewise.
272 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
273 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
274 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
275 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
276 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
277 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
278 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
279 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
280
281 * allocatestack.c (allocate_stack): If mprotect() fails free the
282 TLS memory.
283
284 2003-03-07 Ulrich Drepper <drepper@redhat.com>
285
286 * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
287
288 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
289 lll_wake_tid. This was used only to work around kernel limits in
290 the early days.
291 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
292 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
293 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
294 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
295
296 * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
297 (__pthread_initialize_minimal_internal): Change initialization of
298 __static_tls_align_m1 appropriately.
299 * pthreadP.h (__static_tls_align_m1): Renamed from
300 __static_tls_align.
301 * allocatestack.c (allocate_stack): Use __static_tls_align_m1
302 instead of __static_tls_align-1.
303
304 2003-03-04 Ulrich Drepper <drepper@redhat.com>
305
306 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
307
308 * pthread_create.c: Define __pthread_keys using nocommon
309 attribute, not by placing it explicitly in bss.
310 Remove DEFINE_DEALLOC definition. Not needed anymore.
311
312 * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
313 Use it in mmap call to allocate stacks.
314
315 * sysdeps/pthread/createthread.c (create_thread): Fix comment.
316
317 * pthread_create.c (start_thread): Use THREAD_SETMEM to store
318 result of the thread function.
319
320 2003-03-03 Ulrich Drepper <drepper@redhat.com>
321
322 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed. The generic
323 version is just fine.
324
325 * sysdeps/unix/sysv/linux/libc_pthread_init.c
326 (__pthread_child_handler): Renamed from pthread_child_handler,
327 exported, and marked hidden. Change all users.
328 * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
329 free __pthread_child_handler from child list.
330
331 2003-03-03 Martin Schwidefsky <schwidefsky@de.ibm.com>
332
333 * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
334
335 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
336 Fix handling of cancellation and failing pthread_mutex_unlock call.
337 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
338 (__pthread_cond_wait): Likewise.
339
340 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
341 (pthread_rwlock_timedrdlock): Fix clobber of result variable by
342 lll_futex_timed_wait call.
343 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
344 (pthread_rwlock_timedwrlock): Likewise.
345
346 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
347 Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
348 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
349
350 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
351 check of lll_futex_wake return value.
352
353 2003-03-03 Roland McGrath <roland@redhat.com>
354
355 * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
356
357 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
358 Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
359 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
360
361 2003-03-02 Ulrich Drepper <drepper@redhat.com>
362
363 * sysdeps/pthread/timer_create.c (timer_create): Return correct
364 error for CPU clocks.
365
366 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
367 _POSIX_MONOTONIC_CLOCK.
368 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
369
370 * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
371 recent kernels.
372
373 2003-03-01 Ulrich Drepper <drepper@redhat.com>
374
375 * descr.h (struct pthread): Move cleanup field to the front.
376
377 2003-03-01 Roland McGrath <roland@redhat.com>
378
379 * sem_open.c (sem_open): Braino fix.
380
381 2003-03-01 Ulrich Drepper <drepper@redhat.com>
382
383 * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
384 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
385 __pthread_cleanup_pop functionality.
386 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
387
388 * descr.h (struct pthread): Move tid field to the front now that
389 it is often used.
390
391 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
392 (__lll_mutex_timedlock_wait): Remove.
393 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
394 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
395 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
396 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
397 (lll_unlock_wake_cb): Don't save and restore %esi.
398 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
399 %esi.
400 (__lll_timedwait_tid): Add alignment.
401 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
402 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
403 %esi.
404 (__lll_timedwait_tid): Removed.
405 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
406 (__pthread_cond_broadcast): Don't save, load, and restore %esi.
407 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
408 (pthread_barrier_wait): Don't save, load, and restore %esi for
409 last thread.
410 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
411 (__pthread_cond_signal): Don't save, load, and restore %esi.
412 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
413 (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
414 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
415 Don't save, load, and restore %esi.
416
417 2003-02-27 Ulrich Drepper <drepper@redhat.com>
418
419 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
420 Release lock before waking up the waiters.
421
422 * tst-exit1.c (do_test): Don't start more than one thread in parallel.
423
424 * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
425 (reader_thread): Likewise.
426
427 * sysdeps/pthread/pthread_rwlock_unlock.c
428 (__pthread_rwlock_unlock): Release internal lock early. Don't try
429 to wake up readers if there are none.
430
431 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
432 Release internal lock before wake threads.
433
434 2003-02-26 Ulrich Drepper <drepper@redhat.com>
435
436 * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
437 * tst-rwlock8.c: Initialize lock with INIT. Allow INIT to be
438 predefined.
439 * tst-rwlock9.c: Likewise.
440 * tst-rwlock10.c: New file.
441 * tst-rwlock11.c: New file.
442
443 * Makefile (tests): Add tst-dlsym1.
444 * tst-dlsym1.c: New file.
445
446 * init.c (__pthread_initialize_minimal_internal): Set
447 GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
448 * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
449
450 2003-02-24 Ulrich Drepper <drepper@redhat.com>
451
452 * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
453
454 * tst-cond2.c: Fix sychronization with child.
455
456 * tst-rwlock8.c (reader_thread): Remove unused variable.
457
458 * Makefile: Add rules to build and run tst-tls3.
459 * tst-tls3.c: New file.
460 * tst-tls3mod.c: New file.
461
462 * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
463 * tst-rwlock8.c: New file.
464 * tst-rwlock9.c: New file.
465 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
466 complete broken rwlock implementation.
467 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
468 Likewise.
469 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
470 Likewise.
471 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
472 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
473 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
474 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
475 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
476 * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
477 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
478
479 2003-02-23 Roland McGrath <roland@redhat.com>
480
481 * Makefile (nptl-version): Change regexp so case sensitivity is ok.
482
483 2003-02-23 Ulrich Drepper <drepper@redhat.com>
484
485 * Makefile (tests): Add tst-context1.
486 * tst-context1.c: New file.
487
488 * Makefile (tests): Add tst-tls1 and tst-tls2.
489 * tst-tls1.c: New file.
490 * tst-tls2.c: New file.
491
492 * libc-cancellation.c (__libc_enable_asynccancel): Correct test
493 for failed cmpxchg.
494
495 * pthread_create.c (start_thread): Set EXITING_BIT early.
496
497 * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
498 (THREAD_GETMEM_NC): Likewise.
499
500 2003-02-22 Ulrich Drepper <drepper@redhat.com>
501
502 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
503 off 3 more bytes by using offset-less instructions when possible.
504
505 * Makefile: Add dependency for $(objpfx)version.d.
506
507 * eintr.c (eintr_source): Add unnecessary return but the compiler
508 insists.
509
510 * tst-kill3.c: Include <unistd.h>.
511
512 2003-02-21 Roland McGrath <roland@redhat.com>
513
514 * pthread_create.c (start_thread): Call __libc_thread_freeres.
515
516 2003-02-21 Ulrich Drepper <drepper@redhat.com>
517
518 * Makefile (tests): Add tst-eintr1.
519 (distribute): Add eintr.c.
520 * tst-eintr1.c: New file.
521 * eintr.c: New file.
522
523 * pthread_cancel.c (pthread_cancel): Use tkill directly.
524
525 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
526 Disallow sending SIGCANCEL.
527
528 * Makefile (tests): Remove tst-basic7. Add tst-kill1, tst-kill2,
529 tst-kill3, tst-kill4, tst-kill5, tst-kill6.
530 * tst-kill1.c: New file.
531 * tst-kill2.c: New file.
532 * tst-kill3.c: New file.
533 * tst-kill5.c: New file.
534 * tst-kill6.c: New file.
535 * tst-basic7.c: Renamed to...
536 * tst-kill4.c: ...this.
537
538 2003-02-21 Roland McGrath <roland@redhat.com>
539
540 * Makefile (install-lib-ldscripts): New variable.
541
542 2003-02-21 Ulrich Drepper <drepper@redhat.com>
543
544 * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
545 * pthread_cancel.c: Use INVALID_TD_P.
546 * pthread_detach.c: Likewise.
547 * pthread_getschedparam.c: Likewise.
548 * pthread_setschedparam.c: Likewise.
549 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
550 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
551 * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
552 * pthread_timedjoin.c: Likewise.
553
554 * tst-basic7.c: Include <signal.h>.
555
556 * pthread_join.c (pthread_join): Limited checking for invalid
557 descriptors.
558 * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
559
560 2003-02-20 Ulrich Drepper <drepper@redhat.com>
561
562 * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
563 beginning of the loop. Clear the entire first block of TSD.
564 * Makefile (tests): Add tst-key4.
565 * tst-key4.c: New file.
566
567 2003-02-18 Ulrich Drepper <drepper@redhat.com>
568
569 * Makefile (tests): Add tst-basic7.
570 * tst-basic7.c: New file.
571
572 * pthread_create.c (deallocate_tsd): Mark as internal_function.
573 Add some more __builtin_expect.
574
575 * pthreadP.h: Define dummy version of DEBUGGING_P.
576
577 2003-02-17 Ulrich Drepper <drepper@redhat.com>
578
579 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
580 _POSIX_THREAD_PRIORITY_SCHEDULING.
581 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
582 _XOPEN_REALTIME_THREADS.
583 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
584
585 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
586 kernel returns EINVAL for PID <= 0, work around it.
587
588 * Makefile (tests): Add tst-signal5.
589 * tst-signal5.c: New file.
590
591 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
592 and LOGIN_NAME_MAX.
593
594 * tst-cancel1.c (tf): Block all signals.
595
596 * Makefile (tests): Add tst-basic6.
597 * tst-basic6.c: New file.
598
599 * tst-basic1.c: Add test for process ID.
600
601 * Makefile (tests): Add tst-cancel10.
602 * tst-cancel10.c: New file.
603
604 * Makefile (tests): Add tst-signal4.
605 * tst-signal4.c: New file.
606
607 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
608 __sigismember instead of sigismember. Add __builtin_expect.
609
610 2003-02-16 Ulrich Drepper <drepper@redhat.com>
611
612 * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
613 pthread_setcancelstate, and pthread_rwlock_setpshared.
614
615 * tst-cancel7.c (do_test): Make sure the pid file exists before
616 canceling the thread.
617
618 * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
619 pthread_rwlock_timedrdlock tests.
620 * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
621 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
622 Check for invalid tv_nsec field.
623 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
624 Likewise.
625
626 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
627 recursive mutex of overflow.
628
629 * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
630
631 * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
632 going into an endless loop.
633 * Makefile (tests): Add tst-cancel9.
634 * tst-cancel9.c: New file.
635
636 * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
637
638 2003-02-15 Ulrich Drepper <drepper@redhat.com>
639
640 * tst-mutex5.c (do_test): Add more timedlock tests.
641
642 * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
643 * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
644
645 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
646 use INLINE_SYSCALL. Error number is returned, not -1.
647
648 * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
649 and __deallocate_stack with internal_function.
650 * pthread_create.c: Adjust definitions appropriately.
651 * allocatestack.c: Likewise.
652
653 * pthread_join.c: Add one more __builtin_expect.
654 * pthread_timedjoin.c: Likewise.
655
656 * pthread_getspecific.c (__pthread_getspecific): Clear data->data
657 not data of sequence number does not match.
658 Add one __builtin_expect.
659
660 * Makefile (tests): Add tst-clock1.
661 * tst-clock1.c: New file.
662
663 * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
664 negative arguments.
665 * Makefile (tests): Add tst-basic5.
666 * tst-basic5.c: New file.
667
668 2003-02-14 Ulrich Drepper <drepper@redhat.com>
669
670 * Makefile (tests): Add tst-basic4.
671 * tst-basic4.c: New file.
672
673 * pthreadP.h: Add declaraction for __nptl_nthreads.
674 * pthread_create.c: Define __nptl_nthreads
675 (start_thread): Increment __nptl_nthreads at beginning. Decrement
676 after thread is done. If then zero, call exit(0).
677 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
678 Add ptr_nthreads. Define HAVE_PTR_NTHREADS.
679 * init.c (pthread_functions): Initialize ptr_nthreads.
680 * allocatestack.c (nptl_nthreads): Remove definition and all uses.
681 (__reclaim_stacks): Decrement __nptl_nthreads.
682 * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
683 Define.
684 * Makefile (tests): Add tst-basic3.
685 * tst-basic3.c: New file.
686
687 * descr.h: Define CANCELING_BIT and CANCELING_BITMASK. Introduce
688 after CANCELTYPE_BIT, move the other bits up. Update CANCEL_RESTMASK.
689 * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
690 * pthread_cancel.c (pthread_cancel): Likewise. Also set CANCELING_BIT
691 if asynchronous canceling is enabled.
692 * pthread_join.c (pthread_join): When recognizing circular joins,
693 take into account the other thread might be already canceled.
694 * Makefile (tests): Add tst-join5.
695 * tst-join5.c: New file.
696
697 * Makefile (tests): Add tst-join4.
698 * tst-join4.c: New file.
699
700 2003-02-13 Ulrich Drepper <drepper@redhat.com>
701
702 * tst-cond4.c (main): Add test of pthread_attr_getpshared.
703
704 2003-02-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
705
706 * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
707 THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
708 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
709 warning.
710 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
711 to avoid warning.
712 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
713 error if lll_futex_wake failed.
714
715 2003-02-13 Ulrich Drepper <drepper@redhat.com>
716
717 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
718 handling of cancellation and failung pthread_mutex_unlock call.
719 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
720 * Makefile (tests): Add tst-cond8 and tst-cond9.
721 * tst-cond8.c: New file.
722 * tst-cond9.c: New file.
723
724 * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
725
726 * sysdeps/pthread/pthread.h: Add missing initializers. Protect
727 non-standard initializers with __USE_GNU.
728
729 * Makefile (tests): Add tst-cleanup3.
730 * tst-cleanup3.c: New file.
731
732 2003-02-12 Ulrich Drepper <drepper@redhat.com>
733
734 * Makefile (tests): Add tst-attr1 and tst-attr2.
735 * tst-attr1.c: New file.
736 * tst-attr2.c: New file.
737
738 * Makefile: Add rules to build and run tst-atfork2 test.
739 * tst-atfork2.c: New file.
740 * tst-atfork2mod.c: New file.
741
742 * sysdeps/unix/sysv/linux/unregister-atfork.c
743 (__unregister_atfork): Free the memory allocated for the handlers
744 after removing them from the lists.
745
746 * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
747 cleanup function.
748
749 * tst-atfork1.c (do_test): Wait for the child we forked.
750 Report error in child.
751
752 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
753
754 * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
755
756 2003-02-10 Ulrich Drepper <drepper@redhat.com>
757
758 * Makefile (tests): Add tst-cancel8.
759 * tst-cancel8.c: New file.
760
761 * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
762 clearing of control variable.
763 * Makefile (tests): Add tst-once3 and tst-once4.
764 * tst-once3.c: New file.
765 * tst-once4.c: New file.
766
767 2003-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
768
769 * sysdeps/sh/Makefile: New file.
770 * sysdeps/sh/bits/atomic.h: New file.
771 * sysdeps/sh/pthread_spin_init.c: New file.
772 * sysdeps/sh/pthread_spin_lock.c: New file.
773 * sysdeps/sh/pthread_spin_trylock.S: New file.
774 * sysdeps/sh/pthread_spin_unlock.S: New file.
775 * sysdeps/sh/pthreaddef.h: New file.
776 * sysdeps/sh/tcb-offsets.sym: New file.
777 * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
778 * sysdeps/sh/tls.h: New file.
779 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
780 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
781 * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
782 * sysdeps/unix/sysv/linux/sh/fork.c: New file.
783 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
784 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
785 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
786 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
787 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
788 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
789 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
790 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
791 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
792 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
793 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
794 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
795 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
796 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
797 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
798 * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
799 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
800 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
801 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
802 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
803 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
804 * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
805 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
806 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
807 * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
808 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
809
810 2003-02-08 Ulrich Drepper <drepper@redhat.com>
811
812 * tst-cond2.c: Rearrange code to not rely on behavior undefined
813 according to POSIX.
814
815 * tst-basic2.c (do_test): Lock mutex before creating the thread.
816
817 2003-02-07 Ulrich Drepper <drepper@redhat.com>
818
819 * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
820 (TLS_GET_FS): New #define.
821 (TLS_SET_FS): New #define.
822 Correct value of __NR_set_thread_area.
823
824 * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
825
826 2003-02-06 Ulrich Drepper <drepper@redhat.com>
827
828 * Makefile (tests): Add tst-popen1.
829 * tst-popen1.c: New file.
830
831 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
832 but inactive generalization.
833 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
834 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
835 Minor optimization, remove one instruction.
836 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
837
838 2003-02-04 Martin Schwidefsky <schwidefsky@de.ibm.com>
839
840 * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
841
842 2003-01-31 Martin Schwidefsky <schwidefsky@de.ibm.com>
843
844 * init.c (__NR_set_tid_address): Add #ifdef for s390.
845 * sysdeps/pthread/pthread_barrier_wait.c: New file.
846 * sysdeps/pthread/pthread_cond_broadcast.c: New file.
847 * sysdeps/pthread/pthread_cond_signal.c: New file.
848 * sysdeps/pthread/pthread_cond_timedwait.c: New file.
849 * sysdeps/pthread/pthread_cond_wait.c: New file.
850 * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
851 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
852 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
853 * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
854 * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
855 * sysdeps/s390/Makefile: New file.
856 * sysdeps/s390/bits/atomic.h: New file.
857 * sysdeps/s390/pthread_spin_init.c: New file.
858 * sysdeps/s390/pthread_spin_lock.c: New file.
859 * sysdeps/s390/pthread_spin_trylock.c: New file.
860 * sysdeps/s390/pthread_spin_unlock.c: New file.
861 * sysdeps/s390/pthreaddef.h: New file.
862 * sysdeps/s390/tcb-offsets.sym: New file.
863 * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
864 * sysdeps/s390/tls.h: New file.
865 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
866 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
867 * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
868 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
869 * sysdeps/unix/sysv/linux/s390/fork.c: New file.
870 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
871 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
872 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
873 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
874 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
875 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
876 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
877 * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
878 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
879 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
880 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
881 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
882 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
883 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
884 * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
885 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
886 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
887 * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
888
889 2003-02-04 Ulrich Drepper <drepper@redhat.com>
890
891 * atomic.h: Add a couple more default implementations.
892 (atomic_compare_and_exchange_acq): Use
893 __arch_compare_and_exchange_32_acq in return value definition. It
894 always exists.
895 (atomic_bit_set): Renamed from atomic_set_bit.
896 Add missing atomic_ prefixes.
897
898 * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
899 thread library is available, use correct value to mark initialized
900 once variable.
901
902 2003-02-03 Ulrich Drepper <drepper@redhat.com>
903
904 * allocatestack.c (allocate_stack): Use __getpagesize instead of
905 __sysconf to determine pagesize.
906
907 * pthread_create.c: Include <atomic.h>.
908 * allocatestack.c (allocate_stack): Implement coloring of the
909 allocated stack memory. Rename pagesize to pagesize_m1. It's the
910 size minus one. Adjust users.
911 * sysdeps/i386/i686/Makefile: New file.
912
913 2003-02-02 Ulrich Drepper <drepper@redhat.com>
914
915 * allocatestack.c: Improve comment throughout the file.
916
917 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
918 (__lll_lock_wait): Add branch prediction.
919 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
920 (__lll_lock_wait): Likewise.
921 (lll_unlock_wake_cb): Removed.
922
923 2003-01-31 Ulrich Drepper <drepper@redhat.com>
924
925 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
926 _POSIX_THREAD_PRIORITY_SCHEDULING.
927
928 2003-01-30 Jakub Jelinek <jakub@redhat.com>
929
930 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
931 Fix return type of ptr___pthread_getspecific.
932
933 2003-01-29 Ulrich Drepper <drepper@redhat.com>
934
935 * Makefile (tests): Add tst-umask1.
936 (tst-umask1-ARGS): Define.
937 * tst-umask1.c: New file.
938
939 2003-01-28 Ulrich Drepper <drepper@redhat.com>
940
941 * Makefile (libpthread-routines): Remove lowlevelrwlock. Add
942 pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
943 pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
944 pthread_rwlock_unlock.
945 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
946 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
947 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
948 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
949 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
950 New file.
951 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
952 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
953 New file.
954 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
955 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
956 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
957 New file.
958 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
959 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
960 New file.
961 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
962 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
963 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
964 New file.
965 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
966 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
967 New file.
968 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
969
970 * Makefile (libpthread-routines): Remove lowlevelcond and
971 lowlevelsem. Add sem_wait, sem_trywait, sem_timedwait, sem_post,
972 pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
973 and pthread_cond_broadcast.
974 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
975 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
976 * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
977 * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
978 * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
979 * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
980 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
981 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
982 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
983 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
984 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
985 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
986 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
987 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
988 * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
989 * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
990 * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
991 * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
992 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
993 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
994 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
995 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
996 * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
997 * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
998 * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
999 * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
1000 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
1001 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
1002 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
1003 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
1004 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
1005
1006 * sysdeps/unix/sysv/linux/i386/createthread.c: Define
1007 PREPARE_CREATE and TLS_VALUE with x86-specific bits. All the rest
1008 of the code is moved to ...
1009 * sysdeps/pthread/createthread.c: ...here. New file.
1010
1011 2003-01-27 Ulrich Drepper <drepper@redhat.com>
1012
1013 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
1014 (__new_sem_post): Clear %eax before returning.
1015 Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
1016
1017 * Makefile (tests): Add tst-cleanup2.
1018 * tst-cleanup2.c: New file.
1019
1020 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
1021 Interpret first parameter correctly.
1022
1023 2003-01-17 Ulrich Drepper <drepper@redhat.com>
1024
1025 * Makefile (headers): Add bits/semaphore.h.
1026
1027 2003-01-16 Jakub Jelinek <jakub@redhat.com>
1028
1029 * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
1030 if not SHARED.
1031
1032 2003-01-14 Ulrich Drepper <drepper@redhat.com>
1033
1034 * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
1035 must be used and mapping failed.
1036 Reported by Luke Elliott <luke.elliott@activfinancial.com>.
1037
1038 * Makefile (CFLAGS-pthread_self.os): Define this, not
1039 CFLAGS-pthread_self.c.
1040
1041 2003-01-13 Ulrich Drepper <drepper@redhat.com>
1042
1043 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
1044 lll_unlock_wake_cb.
1045
1046 * Makefile (libpthread-routines): Add version. Add rules to build
1047 version.os and banner.h.
1048 * version.c: New file.
1049
1050 2003-01-13 Jakub Jelinek <jakub@redhat.com>
1051
1052 * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
1053 the alias unconditional.
1054 * pthread_mutex_unlock.c (__pthread_mutex_unlock_internal): Likewise.
1055
1056 2003-01-13 Ulrich Drepper <drepper@redhat.com>
1057
1058 * Makefile (CFLAGS-pthread_self.c): New definition.
1059
1060 2003-01-06 Jakub Jelinek <jakub@redhat.com>
1061
1062 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
1063 INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
1064 * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
1065 * init.c (__pthread_initialize_minimal_internal): Likewise.
1066
1067 2003-01-07 Jakub Jelinek <jakub@redhat.com>
1068
1069 * pthreadP.h (__pthread_cond_timedwait): Add prototype.
1070
1071 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
1072 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
1073 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
1074 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
1075 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
1076 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
1077
1078 2003-01-06 Jakub Jelinek <jakub@redhat.com>
1079
1080 * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
1081 * pt-system.c (LIBC_CANCEL_HANDLED): Add.
1082 * tst-cancel-wrappers.sh: Remove all exceptions.
1083
1084 2003-01-05 Ulrich Drepper <drepper@redhat.com>
1085
1086 * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
1087 features. Reported by Marijn Ros <marijn@mad.scientist.com>.
1088
1089 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
1090 Use __libc_pthread_functions array if SHARED.
1091
1092 * pthreadP.h: Move pthread_cond_2_0_t definition to...
1093 * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
1094
1095 * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
1096 (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
1097 __libc_key_create, __libc_getspecific, __libc_setspecific): Use
1098 __libc_ptf_call instead of __libc_maybe_call.
1099 (PTF): New #define.
1100 (__libc_cleanup_region_start): Wrap function name with PTF call.
1101 (__libc_cleanup_region_end): Likewise.
1102 (__libc_cleanup_end): Likewise.
1103
1104 * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
1105 * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
1106 * pthread_key_create.c: Add __pthread_key_create_internal alias.
1107 * pthreadP.h: Add prototypes.
1108
1109 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
1110 __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
1111 __pthread_rwlock_unlock aliases.
1112 * pthreadP.h: Add prototypes for new aliases.
1113
1114 * pthreadP.h (struct pthead_functions): Moved to...
1115 * sysdeps/pthread/pthread-functions.h: ...here. New file.
1116 * init.c (pthread_functions): Add initializers for new elements.
1117
1118 * cleanup_defer.c: Add __pthread_cleanup_push_defer and
1119 __pthread_cleanup_pop_restore aliases.
1120 * pthreadP.h: Add prototypes.
1121
1122 * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
1123 and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
1124 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
1125 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
1126 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
1127 * pthreadP.h: Adjust prototypes and callers.
1128
1129 2003-01-04 Ulrich Drepper <drepper@redhat.com>
1130
1131 * Makefile (tests): Add tst-cancel7.
1132 (tst-cancel7-ARGS): New variable.
1133 * tst-cancel7.c: New file.
1134
1135 * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
1136 around gcc defficiencies.
1137 * old_pthread_cond_signal.c: Likewise.
1138 * old_pthread_cond_timedwait.c: Likewise.
1139 * old_pthread_cond_wait.c: Likewise.
1140
1141 * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
1142
1143 2003-01-03 Ulrich Drepper <drepper@redhat.com>
1144
1145 * Makefile (tests): Add tst-cond7.
1146 * tst-cond7.c: New file.
1147
1148 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
1149 (condvar_cleanup): Get condvar address from the right place.
1150
1151 * atomic.h: Correct definitions of atomic_full_barrier,
1152 atomic_read_barrier, atomic_write_barrier.
1153
1154 * old_pthread_cond_broadcast.c: Make memory allocate and initialization
1155 race-free.
1156 * old_pthread_cond_signal.c: Likewise.
1157 * old_pthread_cond_timedwait.c: Likewise.
1158 * old_pthread_cond_wait.c: Likewise.
1159
1160 2003-01-03 Jakub Jelinek <jakub@redhat.com>
1161
1162 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
1163
1164 2003-01-03 Ulrich Drepper <drepper@redhat.com>
1165
1166 * pthreadP.h (pthread_cond_2_0_t): New type.
1167 (struct pthread_functions): Use new type for 2.0 condvar callbacks.
1168 Use new type for the 2.0 condvar function prototypes.
1169 * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
1170 * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
1171 parameter.
1172 * old_pthread_cond_destroy.c: Likewise.
1173 * old_pthread_cond_broadcast.c: Likewise. Lock appropriately.
1174 * old_pthread_cond_signal.c: Likewise.
1175 * old_pthread_cond_timedwait.c: Likewise.
1176 * old_pthread_cond_wait.c: Likewise.
1177
1178 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
1179 (__pthread_cond_wait): Don't save cancellation mode and seq value
1180 in same location.
1181
1182 * herrno.c (__h_errno_location): Don't define as weak.
1183
1184 2003-01-02 Jakub Jelinek <jakub@redhat.com>
1185
1186 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
1187 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
1188 and pthread_cond_wait.
1189 * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
1190 Renamed to...
1191 (__pthread_cond_broadcast_2_0): ... this.
1192 * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
1193 Renamed to...
1194 (__pthread_cond_destroy_2_0): ... this.
1195 * old_pthread_cond_init.c (__old_pthread_cond_init):
1196 Renamed to...
1197 (__pthread_cond_init_2_0): ... this.
1198 * old_pthread_cond_signal.c (__old_pthread_cond_signal):
1199 Renamed to...
1200 (__pthread_cond_signal_2_0): ... this.
1201 * old_pthread_cond_wait.c (__old_pthread_cond_wait):
1202 Renamed to...
1203 (__pthread_cond_wait_2_0): ... this.
1204 * pthread_cond_destroy.c: Include shlib-compat.h.
1205 (pthread_cond_destroy): Change strong_alias into versioned_symbol.
1206 * pthread_cond_init.c: Include shlib-compat.h.
1207 (pthread_cond_init): Change strong_alias into versioned_symbol.
1208 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
1209 fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
1210 fields.
1211 (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
1212 __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
1213 __pthread_cond_wait_2_0): New prototypes.
1214 (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
1215 __old_pthread_cond_init, __old_pthread_cond_signal,
1216 __old_pthread_cond_wait): Removed.
1217 * init.c: Include shlib-compat.h.
1218 (pthread_functions): Guard ptr___pthread_attr_init_2_0
1219 initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
1220 Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
1221 ptr___pthread_cond_*_2_0 fields.
1222 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
1223 pthread_cond_*@GLIBC_2.0 compatibility symbols.
1224
1225 * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
1226 LIBC_SIGACTION was not yet defined.
1227 [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
1228 [!defined LIBC_SIGACTION] (__sigaction): New function and
1229 libc_hidden_weak.
1230 [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
1231 [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
1232
1233 2003-01-02 Jakub Jelinek <jakub@redhat.com>
1234
1235 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
1236
1237 2003-01-02 Ulrich Drepper <drepper@redhat.com>
1238
1239 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
1240 New, larger type definition.
1241 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
1242 implementation.
1243 * Versions [libpthread]: Add definitions for new pthread_cond_*
1244 interfaces for version GLIBC_2.3.2.
1245 * pthread_cond_init.c: Update initialization for new type definition.
1246 * Makefile (libpthread-routines): Remove pthread_cond_wait,
1247 pthread_cond_timedwait, pthread_cond_signal, and
1248 pthread_cond_broadcast. Add old_pthread_cond_init,
1249 old_pthread_cond_destroy, old_pthread_cond_wait,
1250 old_pthread_cond_timedwait, old_pthread_cond_signal, and
1251 old_pthread_cond_broadcast.
1252 * old_pthread_cond_broadcast.c: New file.
1253 * old_pthread_cond_destroy.c: New file.
1254 * old_pthread_cond_init.c: New file.
1255 * old_pthread_cond_signal.c: New file.
1256 * old_pthread_cond_timedwait.c: New file.
1257 * old_pthread_cond_wait.c: New file.
1258 * pthreadP.h: Add prototypes for the compatibility interfaces.
1259
1260 * pthread_cond_destroy.c: Don't include <errno.h>.
1261
1262 2003-01-01 Ulrich Drepper <drepper@redhat.com>
1263
1264 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
1265 unnecessary zero offset when addressing MUTEX.
1266
1267 2002-12-31 Ulrich Drepper <drepper@redhat.com>
1268
1269 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
1270 __register_atfork.
1271 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
1272 for __register_atfork.
1273
1274 2002-12-31 Jakub Jelinek <jakub@redhat.com>
1275
1276 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
1277 instead of ASSEMBLER test macro.
1278
1279 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
1280 __libc_current_sigrtmax): Add libc_hidden_def.
1281
1282 * sysdeps/pthread/list.h: Remove assert.h include.
1283
1284 2002-12-31 Ulrich Drepper <drepper@redhat.com>
1285
1286 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
1287 __pthread_initialize_minimal_internal not
1288 __pthread_initialize_minimal.
1289
1290 2002-12-30 Ulrich Drepper <drepper@redhat.com>
1291
1292 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
1293 __pthread_initialize_minimal as hidden.
1294
1295 * init.c (__pthread_initialize_minimal_internal): Don't mark as
1296 constructor.
1297
1298 2002-12-31 Jakub Jelinek <jakub@redhat.com>
1299
1300 * Makefile ($(inst_libdir)/libpthread.so): Depend on
1301 $(common-objpfx)format.lds, include that into the output script.
1302 Fix comment.
1303 (extra-B-pthread.so): Change linuxthreads/ into nptl/.
1304
1305 2002-12-28 Andreas Jaeger <aj@suse.de>
1306
1307 * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
1308 nsec resolution changes.
1309 (xstat64_conv): Likewise.
1310 (xstat32_conv): Likewise.
1311 * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
1312 struct kernel_stat.
1313 * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
1314 structs stat and stat64.
1315 * time/time.h (__timespec_defined): Define for __USE_MISC.
1316 * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
1317
1318 2002-12-30 Jakub Jelinek <jakub@redhat.com>
1319
1320 * forward.c (FORWARD2): Renamed from FORWARD3. Remove unused export
1321 argument.
1322 (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
1323 (pthread_exit): Use strong_alias to avoid warnings.
1324 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
1325 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
1326 ptr___pthread_attr_init_2_*.
1327 * init.c (pthread_functions): Adjust.
1328
1329 2002-12-29 Ulrich Drepper <drepper@redhat.com>
1330
1331 * forward.c: Make all functions available by default again. It
1332 caused too much trouble.
1333
1334 * pt-siglongjmp.c: Removed.
1335
1336 2002-12-28 Jakub Jelinek <jakub@redhat.com>
1337
1338 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
1339 (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
1340 * sysdeps/i386/Makefile: New file.
1341 * sysdeps/i386/tcb-offsets.sym: New file.
1342 * sysdeps/pthread/tcb-offsets.h: New file.
1343 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1344 Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
1345
1346 * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
1347 __register_atfork...
1348 (GLIBC_2.3.2): ...here.
1349
1350 2002-12-28 Ulrich Drepper <drepper@redhat.com>
1351
1352 * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
1353 pthread_attr_setstackaddr with __attribute_deprecated__.
1354
1355 2002-12-27 Jakub Jelinek <jakub@redhat.com>
1356
1357 * pt-system.c (system): Remove cancellation handling.
1358 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
1359 cancellation routines.
1360
1361 2002-12-28 Ulrich Drepper <drepper@redhat.com>
1362
1363 * descr.h: Include <dl-sysdep.h>.
1364 (struct pthread): Move header.data.list to the back of the struct.
1365 * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
1366 (MULTIPLE_THREADS_OFFSET): Adjust offset.
1367 (SYSINFO_OFFSEET): Likewise.
1368
1369 2002-12-27 Jakub Jelinek <jakub@redhat.com>
1370
1371 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
1372 Define.
1373 (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
1374 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
1375 DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
1376 (USE_DL_SYSINFO): Undef.
1377
1378 2002-12-22 Jakub Jelinek <jakub@redhat.com>
1379
1380 * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
1381 $(common-objpfx)libc.so.
1382 * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
1383 it is bigger than pipe buffer size even on arches with bigger
1384 page size.
1385 (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
1386
1387 2002-12-25 Ulrich Drepper <drepper@redhat.com>
1388
1389 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
1390 correct errno access for case that USE___THREAD is not defined.
1391
1392 2002-12-24 Ulrich Drepper <drepper@redhat.com>
1393
1394 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
1395 Patch by Marijn Ros <marijn@mad.scientist.com>.
1396
1397 2002-12-22 Roland McGrath <roland@redhat.com>
1398
1399 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
1400
1401 2002-12-20 Ulrich Drepper <drepper@redhat.com>
1402
1403 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
1404
1405 2002-12-19 Ulrich Drepper <drepper@redhat.com>
1406
1407 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
1408 NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
1409 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
1410
1411 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
1412 of int $0x80.
1413 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
1414 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
1415 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
1416 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1417 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
1418 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
1419 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
1420 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
1421
1422 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
1423 sysenter.
1424 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
1425
1426 * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
1427
1428 * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
1429 in new TCB.
1430 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
1431 that sysinfo is properly initialized.
1432 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
1433 to 1 only for ld.so.
1434
1435 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
1436 RTLD_CORRECT_DYNAMIC_WEAK.
1437
1438 2002-12-19 Jakub Jelinek <jakub@redhat.com>
1439
1440 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
1441 Use return 0 as 6th argument to FORWARD4.
1442 * pthread_equal.c: Include pthreadP.h instead of pthread.h.
1443
1444 2002-12-18 Ulrich Drepper <drepper@redhat.com>
1445
1446 * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
1447 * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
1448 Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
1449 (INIT_SYSINFO): New #define.
1450 (TLS_TP_INIT): Use INIT_SYSINFO.
1451 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1452 At test to make sure SYSINFO_OFFSET value is correct.
1453 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
1454
1455 2002-12-18 Jakub Jelinek <jakub@redhat.com>
1456
1457 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
1458 * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
1459 * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
1460 [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
1461 __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
1462 __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
1463 __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
1464
1465 2002-12-18 Ulrich Drepper <drepper@redhat.com>
1466
1467 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
1468 macro instead of using int $0x80 directly.
1469
1470 * sysdeps/pthread/bits/stdio-lock.h: New file.
1471 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
1472 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
1473 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
1474 * Makefile (routines): Add libc-lowlevelmutex.
1475
1476 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
1477 __i686.get_pc_thunk.dx.
1478
1479 2002-12-17 Jakub Jelinek <jakub@redhat.com>
1480
1481 * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
1482 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
1483 ($(objpfx)tst-cancel-wrappers.out): New rule.
1484 * tst-cancel-wrappers.sh: New test.
1485 * tst-locale1.c: Include signal.h.
1486 (uselocale): Test static linking of __libc_current_sigrt*.
1487
1488 2002-12-17 Ulrich Drepper <drepper@redhat.com>
1489
1490 * Makefile (tests): Add tst-cancel6.
1491 * tst-cancel6.c: New file
1492
1493 2002-12-17 Jakub Jelinek <jakub@redhat.com>
1494
1495 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
1496 Define meaningfully for assembler as well.
1497 * pthreadP.h (struct pthread_functions): Remove
1498 ptr_pthread_attr_init field. Add ptr_pthread_attr_init_2_0
1499 and ptr_pthread_attr_init_2_1 fields.
1500 * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
1501 and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
1502 * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
1503 (FORWARD3): Define using FORWARD4.
1504 (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
1505 versions.
1506 * pt-system.c: Remove duplicate stdlib.h include.
1507
1508 2002-12-16 Ulrich Drepper <drepper@redhat.com>
1509
1510 * sem_init.c: Define sem_init@GLIBC_2.0.
1511 * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
1512 * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
1513
1514 * flockfile.c: Moved to...
1515 * sysdeps/pthread/flockfile.c: ...here. New file.
1516 * funlockfile.c: Moved to...
1517 * sysdeps/pthread/funlockfile.c: ...here. New file.
1518 * ftrylockfile.c: Moved to...
1519 * sysdeps/pthread/ftrylockfile.c: ...here. New file.
1520
1521 2002-12-16 Jakub Jelinek <jakub@redhat.com>
1522
1523 * libc-cancellation.c: Guard both function with
1524 #if !defined NOT_IN_libc.
1525 * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
1526 automatically provided pthread wrappers.
1527 * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
1528 CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
1529 nor in libpthread.
1530 * pt-open.c: Removed.
1531 * pt-fcntl.c: Removed.
1532 * pt-fsync.c: Removed.
1533 * pt-lseek.c: Removed.
1534 * pt-msgrcv.c: Removed.
1535 * pt-msgsnd.c: Removed.
1536 * pt-msync.c: Removed.
1537 * pt-nanosleep.c: Removed.
1538 * pt-open64.c: Removed.
1539 * pt-pause.c: Removed.
1540 * pt-pread.c: Removed.
1541 * pt-pread64.c: Removed.
1542 * pt-pwrite.c: Removed.
1543 * pt-pwrite64.c: Removed.
1544 * pt-read.c: Removed.
1545 * pt-recv.c: Removed.
1546 * pt-recvfrom.c: Removed.
1547 * pt-recvmsg.c: Removed.
1548 * pt-send.c: Removed.
1549 * pt-sendto.c: Removed.
1550 * pt-sigtimedwait.c: Removed.
1551 * pt-sigwait.c: Removed.
1552 * pt-wait.c: Removed.
1553 * pt-waitpid.c: Removed.
1554 * pt-write.c: Removed.
1555 * pt-accept.c: Removed.
1556 * pt-close.c: Removed.
1557 * pt-connect.c: Removed.
1558 * pt-lseek64.c: Removed.
1559 * pt-sendmsg.c: Removed.
1560 * pt-tcdrain.c: Removed.
1561
1562 2002-12-15 Ulrich Drepper <drepper@redhat.com>
1563
1564 * init.c (__pthread_initialize_minimal_internal): Renamed from
1565 __pthread_initialize_minimal. Make old name an alias. This
1566 converts a normal relocation into a relative relocation.
1567
1568 * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
1569
1570 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
1571 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
1572 * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
1573 pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
1574 pt-sigwaitinfo, pt-waitid, and pt-writev.
1575 * pt-creat.c: Removed.
1576 * pt-poll.c: Removed.
1577 * pt-pselect.c: Removed.
1578 * pt-readv.c: Removed.
1579 * pt-select.c: Removed.
1580 * pt-sigpause.c: Removed.
1581 * pt-sigsuspend.c: Removed.
1582 * pt-sigwaitinfo.c: Removed.
1583 * pt-waitid.c: Removed.
1584 * pt-writev.c: Removed.
1585
1586 * init.c (pthread_functions): New variable.
1587 (__pthread_initialize_minimal): Pass pointer to pthread_functions
1588 (or NULL) to __libc_pthread_init.
1589 * forward.c: Rewrite to use __libc:pthread_functions array to get
1590 function addresses.
1591 * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
1592 prototype.
1593 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1594 Take new parameter. Copy content of variable pointed to by it
1595 to __libc_pthread_init.
1596
1597 * pthreadP.h (struct pthread_functions): New type.
1598 (__libc_pthread_init): Declare.
1599
1600 * pthread_attr_destroy.c: Add namespace protected alias.
1601 * pthread_attr_getdetachstate.c: Likewise.
1602 * pthread_attr_getinheritsched.c: Likewise.
1603 * pthread_attr_getschedparam.c: Likewise.
1604 * pthread_attr_getschedpolicy.c: Likewise.
1605 * pthread_attr_getscope.c: Likewise.
1606 * pthread_attr_setdetachstate.c: Likewise.
1607 * pthread_attr_setinheritsched.c: Likewise.
1608 * pthread_attr_setschedparam.c: Likewise.
1609 * pthread_attr_setschedpolicy.c: Likewise.
1610 * pthread_attr_setscope.c: Likewise.
1611 * pthread_cond_broadcast.c: Likewise.
1612 * pthread_cond_destroy.c: Likewise.
1613 * pthread_cond_init.c: Likewise.
1614 * pthread_cond_signal.c: Likewise.
1615 * pthread_cond_wait.c: Likewise.
1616 * pthread_condattr_destroy.c: Likewise.
1617 * pthread_condattr_init.c: Likewise.
1618 * pthread_equal.c: Likewise.
1619 * pthread_exit.c: Likewise.
1620 * pthread_getschedparam.c: Likewise.
1621 * pthread_self.c: Likewise.
1622 * pthread_setcancelstate.c: Likewise.
1623 * pthread_setschedparam.c: Likewise.
1624 * pthread_mutex_destroy.c: Likewise.
1625 * pthread_mutex_init.c: Likewise.
1626 * pthreadP.h: Add prototypes for the aliases.
1627
1628 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
1629 multiple_threads member in correct TCB to 1.
1630
1631 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
1632 SINGLE_THREAD_P. If in libc or libpthread examine multiple_thread
1633 member of thread decriptor, otherwise return unconditionally 1.
1634
1635 2002-12-14 Ulrich Drepper <drepper@redhat.com>
1636
1637 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
1638 regular Linux version. Remove file.
1639 * sysdeps/unix/sysv/linux/connect.S: Likewise. Remove file.
1640 * sysdeps/unix/sysv/linux/llseek.c: Likewise. Remove file.
1641 * sysdeps/unix/sysv/linux/msgrcv.c: Likewise. Remove file.
1642 * sysdeps/unix/sysv/linux/msgsnd.c: Likewise. Remove file.
1643 * sysdeps/unix/sysv/linux/open64.c: Likewise. Remove file.
1644 * sysdeps/unix/sysv/linux/poll.c: Likewise. Remove file.
1645 * sysdeps/unix/sysv/linux/pread.c: Likewise. Remove file.
1646 * sysdeps/unix/sysv/linux/pread64.c: Likewise. Remove file.
1647 * sysdeps/unix/sysv/linux/pselect.c: Likewise. Remove file.
1648 * sysdeps/unix/sysv/linux/pwrite.c: Likewise. Remove file.
1649 * sysdeps/unix/sysv/linux/pwrite64.c: Likewise. Remove file.
1650 * sysdeps/unix/sysv/linux/readv.c: Likewise. Remove file.
1651 * sysdeps/unix/sysv/linux/recv.S: Likewise. Remove file.
1652 * sysdeps/unix/sysv/linux/recvfrom.S: Likewise. Remove file.
1653 * sysdeps/unix/sysv/linux/recvmsg.S: Likewise. Remove file.
1654 * sysdeps/unix/sysv/linux/send.S: Likewise. Remove file.
1655 * sysdeps/unix/sysv/linux/sendmsg.S: Likewise. Remove file.
1656 * sysdeps/unix/sysv/linux/sendto.S: Likewise. Remove file.
1657 * sysdeps/unix/sysv/linux/sigpause.c: Likewise. Remove file.
1658 * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise. Remove file.
1659 * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise. Remove file.
1660 * sysdeps/unix/sysv/linux/sigwait.c: Likewise. Remove file.
1661 * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise. Remove file.
1662 * sysdeps/unix/sysv/linux/system.c: Likewise. Remove file.
1663 * sysdeps/unix/sysv/linux/tcdrain.c: Likewise. Remove file.
1664 * sysdeps/unix/sysv/linux/wait.c: Likewise. Remove file.
1665 * sysdeps/unix/sysv/linux/waitid.c: Likewise. Remove file.
1666 * sysdeps/unix/sysv/linux/waitpid.c: Likewise. Remove file.
1667 * sysdeps/unix/sysv/linux/writev.c: Likewise. Remove file.
1668 * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise. Remove file.
1669
1670 2002-12-14 Jakub Jelinek <jakub@redhat.com>
1671
1672 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
1673 * sysdeps/unix/sysv/linux/open.c: Removed.
1674 * sysdeps/unix/sysv/linux/fsync.c: Removed.
1675 * sysdeps/unix/sysv/linux/lseek.c: Removed.
1676 * sysdeps/unix/sysv/linux/msync.c: Removed.
1677 * sysdeps/unix/sysv/linux/read.c: Removed.
1678 * sysdeps/unix/sysv/linux/close.c: Removed.
1679 * sysdeps/unix/sysv/linux/creat.c: Removed.
1680 * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
1681 * sysdeps/unix/sysv/linux/pause.c: Removed.
1682 * sysdeps/unix/sysv/linux/select.c: Removed.
1683 * sysdeps/unix/sysv/linux/write.c: Removed.
1684
1685 2002-12-14 Ulrich Drepper <drepper@redhat.com>
1686
1687 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
1688 element in TCB to see whether locking is needed.
1689
1690 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
1691 MULTIPLE_THREADS_OFFSET value is correct.
1692
1693 * sysdeps/unix/sysv/linux/close.c: New file.
1694 * sysdeps/unix/sysv/linux/connect.S: New file.
1695 * sysdeps/unix/sysv/linux/creat.c: New file.
1696 * sysdeps/unix/sysv/linux/fsync.c: New file.
1697 * sysdeps/unix/sysv/linux/llseek.c: New file.
1698 * sysdeps/unix/sysv/linux/lseek.c: New file.
1699 * sysdeps/unix/sysv/linux/msgrcv.c: New file.
1700 * sysdeps/unix/sysv/linux/msgsnd.c: New file.
1701 * sysdeps/unix/sysv/linux/msync.c: New file.
1702 * sysdeps/unix/sysv/linux/nanosleep.c: New file.
1703 * sysdeps/unix/sysv/linux/open.c: New file.
1704 * sysdeps/unix/sysv/linux/open64.c: New file.
1705 * sysdeps/unix/sysv/linux/pause.c: New file.
1706 * sysdeps/unix/sysv/linux/poll.c: New file.
1707 * sysdeps/unix/sysv/linux/pread.c: New file.
1708 * sysdeps/unix/sysv/linux/pread64.c: New file.
1709 * sysdeps/unix/sysv/linux/pselect.c: New file.
1710 * sysdeps/unix/sysv/linux/pwrite.c: New file.
1711 * sysdeps/unix/sysv/linux/pwrite64.c: New file.
1712 * sysdeps/unix/sysv/linux/readv.c: New file.
1713 * sysdeps/unix/sysv/linux/recv.S: New file.
1714 * sysdeps/unix/sysv/linux/recvfrom.S: New file.
1715 * sysdeps/unix/sysv/linux/recvmsg.S: New file.
1716 * sysdeps/unix/sysv/linux/select.c: New file.
1717 * sysdeps/unix/sysv/linux/send.S: New file.
1718 * sysdeps/unix/sysv/linux/sendmsg.S: New file.
1719 * sysdeps/unix/sysv/linux/sendto.S: New file.
1720 * sysdeps/unix/sysv/linux/sigpause.c: New file.
1721 * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
1722 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
1723 * sysdeps/unix/sysv/linux/sigwait.c: New file.
1724 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
1725 * sysdeps/unix/sysv/linux/system.c: New file.
1726 * sysdeps/unix/sysv/linux/tcdrain.c: New file.
1727 * sysdeps/unix/sysv/linux/wait.c: New file.
1728 * sysdeps/unix/sysv/linux/waitid.c: New file.
1729 * sysdeps/unix/sysv/linux/waitpid.c: New file.
1730 * sysdeps/unix/sysv/linux/writev.c: New file.
1731 * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
1732
1733 * pt-readv.c: Fix comment.
1734
1735 2002-12-14 Jakub Jelinek <jakub@redhat.com>
1736
1737 * tst-cleanup1.c: Include stdlib.h.
1738
1739 * tst-cancel5.c: New test.
1740 * Makefile (tests): Add tst-cancel5.
1741 (tst-cancel5): Link against libc.so libpthread.so in that order.
1742
1743 2002-12-13 Ulrich Drepper <drepper@redhat.com>
1744
1745 * forward.c (test_loaded): Prevent recursive calls.
1746
1747 * Makefile (routines): Add libc-cancellation.
1748 * libc-cancellation.c: New file.
1749 * descr.h (struct pthread): Add multiple_threads field.
1750 * allocatestack.c (allocate_stack): Initialize multiple_header field of
1751 new thread descriptor to 1.
1752 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
1753 Initialize multiple_thread field after successful thread creation.
1754 * cancellation.c (__do_cancel): Move to pthreadP.h.
1755 (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
1756 (__pthread_disable_asynccancel): Add internal_function attribute.
1757 * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
1758 * pthread_setcancelstate.c: Likewise.
1759 * pthread_setcanceltype.c: Likewise.
1760 * pthread_exit.c: Likewise.
1761 * pthreadP.h (CANCELLATION_P): Likewise.
1762 (__do_cancel): Define as static inline.
1763 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
1764 (__libc_enable_asynccancel, __libc_disable_asynccancel): New
1765 declarations.
1766 * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
1767 fields. Define MULTIPLE_THREADS_OFFSET.
1768 * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
1769 declaration.
1770 * sysdeps/unix/sysv/linux/accept.S: New file.
1771 * sysdeps/unix/sysv/linux/read.c: New file.
1772 * sysdeps/unix/sysv/linux/write.c: New file.
1773 * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
1774 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
1775 initialization of __libc_locking_needed.
1776 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
1777 __libc_locking_needed, use multiple_threads field in TCB.
1778 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
1779
1780 2002-12-12 Ulrich Drepper <drepper@redhat.com>
1781
1782 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
1783 version.
1784 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
1785
1786 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
1787 access to __libc_locking_needed for PIC.
1788
1789 2002-12-12 Jakub Jelinek <jakub@redhat.com>
1790
1791 * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
1792 declare for libc.so.
1793 (__libc_lock_init, __libc_lock_init_recursive): Change into comma
1794 expression.
1795 (__libc_lock_lock): Put into statement expression.
1796 (__libc_lock_unlock): Remove trailing semicolon.
1797 * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
1798
1799 2002-12-12 Roland McGrath <roland@redhat.com>
1800
1801 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
1802 "m" constraint to refer to __libc_locking_needed. Declare it here.
1803
1804 2002-12-12 Ulrich Drepper <drepper@redhat.com>
1805
1806 * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
1807 * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
1808 Initialize __libc_locking_needed.
1809 * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
1810 instead of __register_pthread_fork_handler.
1811 * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
1812 * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
1813 fork-gen with libc_pthread_init.
1814 * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
1815 of __register_pthread_fork_handler.
1816 * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
1817 of __register_pthread_fork_handler.
1818 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
1819 __libc_locking_needed to determine whether lock prefix can be avoided.
1820 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
1821
1822 2002-12-11 Ulrich Drepper <drepper@redhat.com>
1823
1824 * Makefile (tests): Add tst-cleanup1.
1825 * tst-cleanup1.c: New file.
1826 * cancellation.c (__cleanup_thread): Removed.
1827 (__do_cancel): Remove call to __cleanup_thread.
1828 * pthreadP.h: Remove __cleanup_thread prorotype.
1829
1830 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
1831 Remember function and argument even if cancellation handler
1832 function is not available.
1833 (__libc_cleanup_region_end): Execute registered function directly if
1834 pthread functions are not available.
1835 (__libc_cleanup_end): Likewise.
1836
1837 * init.c (__pthread_initialize_minimal): Fix initialization in
1838 static lib by preventing gcc from being too clever.
1839
1840 2002-12-10 Ulrich Drepper <drepper@redhat.com>
1841
1842 * init.c (__pthread_initialize_minimal): Remove unneccesary
1843 sigaddset call.
1844
1845 * Makefile (tests): We can run tst-locale2 now.
1846
1847 2002-12-09 Ulrich Drepper <drepper@redhat.com>
1848
1849 * Versions: Remove duplicated sigwait entry.
1850
1851 2002-12-08 Ulrich Drepper <drepper@redhat.com>
1852
1853 * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
1854 inside libpthread.
1855
1856 * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
1857
1858 * pthreadP.h: Declare __pthread_enable_asynccancel and
1859 __pthread_disable_asynccancel.
1860 (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
1861 (CANCEL_RESET): Use __pthread_disable_asynccancel.
1862 * cancellation.c (__pthread_enable_asynccancel): New function.
1863 (__pthread_disable_asynccancel): New function.
1864 * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
1865 * pt-close.c: Likewise.
1866 * pt-connect.c: Likewise.
1867 * pt-creat.c: Likewise.
1868 * pt-fcntl.c: Likewise.
1869 * pt-fsync.c: Likewise.
1870 * pt-lseek.c: Likewise.
1871 * pt-lseek64.c: Likewise.
1872 * pt-msgrcv.c: Likewise.
1873 * pt-msgsnd.c: Likewise.
1874 * pt-msync.c: Likewise.
1875 * pt-nanosleep.c: Likewise.
1876 * pt-open.c: Likewise.
1877 * pt-open64.c: Likewise.
1878 * pt-pause.c: Likewise.
1879 * pt-poll.c: Likewise.
1880 * pt-pread.c: Likewise.
1881 * pt-pread64.c: Likewise.
1882 * pt-pselect.c: Likewise.
1883 * pt-pwrite.c: Likewise.
1884 * pt-pwrite64.c: Likewise.
1885 * pt-read.c: Likewise.
1886 * pt-readv.c: Likewise.
1887 * pt-recv.c: Likewise.
1888 * pt-recvfrom.c: Likewise.
1889 * pt-recvmsg.c: Likewise.
1890 * pt-select.c: Likewise.
1891 * pt-send.c: Likewise.
1892 * pt-sendmsg.c: Likewise.
1893 * pt-sendto.c: Likewise.
1894 * pt-sigpause.c: Likewise.
1895 * pt-sigsuspend.c: Likewise.
1896 * pt-sigtimedwait.c: Likewise.
1897 * pt-sigwait.c: Likewise.
1898 * pt-sigwaitinfo.c: Likewise.
1899 * pt-system.c: Likewise.
1900 * pt-tcdrain.c: Likewise.
1901 * pt-wait.c: Likewise.
1902 * pt-waitid.c: Likewise.
1903 * pt-waitpid.c: Likewise.
1904 * pt-write.c: Likewise.
1905 * pt-writev.c: Likewise.
1906 * pthread_join.c: Likewise.
1907 * pthread_timedjoin.c: Likewise.
1908
1909 * pt-sigpause.c (sigsuspend): Call __sigsuspend.
1910 (__xpg_sigpause): New function.
1911 * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
1912
1913 2002-12-07 Ulrich Drepper <drepper@redhat.com>
1914
1915 * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
1916
1917 * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
1918 _GI_pthread_cleanup_pop to pthreadP.h.
1919
1920 * ftrylockfile.c: Use _IO_lock_trylock instead of
1921 pthread_mutex_trylock.
1922
1923 * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
1924 (CANCEL_RESET): Likewise.
1925 (__pthread_setcanceltype_): Declare.
1926 (__pthread_mutex_lock_internal): Declare.
1927 (__pthread_mutex_unlock_internal): Declare.
1928 (__pthread_once_internal): Declare.
1929 (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
1930 (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
1931
1932 * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
1933 and pthread_mutex_unlock.
1934 * pthread_cond_wait.c: Likewise.
1935 * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
1936 * pthread_mutex_unlock.c: Likewise.
1937
1938 * pthread_setcanceltype.c: Add additional alias
1939 __pthread_setcanceltype.
1940
1941 * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
1942 * sem_open.c (sem_open): Likewise.
1943 Use __libc_open, __libc_write, and __libc_close instead of
1944 open, write, and close respectively.
1945
1946 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
1947 Rewrite as statement expression since it must return a value.
1948
1949 * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
1950 * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
1951 __pthread_kill.
1952
1953 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
1954 alias __pthread_once_internal.
1955
1956 * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
1957
1958 2002-12-06 Ulrich Drepper <drepper@redhat.com>
1959
1960 * Makefile (tests): Add tst-stdio1 and tst-stdio2.
1961 * tst-stdio1.c: New file.
1962 * tst-stdio2.c: New file.
1963
1964 * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
1965
1966 * Makefile (tests): Comment out tst-locale2 for now.
1967 (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
1968
1969 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
1970 -D_IO_MTSAFE_IO.
1971 * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
1972 Use _IO_lock_init instead of explicit assignment.
1973
1974 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
1975 Define __libc_lock_* and __libc_lock_recursive macros with
1976 lowlevellock macros, not pthread mutexes.
1977
1978 * flockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_lock instead
1979 of pthread_mutex_lock.
1980 * funlockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_unlock
1981 instead of pthread_mutex_unlock.
1982
1983 2002-12-06 Roland McGrath <roland@redhat.com>
1984
1985 * allocatestack.c (__stack_user): Use uninitialized defn.
1986 * init.c (__pthread_initialize_minimal): Initialize it here.
1987
1988 2002-12-05 Roland McGrath <roland@redhat.com>
1989
1990 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
1991 string.
1992 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
1993
1994 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
1995 missing & here too.
1996
1997 2002-12-05 Ulrich Drepper <drepper@redhat.com>
1998
1999 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
2000 lowlevellock.
2001 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
2002 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
2003 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
2004 * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
2005 for __libc_lock_* macros.
2006 * Makefile (routines): Add libc-lowlevellock.
2007
2008 2002-10-09 Roland McGrath <roland@redhat.com>
2009
2010 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
2011 Under [__PIC__], call the function via the pointer fetched for
2012 comparison rather than a call by name that uses the PLT.
2013 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
2014 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
2015 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
2016 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
2017 (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
2018
2019 2002-12-04 Roland McGrath <roland@redhat.com>
2020
2021 * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
2022
2023 * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
2024 * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
2025
2026 * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
2027
2028 2002-12-04 Ulrich Drepper <drepper@redhat.com>
2029
2030 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
2031 a completely opaque, non-integer type.
2032 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2033
2034 2002-12-05 Jakub Jelinek <jakub@redhat.com>
2035
2036 * sysdeps/i386/tls.h: Include stdlib.h.
2037 * sysdeps/x86_64/tls.h: Likewise.
2038
2039 2002-12-04 Ulrich Drepper <drepper@redhat.com>
2040
2041 * Makefile (tests): Add tst-locale2.
2042 (tests-static): Likewise.
2043 * tst-locale2.c: New file.
2044
2045 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
2046 volatile and add memory clobbers to lock operations.
2047
2048 2002-12-03 Ulrich Drepper <drepper@redhat.com>
2049
2050 * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
2051 * sysdeps/i386/i486/bits/atomic.h: New file.
2052 * sysdeps/i386/i586/bits/atomic.h: New file.
2053 * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
2054 include i486 version.
2055 * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
2056 * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
2057 Patch by Marijn Ros <marijn@mad.scientist.com>.
2058
2059 * allocatestack.c (get_cached_stack): Don't crash if we first
2060 found a stack with a larger size then needed.
2061 Reported by Hui Huang <hui.huang@sun.com>.
2062
2063 * Makefile (tests): Add tst-sysconf.
2064 * tst-sysconf.c: New file.
2065
2066 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
2067 PTHREAD_THREADS_MAX.
2068
2069 2002-12-02 Roland McGrath <roland@redhat.com>
2070
2071 * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
2072 Declare using hidden_proto instead of attribute_hidden, so there are
2073 non-.hidden static symbols for gdb to find.
2074 (__pthread_keys): Likewise.
2075 * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
2076 * allocatestack.c (__stack_user): Likewise.
2077 * pthread_create.c (__pthread_keys): Likewise.
2078 (__nptl_threads_events, __nptl_last_event): Make these static instead
2079 of hidden.
2080 * pthread_key_create.c (__pthread_pthread_keys_max,
2081 __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
2082
2083 2002-12-02 Ulrich Drepper <drepper@redhat.com>
2084
2085 * Makefile (tests): Add tst-locale1. If buid-static is yes link
2086 statically.
2087 * tst-locale1.c: New file.
2088
2089 * pthread_cond_timedwait.c: Include <stdlib.h>.
2090
2091 * Makefile (tests): Add tst-fork2 and tst-fork3.
2092 * tst-fork2.c: New file.
2093 * tst-fork3.c: New file.
2094
2095 2002-11-28 Ulrich Drepper <drepper@redhat.com>
2096
2097 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
2098
2099 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
2100 require it to 200112L.
2101
2102 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
2103 instruction only if HAVE_CMOV is defined.
2104 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
2105
2106 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
2107
2108 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
2109
2110 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
2111
2112 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
2113
2114 2002-11-27 Ulrich Drepper <drepper@redhat.com>
2115
2116 * sysdeps/x86_64/bits/atomic.h: New file.
2117
2118 * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
2119 16-bit operations.
2120
2121 * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
2122 possible since gettid cannot fail.
2123
2124 * sysdeps/x86_64/pthreaddef.h: New file.
2125
2126 * sysdeps/i386/pthreaddef.h (gettid): Removed.
2127
2128 * sysdeps/x86_64/pthread_spin_init.c: New file.
2129 * sysdeps/x86_64/pthread_spin_lock.c: New file.
2130 * sysdeps/x86_64/pthread_spin_trylock.c: New file.
2131 * sysdeps/x86_64/pthread_spin_unlock.c: New file.
2132
2133 * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
2134 Add missing lock prefix. Minute optimization.
2135
2136 * tst-spin2.c (main): Also check successful trylock call.
2137
2138 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
2139 syscall. Fix typo in case INTERNAL_SYSCALL is not used.
2140
2141 * sysdeps/i386/pthread_spin_destroy.c: Moved to...
2142 * sysdeps/pthread/pthread_spin_destroy.c: ...here. New file.
2143
2144 * sysdeps/i386/pthread_sigmask.c: Removed. Use the generic code.
2145 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
2146 value in case of an error. Add support for INTERNAL_SYSCALL.
2147
2148 * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
2149 value in case of an error.
2150
2151 * sysdeps/x86_64/tls.h: New file.
2152
2153 2002-11-26 Ulrich Drepper <drepper@redhat.com>
2154
2155 * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface. It now
2156 takes the array member name and the index as parameters.
2157 (THREAD_SETMEM_NC): Likewise.
2158 * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
2159 * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
2160 interfaces.
2161
2162 * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
2163 to decide which code to use.
2164 (THREAD_SETMEM_NC): Likewise.
2165
2166 * allocatestack.c (queue_stack): Don't remove stack from list here.
2167 Do it in the caller. Correct condition to prematurely terminate
2168 loop to free stacks.
2169 (__deallocate_stack): Remove stack from list here.
2170
2171 2002-11-26 Ulrich Drepper <drepper@redhat.com>
2172
2173 * Makefile (tests): Add tst-stack1.
2174 * tst-stack1.c: New file.
2175
2176 * allocatestack.c (allocate_stack): Initialize the TCB on a user
2177 provided stack.
2178
2179 * pthread_attr_getstack.c: Return bottom of the thread area.
2180
2181 2002-11-25 Ulrich Drepper <drepper@redhat.com>
2182
2183 * Makefile (libpthread-routines): Add pt-allocrtsig and
2184 pthread_kill_other_threads.
2185 * pt-allocrtsig.c: New file.
2186 * pthread_kill_other_threads.c: New file.
2187 * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
2188 all three functions.
2189 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
2190 allocrtsig.
2191 * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
2192 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
2193 and __libc_allocate_rtsig_private.
2194 * Versions (libpthread): Export pthread_kill_other_threads_np,
2195 __libc_current_sigrtmin, and __libc_current_sigrtmax.
2196
2197 2002-11-24 Ulrich Drepper <drepper@redhat.com>
2198
2199 * allocatestack.c (allocate_stack): stackaddr in attribute points to
2200 the end of the stack. Adjust computations.
2201 When mprotect call fails dequeue stack and free it.
2202 * pthread_attr_setstack.c: Store top of the stack in stackaddr
2203 attribute.
2204 * pthread_getattr_np.c: Likewise.
2205
2206 * descr.h (IS_DETACHED): Add some more parenthesis to prevent
2207 surprises.
2208
2209 2002-11-23 Ulrich Drepper <drepper@redhat.com>
2210
2211 * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
2212 attribute definitions. Patch by Luca Barbieri <ldb@ldb.ods.org>.
2213
2214 2002-11-22 Ulrich Drepper <drepper@redhat.com>
2215
2216 * pthread_getspecific.c: Optimize access to first 2nd-level array.
2217 * pthread_setspecific.c: Likewise.
2218
2219 2002-11-21 Ulrich Drepper <drepper@redhat.com>
2220
2221 * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
2222 definitions. Get them from the official place.
2223 * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
2224
2225 * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
2226 Use new CLONE_ flags in clone() calls.
2227
2228 * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
2229 * sysdeps/unix/sysv/linux/i386/fork.c: New file.
2230
2231 * Versions: Add pthread_* functions for libc.
2232 * forward.c: New file.
2233
2234 * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
2235 errno-loc.
2236 * herrno.c: New file.
2237 * res.c: New file.
2238
2239 * Makefile (libpthread-routines): Remove sem_post, sem_wait,
2240 sem_trywait, and sem_timedwait. Add herrno and res.
2241 * sem_init.c: Don't initialize lock and waiters members.
2242 * sem_open.c: Likewise.
2243 * sem_post.c: Removed.
2244 * sem_wait.c: Removed.
2245 * sem_trywait.c: Removed.
2246 * sem_timedwait.c: Removed.
2247 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
2248 Includes full implementations of sem_post, sem_wait, sem_trywait,
2249 and sem_timedwait.
2250 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
2251 for new implementation.
2252 * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
2253 and waiters fields.
2254
2255 * tst-sem3.c: Improve error message.
2256 * tst-signal3.c: Likewise.
2257
2258 * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
2259 to tell the kernel about the termination futex and to initialize tid
2260 member. Don't initialize main_thread.
2261 * descr.h (struct pthread): Remove main_thread member.
2262 * cancelllation.c (__do_cancel): Remove code handling main thread.
2263 The main thread is not special anymore.
2264
2265 * allocatestack.c (__reclaim_stacks): Mark stacks as unused. Add
2266 size of the stacks to stack_cache_actsize.
2267
2268 * pt-readv.c: Add missing "defined".
2269 * pt-sigwait.c: Likewise.
2270 * pt-writev.c: Likewise.
2271
2272 2002-11-09 Ulrich Drepper <drepper@redhat.com>
2273
2274 * Versions: Export __connect from libpthread.
2275 Patch by Luca Barbieri <ldb@ldb.ods.org>.
2276
2277 * Makefile (libpthread-routines): Add pt-raise.
2278 * sysdeps/unix/sysv/linux/raise.c: New file.
2279 * sysdeps/unix/sysv/linux/pt-raise.c: New file.
2280 * sysdeps/generic/pt-raise.c: New file.
2281
2282 * pthread_cond_init.c: Initialize all data elements of the condvar
2283 structure. Patch by Luca Barbieri <ldb@ldb.ods.org>.
2284
2285 * pthread_attr_init.c: Actually implement 2.0 compatibility version.
2286 * pthread_create.c: Likewise.
2287
2288 * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
2289 * tst-key1.c: New file.
2290 * tst-key2.c: New file.
2291 * tst-key3.c: New file.
2292
2293 * Versions: Export pthread_detach for version GLIBC_2.0.
2294 Reported by Saurabh Desai <sdesai@austin.ibm.com>.
2295
2296 2002-11-08 Ulrich Drepper <drepper@redhat.com>
2297
2298 * pthread_key_create.c: Terminate search after an unused key was found.
2299 Patch by Luca Barbieri <ldb@ldb.ods.org>.
2300
2301 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
2302 Patch by Luca Barbieri <ldb@ldb.ods.org>.
2303
2304 2002-10-10 Ulrich Drepper <drepper@redhat.com>
2305
2306 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
2307 dynamic lookup for errno in PIC.
2308
2309 * allocatestack.c (get_cached_stack): Rearrange code slightly to
2310 release the stack lock as soon as possible.
2311 Call _dl_allocate_tls_init for TCB from the cache to re-initialize
2312 the static TLS block.
2313 (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
2314
2315 * cancellation.c: Renamed from cancelation.c.
2316 * Makefile: Adjust accordingly.
2317 * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
2318 * cleanup_defer.c: Use CANCELLATION_P.
2319 * pthread_testcancel.c: Likewise.
2320 * descr.h: Fix spelling in comments.
2321 * init.c: Likewise.
2322 * pthread_getattr_np.c: Likewise.
2323 * pthread_getschedparam.c: Likewise.
2324 * pthread_setschedparam.c: Likewise.
2325 * Versions: Likewise.
2326
2327 * pt-pselect.c: New file.
2328 * Makefile (libpthread-routines): Add pt-pselect.
2329 * Versions: Add pselect.
2330
2331 * tst-cancel4.c: New file.
2332 * Makefile (tests): Add tst-cancel4.
2333
2334 2002-10-09 Ulrich Drepper <drepper@redhat.com>
2335
2336 * pthread_mutex_lock.c: Always record lock ownership.
2337 * pthread_mutex_timedlock.c: Likewise.
2338 * pthread_mutex_trylock.c: Likewise.
2339
2340 * pt-readv.c: New file.
2341 * pt-writev.c: New file.
2342 * pt-creat.c: New file.
2343 * pt-msgrcv.c: New file.
2344 * pt-msgsnd.c: New file.
2345 * pt-poll.c: New file.
2346 * pt-select.c: New file.
2347 * pt-sigpause.c: New file.
2348 * pt-sigsuspend.c: New file.
2349 * pt-sigwait.c: New file.
2350 * pt-sigwaitinfo.c: New file.
2351 * pt-waitid.c: New file.
2352 * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
2353 pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
2354 pt-sigwait, pt-sigwaitinfo, and pt-waitid.
2355 * Versions: Add all the new functions.
2356
2357 * tst-exit1.c: New file.
2358 * Makefile (tests): Add tst-exit1.
2359
2360 * sem_timedwait.c: Minor optimization for more optimal fastpath.
2361
2362 2002-10-08 Ulrich Drepper <drepper@redhat.com>
2363
2364 * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
2365
2366 * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
2367 call. pthread_join is an official cancellation point.
2368 * pthread_timedjoin.c: Likewise.
2369
2370 * pthread_cond_wait.c: Revert order in which internal lock are dropped
2371 and the condvar's mutex are retrieved.
2372 * pthread_cond_timedwait.c: Likewise.
2373 Reported by dice@saros.East.Sun.COM.
2374
2375 2002-10-07 Ulrich Drepper <drepper@redhat.com>
2376
2377 * pthreadP.h: Cut out all type definitions and move them...
2378 * sysdeps/unix/sysv/linux/internaltypes.h: ...here. New file.
2379 * pthreadP.h: Include <internaltypes.h>.
2380
2381 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
2382 performance tweaks.
2383
2384 * sem_trywait.c: Shuffle #includes around to get right order.
2385 * sem_timedwait.c: Likewise.
2386 * sem_post.c: Likewise.
2387 * sem_wait.c: Likewise.
2388
2389 * nptl 0.3 released.
2390
2391 * Makefile (tests): Add tst-signal3.
2392 * tst-signal3.c: New file.
2393
2394 2002-10-05 Ulrich Drepper <drepper@redhat.com>
2395
2396 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
2397 the asms modify the sem object.
2398 (__lll_sem_timedwait): Now takes struct sem* as first parameter.
2399
2400 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
2401 the actual members.
2402 * pthreadP.h (struct sem): New type. Actual semaphore type.
2403 * semaphoreP.h: Include pthreadP.h.
2404 * sem_getvalue.c: Adjust to sem_t change.
2405 * sem_init.c: Likewise.
2406 * sem_open.c: Likewise.
2407 * sem_post.c: Likewise.
2408 * sem_timedwait.c: Likewise.
2409 * sem_trywait.c: Likewise.
2410 * sem_wait.c: Likewise.
2411
2412 2002-10-04 Ulrich Drepper <drepper@redhat.com>
2413
2414 * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
2415 * tst-basic2.c: New file.
2416 * tst-exec1.c: New file.
2417 * tst-exec2.c: New file.
2418 * tst-exec3.c: New file.
2419
2420 * tst-fork1.c: Remove extra */.
2421
2422 * nptl 0.2 released. The API for IA-32 is complete.
This page took 0.312282 seconds and 5 git commands to generate.