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