]> git.ipfire.org Git - thirdparty/glibc.git/blame - nptl/ChangeLog
2004-11-17 Roland McGrath <roland@redhat.com>
[thirdparty/glibc.git] / nptl / ChangeLog
CommitLineData
ccd8de9a
UD
12004-11-10 Jakub Jelinek <jakub@redhat.com>
2
3 * sysdeps/pthread/setxid.h: New file.
4 * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
5 (struct xid_command): Add forward decl.
6 (struct pthread_functions): Change return type of __nptl_setxid hook
7 to int.
8 * pthreadP.h (__nptl_setxid): Change return type to int.
9 * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
10 calling thread, return its return value and set errno on failure.
11 * descr.h (struct xid_command): Change id type to long array.
12
13 * Makefile: Add rules to build and test tst-setuid1 and
14 tst-setuid1-static.
15 * tst-setuid1.c: New test.
16 * tst-setuid1-static.c: New test.
17
ed2ced8a
UD
182004-11-10 Jakub Jelinek <jakub@redhat.com>
19
20 * Makefile (tests): Add tst-exit3.
21 * tst-exit3.c: New test.
22
948603ee
UD
232004-11-09 Ulrich Drepper <drepper@redhat.com>
24
25 * Makefile (tests): Add tst-exit2.
26 * tst-exit2.c: New file.
27
ba5ffd2a
RM
282004-11-09 Roland McGrath <roland@redhat.com>
29
30 [BZ #530]
31 * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
32 here, before calling clone.
33 * pthread_create.c (start_thread): Don't do it here.
34
352004-11-04 Roland McGrath <roland@redhat.com>
36
37 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
38
c4d7bd39
RM
392004-11-02 Jakub Jelinek <jakub@redhat.com>
40
41 * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
42
543fb0c8
UD
432004-10-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
44
45 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
46 Set ETIMEDOUT to errno when time is up. Tweak to avoid
47 assembler warning.
48
a1fbd858
UD
492004-10-28 Jakub Jelinek <jakub@redhat.com>
50
51 * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
52 if sched_priority is not between minprio and maxprio.
53
c2a4357a
UD
542004-10-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
55
56 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
57 (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
58
59 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
60 (__lll_mutex_timedlock_wait): Fix a bad branch condition.
61
78d8d211
UD
622004-10-24 Ulrich Drepper <drepper@redhat.com>
63
64 * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
65 not-cancelable I/O functions.
66
dd28590f
UD
672004-10-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
68
69 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
70 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
71 make sure 2 is stored in the futex and we looked at the old value.
72 Fix a few other problems to return the correct value.
73
f8c97af7
RH
742004-10-14 Richard Henderson <rth@redhat.com>
75
76 * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
77 make gcc4 happy.
78
3feb8efa
UD
792004-10-06 Jakub Jelinek <jakub@redhat.com>
80
81 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
82 of pthread-functions.h and pthreaddef.h.
83 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
84
85 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
86 Change __data.__nwaiters from int to unsigned int.
87
88 * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
89 sysconf (_SC_THREAD_CPUTIME) returns negative value.
90
91 * allocatestack.c (__find_thread_by_id): Move attribute_hidden
92 before return type.
93
94 * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
95 (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
96
67060ef5
UD
972004-10-06 Ulrich Drepper <drepper@redhat.com>
98
99 * tst-cancel4.c (tf_msgrcv): Check for failure in msgget. If the
100 test fails, remove message queue.
101 (tf_msgsnd): Likewise.
102
f38a3086
UD
1032004-10-05 Jakub Jelinek <jakub@redhat.com>
104
105 * tst-clock1.c: Change #ifdef to #if defined.
106 * tst-clock2.c: Likewise.
107 * tst-cond11.c: Likewise.
108
2c03b6db
UD
109 * sysdeps/pthread/timer_create.c (timer_create): Use
110 defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
111 defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
112 THREAD_CPUTIME.
113
6ab5f50d
UD
1142004-10-05 Jakub Jelinek <jakub@redhat.com>
115
116 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
117 _POSIX_THREAD_CPUTIME): Define to 0.
118
e4bb4853
UD
1192004-10-04 Ulrich Drepper <drepper@redhat.com>
120
121 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
122 and _POSIX_THREAD_CPUTIME to zero.
123 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
124 * tst-barrier2.c: Fix testing for POSIX feature.
125 * tst-clock1.c: Likewise.
126 * tst-clock2.c: Likewise.
127 * tst-cond11.c: Likewise.
128 * tst-cond4.c: Likewise.
129 * tst-cond6.c: Likewise.
130 * tst-flock2.c: Likewise.
131 * tst-mutex4.c: Likewise.
132 * tst-mutex9.c: Likewise.
133 * tst-rwlock12.c: Likewise.
134 * tst-rwlock4.c: Likewise.
135 * tst-signal1.c: Likewise.
136 * tst-spin2.c: Likewise.
137 * sysdeps/pthread/posix-timer.h: Likewise.
138 * sysdeps/pthread/timer_create.c: Likewise.
139 * sysdeps/pthread/timer_routines.c: Likewise.
140
c1b48791
UD
1412004-10-01 Ulrich Drepper <drepper@redhat.com>
142
927f0673
UD
143 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
144 (__lll_mutex_timedlock_wait): Address futex correctly.
145
c1b48791 146 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
b610fa2d 147 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
c1b48791
UD
148 make sure 2 is stored in the futex and we looked at the old value.
149 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
150 (__lll_mutex_timedlock_wait): Likewise. Fix a few other problems
151 which might very well made the code not working at all before.
7b87aca6 152 [BZ #417]
c1b48791 153
e9f4e844
UD
1542004-09-28 Ulrich Drepper <drepper@redhat.com>
155
4f21c95d
UD
156 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
157 allow SIGSETXID to be sent.
158 * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
159 for SIGSETXID to be defined.
160 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
161 SIGSETXID cannot be blocked.
162
e9f4e844
UD
163 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
164 Add __extension__ to long long types.
165 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
166 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
167 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
168 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
169 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
170 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
171 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
172
5f66b766
UD
1732004-09-25 Ulrich Drepper <drepper@redhat.com>
174
175 * descr.h (struct pthread): Add stopped_start field.
176 * sysdeps/pthread/createthread.c (create_thread): Set
177 start_stopped flag in descriptor for new thread appropriately.
178 * pthread_create.c (start_thread): Only take lock to be stopped on
179 startup if stopped_start flag says so.
180
362038b0
UD
1812004-09-24 Ulrich Drepper <drepper@redhat.com>
182
3f80a99b
UD
183 * pthread_create.c (__pthread_create_2_1): Remember whether thread
184 is created detached and if yes, do not try to free the stack in case
185 the thread creation failed.
186 * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
187 call fails. Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
188 case there has been no error. [BZ #405]
189
362038b0
UD
190 * pthread_create.c (start_thread): Don't wait for scheduler data
191 etc to be set at the beginning of the function. The cancellation
192 infrastructure must have been set up. And enable async
193 cancellation before potentially going to sleep. [BZ #401]
194
65f0beb9
UD
1952004-09-20 Ulrich Drepper <drepper@redhat.com>
196
3c12b91a 197 * Versions: Remove exports for pthread_set*id_np functions.
65f0beb9
UD
198 * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
199 for now.
200 * Makefile: Don't build pthread_set*id code for now.
201
2edb61e3
UD
2022004-09-19 Ulrich Drepper <drepper@redhat.com>
203
204 * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
205 internal use.
206 * allocatestack.c (__nptl_setxid): New function.
207 * descr.h (struct xid_command): Define type.
208 * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
209 (sighandler_setxid): New function.
210 (__pthread_initialize_minimal): Register sighandler_setxid for
211 SIGCANCEL.
212 * pt-allocrtsig.c: Update comment.
213 * pthreadP.h: Define SIGSETXID. Declare __xidcmd variable.
214 Declare __nptl_setxid.
215 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
216 * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
217 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
218 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
219 and pthread_setresuid_np.
220 * pthread_setgid_np.c: New file.
221 * pthread_setuid_np.c: New file.
222 * pthread_setegid_np.c: New file.
223 * pthread_seteuid_np.c: New file.
224 * pthread_setregid_np.c: New file.
225 * pthread_setreuid_np.c: New file.
226 * pthread_setresgid_np.c: New file.
227 * pthread_setresuid_np.c: New file.
228 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
229 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
230 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
231 and pthread_setresuid_np.
232 * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
233 pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
234 pthread_setregid, and pthread_setresgid.
235
1ab1fa6f
UD
2362004-09-18 Ulrich Drepper <drepper@redhat.com>
237
238 * allocatestack.c (allocate_stack): Return EAGAIN instead of
239 ENOMEM when out of memory.
240
ae9e6b36
RM
2412004-09-10 Roland McGrath <roland@redhat.com>
242
243 [BZ #379]
244 * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
245 code, since we don't try to use the broken CLONE_STOPPED any more.
246 * pthread_create.c (start_thread): Likewise.
247
424bd2f8
RH
2482004-09-15 Richard Henderson <rth@redhat.com>
249
250 * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
251
17b8a52d
UD
2522004-09-01 David Mosberger <davidm@hpl.hp.com>
253
254 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
255 (__libc_unwind_longjmp): Delete macro and declare as function.
256 * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
257 __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
258 nptl directory.
259 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
260 * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
261 * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
262
ccc63b07
UD
2632004-09-12 Ulrich Drepper <drepper@redhat.com>
264
265 * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
266 for __USE_XOPEN2K.
267 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
268 types also for __USE_XOPEN2K.
269 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
270 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
271 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
272 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
273 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
274 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
275 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
276 [BZ #320]
277
31f93b3b
UD
2782004-09-08 Ulrich Drepper <drepper@redhat.com>
279
280 * sysdeps/pthread/pthread.h
281 (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
282 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
283 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
284 (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
285 [BZ #375]
286
e0329987
UD
2872004-09-07 Ulrich Drepper <drepper@redhat.com>
288
590b40f7
UD
289 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
290 PSEUDO to be used with . prefix.
291
67254a97
UD
292 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
293 Use atomic_increment instead of atomic_exchange_and_add.
294 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
295 Likewise.
296 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
297 Likewise.
298 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
299 Likewise.
300
301 * allocatestack.c (allocate_stack): Use atomic_increment_val
302 instead of atomic_exchange_and_add.
303 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
304 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
305 Likewise.
306 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
307 Likewise.
308
e0329987
UD
309 * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
310 the initialization function might throw.
311
42d86dd6 3122005-09-05 Richard Henderson <rth@redhat.com>
e0329987 313
42d86dd6
RH
314 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
315 Move definition inside libpthread, libc, librt check. Provide
316 definition for rtld.
317
73f7c32c
UD
3182004-09-02 Ulrich Drepper <drepper@redhat.com>
319
f76c8499
UD
320 * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
321 * sysdeps/i386/jmpbuf-unwind.h: Likewise
322 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
323 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
324 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
325 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
326 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
327 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
328 * unwind.c: Use it.
329
73f7c32c
UD
330 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
331 Rename __data.__clock to __data.__nwaiters, make it unsigned int.
332 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
333 Likewise.
334 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
335 Decrement __nwaiters. If pthread_cond_destroy has been called and
336 this is the last waiter, signal pthread_cond_destroy caller and
337 avoid using the pthread_cond_t structure after unlock.
338 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
339 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
340 Read clock type from the least significant bits of __nwaiters instead
341 of __clock.
342 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
343 * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
344
3452004-08-31 Jakub Jelinek <jakub@redhat.com>
346
347 [BZ #342]
348 * Makefile (tests): Add tst-cond20 and tst-cond21.
349 * tst-cond20.c: New test.
350 * tst-cond21.c: New test.
351 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
352 (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
353 it unsigned int.
354 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
355 Likewise.
356 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
357 (pthread_cond_t): Likewise.
358 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
359 Likewise.
360 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
361 Likewise.
362 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
363 Likewise.
364 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
365 (cond_nwaiters): New.
366 (clock_bits): New.
367 * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
368 if there are waiters not signalled yet.
369 Wait until all already signalled waiters wake up.
370 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
371 __nwaiters. If pthread_cond_destroy has been called and this is the
372 last waiter, signal pthread_cond_destroy caller and avoid using
373 the pthread_cond_t structure after unlock.
374 (__pthread_cond_wait): Increment __nwaiters in the beginning,
375 decrement it when leaving. If pthread_cond_destroy has been called
376 and this is the last waiter, signal pthread_cond_destroy caller.
377 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
378 Likewise. Read clock type from the least significant bits of
379 __nwaiters instead of __clock.
380 * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
381 whether clock ID can be encoded in COND_CLOCK_BITS bits.
382 * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
383 clock type just from the last COND_CLOCK_BITS bits of value.
384 * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
385 instead of __clock, just from second bit of condattr's value.
386
409f7493
UD
3872004-08-30 Jakub Jelinek <jakub@redhat.com>
388
389 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
390 bits/wordsize.h. Make the header match i386 header when __WORDSIZE
391 != 64.
392 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
393
92c6ccd1
RM
3942004-08-15 Roland McGrath <roland@frob.com>
395
396 * pthread_atfork.c: Update copyright terms including special exception
397 for these trivial files, which are statically linked into executables
398 that use dynamic linking for the significant library code.
399
4d004cfb
UD
4002004-08-09 Jakub Jelinek <jakub@redhat.com>
401
402 * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
403 pthread_rwlock_rdlock.
404 * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
405 Decrease __nr_readers_queued after reacquiring lock.
406 * sysdeps/pthread/pthread_rwlock_timedrdlock
407 (pthread_rwlock_timedrdlock): Likewise.
408 Reported by Bob Cook <bobcook47@hotmail.com>.
409
90595fb6
RM
4102004-08-11 Jakub Jelinek <jakub@redhat.com>
411
412 * tst-rwlock14.c (tf): Read main thread handle from *ARG
413 before pthread_barrier_wait.
414
fa46f7ab
UD
4152004-08-07 Ulrich Drepper <drepper@redhat.com>
416
417 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
418 Remove unnecessary exception handling data.
419
15ef4b55
UD
4202004-07-23 Jakub Jelinek <jakub@redhat.com>
421
422 [BZ #284]
423 * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
424 instead of clockid_t.
425
4fb907b7
RM
4262004-07-21 Roland McGrath <roland@redhat.com>
427
428 * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
429
4302004-07-19 Roland McGrath <roland@redhat.com>
431
432 * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
433
8f73811b
RM
4342004-07-02 Roland McGrath <roland@redhat.com>
435
436 * configure: Don't exit.
437
290639c3
UD
4382004-07-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
439
440 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
441 (__pthread_cond_timedwait): Check for invalid nanosecond in
442 timeout value.
443
8e5aaad9
UD
4442004-07-07 Ulrich Drepper <drepper@redhat.com>
445
446 * Makefile: Add rules to build and run tst-fini1.
447 * tst-fini1.c: New file.
448 * tst-fini1mod.c: New file.
449
ce6e047f
UD
4502004-07-05 Ulrich Drepper <drepper@redhat.com>
451
452 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
453 if no cancellation support is needed.
454 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
455 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
456 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
457 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
458 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
459 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
460 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
461 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
462 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
463
464 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
465 only if not already defined.
466
9b9ef823
UD
4672004-07-05 Jakub Jelinek <jakub@redhat.com>
468
2dd18ce2
UD
469 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
470 constraint "m" instead of "0" for futex.
471
9b9ef823
UD
472 * shlib-versions: Add powerpc64-.*-linux.*.
473
38205402
UD
4742004-07-04 Jakub Jelinek <jakub@redhat.com>
475
476 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
477 (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
478 for valid tv_nsec.
479 * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
480 1 billion and 64-bit tv_nsec which is valid when truncated to 32
481 bits.
482
78a9c837
RM
4832004-06-29 Roland McGrath <roland@redhat.com>
484
485 * Banner: NPTL no longer has its own version number.
486 * Makefile (nptl-version): Variable removed.
487 * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
488 using $(version), the glibc version number.
489
d3d35527
UD
4902004-06-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
491
492 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
493 Fix branch offset for a PLT entry.
494 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
495 Likewise.
496 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
497 Likewise.
498 * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
499 Likewise.
500 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
501 Likewise.
502
346f18ae
UD
5032004-06-28 Jakub Jelinek <jakub@redhat.com>
504
505 * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
506 unconditionally.
507
f3a19754
UD
5082004-06-28 Jakub Jelinek <jakub@redhat.com>
509
510 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
511 (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
512 instead of tv_sec.
513 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
514 (pthread_rwlock_timedrdlock): Likewise.
515
539842a4
UD
5162004-06-22 Jakub Jelinek <jakub@redhat.com>
517
518 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
519 Set __r7 to val, not mutex.
520
46f4c578
UD
5212004-06-27 Ulrich Drepper <drepper@redhat.com>
522
523 * Makefile: Add rules to build tst-rwlock14.
524 * tst-rwlock14.c: New file.
525
5262004-06-24 Boris Hu <boris.hu@intel.com>
527
528 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
529 check.
530 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
531
9898e99c
AJ
5322004-06-19 Andreas Jaeger <aj@suse.de>
533
534 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
535 assembler in last patch.
536
7c3164bc
UD
5372004-06-17 Ulrich Drepper <drepper@redhat.com>
538
539 * sysdeps/pthread/pthread_cond_timedwait.c
540 (__pthread_cond_timedwait): Also check for negativ nanoseconds.
541 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
542 (__pthread_cond_timedwait): Check for invalid nanosecond in
543 timeout value.
544 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
545 * tst-cond19.c: New file.
546 * Makefile: Add rules to build and run tst-cond19.
547
72e61500
UD
5482004-06-15 Steven Munroe <sjmunroe@us.ibm.com>
549
550 * tst-context1.c (GUARD_PATTERN): Defined.
551 (tst_context_t): Define struct containing ucontext_t & guard words.
552 (ctx): Declare as an array of tst_context_t.
553 (fct): Verify uc_link & guard words are still valid.
554 (tf): Initialize guard words in ctx. Adjust ctx refs for new struct.
555
7c370086
UD
5562004-06-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
557
558 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
559 Add __data.__futex field, reshuffle __data.__clock.
560 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
561 (__pthread_cond_signal): Increment __futex at the same time as
562 __wakeup_seq or __total_seq. Pass address of __futex instead of
563 address of low 32-bits of __wakeup_seq to futex syscall.
564 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
565 (__pthread_cond_wait): Likewise. Pass __futex value from before
566 releasing internal lock to FUTEX_WAIT.
567 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
568 (__pthread_cond_timedwait): Likewise.
569 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
570 (FUTEX_CMP_REQUEUE): Define.
571 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
572 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
573 Pass __futex value from before the unlock and __futex address instead
574 of address of low 32-bits of __wakeup_seq to futex syscall.
575 Fallback to FUTEX_WAKE all on any errors.
576
a9e526e7
RM
5772004-06-08 Jakub Jelinek <jakub@redhat.com>
578
579 * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
580 comment typo.
581 * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
582 * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
583 * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
584 * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
585 Likewise. Reported by Bob Cook <bobcook47@hotmail.com>.
586
f1847a84
RM
5872004-06-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
588
589 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
590 Add memory clobber to inline assembly.
591 (__lll_mutex_trylock): Likewise.
592 (__lll_mutex_cond_trylock): Likewise.
593
f7c81e1a
UD
5942004-06-07 Martin Schwidefsky <schwidefsky@de.ibm.com>
595
596 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
597 Pass val argument as 6th system call argument in %r7.
598
75fccede
UD
5992004-05-21 Jakub Jelinek <jakub@redhat.com>
600
601 * Makefile (tests): Add tst-cond16.
602 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
603 * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
604 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
605 Add __data.__futex field, reshuffle __data.__clock.
606 * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
607 (__pthread_cond_signal): Increment __futex at the same time as
608 __wakeup_seq or __total_seq. Pass address of __futex instead of
609 address of low 32-bits of __wakeup_seq to futex syscall.
610 * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
611 (__pthread_cond_wait): Likewise. Pass __futex value from before
612 releasing internal lock to FUTEX_WAIT.
613 * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
614 (__pthread_cond_timedwait): Likewise.
615 * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
616 (FUTEX_CMP_REQUEUE): Define.
617 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
618 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
619 Pass __futex value from before the unlock and __futex address instead
620 of address of low 32-bits of __wakeup_seq to futex syscall.
621 Fallback to FUTEX_WAKE all on any errors.
622 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
623 Define.
624 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
625 internally. Return non-zero if error, zero if success.
626 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
627 Add __data.__futex field, reshuffle __data.__clock.
628 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
629 Define.
630 (lll_futex_requeue): Add val argument, return 1 unconditionally
631 for the time being.
632 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
633 Add __data.__futex field, reshuffle __data.__clock.
634 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
635 Define.
636 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
637 internally. Return non-zero if error, zero if success.
638 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
639 (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
640 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
641 Define.
642 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
643 internally. Return non-zero if error, zero if success.
644 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
645 Add __data.__futex field, reshuffle __data.__clock.
646 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
647 Define.
648 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
649 internally. Return non-zero if error, zero if success.
650 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
651 Add __data.__futex field, reshuffle __data.__clock.
652 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
653 Add __data.__futex field, reshuffle __data.__clock.
654 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
655 Increment __futex at the same time as __wakeup_seq or __total_seq.
656 Pass address of __futex instead of address of low 32-bits of
657 __wakeup_seq to futex syscall.
658 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
659 Pass __futex value from before releasing internal lock
660 to FUTEX_WAIT.
661 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
662 Likewise. Avoid unnecessary shadowing of variables.
663 * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
664 Set __futex to 2 * __total_seq. Pass __futex value from before the
665 unlock and __futex address instead of address of low 32-bits of
666 __wakeup_seq to futex_requeue macro, adjust for new return value
667 meaning.
668 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
669 (__pthread_cond_signal): Increment __futex at the same time as
670 __wakeup_seq or __total_seq. Pass address of __futex instead of
671 address of low 32-bits of __wakeup_seq to futex syscall.
672 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
673 (__pthread_cond_wait): Likewise. Pass __futex value from before
674 releasing internal lock to FUTEX_WAIT.
675 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
676 (__pthread_cond_timedwait): Likewise.
677 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
678 (FUTEX_CMP_REQUEUE): Define.
679 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
680 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
681 Pass __futex value from before the unlock and __futex address instead
682 of address of low 32-bits of __wakeup_seq to futex syscall.
683 Fallback to FUTEX_WAKE all on any errors.
684
6852004-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
686
687 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
688 Add nop to align the end of critical section.
689 (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
690
fbf86dda
UD
6912004-06-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
692
693 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
694 Add __broadcast_seq field.
695 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
696 all waiters as woken with woken_seq and bump broadcast counter.
697 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
698 __broadcast_seq. Increment __woken_seq correctly when cleanuped.
699 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
700 Comment typo fixes. Avoid returning -ETIMEDOUT.
701
7022004-06-01 Ulrich Drepper <drepper@redhat.com>
703
704 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
705 (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
706 Reported by Kaz Kojima.
707
ffdd5e50
UD
7082004-05-25 Jakub Jelinek <jakub@redhat.com>
709
710 * sysdeps/unix/sysv/linux/aio_misc.h: New file.
711
3abc82c8
UD
7122004-05-21 Jakub Jelinek <jakub@redhat.com>
713
714 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
715 __broadcast_seq with bc_seq after acquiring internal lock instead of
716 before it.
717
893a3511
UD
7182004-05-18 Jakub Jelinek <jakub@redhat.com>
719
720 * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
721 compilation.
722 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
723 (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
724 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
725 (pthread_cond_t): Add __data.__broadcast_seq field.
726 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
727 (FRAME_SIZE): Define.
728 (__pthread_cond_timedwait): Use it. Store/check broadcast_seq.
729 Comment typo fixes.
730 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
731 Define.
732 (__pthread_cond_wait): Use it. Store/check broadcast_seq. Comment
733 typo fixes.
734 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
735 (__pthread_cond_broadcast): Increment broadcast_seq. Comment typo
736 fixes.
737
7382004-05-18 Ulrich Drepper <drepper@redhat.com>
739
740 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
741 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
742 Add __broadcast_seq field.
743 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
744 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
745 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
746 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
747 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
748 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
749 all waiters as woken with woken_seq and bump broadcast counter.
750 * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
751 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
752 __broadcast_seq field.
753 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
754 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
755 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
756 * pthread_cond_init.c: Initialize __broadcast_seq field.
757 * Makefile (tests): Add tst-cond17 and tst-cond18.
758 Add .NOTPARALLEL goal.
759 * tst-cond16.c: New file. From Jakub.
760 * tst-cond17.c: New file. From Jakub.
761 * tst-cond18.c: New file. From Jakub.
762
4123718e
UD
7632004-05-16 Ulrich Drepper <drepper@redhat.com>
764
765 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
766 unwind info.
767
768 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
769 Parametrize frame size. Correct some unwind info.
770 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
771
2d7ae210
UD
7722004-05-04 Jakub Jelinek <jakub@redhat.com>
773
774 * tst-stack3.c: Note testing functionality beyond POSIX.
775
50c2b6d7
UD
7762004-05-04 Jakub Jelinek <jakub@redhat.com>
777
778 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
779 Change conditional from ifdef to if.
780
27b02589
UD
7812004-04-23 Jakub Jelinek <jakub@redhat.com>
782
783 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
784 SYSDEP_CANCEL_ERROR): Define.
785 (PSEUDO): Use it.
786
4bb8fc33
UD
7872004-05-01 Jakub Jelinek <jakub@redhat.com>
788
789 * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
790
f9a06dc1
UD
7912004-04-20 Jakub Jelinek <jakub@redhat.com>
792
793 * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
794
d3b52028
UD
7952004-04-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
796
797 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
798 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
799 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
800 info. Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
801
a5dd0a6c
UD
8022004-04-19 Ulrich Drepper <drepper@redhat.com>
803
804 * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
805 thread has all signals blocked.
806
620c3354
AJ
8072004-04-18 Andreas Jaeger <aj@suse.de>
808
809 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
810 (SEM_VALUE_MAX): Add missing brace.
811
1683daeb
UD
8122004-04-17 Jakub Jelinek <jakub@redhat.com>
813
814 * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
815 in rt subdir.
816 (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
817 * sysdeps/pthread/tst-mqueue8x.c: New test.
818 * tst-cancel4.c: Update comment about message queues.
819
820 * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
821 return it_value { 0, 0 }.
822 * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
823 like SIGEV_SIGNAL.
824 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
825 assertion for SIGEV_NONE.
826 (thread_attr_compare): Compare all attributes, not just a partial
827 subset.
828
8292004-04-17 Jakub Jelinek <jakub@redhat.com>
830
831 * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
832
f532641d
UD
8332004-04-17 Ulrich Drepper <drepper@redhat.com>
834
835 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
836 Just use a plain number.
837 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
838 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
839 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
840 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
841 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
842 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
843 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
844
7eb7fdda
UD
8452004-04-16 Kaz Kojima <kkojima@rr.iij4u.or.jp>
846
53392906
UD
847 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
848 frame info.
849 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7eb7fdda 850
d7ba1313
UD
8512004-04-15 Jakub Jelinek <jakub@redhat.com>
852
853 * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
854 (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
855 of calling sigwaitinfo.
856
5adac0e4
UD
8572004-04-16 Ulrich Drepper <drepper@redhat.com>
858
859 * allocatestack.c (allocate_stack): Set reported_guardsize
860 unconditionally.
861 * pthread_getattr_np.c (pthread_getattr_np): Use
862 reported_guardsize instead of guardsize.
863 * descr.h (struct pthread): Add reported_guardsize field.
864
f93fa7d4
UD
8652004-04-13 Jakub Jelinek <jakub@redhat.com>
866
867 * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
868
1b82c6c7
UD
8692004-04-12 Ulrich Drepper <drepper@redhat.com>
870
871 * sysdeps/unix/sysv/linux/mq-notify.c: New file.
872
8732004-04-08 Jakub Jelinek <jakub@redhat.com>
874
875 * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
876 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
877 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
878 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
879 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
880 Define.
881 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
882 (_POSIX_MESSAGE_PASSING): Define.
883 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
884 (_POSIX_MESSAGE_PASSING): Define.
885 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
886 (_POSIX_MESSAGE_PASSING): Define.
887
e6eb894e
UD
8882004-04-04 Ulrich Drepper <drepper@redhat.com>
889
890 * tst-context1.c (fct): Check whether correct stack is used.
891
1e084487
UD
8922004-04-03 Ulrich Drepper <drepper@redhat.com>
893
4e73e115
UD
894 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
895 matching constraints for asm mem parameters.
896
1e084487
UD
897 * tst-clock2.c (tf): Don't define unless needed.
898
feca5e0b
UD
8992004-03-30 H.J. Lu <hongjiu.lu@intel.com>
900
901 * Makefile (link-libc-static): Use $(static-gnulib) instead of
902 $(gnulib).
903
3fa21fd8
UD
9042004-03-30 Ulrich Drepper <drepper@redhat.com>
905
906 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
907 * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
908 * pthreadP.h: Declare __nptl_deallocate_tsd.
909 * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
910 Adjust caller.
911
912 * Makefile (tests): Add tst-tsd5.
913 * tst-tsd5.c: New file.
914
8e32efa6
UD
9152004-03-29 Ulrich Drepper <drepper@redhat.com>
916
917 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
918 (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
919 is SHLIB_COMPAT check.
920 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
921 (__pthread_attr_getaffinity_old): Likewise.
922 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
923 (__pthread_getaffinity_old): Likewise.
924 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
925 (__pthread_setaffinity_old): Likewise.
926
eec8b6ca
UD
9272004-03-26 Ulrich Drepper <drepper@redhat.com>
928
929 * allocatestack.c (_make_stacks_executable): Call
930 _dl_make_stack_executable first.
931
db2f05ba
RM
9322004-03-24 Roland McGrath <roland@redhat.com>
933
934 * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
935 constraint instead of "0".
936
6abbc501
UD
9372004-03-24 Ulrich Drepper <drepper@redhat.com>
938
68dc4dcb
UD
939 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
940 (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
941
6abbc501
UD
942 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
943 code to avoid warning.
944
865e14d9
AJ
9452004-03-24 Andreas Jaeger <aj@suse.de>
946
947 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
948 (__pthread_attr_setaffinity_old): Remove const.
949
16b06b70
UD
9502004-03-23 Ulrich Drepper <drepper@redhat.com>
951
2c0b891a
UD
952 * sysdeps/unix/sysv/linux/smp.h: New file.
953 * sysdeps/unix/sysv/linux/sh/smp.h: New file.
954 * init.c: Define __is_smp.
955 (__pthread_initialize_minimal_internal): Call is_smp_system to
956 initialize __is_smp.
957 * pthreadP.h: Declare __is_smp.
958 Define MAX_ADAPTIVE_COUNT is necessary.
959 * pthread_mutex_init.c: Add comment regarding __spins field.
960 * pthread_mutex_lock.c: Implement adaptive mutex type.
961 * pthread_mutex_timedlock.c: Likewise.
962 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
963 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
964 Add __spins field.
965 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
966 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
967 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
968 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
969 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
970 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
971 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
972 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
973 lll_mutex_cond_trylock.
974 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
975 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
976 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
977 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
978 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
979 Define BUSY_WAIT_NOP.
980 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
981 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
982
983 * tst-mutex5.c: Add support for testing adaptive mutexes.
984 * tst-mutex7.c: Likewise.
985 * tst-mutex5a.c: New file.
986 * tst-mutex7a.c: New file.
987 * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
988
565699e4
UD
989 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
990 (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
6abbc501 991 vgettimeofday call might destroy the content.
565699e4 992
7fe1586f
UD
993 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
994 @pause in the loop.
995
e408880b
UD
996 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
997 No need to restrict type of ret. Make it int. Add comment.
998
16b06b70
UD
999 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
1000 Remove unnecessary setne instruction.
1001
61645263
UD
10022004-03-22 Jakub Jelinek <jakub@redhat.com>
1003
1004 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
1005 (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
1006 * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
1007 If realloc fails, break out of the loop.
1008
e3d4c585
AJ
10092004-03-20 Andreas Jaeger <aj@suse.de>
1010
1011 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
1012 (__pthread_setaffinity_old): Fix interface.
1013 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
1014 (__pthread_getaffinity_old): Likewise.
1015
1016 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
1017 (__pthread_setaffinity_new): Remove duplicate declaration.
1018
3abb1ff7
UD
10192004-03-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1020
1021 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
1022 the return value to a safe register.
1023 (CDISABLE): Set the function argument correctly.
1024
07bd2a3f
UD
10252004-03-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1026
1027 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
1028 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
1029 Rewrite so that only one locked memory operation per round is needed.
1030 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
1031 (pthread_barrier_wait): After wakeup, release lock only when the
1032 last thread stopped using the barrier object.
1033 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
1034 (__pthread_cond_wait): Don't store mutex address if the current
1035 value is ~0l. Add correct cleanup support and unwind info.
1036 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
1037 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
1038 (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
1039 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
1040 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
1041 Add correct cleanup support and unwind info.
1042 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
1043 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
1044 information for syscall wrappers.
1045
14c35863
UD
10462004-03-18 Ulrich Drepper <drepper@redhat.com>
1047
1048 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
1049 cpusetsize field, remove next.
1050 * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
1051 parameter for size of the CPU set.
1052 (pthread_setaffinity_np): Likewise.
1053 (pthread_attr_getaffinity_np): Likewise.
1054 (pthread_attr_setaffinity_np): Likewise.
1055 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
1056 interface change, keep compatibility code.
1057 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
1058 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
1059 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
1060 * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np. Declare
1061 __pthread_getaffinity_np.
1062 * Versions: Add version for changed interfaces.
1063 * tst-attr3.c: Adjust test for interface change.
1064 * pthread_getattr_np.c: Query the kernel about the affinity mask with
1065 increasing buffer sizes.
1066 * pthread_attr_destroy.c: Remove unused list handling.
1067 * pthread_attr_init.c: Likewise.
1068
8e115d80
RM
10692004-03-17 Roland McGrath <roland@redhat.com>
1070
1071 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
1072 first argument to clock_getres so we ever enable kernel timers.
1073
e3b22ad3
UD
10742004-03-15 Ulrich Weigand <uweigand@de.ibm.com>
1075
1076 * init.c (nptl_version): Add __attribute_used__ to nptl_version.
1077
841153fa
RH
10782004-03-12 Richard Henderson <rth@redhat.com>
1079
e3b22ad3
UD
1080 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
1081 oldvalue from CENABLE to CDISABLE.
841153fa 1082
932dfea7
UD
10832004-03-12 Ulrich Drepper <drepper@redhat.com>
1084
1085 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
1086 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
1087 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
1088 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
1089
9852f6dc
RH
10902004-03-11 Richard Henderson <rth@redhat.com>
1091
1092 * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
1093 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
1094 * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
1095
43513fb7
UD
10962004-03-11 Jakub Jelinek <jakub@redhat.com>
1097
1098 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
1099 instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
1100 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
1101
11022004-03-11 Jakub Jelinek <jakub@redhat.com>
1103
1104 * forward.c (__pthread_cond_broadcast_2_0,
1105 __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
1106 __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
1107 __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
1108
8a3e10e0
UD
11092004-03-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1110
1111 * sysdeps/sh/tcb-offsets.sym: Add PID.
1112 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
1113 * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
1114
6d3a2bec
UD
11152004-03-10 Ulrich Drepper <drepper@redhat.com>
1116
1117 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
1118 include <sysdep-cancel.h>, vfork is no cancellation point.
1119 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
1120 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
1121 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
1122
d3a4a571
UD
11232004-03-10 Jakub Jelinek <jakub@redhat.com>
1124
73b4ce64
UD
1125 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
1126 libc_hidden_def.
1127 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
1128 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
1129 Likewise.
1130 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
1131 Likewise.
1132 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
1133 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
1134 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
1135 * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
1136 of DO_CALL_VIA_BREAK. Work around a gas problem.
1137
d682a515
UD
1138 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
1139 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
1140 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
1141 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
1142 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
1143 * sysdeps/powerpc/tcb-offsets.sym: Add PID.
1144
1145 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
1146 a local register for saving old PID. Negate PID in parent upon exit.
1147
d3a4a571
UD
1148 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
1149 tcb-offsets.h.
1150 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
1151 before syscall, set to the old value in the parent afterwards.
1152 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
1153 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
1154 tcb-offsets.h.
1155 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
1156 before syscall, set to the old value in the parent afterwards.
1157 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
1158 * sysdeps/s390/tcb-offsets.sym: Add PID.
1159
1160 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
1161 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
1162 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
1163 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
1164 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
1165 * sysdeps/sparc/tcb-offsets.sym: Add PID.
1166
11672004-03-10 Andreas Schwab <schwab@suse.de>
1168
1169 * sysdeps/ia64/tcb-offsets.sym: Add PID.
1170 * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
1171 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
1172
3f2fb223 11732004-03-09 Jakub Jelinek <jakub@redhat.com>
f4c024d1 1174
3f2fb223
UD
1175 * tst-cancel20.c (do_one_test): Clear in_sh_body first.
1176 * tst-cancel21.c (do_one_test): Likewise.
1177 Reported by Gordon Jin <gordon.jin@intel.com>.
f4c024d1 1178
8b9d6054
UD
11792004-02-09 Jakub Jelinek <jakub@redhat.com>
1180
1181 * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
1182 if non-zero and set to INT_MIN if zero.
1183 * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
1184 * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
1185 (SAVE_PID, RESTORE_PID): Define.
1186 (__vfork): Use it.
1187 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
1188 Use relative path to avoid including NPTL i386/vfork.S.
1189 (SAVE_PID, RESTORE_PID): Define.
1190 * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
1191 (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
1192 * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
1193 tst-vfork2x.
1194 (tests-reverse): Add tst-vfork1x and tst-vfork2x.
1195 * tst-vfork1.c: New test.
1196 * tst-vfork2.c: New test.
1197 * tst-vfork1x.c: New test.
1198 * tst-vfork2x.c: New test.
1199
02287d05
UD
12002004-03-08 Ulrich Drepper <drepper@redhat.com>
1201
c072ef6d 1202 * sysdeps/i386/tcb-offsets.sym: Add PID.
6fadea9f 1203 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
c072ef6d 1204 * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
6fadea9f 1205 * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
02287d05 1206
d4acd24b
UD
12072004-03-08 Steven Munroe <sjmunroe@us.ibm.com>
1208
1209 * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
1210
8acb4b81
UD
12112004-03-08 H.J. Lu <hongjiu.lu@intel.com>
1212
1213 * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
1214 _rtld_global_ro.
1215
4d1a02ef
UD
12162004-03-07 Ulrich Drepper <drepper@redhat.com>
1217
001836c8 1218 * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
8acb4b81 1219 _rtld_global_ro.
001836c8 1220
4d1a02ef
UD
1221 * tst-once4.c: Remove unnecessary macro definition.
1222
1223 * tst-mutex7.c (do_test): Limit thread stack size.
1224 * tst-once2.c (do_test): Likewise.
1225 * tst-tls3.c (do_test): Likewise.
1226 * tst-tls1.c (do_test): Likewise.
1227 * tst-signal3.c (do_test): Likewise.
1228 * tst-kill6.c (do_test): Likewise.
1229 * tst-key4.c (do_test): Likewise.
1230 * tst-join4.c (do_test): Likewise.
1231 * tst-fork1.c (do_test): Likewise.
1232 * tst-context1.c (do_test): Likewise.
1233 * tst-cond2.c (do_test): Likewise.
1234 * tst-cond10.c (do_test): Likewise.
1235 * tst-clock2.c (do_test): Likewise.
1236 * tst-cancel10.c (do_test): Likewise.
1237 * tst-basic2.c (do_test): Likewise.
1238 * tst-barrier4.c (do_test): Likewise.
1239
aa420660
UD
12402004-03-05 Ulrich Drepper <drepper@redhat.com>
1241
1242 * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
1243
cff08c81
UD
12442004-03-01 Ulrich Drepper <drepper@redhat.com>
1245
1246 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
1247 (__pthread_cond_timedwait): Optimize wakeup test.
1248 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
1249 (__pthread_cond_wait): Likewise.
1250 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
1251 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
1252 Likewise.
1253
b7fe377c
UD
12542004-02-29 Ulrich Drepper <drepper@redhat.com>
1255
1256 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1257 (__lll_mutex_lock_wait): Optimize a bit more. Just one copy of
1258 the atomic instruction needed.
1259 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1260 (__lll_mutex_lock_wait): Likewise.
1261
4c771a3b
UD
12622004-02-28 Ulrich Drepper <drepper@redhat.com>
1263
1264 * Makefile (tests): Add tst-cond14 and tst-cond15.
1265 * tst-cond14.c: New file.
1266 * tst-cond15.c: New file.
1267
a2c33d5a
UD
12682004-02-27 Ulrich Drepper <drepper@redhat.com>
1269
1270 * sysdeps/pthread/createthread.c (create_thread): Remove use of
1271 CLONE_STOPPED. We cannot use SIGCONT which means CLONE_STOPPED
1272 needs to be implemented differently to be useful.
1273
261eada2
UD
12742004-02-26 Ulrich Drepper <drepper@redhat.com>
1275
14ffbc83
UD
1276 * pthread_attr_setschedparam.c: Don't test priority against limits
1277 here. Set ATTR_FLAG_SCHED_SET flag.
1278 * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
1279 * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
1280 from parent thread to child. If attribute is used and scheduling
1281 parameters are not inherited, copy parameters from attribute or
1282 compute them. Check priority value.
1283 * pthread_getschedparam.c: If the parameters aren't known yet get
1284 them from the kernel.
1285 * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
1286 ATTR_FLAG_POLICY_SET flag for thread.
1287 * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
1288 and ATTR_FLAG_POLICY_SET.
1289
1290 * sysdeps/pthread/createthread.c: Use tgkill if possible.
1291
261eada2
UD
1292 * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
1293 fail if stack address hasn't been set. Just return 0.
1294
701d185c
UD
12952004-02-25 Ulrich Drepper <drepper@redhat.com>
1296
25b8e63c
UD
1297 * Makefile (tests-nolibpthread): Add tst-unload. Don't link with
1298 libpthread for the files in this list.
1299 (CFLAGS-tst-unload): Removed.
1300 * tst-unload.c (do_test): Don't use complete path for
1301 LIBPHREAD_SO.
1302
701d185c
UD
1303 * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
1304 tst-_res1mod2.
1305
a8fd5a02
UD
13062004-02-22 Ulrich Drepper <drepper@redhat.com>
1307
1308 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1309 (__lll_mutex_lock_wait): Rewrite so that only one locked memory
1310 operation per round is needed.
1311 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1312 (__lll_mutex_lock_wait): Likewise.
1313
dd0b7b19
UD
13142004-02-20 Ulrich Drepper <drepper@redhat.com>
1315
1316 * tst-cancel9.c (cleanup): Don't print to stderr.
1317
5990e1fe
UD
13182004-02-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1319
1320 * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
1321
33ab3b66
UD
13222004-02-20 Jakub Jelinek <jakub@redhat.com>
1323
1be3130e
UD
1324 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
1325 (__syscall_error_handler2): Call CDISABLE.
1326 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
1327 (__syscall_error_handler2): Call CDISABLE.
1328
8ba5025a
UD
1329 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
1330 Release lock before the loop, don't reacquire it.
8ba5025a 1331
33ab3b66
UD
1332 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
1333
11986c68
UD
13342004-02-19 Andreas Schwab <schwab@suse.de>
1335
1336 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
1337 Fix last change.
1338
dc391246
UD
13392004-02-18 Ulrich Drepper <drepper@redhat.com>
1340
37c054c7
UD
1341 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
1342 (pthread_barrier_wait): After wakeup, release lock only when the
1343 last thread stopped using the barrier object.
1344 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
1345 (pthread_barrier_wait): Likewise.
1346 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
1347 Likewise.
1348 * Makefile (tests): Add tst-barrier4.
1349 * tst-barrier4.c: New file.
dc391246
UD
1350
1351 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
1352 (__pthread_cond_timedwait): Perform timeout test while holding
1353 internal lock to prevent wakeup race.
1354 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
1355 * sysdeps/pthread/pthread_cond_timedwait.c
1356 (__pthread_cond_timedwait): Likewise.
1357 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1358 (__pthread_cond_timedwait): Likewise.
1359
4a08113c
UD
13602004-02-18 Jakub Jelinek <jakub@redhat.com>
1361
1362 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
1363 (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
1364 * Makefile (tests): Add tst-rwlock13.
1365 * tst-rwlock13.c: New test.
1366
71b1675e
UD
13672004-02-16 Ulrich Drepper <drepper@redhat.com>
1368
1369 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
1370 (__condvar_tw_cleanup): Little optimization.
1371 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
1372
cd9fdc72
UD
13732004-02-16 Steven Munroe <sjmunroe@us.ibm.com>
1374
1375 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
1376 libpthread as "lib" parameter to SHLIB_COMPAT.
1377 (__novmx_siglongjmp): Fix typo in function name.
1378 (__novmx_longjmp): Fix typo in function name.
1379
82038750
UD
13802004-02-13 Ulrich Drepper <drepper@redhat.com>
1381
b078c591
UD
1382 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
1383 __builtin_expect.
1384
82038750
UD
1385 * sysdeps/generic/pt-longjmp.c: Moved to...
1386 * sysdeps/pthread/pt-longjmp.c: ...here. New file.
1387
e2982bf0
UD
13882004-01-29 Steven Munroe <sjmunroe@us.ibm.com>
1389
1390 * Makefile (libpthread-routines): Add pt-cleanup.
1391 * pt-longjmp.c: Removed.
1392 * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
1393 * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
1394 * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
1395 Version longjmp, siglongjmp for GLIBC_2.3.4.
1396 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
1397
3730d95c
UD
13982004-02-13 Ulrich Drepper <drepper@redhat.com>
1399
219304ec
UD
1400 * sysdeps/pthread/pthread_cond_timedwait.c
1401 (__pthread_cond_timedwait): Optimize. Drop internal lock earlier.
1402 Reuse code. Add __builtin_expects.
1403
3730d95c
UD
1404 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
1405 (__pthread_cond_timedwait): Get internal lock in case timeout has
1406 passed before the futex syscall.
1407 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1408
5673ccc1
UD
14092004-01-20 Ulrich Drepper <drepper@redhat.com>
1410
debddf64
UD
1411 * allocatestack.c: Pretty printing.
1412
5673ccc1
UD
1413 * sysdeps/pthread/createthread.c (create_thread): Don't add
1414 CLONE_DETACHED bit if it is not necessary.
1415
6bae8725
UD
14162004-01-16 Ulrich Drepper <drepper@redhat.com>
1417
1418 * pthread_getattr_np.c: Include ldsodefs.h.
1419
ff151400
RH
14202004-01-16 Richard Henderson <rth@redhat.com>
1421
6bae8725
UD
1422 * allocatestack.c: Don't declare __libc_stack_end.
1423 * init.c (__pthread_initialize_minimal_internal): Likewise.
1424 * pthread_getattr_np.c (pthread_getattr_np): Likewise.
ff151400 1425
ba683832
RH
14262004-01-15 Richard Henderson <rth@redhat.com>
1427
1428 * sysdeps/alpha/tls.h (tcbhead_t): Add private.
1429 (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
1430 TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
1431 GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
1432 (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
1433 (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
1434 (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1435 * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
1436
630d93a7
UD
14372004-01-14 Ulrich Drepper <drepper@redhat.com>
1438
219304ec 1439 * init.c (pthread_functions): Make array const.
630d93a7 1440
d1fc817e
UD
14412004-01-13 Ulrich Drepper <drepper@redhat.com>
1442
1443 * allocatestack.c (__make_stacks_executable): Change interface.
1444 Check parameters. Pass parameter on to libc counterpart.
1445 * pthreadP.h: Change declaration.
1446
dc927809
RH
14472004-01-13 Richard Henderson <rth@redhat.com>
1448
10677727
UD
1449 * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
1450 prototype form.
1451 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
1452 Likewise.
1453
d1fc817e
UD
1454 * sysdeps/alpha/Makefile: New file.
1455 * sysdeps/alpha/tcb-offsets.sym: New file.
1456 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
1457 Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
dc927809 1458
d1fc817e
UD
1459 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
1460 on powerpc version.
dc927809 1461
249a3d0c
UD
14622004-01-08 Jakub Jelinek <jakub@redhat.com>
1463
1464 * Makefile (tests): Add tst-backtrace1.
1465 * tst-backtrace1.c: New test.
1466
763c0490
RM
14672003-12-11 Ulrich Weigand <uweigand@de.ibm.com>
1468
1469 * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
1470 register as second parameter to the REGISTER macro.
1471 * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
1472 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
1473 * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
1474 * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
1475 * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
1476 of thread register as second parameter to REGISTER macro in 64 case.
1477
c7baafd5
UD
14782004-01-03 Ulrich Drepper <drepper@redhat.com>
1479
1480 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
1481 (CFLAGS-getpid.o): Defined.
1482 (CFLAGS-getpid.os): Defined.
1483
25ac0258
UD
14842003-12-31 Ulrich Drepper <drepper@redhat.com>
1485
1486 * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
1487 returned for main thread does not overlap with any other VMA.
1488 Patch by Jakub Jelinek.
1489
795985e4
UD
14902003-12-29 Jakub Jelinek <jakub@redhat.com>
1491
1492 * tst-raise1.c: Include stdio.h.
1493
cb5b9388
UD
14942003-12-23 Jakub Jelinek <jakub@redhat.com>
1495
1496 * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
1497 setting with __ASSUME_TGKILL || defined __NR_tgkill.
1498 If pid is 0, set it to selftid.
1499 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
1500 Don't set self->pid but self->tid. If self->pid == 0 and self->tid
1501 != 0, return self->tid without doing a syscall.
1502 * descr.h (struct pthread): Move pid field after tid.
1503
1504 * Makefile (tests): Add tst-raise1.
1505 * tst-raise1.c: New file.
1506
432aaf5b
RM
15072003-12-23 Roland McGrath <roland@redhat.com>
1508
1509 * tst-oddstacklimit.c: New file.
1510 * Makefile (tests): Add it.
1511 (tst-oddstacklimit-ENV): New variable.
1512
1513 * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
1514 value up to page size for __default_stacksize.
1515
33ebea17
UD
15162003-12-21 Ulrich Drepper <drepper@redhat.com>
1517
1518 * Makefile (tests): Add tst-eintr5.
1519 * tst-eintr5.c: New file.
1520
1521 * eintr.c (eintr_source): Prevent sending signal to self.
1522
1523 * tst-eintr2.c (tf1): Improve error message.
1524
bbe35eb5
UD
15252003-12-20 Ulrich Drepper <drepper@redhat.com>
1526
1527 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
1528 * sysdeps/unix/sysv/linux/getpid.c: New file.
c0ecb80a
UD
1529 * pthread_cancel.c: Add comment explaining use of PID field.
1530 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
1531 * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
1532 * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
1533 temporarily to signal the field must not be relied on and updated
1534 by getpid().
1535 * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
1536 temporarily negative.
1537 * sysdeps/unix/sysv/linux/raise.c: Likewise.
bbe35eb5 1538
4efdd8d3
UD
15392003-12-19 Ulrich Drepper <drepper@redhat.com>
1540
1541 * eintr.c (setup_eintr): Add new parameter. Pass to thread function.
1542 (eintr_source): If ARG != NULL, use pthread_kill.
1543 * tst-eintr1.c: Adjust for this change.
1544 * tst-eintr2.c: Likewise.
1545 * Makefile (tests): Add tst-eintr3 and tst-eintr4.
1546 * tst-eintr3.c: New file.
1547 * tst-eintr4.c: New file.
1548
15492003-12-19 Jakub Jelinek <jakub@redhat.com>
1550
1551 * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
1552 if CANCELSTATE_BITMASK is set.
1553 * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
1554 Likewise.
1555
1556 * Makefile (tests): Add tst-cancel22 and tst-cancel23.
1557 (tests-reverse): Add tst-cancel23.
1558 * tst-cancel22.c: New test.
1559 * tst-cancel23.c: New test.
1560
675620f7
UD
15612003-12-18 Ulrich Drepper <drepper@redhat.com>
1562
1563 * tst-eintr1.c: Better error messages.
1564
1565 * Makefile (tests): Add tst-eintr2.
1566 * tst-eintr2.c: New file.
1567
15682003-12-18 Jakub Jelinek <jakub@redhat.com>
1569
1570 * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
1571 (CFLAGS-tst-cancelx21.c): Set.
1572 * tst-cancel21.c: New test.
1573 * tst-cancelx21.c: New test.
1574
1575 * unwind.c (FRAME_LEFT): Add adj argument. Subtract it from each
1576 comparison operand.
1577 (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
1578 _JMPBUF_CFA_UNWINDS. Adjust FRAME_LEFT invocations.
1579 * pt-longjmp.c: Include jmpbuf-unwind.h.
1580 (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
1581 _JMPBUF_UNWINDS. Adjust compared pointers.
1582 * init.c (__pthread_initialize_minimal_internal): Initialize
1583 pd->stackblock_size.
1584 * sysdeps/pthread/jmpbuf-unwind.h: Removed.
1585 * sysdeps/alpha/jmpbuf-unwind.h: New file.
1586 * sysdeps/i386/jmpbuf-unwind.h: New file.
1587 * sysdeps/powerpc/jmpbuf-unwind.h: New file.
1588 * sysdeps/s390/jmpbuf-unwind.h: New file.
1589 * sysdeps/sh/jmpbuf-unwind.h: New file.
1590 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
1591 * sysdeps/x86_64/jmpbuf-unwind.h: New file.
2e5e031d 1592 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
675620f7
UD
1593 (_JMPBUF_CFA_UNWINDS): Remove.
1594 (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
1595
15962003-12-12 Jakub Jelinek <jakub@redhat.com>
1597
1598 * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
1599 (CFLAGS-tst-cancelx20.c): Set.
1600 * tst-cancel20.c: New test.
1601 * tst-cancelx20.c: New test.
1602
2d951ab6
UD
16032003-12-17 Ulrich Drepper <drepper@redhat.com>
1604
1605 * init.c (__pthread_initialize_minimal_internal): Don't treat
1606 architectures with separate register stack special here when
1607 computing default stack size.
1608
f8a3a2e7
RM
16092003-12-17 Roland McGrath <roland@redhat.com>
1610
1611 * Makefile (tst-cancelx7-ARGS): New variable.
1612 Reportd by Greg Schafer <gschafer@zip.com.au>.
1613
e796f92f
UD
16142003-12-17 Jakub Jelinek <jakub@redhat.com>
1615
1616 * Makefile (tests): Add tst-stack3. Depend on $(objpfx)tst-stack3-mem.
1617 (generated): Add tst-stack3.mtrace and tst-stack3-mem.
1618 (tst-stack3-ENV): Set.
1619 ($(objpfx)tst-stack3-mem): New.
1620 * tst-stack3.c: New test.
1621
092eb73c
UD
16222003-12-10 David Mosberger <davidm@hpl.hp.com>
1623
1624 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
1625 Add unwind directives. Drop unused .regstk directive.
1626 (_fini_EPILOG_BEGINS): Add unwind directives.
1627
ff48874d
UD
16282003-12-11 Ulrich Drepper <drepper@redhat.com>
1629
1630 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
1631 Assume parameter is a pointer.
1632 (lll_futex_wake): Likewise.
20945457
UD
1633 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
1634 Likewise.
1635 (lll_futex_wake): Likewise.
ff48874d
UD
1636 Reported by Boris Hu.
1637 * sysdeps/unix/sysv/linux/unregister-atfork.c
1638 (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
1639
1640 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
1641
1d9d0b80
UD
16422003-12-10 Ulrich Drepper <drepper@redhat.com>
1643
1644 * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
1645 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
1646 __rtld_lock_initialize for ld.so lock.
1647 Patch in part by Adam Li <adam.li@intel.com>.
1648
c776b3d7
UD
16492003-12-02 David Mosberger <davidm@hpl.hp.com>
1650
1651 * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
1652 in $(gnulib). Also, remove stale comment.
1653
16542003-11-12 David Mosberger <davidm@hpl.hp.com>
1655
1656 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
1657 advantage of new syscall stub and optimize accordingly.
1658
1659 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
1660 from SYS_futex, to match expectations of
1661 sysdep.h:DO_INLINE_SYSCALL.
1662 (lll_futex_clobbers): Remove.
1663 (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
1664 (lll_futex_wake): Likewise.
1665 (lll_futex_requeue): Likewise.
1666 (__lll_mutex_trylock): Rewrite to a macro, so we can include this
1667 file before DO_INLINE_SYSCALL is defined (proposed by Jakub
1668 Jelinek).
1669 (__lll_mutex_lock): Likewise.
1670 (__lll_mutex_cond_lock): Likewise.
1671 (__lll_mutex_timed_lock): Likewise.
1672 (__lll_mutex_unlock): Likewise.
1673 (__lll_mutex_unlock_force): Likewise.
1674
1675 * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
1676 comes before the include of <sysdep.h>.
1677 (THREAD_SELF_SYSINFO): New macro.
1678 (THREAD_SYSINFO): Likewise.
1679 (INIT_SYSINFO): New macro.
1680 (TLS_INIT_TP): Call INIT_SYSINFO.
1681
1682 * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
1683
1684 * sysdeps/pthread/createthread.c (create_thread): Use
1685 THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
1686 * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
1687 THREAD_SELF_SYSINFO instead of open code.
1688 * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
1689 (THREAD_SYSINFO): Likewise.
1690
1691 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
1692
1693 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
1694
57d20ee7
UD
16952003-12-06 Ulrich Drepper <drepper@redhat.com>
1696
1697 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
1698 instead of .init. Patch by David Mosberger.
1699
67aeab2a
AJ
17002003-11-30 Thorsten Kukuk <kukuk@suse.de>
1701
1702 * sysdeps/pthread/configure.in: Remove broken declaration in C
1703 cleanup handling check.
1704
8ca203e6
AJ
17052003-11-30 Andreas Jaeger <aj@suse.de>
1706
1707 * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
1708 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
1709 Likewise.
1710
46bf9de7
UD
17112003-11-27 Jakub Jelinek <jakub@redhat.com>
1712
1713 * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
1714 * pthread_attr_destroy.c: Include shlib-compat.h.
1715 (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
1716 is set in iattr->flags.
1717 * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
1718
1d9b73ab
UD
17192003-11-21 Jakub Jelinek <jakub@redhat.com>
1720
1721 * Makefile (distribute): Add tst-cleanup4aux.c.
1722
1723 * tst-cond12.c (prepare): Add prototype. Move after test-skeleton.c
1724 include.
1725
53f9084e
UD
17262003-11-21 Ulrich Drepper <drepper@redhat.com>
1727
1d9b73ab
UD
1728 * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
1729 pthread_cond_signal.
1730
e42a990e
UD
1731 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
1732 store mutex address if the current value is ~0l.
1733 * sysdeps/pthread/pthread_cond_timedwait.c
1734 (__pthread_cond_timedwait): Likewise.
1735 * sysdeps/pthread/pthread_cond_broadcast.c
1736 (__pthread_cond_broadcast): Don't use requeue for pshared
1737 condvars.
1738
1739 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1740 (__pthread_cond_wait): Don't store mutex address if the current
1741 value is ~0l.
1742 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1743 (__pthread_cond_timedwait): Likewise.
1744 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
1745 (__pthread_cond_broadcast): Don't use requeue for pshared
1746 condvars.
1747
1748 * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
1749 element with ~0l for pshared condvars, with NULL otherwise.
1750
1751 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
1752 (__pthread_cond_wait): Don't store mutex address if the current
1753 value is ~0l.
1754 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
1755 (__pthread_cond_timedwait): Likewise.
1756 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
1757 (__pthread_cond_broadcast): Don't use requeue for pshared
1758 condvars.
1759
bf68b236 1760 * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
53f9084e 1761 * tst-cond12.c: New file.
bf68b236 1762 * tst-cond13.c: New file.
53f9084e 1763
9780c971
UD
17642003-11-17 Ulrich Drepper <drepper@redhat.com>
1765
1766 * sysdeps/pthread/configure.in: Make missing forced unwind support
1767 fatal.
1768
74e12fbc
UD
17692003-11-11 Ulrich Drepper <drepper@redhat.com>
1770
1771 * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
1772
c685b2b0
UD
17732003-11-06 Ulrich Drepper <drepper@redhat.com>
1774
1775 * Makefile: Add magic to clean up correctly.
1776
44e94149
UD
17772003-11-05 Jakub Jelinek <jakub@redhat.com>
1778
1779 * unwind.c (FRAME_LEFT): Define.
1780 (unwind_stop): Handle old style cleanups here.
1781 (__pthread_unwind): Handle old style cleanups only if
1782 !HAVE_FORCED_UNWIND.
1783 * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
1784 (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
1785 ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
1786 ($(objpfx)tst-cleanupx4): Likewise.
1787 * tst-cleanup4.c: New test.
1788 * tst-cleanup4aux.c: New.
1789 * tst-cleanupx4.c: New test.
1790
c28422b5
UD
17912003-11-04 Ulrich Drepper <drepper@redhat.com>
1792
1793 * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
1794 lll_mutex_*lock macros to skip atomic operations on some archs.
1795
27176677
UD
17962003-11-03 Ulrich Drepper <drepper@redhat.com>
1797
1798 * sysdeps/pthread/tst-timer.c (main): Initialize
1799 sigev2.sigev_value as well.
1800
026395a2
RM
18012003-10-15 Roland McGrath <roland@redhat.com>
1802
1803 * sysdeps/pthread/configure.in: Barf if visibility attribute support
1804 is missing.
1805 * sysdeps/pthread/configure: Regenerated.
1806
fa3cbe3d
UD
18072003-10-09 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1808
1809 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
1810 locking macros. No distinction between normal and mutex locking
1811 anymore.
1812 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
1813 Merge bits from lowlevelmutex.S we still need.
1814 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
1815 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
1816 * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
1817 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
1818 new mutex implementation.
1819 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
1820 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
1821 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
1822 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
1823 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
1824 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
1825 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
1826 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
1827 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1828 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
1829 symbol for entry point to avoid cancellation.
1830
e700a908
UD
18312003-10-07 Jakub Jelinek <jakub@redhat.com>
1832
1833 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
1834 changes.
1835 (SAVE_OLDTYPE_0): Fix a typo.
1836
c70a86b6
UD
18372003-10-03 Ulrich Drepper <drepper@redhat.com>
1838
1839 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
1840 Check __sigsetjmp return value. Reported by Daniel Jacobowitz.
1841
134abcb5
UD
18422003-10-02 Ulrich Drepper <drepper@redhat.com>
1843
1844 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
1845 correct offset.
1846
b77ca0e8
UD
18472003-10-02 Jakub Jelinek <jakub@redhat.com>
1848
1849 * Makefile (tests): Add tst-cancel19.
1850 * tst-cancel19.c: New test.
1851
4d961dc7
UD
18522003-10-02 Ulrich Drepper <drepper@redhat.com>
1853
1854 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
1855 restoring of the old cancellation type.
1856
1d5b20ad 18572003-09-30 Jakub Jelinek <jakub@redhat.com>
94ae6d75 1858
1d5b20ad
UD
1859 * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
1860
4106a403
RM
18612003-09-27 Wolfram Gloger <wg@malloc.de>
1862
4d961dc7 1863 * sysdeps/pthread/malloc-machine.h: New file
94ae6d75 1864
fca9d8e4
RM
18652003-09-24 Roland McGrath <roland@redhat.com>
1866
1867 * allocatestack.c (__make_stacks_executable): Don't ignore return
1868 value from _dl_make_stack_executable.
1869
c9c60884
UD
18702003-09-24 Ulrich Drepper <drepper@redhat.com>
1871
69c9fa04
UD
1872 * allocatestack.c (__make_stacks_executable): Also change
1873 permission of the currently unused stacks.
1874
279f1143
UD
1875 * allocatestack.c (change_stack_perm): Split out from
1876 __make_stacks_executable.
1877 (allocate_stack): If the required permission changed between the time
1878 we started preparing the stack and queueing it, change the permission.
1879 (__make_stacks_executable): Call change_stack_perm.
1880
c9c60884
UD
1881 * Makefile: Build tst-execstack-mod locally.
1882 * tst-execstack-mod.c: New file.
1883
54ee14b3
UD
18842003-09-23 Jakub Jelinek <jakub@redhat.com>
1885
1886 * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
1887
18882003-09-23 Roland McGrath <roland@redhat.com>
1889
1890 * tst-execstack.c: New file.
1891 * Makefile (tests): Add it.
1892 ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
1893 (LDFLAGS-tst-execstack): New variable.
1894
1895 * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
1896 whether to use PROT_EXEC for stack mmap.
1897 (__make_stacks_executable): New function.
1898 * pthreadP.h: Declare it.
1899 * init.c (__pthread_initialize_minimal_internal): Set
1900 GL(dl_make_stack_executable_hook) to that.
1901
365b1602
UD
19022003-09-22 Ulrich Drepper <drepper@redhat.com>
1903
1904 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
1905 recommendation from AMD re avoidance of lock prefix.
1906
39358e8b
UD
19072003-09-22 Jakub Jelinek <jakub@redhat.com>
1908
1909 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
1910 lll_futex_timed_wait instead of lll_futex_wait.
1911 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
1912 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
1913 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
1914 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
1915 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
1916 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
1917 * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
1918 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
1919 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
1920 Completely revamp the locking macros. No distinction between
1921 normal and mutex locking anymore.
1922 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1923 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
1924 __lll_lock_timedwait): Fix prototypes.
1925 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
1926 __lll_lock_timedwait): Likewise.
1927 (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
1928 macros, add __builtin_expect.
1929 (lll_mutex_timedlock): Likewise. Fix return value.
1930 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
1931 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
1932 * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
1933 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
1934 * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
1935 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
1936 * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
1937 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
1938
9d08fbbb
UD
19392003-09-22 Ulrich Drepper <drepper@redhat.com>
1940
c0df57e1
UD
1941 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1942 (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
1943 operation if possible.
1944
9d08fbbb
UD
1945 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
1946 like jumping over the lock prefix.
1947
71451de2
UD
19482003-09-21 Ulrich Drepper <drepper@redhat.com>
1949
1950 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
1951 locking macros. No distinction between normal and mutex locking
1952 anymore.
3a226d33 1953 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
bc1989aa
UD
1954 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1955 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
71451de2
UD
1956 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
1957 locking. Merge bits from lowlevelmutex.S we still need.
3a226d33 1958 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
bc1989aa 1959 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
71451de2 1960 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
3a226d33 1961 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
71451de2
UD
1962 * Makefile (routines): Remove libc-lowlevelmutex.
1963 (libpthread-rountines): Remove lowlevelmutex.
3a226d33
UD
1964 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
1965 for new mutex implementation.
1966 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
1967 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1968 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1969 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1970 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1971 Likewise.
1972 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1973 Likewise.
1974 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1975 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1976 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
1977 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
1978 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1979 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1980 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
1981 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1982 Likewise.
1983 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1984 Likewise.
1985 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
1986 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1987 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
1988 Don't use requeue.
1989 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
bc1989aa 1990 * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
71451de2 1991
8f31c0ef
UD
19922003-09-20 Ulrich Drepper <drepper@redhat.com>
1993
56a4aa98
UD
1994 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
1995 in parameters of asm with output parameters.
1996
8f31c0ef
UD
1997 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
1998 type of DECR parameter to int.
1999 * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
2000
8b8074da
UD
20012003-09-18 Jakub Jelinek <jakub@redhat.com>
2002
2003 * tst-attr3.c (tf, do_test): Print stack start/end/size and
2004 guardsize for each thread.
2005
65af7e61
UD
20062003-09-17 Jakub Jelinek <jakub@redhat.com>
2007
9ba96eda
UD
2008 * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
2009 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
2010 (pthread_attr_setaffinity_np): Handle cpuset == NULL.
2011
06f6ca90
UD
2012 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
2013 (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
2014 NULL.
2015 * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
2016 * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
2017 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
2018 (pthread_getaffinity_np): Add hidden_def.
2019
2020 * Makefile (tests): Add tst-attr3.
2021 * tst-attr3.c: New test.
2022
65af7e61
UD
2023 * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
2024
3402852c
UD
20252003-09-15 Jakub Jelinek <jakub@redhat.com>
2026
2027 * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
2028 CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
2029
a4db3439
UD
20302003-09-17 Jakub Jelinek <jakub@redhat.com>
2031
2032 * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
2033 * tst-align.c: Include tst-stack-align.h.
2034 (tf, do_test): Use TEST_STACK_ALIGN macro.
2035
20362003-09-17 Ulrich Drepper <drepper@redhat.com>
2037
2038 * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
2039 variable.
2040
92ce4676
UD
20412003-09-16 Ulrich Drepper <drepper@redhat.com>
2042
2043 * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
2044 stack-related values for the initial thread.
2045
e07bb02a
UD
20462003-09-15 Jakub Jelinek <jakub@redhat.com>
2047
2048 * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
2049
d087b5dc
UD
20502003-09-11 Ulrich Drepper <drepper@redhat.com>
2051
2052 * pthread_mutex_lock.c: Minor code rearrangements.
2053
7f08f55a
RM
20542003-09-05 Roland McGrath <roland@redhat.com>
2055
2056 * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
2057 Instead, include ../nptl_db/db_info.c to do its magic.
2058 * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
2059 (__pthread_pthread_key_2ndlevel_size): Likewise.
2060 * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
2061 * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
2062 * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
2063 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
2064 * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
2065 * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
2066 * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
2067 * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
2068 * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
2069 * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
2070 * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
2071 * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
2072 * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
2073 * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
2074 * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
2075 * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
2076 * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
2077
806e4a4a
UD
20782003-09-08 Ulrich Drepper <drepper@redhat.com>
2079
2080 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
2081 of pthread_t to be compatible with LT.
2082 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2083 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
2084 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2085 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2086 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
2087 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2088 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
2089
17f83e56
UD
20902003-09-04 Ulrich Drepper <drepper@redhat.com>
2091
2092 * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
2093
58e8ec84
UD
20942003-09-04 Jakub Jelinek <jakub@redhat.com>
2095
2096 * unwind-forcedunwind.c: Move to...
2097 * sysdeps/pthread/unwind-forcedunwind.c: ...here.
2098 (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
2099 * sysdeps/pthread/jmpbuf-unwind.h: New file.
2100 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
2101 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
2102 * unwind.c: Include jmpbuf-unwind.h.
2103 (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
2104
abf1cf21
JJ
21052003-09-02 Jakub Jelinek <jakub@redhat.com>
2106
4a244f0d
UD
2107 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
2108 * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
2109 pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
2110 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
2111 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
2112 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
2113 * sysdeps/unix/sysv/linux/sparc/Versions: New file.
2114 * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
2115 (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
2116 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
2117 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
2118 function.
2119 (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
2120 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
2121 * Makefile (tests): Add tst-stack2.
2122 * tst-stack2.c: New test.
2123 * tst-stack1.c: Include limits.h and sys/param.h.
2124 (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
2125
e29ef647
UD
2126 * pthread_condattr_setpshared.c: Include errno.h.
2127 (pthread_condattr_setpshared): Return EINVAL if pshared
2128 is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
2129
5777d565
UD
2130 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
2131 defined symbol for entry point to avoid cancellation.
2132 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
2133 Likewise.
2134 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
2135 Likewise.
2136 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
2137 Likewise.
2138 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
2139 Likewise.
2140 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
2141 Likewise.
2142 * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
2143 __close_nocancel, __read_nocancel, __write_nocancel,
2144 __waitpid_nocancel): Add attribute_hidden. If not in libc.so,
2145 libpthread.so or librt.so, define to corresponding function
2146 without _nocancel suffix.
2147 * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
2148 * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
2149 * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
2150
abf1cf21
JJ
2151 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
2152
8348dcc8
UD
21532003-09-02 Ulrich Drepper <drepper@redhat.com>
2154
2155 * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
1e03e0af 2156 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
8348dcc8
UD
2157
2158 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
2159 in subsections has a symbol associated with it.
2160
2161 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
2162 defined symbol for entry point to avoid cancellation.
2163 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
2164
c874a32e
UD
21652003-09-01 Jakub Jelinek <jakub@redhat.com>
2166
2167 * Makefile (tests): Add tst-tls5.
2168 (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
2169 ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
2170 ($(objpfx)tst-tls5): New.
2171 ($(objpfx)tst-tls6.out): Likewise.
2172 (tests): Depend on $(objpfx)tst-tls6.out.
2173 * tst-tls3.c: Include stdint.h and pthreaddef.h.
2174 (do_test): Check pthread_self () return value alignment.
2175 * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
2176 (tf): Check pthread_self () return value alignment.
2177 * tst-tls5.c: New test.
2178 * tst-tls5.h: New.
2179 * tst-tls5mod.c: New.
2180 * tst-tls5moda.c: New.
2181 * tst-tls5modb.c: New.
2182 * tst-tls5modc.c: New.
2183 * tst-tls5modd.c: New.
2184 * tst-tls5mode.c: New.
2185 * tst-tls5modf.c: New.
2186 * tst-tls6.sh: New test.
2187
c503d3dc
UD
2188 * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
2189 ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
2190 * init.c (pthread_functions): Initialize them.
2191 * forward.c (pthread_cond_timedwait@GLIBC_2.0,
2192 pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
2193 * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
2194 pthread_cond_timedwait@@GLIBC_2.3.2.
2195
48614753
JJ
21962003-09-01 Jakub Jelinek <jakub@redhat.com>
2197
56a1b877
JJ
2198 * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
2199 * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
2200 * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
2201 * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
2202 * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
2203 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
2204
2205 * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
2206
48614753
JJ
2207 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
2208 _POSIX_THREAD_PRIORITY_SCHEDULING.
2209 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
2210
28c97261
UD
22112003-08-31 Ulrich Drepper <drepper@redhat.com>
2212
eef80cf8
UD
2213 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
2214 nested function, use static inline function from libio.h.
2215 Code by Richard Henderson.
2216
28c97261
UD
2217 * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
2218 weak.
2219
cd2fbe58
UD
22202003-08-30 Jakub Jelinek <jakub@redhat.com>
2221
2222 * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
2223 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
2224 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
2225 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
2226 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
2227 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
2228 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
2229 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
2230 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
2231 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
2232 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
2233 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
2234 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
2235 * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
2236 * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
2237 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
2238 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
2239 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
2240 * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
2241 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
2242 * sysdeps/sparc/sparc32/pthreaddef.h: New file.
2243 * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
2244 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
2245 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
2246 * sysdeps/sparc/sparc64/pthreaddef.h: New file.
2247 * sysdeps/sparc/tls.h: New file.
2248 * sysdeps/sparc/tcb-offsets.sym: New file.
2249 * sysdeps/sparc/Makefile: New file.
2250 * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
2251 * init.c [__sparc__] (__NR_set_tid_address): Define.
2252
feda52c0
UD
22532003-08-29 Jakub Jelinek <jakub@redhat.com>
2254
2255 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
2256 _IO_release_lock): Define.
2257
7c868816
JJ
22582003-08-29 Jakub Jelinek <jakuB@redhat.com>
2259
0261d33f 2260 * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
7c868816
JJ
2261 sigemptyset before sigaddset. Reported by jreiser@BitWagon.com.
2262
68b9e1ae
UD
22632003-08-27 Ulrich Drepper <drepper@redhat.com>
2264
2265 * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
2266 (__pthread_cleanup_class): Add missing return types of member
2267 functions.
2268
13b3edfc
UD
22692003-08-26 Steven Munroe <sjmunroe@us.ibm.com>
2270
2271 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
2272 (lll_mutex_unlock_force): Add memory barrier between store and futex
2273 syscall.
2274
bb606fbe
UD
22752003-08-25 Ulrich Drepper <drepper@redhat.com>
2276
2277 * tst-cancel4.c (do_test): Also unlink tempfname and remove
2278 tempmsg in first loop.
2279
ee4e5a3d
UD
22802003-08-18 Ulrich Drepper <drepper@redhat.com>
2281
2282 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2283 _POSIX_THREAD_PRIORITY_SCHEDULING.
2284 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2285
334fcf2a
UD
22862003-08-07 Jakub Jelinek <jakub@redhat.com>
2287
2288 * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
2289 (__rtld_lock_default_lock_recursive,
2290 __rtld_lock_default_unlock_recursive): Define.
2291 [_LIBC && SHARED] (__rtld_lock_lock_recursive,
2292 __rtld_lock_unlock_recursive): Define using
2293 GL(_dl_rtld_*lock_recursive).
2294 * init.c (__pthread_initialize_minimal_internal): Initialize
2295 _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
2296 Lock GL(_dl_load_lock) the same number of times as
2297 GL(_dl_load_lock) using non-mt implementation was nested.
2298
2299 * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
2300 * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
2301
a30fb2df
UD
23022003-08-06 Jakub Jelinek <jakub@redhat.com>
2303
2304 * tst-cancel17.c (do_test): Make len2 maximum of page size and
2305 PIPE_BUF.
2306
ce0d30a0
JJ
23072003-08-07 Jakub Jelinek <jakub@redhat.com>
2308
2309 * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
2310
9c988b83
UD
23112003-08-03 Jakub Jelinek <jakub@redhat.com>
2312
2313 * sysdeps/pthread/createthread.c (do_clone): Move error handling
2314 to first syscall error check. Move syscall error check for tkill
2315 into __ASSUME_CLONE_STOPPED #ifdef.
2316
5c5252bd
UD
23172003-08-02 Ulrich Drepper <drepper@redhat.com>
2318
f1205aa7
UD
2319 * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
2320 is not defined, do explicit synchronization.
2321 (create_thread): Do not lock pd->lock here. If __ASSUME_CLONE_STOPPED
2322 is not defined also unlock pd->lock for non-debugging case in case
2323 it is necessary.
2324 * pthread_create.c (start_thread): Always get and release pd->lock
2325 if __ASSUME_CLONE_STOPPED is not defined.
2326 (start_thread_debug): Removed. Adjust users.
2327 * allocatestack.c (allocate_stack): Always initialize lock if
2328 __ASSUME_CLONE_STOPPED is not defined.
2329 * Makefile (tests): Add tst-sched1.
2330 * tst-sched1.c: New file.
2331
5c5252bd
UD
2332 * sysdeps/pthread/createthread.c (do_clone): Only use
2333 sched_setschduler and pass correct parameters.
2334
973d66e4
UD
23352003-07-31 Jakub Jelinek <jakub@redhat.com>
2336
2337 * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
2338 pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
2339 PTHREAD_STACK_MIN in comments.
2340
d347a4ab
UD
23412003-07-31 Jakub Jelinek <jakub@redhat.com>
2342
2343 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
2344 Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
2345 argument.
2346 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
2347 * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
2348 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
2349 (__pthread_cleanup_upto): Fix prototype.
2350 (_longjmp_unwind): Adjust caller.
2351 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
2352 Change second argument to const struct pointer.
2353 * tst-sem8.c (main): Remove unused s2 and s3 variables.
2354 * tst-sem9.c (main): Likewise.
2355 * unwind.c: Include string.h for strlen prototype.
2356
1b26e9a5
UD
23572003-07-31 Ulrich Drepper <drepper@redhat.com>
2358
2359 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2360 (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
2361 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
2362 Define HAVE_CMOV.
2363 Patch by Nicholas Miell <nmiell@attbi.com>.
2364
adc12574
UD
23652003-07-30 Jakub Jelinek <jakub@redhat.com>
2366
2367 * init.c (__pthread_initialize_minimal_internal): Initialize
2368 GL(dl_init_static_tls).
2369 * pthreadP.h (__pthread_init_static_tls): New prototype.
2370 * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
2371 New functions.
2372 * Makefile (tests): Add tst-tls4.
2373 (modules-names): Add tst-tls4moda and tst-tls4modb.
2374 ($(objpfx)tst-tls4): Link against libdl and libpthread.
2375 ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
2376 tst-tls4modb.so.
2377 * tst-tls4.c: New file.
2378 * tst-tls4moda.c: New file.
2379 * tst-tls4modb.c: New file.
2380
a7f6c66e
RM
23812003-06-19 Daniel Jacobowitz <drow@mvista.com>
2382
2383 * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
2384 before __timer_dealloc.
2385 * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
2386 Don't call list_unlink.
2387
172ce013
RM
23882003-07-29 Roland McGrath <roland@redhat.com>
2389
2390 * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
2391
7b787f85
UD
23922003-07-25 Jakub Jelinek <jakub@redhat.com>
2393
2394 * tst-cancel17.c (do_test): Check if aio_cancel failed.
2395 Don't reuse struct aiocb A if it failed.
2396 Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
2397 not just one byte, as that does not block.
2398
0e9d6240
UD
23992003-07-22 Jakub Jelinek <jakub@redhat.com>
2400
9d79e037
UD
2401 * sysdeps/pthread/unwind-resume.c: New file.
2402 * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
2403 unwind-resume in csu subdir.
2404 (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
2405 exceptions.
2406 (librt-sysdep_routines, librt-shared-only-routines): Add
2407 rt-unwind-resume.
2408 * sysdeps/pthread/rt-unwind-resume.c: New file.
2409 * unwind-forcedunwind.c: New file.
2410 * Makefile (libpthread-routines): Add unwind-forcedunwind.
2411 (libpthread-shared-only-routines): Likewise.
2412 (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
2413 * pthreadP.h (pthread_cancel_init): New prototype.
2414 * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
2415
2416 * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
2417 attr argument const struct pthread_attr *.
2418
0e9d6240
UD
2419 * res.c (__res_state): Return __resp.
2420 * descr.h: Include resolv.h.
2421 (struct pthread): Add res field.
2422 * pthread_create.c: Include resolv.h.
2423 (start_thread): Initialize __resp.
2424 * Makefile (tests): Add tst-_res1.
2425 (module-names): Add tst-_res1mod1, tst-_res1mod2.
2426 ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
2427 ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
2428 libpthread.
2429 * tst-_res1.c: New file.
2430 * tst-_res1mod1.c: New file.
2431 * tst-_res1mod2.c: New file.
2432
1a379ea0
UD
24332003-07-21 Ulrich Drepper <drepper@redhat.com>
2434
7e939b21
UD
2435 * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
2436
1a379ea0
UD
2437 * Makefile: Define various *-no-z-defs variables for test DSOs
2438 which has undefined symbols.
2439
ca86a763
UD
24402003-07-21 Steven Munroe <sjmunroe@us.ibm.com>
2441
2442 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
2443 Retry if the stwcx fails to store once_control.
2444
80f536db
UD
24452003-07-20 Ulrich Drepper <drepper@redhat.com>
2446
2447 * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
2448 pthread_attr_setaffinity.
2449 * Versions [libpthread] (GLIBC_2.3.3): Likewise.
2450 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
2451 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
2452 * pthread_attr_destroy.c: Free cpuset element if allocated.
2453 * pthread_create.c: Pass iattr as additional parameter to
2454 create_thread.
2455 * sysdeps/pthread/createthread.c: If attribute is provided and
2456 a new thread is created with affinity set or scheduling parameters,
2457 start thread with CLONE_STOPPED.
2458 * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
2459 pthread_attr_setaffinity.
2460 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
2461 cpuset element.
2462
73299943
UD
24632003-07-15 Ulrich Drepper <drepper@redhat.com>
2464
2465 * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
2466
da35d15e
UD
24672003-07-14 Ulrich Drepper <drepper@redhat.com>
2468
2469 * sysdeps/pthread/configure.in: Require CFI directives also for
2470 ppc and s390.
2471
75540d8a
UD
24722003-07-15 Jakub Jelinek <jakub@redhat.com>
2473
2474 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
2475 Add cfi directives.
2476
4a17085f
UD
24772003-07-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2478
2479 * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
2480 CLEANUP_JMP_BUF.
2481 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
2482 registers as variables. Call __pthread_mutex_unlock_usercnt.
2483 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2484 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
2485 not self pointer in __writer. Compare with TID to determine
2486 deadlocks.
2487 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
2488 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
2489 Likewise.
2490 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
2491 Likewise.
2492 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
2493 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
2494 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
2495 macros also when compiling librt.
2496
6080ecdf
UD
24972003-07-11 Jakub Jelinek <jakub@redhat.com>
2498
2499 * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
2500 -fasynchronous-unwind-tables.
2501 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
2502 (PSEUDO): Add cfi directives.
2503 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
2504 Likewise.
2505 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
2506 Likewise.
2507
da0c02ee
UD
25082003-07-08 Jakub Jelinek <jakub@redhat.com>
2509
2510 * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
2511 __pthread_unregister_cancel): Add prototypes and hidden_proto.
2512 * unwind.c (__pthread_unwind_next): Add hidden_def.
2513 * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
2514 Likewise.
2515 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
2516 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
2517 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
2518 Likewise.
2519 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
2520 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
2521 Likewise.
2522 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
2523 HIDDEN_JUMPTARGET to call __pthread_register_cancel,
2524 __pthread_unregister_cancel and __pthread_unwind_next.
2525
57a5ea02
UD
25262003-07-04 Jakub Jelinek <jakub@redhat.com>
2527
2528 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
2529 different symbol for the cancellation syscall wrapper and
2530 non-cancellation syscall wrapper.
2531 (PSEUDO_END): Define.
2532
d810b358
UD
25332003-07-05 Richard Henderson <rth@redhat.com>
2534
2535 * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
2536 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
42d86dd6
RH
2537 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
2538 return actual return value from the syscall, not 0.
d810b358 2539
db54f488
UD
25402003-07-07 Ulrich Drepper <drepper@redhat.com>
2541
2542 * descr.h (struct pthread): Add pid field.
2543 * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
2544 (__reclaim_stacks): Likewise.
2545 * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
2546 also check for PID of the signal source.
2547 (__pthread_initialize_minimal_internal): Also initialize pid field
2548 of initial thread's descriptor.
2549 * pthread_cancel.c: Use tgkill instead of tkill if possible.
2550 * sysdeps/unix/sysv/linux/fork.c: Likewise.
2551 * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
2552 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
2553 * sysdeps/unix/sysv/linux/raise.c: Likewise.
2554
5e497a41
UD
25552003-07-05 Ulrich Drepper <drepper@redhat.com>
2556
2557 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
2558 Fix use of parameter.
2559 (__libc_cleanup_pop): Likewise.
2560
86a0c4fa
UD
25612003-07-04 Ulrich Drepper <drepper@redhat.com>
2562
2563 * init.c (sigcancel_handler): Change parameters to match handler
2564 for SA_SIGACTION. Check signal number and code to recognize
2565 invalid invocations.
2566
bdbecaa3
RM
25672003-07-03 Roland McGrath <roland@redhat.com>
2568
2569 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
2570 Apply sizeof (struct pthread) bias to r13 value.
2571
56421b23
UD
25722003-07-03 Ulrich Drepper <drepper@redhat.com>
2573
fbd90f6c
UD
2574 * sysdeps/pthread/configure.in: Require CFI directives.
2575
56421b23
UD
2576 * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
2577 definition.
2578 * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
2579 libpthread compilation.
2580 * unwind.c (__pthread_unwind): Add hidden_def.
2581 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
2582
ca2b4cd7
UD
25832003-07-01 Ulrich Drepper <drepper@redhat.com>
2584
2585 * libc-cancellation.c (__libc_cleanup_routine): Define.
2586 * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
2587 (__pthread_cleanup_pop): Define.
2588
f036e569
UD
25892003-07-01 Richard Henderson <rth@redhat.com>
2590
2591 * sysdeps/alpha/elf/pt-initfini.c: New file.
2592 * sysdeps/alpha/pthread_spin_lock.S: New file.
2593 * sysdeps/alpha/pthread_spin_trylock.S: New file.
2594 * sysdeps/alpha/pthreaddef.h: New file.
2595 * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
2596 * sysdeps/alpha/tls.h: New file.
2597 * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
2598 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
2599 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
2600 * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
2601 * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
2602 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
2603 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
2604 * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
2605 * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
2606 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
2607
3b985826
UD
26082003-07-01 Ulrich Drepper <drepper@redhat.com>
2609
2610 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
2611 cleanup support and unwind info.
2612
3a4d1e1e
UD
26132003-06-30 Ulrich Drepper <drepper@redhat.com>
2614
2615 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
2616 Use correct cleanup handler registration. Add unwind info.
96c814d3
UD
2617 * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
2618 * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
3a4d1e1e
UD
2619 * tst-once3.c: Add cleanup handler and check it is called.
2620 * tst-once4.c: Likewise.
2621 * tst-oncex3.c: New file.
2622 * tst-oncex4.c: New file.
2623 * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
2624
e479cc8e
UD
26252003-06-29 Ulrich Drepper <drepper@redhat.com>
2626
2627 * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
2628
7d7ff54c
UD
26292003-06-27 Ulrich Drepper <drepper@redhat.com>
2630
483e95d0
UD
2631 * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
2632 (tf_msgsnd): Likewise.
2633
7d7ff54c
UD
2634 * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
2635 premature returns a bit more.
2636
7539c7ec
UD
26372003-06-26 Ulrich Drepper <drepper@redhat.com>
2638
2639 * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
2640 definition to the front.
2641
2642 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
2643 the cleanup functions to make the names unique. Fix dwarf opcode
2644 un unwind table.
2645 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
2646 functions to make the names unique. Fix CFA offset for two blocks.
2647
0af6a1d9
UD
26482003-06-25 Ulrich Drepper <drepper@redhat.com>
2649
2650 * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
2651 missing closing braces.
2652 Patch by Christophe Saout <christophe@saout.de>.
2653
eef4a9f3
RM
26542003-06-24 Roland McGrath <roland@redhat.com>
2655
2656 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
2657
4165d44d
UD
26582003-06-24 Ulrich Drepper <drepper@redhat.com>
2659
7f8f7b9d
UD
2660 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
2661 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
2662
4165d44d
UD
2663 * pthreadP.h: Declare __find_thread_by_id.
2664 * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
2665 * pthread_clock_gettime.c: Allow using other thread's clock.
2666 * pthread_clock_settime.c: Likewise.
2667 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
2668 * Makefile: Add rules to build and run tst-clock2.
2669 * tst-clock2.c: New file.
2670
67b78ef9
UD
26712003-06-23 Ulrich Drepper <drepper@redhat.com>
2672
2673 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
2674 to use exception-based cleanup handler.
2675 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2676
2677 * tst-cond8.c (ch): Announce that we are done.
2678
2679 * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
2680
2681 * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
2682 Also test aio_suspend with timeout value.
2683
61623643
UD
26842003-06-22 Ulrich Drepper <drepper@redhat.com>
2685
3a4f2043
UD
2686 * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
2687 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
2688 attribute_hidden.
2689
61623643
UD
2690 * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
2691 (__pthread_mutex_lock_internal): Likewise.
2692 (__pthread_mutex_unlock_internal): Likewise.
2693 (__pthread_mutex_unlock_usercnt): Declare.
2694 * pthread_mutex_destroy.c: Always fail if used in any way.
2695 * pthread_mutex_init.c: Update comment.
2696 * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
2697 * pthread_mutex_timedlock.c: Adjust __nusers.
2698 * pthread_mutex_trylock.c: Adjust __nusers.
2699 * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
2700 and public interfaces are wrapper with pass additional parameter.
2701 __pthread_mutex_unlock_usercnt does not adjust __nusers if second
2702 parameter zero.
2703 * tst-mutex8.c: New file.
2704 * Makefile (tests): Add tst-mutex8.
2705 * sysdeps/pthread/pthread_cond_timedwait.c: Call
2706 __pthread_mutex_unlock_usercnt.
2707 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
2708 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2709 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2710 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2711 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2712 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
2713 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
2714 Add __nusers.
2715 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2716 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2717 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2718 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
2719 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2720
2721 * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
2722 * pthread_mutex_timedlock.c: Likewise.
2723 * pthread_mutex_trylock.c: Adjust __nusers.
2724 * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
2725 * tst-mutex9.c: New file.
2726 * Makefile (tests): Add tst-mutex9.
2727 * sysdeps/i386/tls.h: Remove THREAD_ID definition.
2728 * sysdeps/ia64/tls.h: Likewise.
2729 * sysdeps/powerpc/tls.h: Likewise.
2730 * sysdeps/s390/tls.h: Likewise.
2731 * sysdeps/sh/tls.h: Likewise.
2732 * sysdeps/x86_64/tls.h: Likewise.
2733 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
2734 Change type of __owner.
2735 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2736 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2737 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2738 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
2739 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2740
9bdabb94
UD
27412003-06-19 Jakub Jelinek <jakub@redhat.com>
2742
2743 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
2744 * sysdeps/unix/sysv/linux/sem_post.c: ...here.
2745
2746 * sysdeps/unix/sysv/linux/sem_post.c: Move to...
2747 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here. Pass nr + 1
2748 instead of nr to lll_futex_wake. Only set errno and return -1
2749 if err < 0.
2750
2751 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
2752 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
2753 return actual return value from the syscall, not 0.
2754
f6c93bd9
UD
27552003-06-18 Ulrich Drepper <drepper@redhat.com>
2756
ca343e73
UD
2757 * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
2758 find a random value.
2759 (tf_msgrcv): Likewise. Also don't report msgrcv returns if
2760 errno==EIDRM.
2761
50441a98
UD
2762 * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
2763 compat_timer_settime.
2764 * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
2765 compat_timer_gettime.
2766 * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
9bdabb94 2767 compat_timer_getoverrun.
50441a98
UD
2768 * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
2769 compat_timer_delete.
2770
f6c93bd9
UD
2771 * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
2772 error-checking mutex detect busy mutexes.
2773
047aec8f
UD
27742003-06-17 Ulrich Drepper <drepper@redhat.com>
2775
1d53508d
UD
2776 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
2777 Add ax to clobber list.
2778 (lll_mutex_cond_lock): Likewise.
2779 (lll_mutex_unlock): Likewise.
2780 (lll_lock): Likewise.
2781 (lll_unlock): Likewise.
2782
f23b30e2
UD
2783 * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
2784 * tst-cancel18.c: New file.
2785 * tst-cancelx18.c: New file.
2786
2787 * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
2788 and tcdrain.
2789
2790 * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
2791 * tst-cancel17.c: New file.
2792 * tst-cancelx17.c: New file.
2793
2794 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
2795 * sysdeps/unix/sysv/linux/sigwait.c: New file.
2796 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
2797
047aec8f
UD
2798 * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
2799
bbde8527
UD
28002003-06-16 Jakub Jelinek <jakub@redhat.com>
2801
2802 * sysdeps/pthread/createthread.c (create_thread): Set
2803 header.multiple_threads unconditionally.
2804 * allocatestack.c (allocate_stack): Likewise.
2805 * descr.h (struct pthread): Add header.multiple_threads
2806 unconditionally.
2807 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
2808 Define for librt. #error if neither libpthread, libc nor librt.
2809 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
2810 Likewise.
2811 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
2812 CDISABLE): Likewise.
2813 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
2814 CDISABLE): Likewise.
2815 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
2816 CDISABLE): Likewise.
2817 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
2818 CDISABLE): Likewise. Access header.multiple_threads outside of
2819 libc and libpthread.
2820 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
2821 Likewise.
2822 * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
2823 * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
2824
26676450
UD
28252003-06-17 Ulrich Drepper <drepper@redhat.com>
2826
2827 * tst-cancel4.c: Add tests for the socket and signal functions, pause.
2828 Also test early cancellation before the thread reaches the cancellation
2829 point.
2830
2831 * Makefile: Compile forward.c with exceptions.
2832
2833 * sysdeps/unix/sysv/linux/sleep.c: New file.
2834
301a6724
UD
28352003-06-16 Ulrich Drepper <drepper@redhat.com>
2836
0e0deb03
UD
2837 * Makefile: Add CFLAGS definition to compile function wrappers
2838 duplicated from libc with exceptions.
2839 * tst-cancel4.c: Also check cancellation handlers.
2840
301a6724
UD
2841 * Makefile: Add rules to build and run tst-cancel16 and
2842 tst-cancelx16. Add missing CFLAGS definitions.
2843 * tst-cancel16.c: New file.
2844 * tst-cancelx16.c: New file.
2845
7a114794
UD
28462003-06-15 Ulrich Drepper <drepper@redhat.com>
2847
452aea84
UD
2848 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
2849 (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
2850 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
2851 (DL_SYSINFO_IMPLEMENTATION): Likewise.
2852
7a114794
UD
2853 * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
2854 (LIBC_CANCEL_RESET): Likewise.
2855 Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
2856 * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
2857 librt-cancellation.
2858 (CFLAGS-libcrt-cancellation.c): Define.
2859 * sysdeps/pthread/librt-cancellation.c: New file.
2860 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
2861 macros also when compiling librt.
2862 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
2863 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
2864 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
2865 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
2866 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
2867 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
2868 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
2869
2870 * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
2871 compat_timer_create.
2872
8ba1d429
UD
28732003-06-14 Ulrich Drepper <drepper@redhat.com>
2874
cc8fb6f3
UD
2875 * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
2876
8ba1d429
UD
2877 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
2878 __register_atfork.
2879 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
2880 Add libc_hidden_def.
2881
d4f100e2
RM
28822003-06-13 Roland McGrath <roland@redhat.com>
2883
2884 * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
2885 constant from <sys/reg.h> to ps_get_thread_area, not register contents.
2886
dd9423a6
UD
28872003-06-11 Ulrich Drepper <drepper@redhat.com>
2888
2889 * allocatestack.c (queue_stack): Always inline.
2890 * ptreadhP.h (__do_cancel): Likewise.
2891
ed24330d
JJ
28922003-06-10 Jakub Jelinek <jakub@redhat.com>
2893
2894 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
2895 a typo.
2896
06120d79
UD
28972003-06-10 Ulrich Drepper <drepper@redhat.com>
2898
2899 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
2900 (__pthread_cond_signal): Remove incorrect second addition for
2901 cond_lock!=0.
2902
b1720346
UD
29032003-06-09 Ulrich Drepper <drepper@redhat.com>
2904
5b318f85
UD
2905 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
2906 (__pthread_cond_signal): Use correct futex pointer in
2907 __lll_mutex_lock_wait call.
2908
b1720346
UD
2909 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
2910 (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
2911
3e36c37d
UD
29122003-06-08 Ulrich Drepper <drepper@redhat.com>
2913
ecf7955d
UD
2914 * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
2915 cancelable.
ed24330d 2916 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
ecf7955d
UD
2917 Likewise.
2918
3e36c37d
UD
2919 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
2920 hand-written CFI generation code. Since ENTRY/END also initiated
2921 CFI frames this caused two CFI sets to be generated.
2922
7726edc2
UD
29232003-06-07 Ulrich Drepper <drepper@redhat.com>
2924
2925 * cleanup_routine.c: New file.
2926 * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
2927 * sysdeps/pthread/pthread.h: Add support for fully exception-based
2928 cleanup handling.
2929 * Makefile (libpthread-routines): Add cleanup_routine.
2930 Add more CFLAGS variables to compile with exceptions. Add comments
2931 why which file needs unwind tables.
2932 (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
2933 tests.
2934 * tst-cancelx1.c: New file.
2935 * tst-cancelx2.c: New file.
2936 * tst-cancelx3.c: New file.
2937 * tst-cancelx4.c: New file.
2938 * tst-cancelx5.c: New file.
2939 * tst-cancelx6.c: New file.
2940 * tst-cancelx7.c: New file.
2941 * tst-cancelx8.c: New file.
2942 * tst-cancelx9.c: New file.
2943 * tst-cancelx10.c: New file.
2944 * tst-cancelx11.c: New file.
2945 * tst-cancelx12.c: New file.
2946 * tst-cancelx13.c: New file.
2947 * tst-cancelx14.c: New file.
2948 * tst-cancelx15.c: New file.
2949 * tst-cleanupx0.c: New file.
2950 * tst-cleanupx0.expect: New file.
2951 * tst-cleanupx1.c: New file.
2952 * tst-cleanupx2.c: New file.
2953 * tst-cleanupx3.c: New file.
2954
2955 * tst-cleanup0.c: Make standard compliant.
2956 * tst-cleanup1.c: Likewise.
2957
2958 * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
2959 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
2960 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2961 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2962 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
2963 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
2964 * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
2965 CLEANUP_JMP_BUF.
2966 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
2967 * tst-cancel12.c: New file.
2968 * tst-cancel13.c: New file.
2969 * tst-cancel14.c: New file.
2970 * tst-cancel15.c: New file.
2971 * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
2972 and tst-cancel15.
2973
2974 * tst-cancel1.c: Add some comments.
2975
2976 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
2977 timeout correctly.
2978
7a8a8e21
UD
29792003-06-06 Ulrich Drepper <drepper@redhat.com>
2980
2981 * Makefile (CFLAGS-pthread_cancel.c): Define.
2982
4ad0bbf4
UD
29832003-06-05 Ulrich Drepper <drepper@redhat.com>
2984
2985 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
2986 Change type of __writer element to int.
2987 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2988 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2989 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2990 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2991 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2992 * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
2993 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
2994 * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
2995 Compare with TID to determine deadlocks.
2996 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
2997 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
2998 * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
2999 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
3000 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
3001 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3002 Likewise.
3003 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3004 Likewise.
3005 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
3006 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3007 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3008 Likewise.
3009 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3010 Likewise.
3011 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3012 * Makefile (tests): Add tst-rwlock12.
3013 * tst-rwlock12.c: New file.
3014
332faa96
JJ
30152003-06-05 Jakub Jelinek <jakub@redhat.com>
3016
3017 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
3018 __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
3019 Remove bogus hidden_proto.
3020 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
3021 Likewise.
3022 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
3023 lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
3024 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
3025 ___lll_mutex_timedlock): Likewise.
3026
29d9e2fd
UD
30272003-06-04 Ulrich Drepper <drepper@redhat.com>
3028
3029 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
3030 (__pthread_cond_signal): Add some code to eventually handle
3031 cond_lock!=0.
3032
6f1acb30
UD
30332003-06-01 Ulrich Drepper <drepper@redhat.com>
3034
3035 * Makefile (tests): Add tst-exec4.
3036 (tst-exec4-ARGS): Define.
3037 * tst-exec4.c: New file.
3038
49b65043
UD
30392003-05-31 Ulrich Drepper <drepper@redhat.com>
3040
31195be2
UD
3041 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
3042 Also fail if tv_nsec < 0.
3043 (__lll_timedwait_tid): Likewise.
3044 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
3045 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
3046 Likewise.
3047 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
3048 Likewise.
3049 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
3050 Likewise.
3051 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
3052 Likewise.
80b54217
UD
3053 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
3054 Likewise.
3055 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
3056 Likewise.
31195be2 3057
dcfc8224
UD
3058 * Makefile (tests): Add tst-sem8 and tst-sem9.
3059 * tst-sem8.c: New file.
3060 * tst-sem9.c: New file.
3061 * sem_open.c: Fix creation of in_use record if the file exists but
3062 no internal record.
3063
49b65043
UD
3064 * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
3065 definitions.
3066
3067 * sysdeps/pthread/timer_create.c (timer_create): In case
3068 evp==NULL, assign timer ID to sival_ptr.
3069
3070 * descr.h (struct pthread_unwind_buf): Change type of prev element to
3071 struct pthread_unwind_buf *.
3072 (struct pthread): Likewise for cleanup_jmp_buf element.
3073
3074 * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
3075 * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
3076 * unwind.c (__pthread_unwind_next): Likewise.
3077
50794a45
UD
30782003-05-30 Ulrich Drepper <drepper@redhat.com>
3079
5d4f57bd
UD
3080 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
3081 (lll_futex_timed_wait): Use int for futex value parameter.
3082 (lll_futex_wake): Likewise.
3083 (lll_futex_requeue): Likewise.
3084
3085 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
3086 Replace one memory operation with one register operation.
3087
3088 * tst-join4.c (do_test): Fix error message.
3089
7ab7ea33
UD
3090 * tst-rwlock6.c (do_test): Use correct format specifier.
3091
3092 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
3093 (__lll_mutex_lock_wait): Replace one memory operation with one
3094 register operation.
3095 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
3096 (__lll_mutex_lock_wait): Likewise.
3097
50794a45
UD
3098 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
3099 (__lll_mutex_cond_lock): Add one to value parameter of
3100 __lll_lock_wait to reflect reality in the futex syscall.
3101 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3102 (lll_mutex_cond_lock): Likewise.
3103
5a70784e
JJ
31042003-05-30 Jakub Jelinek <jakub@redhat.com>
3105
3106 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
3107 New function.
3108 (lll_mutex_cond_lock): Define.
3109
e7c5ac68
UD
31102003-05-29 Ulrich Drepper <drepper@redhat.com>
3111
586d1748
UD
3112 * Makefile (tests): Add tst-signal6.
3113 * tst-signal6.c: New file.
3114
b8ba4a27
UD
3115 * sysdeps/unix/sysv/linux/s390/lowlevellock.h
3116 (__lll_mutex_unlock_force): New function
3117 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
3118
65d46efe
UD
3119 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
3120 (__lll_mutex_unlock_force): New function.
3121 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
3122
3123 * tst-rwlock7.c (do_test): Use correct format specifier.
3124
e7c5ac68
UD
3125 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
3126 Find break parameter in correct asm argument.
3127
284bdc42
UD
31282003-05-27 Jakub Jelinek <jakub@redhat.com>
3129
3130 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
3131 Remove out4.
3132 (lll_futex_requeue): Fix __o3 constraint, return negative errno if
3133 error occured.
3134 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
3135 Add __mutex.
3136 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
3137 lll_futex_requeue, lll_mutex_unlock_force): Define.
3138
e7c5ac68
UD
31392003-05-30 Jakub Jelinek <jakub@redhat.com>
3140
3141 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
3142 (pthread_cond_t): Add __mutex.
3143 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
3144 lll_futex_requeue, lll_mutex_unlock_force): Define.
3145
ea2630c6
UD
31462003-05-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3147
3148 * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
3149 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
42d86dd6 3150 Add __mutex field.
ea2630c6
UD
3151 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
3152 Define.
3153 (lll_futex_wait, lll_futex_wake): Define.
3154 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
3155 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
3156 FUTEX_REQUEUE instead of FUTEX_WAIT.
3157 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
3158 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
3159 mutex which was used in condvar structure. Call
3160 __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
3161 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
3162
3163 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
3164 include tcb-offsets.h. Read wakeup value in locked region.
3165 Use the value of gbr register as THREAD_ID.
3166 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
3167 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
3168 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
3169
3170 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
3171 macros.
3172
5a77f150
UD
31732003-05-28 Ulrich Drepper <drepper@redhat.com>
3174
3175 * sysdeps/pthread/pthread_cond_broadcast.c
3176 (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
3177
7661d9f7
UD
31782003-05-26 Ulrich Drepper <drepper@redhat.com>
3179
3180 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
3181 typo in register name.
3182 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
3183 correctly. Actually use requeue. Little optimization.
3184 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
3185 mutex address early. Handle cancellation state as 32-bit value.
3186 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3187 Remove unnecessary label.
3188
69431c9a
UD
31892003-05-25 Ulrich Drepper <drepper@redhat.com>
3190
3191 * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
3192 instead of FUTEX_WAIT.
3193 * sysdeps/pthread/pthread_cond_signal.c: Likewise.
3194 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
3195 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
3196 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
3197 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
3198 * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
3199 used in condvar structure. Call __pthread_mutex_cond_lock instead
3200 of __pthread_mutex_lock_internal.
3201 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3202 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3203 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
3204 (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
3205 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3206 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3207 * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
3208 Add pthread_mutex_cond_lock.
3209 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
3210 * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
3211 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
3212 lll_mutex_cond_lock.
3213 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3214 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
248a3490 3215 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
69431c9a 3216 Add __mutex field.
248a3490 3217 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
69431c9a
UD
3218 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3219
3220 * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
3221 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
3222
3223 * pthreadP.h: Declare __pthread_mutex_cond_lock.
3224 * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
3225 Use it instead of lll_mutex_lock. If __pthread_mutex_lock is a
3226 macro don't define aliases.
3227
3228 * cancellation.c: Remove __pthread_enable_asynccancel_2.
3229 * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
3230 * sysdeps/pthread/pthread_cond_timedwait.c: Use
3231 __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
3232 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3233 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3234 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
3235 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3236 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3237
fddfebbd
UD
32382003-05-17 Ulrich Drepper <drepper@redhat.com>
3239
3240 * sem_open.c: Fix one endless loop. Implement correct semantics
3241 wrt opening the same semaphore more then once.
3242 * sem_close.c: Adjust for sem_open change.
3243 * semaphoreP.h: Include <semaphore.h>. Define struct inuse_sem.
3244 Declare __sem_mappings, __sem_mappings_lock, __sem_search.
3245 * Makefile (tests): Add tst-sem7.
3246 * tst-sem7.c: New file.
3247
1eefffb0
RM
32482003-05-16 Roland McGrath <roland@redhat.com>
3249
3250 * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
3251 uninitialized variable braino.
3252
6e66dc78
UD
32532003-05-16 Ulrich Drepper <drepper@redhat.com>
3254
23ae6451
UD
3255 * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
3256 test for syscall availability.
3257
3258 * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
3259 __no_posix_timers to -1 if the syscalls don't exist.
3260
7ac5b8e2
UD
3261 * pthread_join.c (pthread_join): Set tid field of the joined
3262 thread to -1. This isn't necessary but helps to recognize some
3263 error conditions with almost no cost.
3264
3265 * allocatestack.c (FREE_P): Also negative values indicate an
3266 unused stack.
3267
6e66dc78
UD
3268 * unwind.c: Include <unistd.h>.
3269
855dba3c
UD
32702003-05-14 Ulrich Drepper <drepper@redhat.com>
3271
3272 * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
3273
81f3ac4c
UD
32742003-05-14 Jakub Jelinek <jakub@redhat.com>
3275
3276 * Makefile (crti-objs, crtn-objs): New variables.
3277 (omit-deps, extra-objs): Add crtn.
3278 ($(objpfx)libpthread.so): Depend on both crti and crtn
3279 and links to them in multidir.
3280 ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
3281
7158eae4
UD
32822003-05-12 Steven Munroe <sjmunroe@us.ibm.com>
3283
3284 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3285 (lll_mutex_unlock): Use atomic_exchange_rel.
3286
edf205d5
UD
32872003-05-11 Ulrich Drepper <drepper@redhat.com>
3288
3289 * cond-perf.c (cons): Add missing locking around setting of alldone.
3290
a3f979a7
UD
32912003-05-10 Ulrich Drepper <drepper@redhat.com>
3292
3293 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
3294 related macros.
3295 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
3296
880867a4
UD
32972003-05-09 Ulrich Drepper <drepper@redhat.com>
3298
949ec764
UD
3299 * tst-sem6.c: New file.
3300 * Makefile (tests): Add tst-sem6.
3301
3302 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
3303 Use atomic_exchange_rel instead of atomic_exchange.
3304 * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
3305 Likewise.
3306
3307 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
3308 code for lll_futex_wait and lll_futex_wake in static apps. Use
3309 vsyscall is possible.
3310
3311 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
3312 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
3313 * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
3314 pthread_setaffinity_np.
3315 * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
3316 and pthread_setaffinity_np.
3317 * Makefile (libpthread-routines): Add pthread_getaffinity and
3318 pthread_setaffinity.
3319
880867a4
UD
3320 * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
3321 use it in case mmap to allocate the stack fails.
3322 * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
3323 ARCH_MAP_FLAGS here.
3324 * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
3325 ARCH_RETRY_MMAP.
3326
92d83c72
UD
33272003-05-08 Ulrich Drepper <drepper@redhat.com>
3328
3329 * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
3330 handler implementation. It is now lockless in fork().
3331 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
3332 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
3333 * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>. Don't
3334 declare the __fork_*_lists.
3335 (struct fork_handler): Include pointers to all three functions.
3336 Add next, refcntr and need_signal elements.
3337 (__fork_handlers): New declaration.
3338 (__register_atfork_malloc): Remove declaration.
3339 (HAVE_register_atfork_malloc): Remove definition.
3340 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
3341 __pthread_child_handler variable.
3342 (__libc_pthread_init): Use __register_atfork instead of explicitly
3343 adding to the list.
3344 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
3345 and lll_futex_wake.
3346 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3347
3348 * unwind.c (unwind_cleanup): Print error message and then abort. This
3349 function must never be reached.
3350
3351 * cond-perf.c: New file.
3352
be4d8038
UD
33532003-05-05 Ulrich Drepper <drepper@redhat.com>
3354
3355 * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
3356
c6696b79
RM
33572003-05-04 Roland McGrath <roland@redhat.com>
3358
3359 * Makefile ($(objpfx)../libc.so): New target.
3360
7da168bf
UD
33612003-05-02 Ulrich Drepper <drepper@redhat.com>
3362
3363 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
3364 (pthread_condattr_t): Size is only an int, don't use long for
3365 alignment.
3366 (pthread_mutexattr_t): Likewise.
7da168bf
UD
3367 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3368 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3369 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3370
9a7178d6
UD
33712003-05-01 Ulrich Drepper <drepper@redhat.com>
3372
3373 * sysdeps/i386/tls.h: Define THREAD_ID.
3374 * sysdeps/ia64/tls.h: Likewise.
3375 * sysdeps/powerpc/tls.h: Likewise.
3376 * sysdeps/s390/tls.h: Likewise.
3377 * sysdeps/sh/tls.h: Likewise.
3378 * sysdeps/x86_64/tls.h: Likewise.
3379 * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
3380 record ownership.
3381 * pthread_mutex_timedlock.c: Likewise.
3382 * pthread_mutex_trylock.c: Likewise.
3383 * pthread_mutex_unlock.c: Likewise.
3384 * pthread_rwlock_trywrlock.c: Likewise.
3385 * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
3386 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
3387 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
3388 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
3389
3390 * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
3391 flag.
3392
a234e27d
UD
33932003-04-29 Jakub Jelinek <jakub@redhat.com>
3394
3395 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
3396 (__SIZEOF_PTHREAD_COND_T): Define to 48.
3397 (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
3398 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
3399 Make __align long long instead of long.
3400 (pthread_rwlock_t): Formatting.
3401 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
3402 (pthread_rwlock_t): Formatting.
3403 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
3404 (pthread_cond_t): Make __align long long instead of long.
3405 (pthread_rwlock_t): Move __flags field to the same position as in
3406 linuxthreads.
3407
f025c136
UD
34082003-04-30 Ulrich Drepper <drepper@redhat.com>
3409
3410 * tst-rwlock6.c (do_test): Use correct printf format specifiers.
3411 * tst-rwlock7.c (do_test): Likewise.
3412
7531ab9e
RM
34132003-04-26 Roland McGrath <roland@redhat.com>
3414
3415 * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
3416
299601a1
UD
34172003-04-22 Jakub Jelinek <jakub@redhat.com>
3418
299601a1
UD
3419 * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
3420 sizeof (struct pthread).
3421 (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
468777e1 3422 1 struct pthread.
299601a1
UD
3423 * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
3424 to 0.
3425 (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
3426 struct pthread.
3427 (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
3428 to 32-bit bytes.
3429 (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
3430 tcbp.
3431 (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
3432 unneccessarily.
3433 (NO_TLS_OFFSET): Define.
299601a1
UD
3434 * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
3435 add TLS_TCB_SIZE unnecessarily.
299601a1 3436
950094f8
RM
34372003-04-22 Roland McGrath <roland@redhat.com>
3438
3439 * Makeconfig (shared-thread-library): Reverse link order to work
3440 around linker bug.
3441
dc2f6455
UD
34422003-04-22 Ulrich Drepper <drepper@redhat.com>
3443
3444 * semaphore.h: Fix typo in comment.
3445
e7608d77
UD
34462003-04-21 Ulrich Drepper <drepper@redhat.com>
3447
6a87ee19
UD
3448 * sysdeps/pthread/sigfillset.c: New file.
3449
e7608d77
UD
3450 * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
3451 * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
3452 * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
3453 * sysdeps/pthread/sigaction.c: Likewise.
3454 * sysdeps/pthread/sigprocmask.c: New file.
3455 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
3456 __SIGRTMIN+1.
3457 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
3458 Block SIGTIMER. Also handle SI_TKILL events and terminate thread
3459 in this case.
3460
0b3df49e
UD
34612003-04-19 Ulrich Drepper <drepper@redhat.com>
3462
58a7a325
UD
3463 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
3464 (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
3465
0b3df49e
UD
3466 * sysdeps/unix/sysv/linux/unregister-atfork.c
3467 (__unregister_atfork): Don't free memory not allocated dynamically.
3468
3469 * semaphore.h: Remove __THROW marker from cancellation points.
3470 * nptl/sysdeps/pthread/pthread.h: Likewise.
3471
7d74651e
UD
34722003-04-18 Ulrich Drepper <drepper@redhat.com>
3473
76a67697
UD
3474 * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
3475 pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
7d74651e
UD
3476 __THROW.
3477
dd9d6538
JJ
34782003-04-16 Jakub Jelinek <jakub@redhat.com>
3479
3480 * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
3481
4ab6f47c
RM
34822003-04-15 Roland McGrath <roland@redhat.com>
3483
3484 * forward.c (__pthread_unwind): Tweak to avoid warning.
3485
162434a6
UD
34862003-04-15 Ulrich Drepper <drepper@redhat.com>
3487
3488 * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
3489
35909161
UD
34902003-04-14 Ulrich Drepper <drepper@redhat.com>
3491
18ddd3aa 3492 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
35909161
UD
3493 overflow CFA advance instructions.
3494 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3495
18a8e730
UD
34962003-04-14 Jakub Jelinek <jakub@redhat.com>
3497
bd4f43b4
UD
3498 * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
3499 * sysdeps/i386/pthread_spin_lock.c: Likewise.
3500 * sysdeps/x86_64/tls.h: Likewise. Define LOCK_PREFIX if not already
3501 defined.
3502
18a8e730
UD
3503 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
3504 DW_CFA_advance_loc2 for .Laddl-.Lsubl.
3505 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
3506 DW_CFA_advance_loc for .Laddl-.Lsubl.
3507
08c765fa
UD
35082003-04-13 Ulrich Drepper <drepper@redhat.com>
3509
18a8e730
UD
3510 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
3511 position-independent unwind data for static libraries.
3512 Add missing unwind info. Add comments.
3513
ad2be852
UD
3514 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
3515 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3516 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
08c765fa
UD
3517 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3518
177d1ad3
UD
35192003-04-12 Ulrich Drepper <drepper@redhat.com>
3520
08c765fa
UD
3521 * Makefile: Make sure all cancellation points are compiled with
3522 exception and asynchronous unwind tables.
3523
177d1ad3
UD
3524 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
3525 which mishandles loading of global object addresses in PIC.
3526 (THREAD_SETMEM_NC): Likewise.
3527
09d65ff3
UD
35282003-04-11 Ulrich Drepper <drepper@redhat.com>
3529
3530 * pthread.h: Define new data structure for cleanup buffer. Declare
3531 new cleanup handler interfaces.
3532 * descr.h: Include <unwind.h> if necessary. Define pthread_unwind_buf.
3533 (struct pthread): Add cleanup_jmp_buf pointer. Define
3534 HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
3535 * pthreadP.h: Declare __pthread_unwind. Define __do_cancel to use
3536 it. Declare old cleanup handler installation functions.
3537 * cleanup.c: Rewrite. Install handler for unwind-based cleanup
3538 handling.
3539 * cleanup_defer.c: Likewise.
3540 * cleanup_compat.c: New file. Old cleanup code.
3541 * cleanup_def_compat.c: New file. Old cleanup code.
3542 * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
3543 if own thread descriptor.
3544 * unwind.c: New file.
3545 * forward.c: Add __pthread_unwind.
3546 * init.c (pthread_functions): Add __pthread_unwind.
3547 * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
3548 Add ptr___pthread_unwind.
3549 * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
3550 and unwind function.
3551 * Makefile (libpthread-routines): Add cleanup_compat,
3552 cleanup_def_compat, and unwind. Define CFLAGS to enable unwind
3553 table generation if necessary.
3554 * version.c: Record whether unwind support is compiled in.
3555 * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
3556 * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
3557 handler interfaces.
3558 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
3559 complication to generate unwind information for syscall wrappers.
68107ec0 3560 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
09d65ff3
UD
3561 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
3562 __cleanup_fct_attribute.
3563
3564 * Makefile: Add rules to build and run tst-cleanup0.
3565 * tst-cleanup0.c: New file.
3566 * tst-cleanup0.expect: New file.
3567
3568 * pthread_create.c (deallocate_tsd): Don't take parameter. Adjust
3569 caller. Optimize to avoid often unecessary local variable.
3570
0dc44b51
RM
35712003-04-11 Roland McGrath <roland@redhat.com>
3572
3573 * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
3574 sets variable `multidir'; include that.
3575 (generated): Add it.
3576 ($(objpfx)$(multidir)/crti.o): New target.
3577 [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
3578
84a80719
UD
35792003-04-11 Ulrich Drepper <drepper@redhat.com>
3580
3581 * tst-attr2.c (do_test): Add cast to avoid warning.
3582 * tst-mutex4.c (do_test): Likewise.
3583
88ff4759
UD
35842003-04-10 Ulrich Drepper <drepper@redhat.com>
3585
3586 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
3587 in child.
3588
b2041097
UD
35892003-04-09 Ulrich Drepper <drepper@redhat.com>
3590
3591 * Makefile (tests): Add tst-detach1.
3592 * tst-detach1.c: New file.
3593
f9657e88
UD
35942003-04-08 Ulrich Drepper <drepper@redhat.com>
3595
9afe4964
UD
3596 * sysdeps/pthread/pthread.h: Remove duplicate
3597 pthread_cleanup_{push,pop} definitions.
3598
f9657e88
UD
3599 * tst-barrier2.c: Eliminate warnings.
3600 * tst-cancel4.c: Likewise.
3601 * tst-cond4.c: Likewise.
3602 * tst-cond6.c: Likewise.
3603 * tst-detach1.c: Likewise.
3604 * tst-rwlock4.c: Likewise.
3605 * tst-rwlock6.c: Likewise.
3606 * tst-rwlock7.c: Likewise.
3607 * tst-sem3.c: Likewise.
3608 * tst-spin2.c: Likewise.
3609 * tst-umask1.c: Likewise.
3610
69b35e86
UD
36112003-04-07 Ulrich Drepper <drepper@redhat.com>
3612
3613 * pthread_detach.c (pthread_detach): Fix test for invalid TID.
3614
c70ad7d7
UD
36152003-04-06 Ulrich Drepper <drepper@redhat.com>
3616
3617 * descr.h (struct pthread): Move cancelhandling member to the front.
3618
54e0138f
UD
36192003-04-05 Ulrich Drepper <drepper@redhat.com>
3620
3621 * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
3622 malloc_parent, and malloc_child statically.
3623 (__register_atfork_malloc): New function.
3624 (free_mem): Don't free any of the malloc_* variables on the list.
3625 * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
3626 Define HAVE_register_atfork_malloc.
3627
b22d701b
UD
36282003-04-04 Ulrich Drepper <drepper@redhat.com>
3629
3630 * sysdeps/pthread/createthread.c (create_thread): Add some more
3631 comments explaining when to set multiple_threads and when not.
3632
3633 * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
3634 THREAD_ATOMIC_BIT_SET if not already defined.
3635 * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
3636 THREAD_ATOMIC_BIT_SET:
3637 * sysdeps/x86_64/tls.h: Likewise.
3638 * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
3639 THREAD_ATOMIC_CMPXCHG_VAL.
3640 (_pthread_cleanup_pop_restore): Likewise.
3641 * cancellation.c (__pthread_enable_asynccancel): Likewise.
3642 (__pthread_enable_asynccancel_2): Likewise.
3643 (__pthread_disable_asynccancel): Likewise.
3644 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
3645 (__libc_disable_asynccancel): Likewise.
3646 * init.c (sigcancel_handler): Likewise.
3647 * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
3648 * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
3649
86246935
UD
36502003-04-03 Ulrich Drepper <drepper@redhat.com>
3651
3652 * init.c (sigcancel_handler): Don't set EXITING_BIT here.
3653 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
3654 * pthreadP.h (__do_cancel): Set EXITING_BIT here.
3655 * Makefile (tests): Add tst-cancel11.
3656 * tst-cancel11.c: New file.
3657
6b4686a5
UD
36582003-04-01 Ulrich Drepper <drepper@redhat.com>
3659
3660 * pthread_create.c (deallocate_tsd): Clear/free memory after the last
3661 round, not the first. Use specific_used flag instead of local
3662 found_nonzero variable. Use THREAD_[SG]ETMEM where possible.
3663 (__free_tcb): Don't call deallocate_tsd here.
3664 (start_thread): Call deallocate_tsd here.
3665 * pthread_setspecific.c: Set specific_used flag really only when
3666 needed.
0d73a73b 3667 * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
6b4686a5 3668 * tst-tsd3.c: New file.
0d73a73b 3669 * tst-tsd4.c: New file.
6b4686a5 3670
42b2395d
UD
36712003-03-31 Ulrich Drepper <drepper@redhat.com>
3672
211d90c5
UD
3673 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
3674 Use atomic_exchange_and_add instead of __lll_add.
3675 (__lll_mutex_timedlock): Likewise.
3676 Patch by Ian Wienand.
3677
36782003-03-24 Steven Munroe <sjmunroe@us.ibm.com>
3679
3680 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
3681 (SINGLE_THREAD_P): Fix typo.
3682 * tst-cancel-wrappers.sh: Handle '.'ed symbols.
3683
36842003-03-31 Ulrich Drepper <drepper@redhat.com>
3685
3686 * Makefile (tests): Add tst-align.
3687 * tst-align.c: New file.
3688 * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
211d90c5 3689
42b2395d
UD
3690 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
3691 function correctly.
3692
211d90c5
UD
3693 * tst-tsd2.c: Add casts to avoid warnings.
3694
163b180f
UD
36952003-03-30 Ulrich Drepper <drepper@redhat.com>
3696
3697 * descr.h (struct pthread): Move most often used elements to the front.
3698
ea473bad
UD
36992003-03-29 Ulrich Drepper <drepper@redhat.com>
3700
3701 * Makefile (libpthread-routines): Add pthread_atfork.
3702 (libpthread-static-only-routines): Add pthread_atfork.
3703
dd731d53
UD
37042003-03-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3705
3706 * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
3707 of TLS_DTV_AT_TP.
3708 (INSTALL_DTV): Add parens.
3709 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
3710 Use passed descr instead of THREAD_SELF.
3711 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
3712 (__lll_mutex_timedlock_wait): Correct expected value after
3713 spurious wakeup.
3714 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
3715 Release lock before waking up the waiters.
3716 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
3717 criteria. Reorderstruct passed to cleanup handler. Fix
3718 handling of cancellation and failung pthread_mutex_unlock call.
3719 Use __pthread_enable_asynccancel_2 instead of
3720 __pthread_enable_asynccancel.
3721 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
3722 Return result of lock re-get if it fails.
3723 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
3724 for __pthread_cleanup_push.
3725 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
3726 completely broken rwlock implementation.
3727 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
3728 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
3729 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
3730 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
3731 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
3732 * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value. Use
3733 versioned_symbol macro.
3734 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
3735 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
3736
c75d02f0
UD
37372003-03-27 Ulrich Drepper <drepper@redhat.com>
3738
5f5004df
UD
3739 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
3740 __timer_helper_thread. Declare __start_helper_thread, __helper_once,
3741 and __helper_tid.
3742 (struct timer): Remove th and bar field.
3743 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
3744 debugging code. Create only one helper thread.
3745 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
3746 helper thread.
3747 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
3748 Renamed. Define statically. Use thread info from siginfo.
3749 (__helper_once): New variable.
3750 (__helper_tid): New variable.
3751 (__reset_helper_control): New function.
3752 (__start_helper_thread): New function.
3753
18d009ca
UD
3754 * pthread_create.c (start_thread): Don't use setjmp inside
3755 __builtin_expect to work around gcc bug.
3756
c75d02f0
UD
3757 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
3758 timer_delete syscall fails, but not with ENOSYS, set
3759 __no_posix_timers.
3760
3761 * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
3762 (timer_settime): Fix typo.
28cf3058
UD
3763 * sysdeps/unix/sysv/linux/timer_getoverr.c
3764 [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
c75d02f0 3765
049ac259
JJ
37662003-03-27 Jakub Jelinek <jakub@redhat.com>
3767
3768 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
3769 offset of cleanupbuf.__prev.
3770
f93d39dd
JJ
37712003-03-26 Jakub Jelinek <jakub@redhat.com>
3772
3773 * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
3774 of included file.
3775
f064e4c5
UD
37762003-03-26 Ulrich Drepper <drepper@redhat.com>
3777
3778 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
3779 NULL provide default definition to syscall.
3780
83e886a3
RM
37812003-03-25 Roland McGrath <roland@redhat.com>
3782
3783 * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
3784 (timer_id2ptr): Fix typo.
3785
09402f5b
UD
37862003-03-25 Ulrich Drepper <drepper@redhat.com>
3787
3788 * pthreadP.h: Define SIGCANCEL and SIGTIMER.
3789 * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
3790 * sysdeps/ia64/pthreaddef.h: Likewise.
3791 * sysdeps/powerpc/pthreaddef.h: Likewise.
3792 * sysdeps/s390/pthreaddef.h: Likewise.
3793 * sysdeps/sh/pthreaddef.h: Likewise.
3794 * sysdeps/x86_64/pthreaddef.h: Likewise.
3795 * init.c (__pthread_initialize_minimal): Block SIGTIMER.
3796 * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
3797 being changed.
3798 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
3799 SIGTIMER is not unblocked.
3800 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
3801 RT signal taken.
3802 * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
3803 be send.
3804 * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
3805 pass pointer through as ID.
3806 * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
3807 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
3808 * sysdeps/unix/sysv/linux/timer_create.c: New file.
3809 * sysdeps/unix/sysv/linux/timer_delete.c: New file.
3810 * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
3811 * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
3812 * sysdeps/unix/sysv/linux/timer_routines.c: New file.
3813 * sysdeps/unix/sysv/linux/timer_settime.c: New file.
3814 * sysdeps/unix/sysv/linux/ia64/Versions: New file.
3815 * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
3816 * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
3817 * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
3818 * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
3819 * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
3820 * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
3821 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
3822 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
3823 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
3824 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
3825 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
3826 * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
3827 * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
3828 * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
3829 * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
3830 * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
3831 * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
3832 * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
3833 * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
3834 * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
3835 * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
3836 * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
3837 * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
3838 * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
3839
3840 * pthreadP.h: Remove FRAME_LEFT definition.
3841 * cleanup.c (_pthread_cleanup_push): Don't check for reference to
3842 already left frame. Programs which have this problem are not POSIX
3843 compliant.
3844 * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
3845
5e826ab5
UD
38462003-03-24 Ulrich Drepper <drepper@redhat.com>
3847
3848 * sysdeps/pthread/tst-timer.c: Check return values of the
3849 functions we test.
3850
b910f788
RM
38512003-03-23 Roland McGrath <roland@redhat.com>
3852
3045a1fe
RM
3853 * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
3854 * tst-tls3mod.c: Likewise.
3855 * tst-tls1.c: Likewise.
3856 * tst-tls2.c: Likewise.
3857
85047fe3
RM
3858 * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
3859 undefined behavior.
3860
b910f788
RM
3861 * tst-join5.c (tf1, tf2): Add a cast.
3862
3863 * Makeconfig (includes): Append -I$(..)nptl to this variable.
3864
3865 * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
3866 Don't test anything.
3867 * tst-cond4.c: Likewise.
3868 * tst-cond6.c: Likewise.
3869 * tst-flock2.c: Likewise.
3870 * tst-mutex4.c: Likewise.
3871 * tst-rwlock4.c: Likewise.
3872 * tst-signal1.c: Likewise.
3873 * tst-spin2.c: Likewise.
3874 * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
3875
3876 * tst-mutex4.c: Use test-skeleton.c.
3877 * tst-spin2.c: Likewise.
3878 * tst-sysconf.c: Likewise.
3879 * tst-barrier2.c: Likewise.
3880 * tst-cond4.c: Likewise.
3881 * tst-cond6.c: Likewise.
3882 * tst-rwlock4.c: Likewise.
3883 * tst-unload.c: Likewise.
3884 * tst-flock2.c (do_test): Use return instead of exit.
3885
4baa087a
RM
38862003-03-22 Jakub Jelinek <jakub@redhat.com>
3887
3888 * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
3889
5a3ab2fc
UD
38902003-03-21 Ulrich Drepper <drepper@redhat.com>
3891
9f07eae2
UD
3892 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
3893 (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
3894 instead of __lll_compare_and_swap.
3895 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
3896 Likewise.
3897 Removed definition if __lll_compare_and_swap.
3898
5a3ab2fc
UD
3899 * cancellation.c: Adjust for new form of compare&exchange macros.
3900 * cleanup_defer.c: Likewise.
3901 * init.c: Likewise.
3902 * libc-cancellation.c: Likewise.
3903 * old_pthread_cond_broadcast.c: Likewise.
3904 * old_pthread_cond_signal.c: Likewise.
3905 * old_pthread_cond_timedwait.c: Likewise.
3906 * old_pthread_cond_wait.c: Likewise.
3907 * pthread_cancel.c: Likewise.
3908 * pthread_create.c: Likewise.
3909 * pthread_detach.c: Likewise.
3910 * pthread_join.c: Likewise.
3911 * pthread_key_delete.c: Likewise.
3912 * pthread_setcancelstate.c: Likewise.
3913 * pthread_setcanceltype.c: Likewise.
3914 * pthread_timedjoin.c: Likewise.
3915 * pthread_tryjoin.c: Likewise.
3916 * sysdeps/pthread/createthread.c: Likewise.
3917
b1aea098
UD
39182003-03-20 Ulrich Drepper <drepper@redhat.com>
3919
3920 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
4baa087a 3921 Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
b1aea098
UD
3922 definitions. Replace uses with calls to atomic_* functions.
3923 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3924 * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
3925 __lll_test_and_set calls with atomic_exchange_and_add and
3926 atomic_exchange calls respectively.
3927 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
3928 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
3929 * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
3930 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
3931 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
3932 * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
3933 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
3934
3935 * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
3936 returns the old value.
3937
100a7100
RM
39382003-03-20 Martin Schwidefsky <sky@mschwid3.boeblingen.de.ibm.com>
3939
3940 * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
3941 int for variable OLDVAL and correct inline assembler contraint.
3942 * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
3943 type int for variable OLD.
3944
3945 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
3946 only for s390-32.
3947 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
3948 (SINGLE_THREAD_P): Use global variable __local_multiple_threads
3949 instead of multiple_threads field in the TCB.
3950
95767b36
UD
39512003-03-19 Ulrich Drepper <drepper@redhat.com>
3952
4009bf40
UD
3953 * sysdeps/i386/i686/bits/atomic.h: Removed.
3954 * sysdeps/i386/i586/bits/atomic.h: Removed.
3955 * sysdeps/i386/i486/bits/atomic.h: Removed. Moved to glibc.
3956 * sysdeps/x86_64/bits/atomic.h: Removed. Moved to glibc.
3957 * sysdeps/s390/bits/atomic.h: Removed. Moved to glibc.
3958 * sysdeps/sh/bits/atomic.h: Removed. Moved to glibc.
3959 * sysdeps/ia64/bits/atomic.h: Removed. Moved to glibc.
3960 * sysdeps/powerpc/bits/atomic.h: Removed. Moved to glibc.
3961 * atomic.h: Removed. Moved to glibc.
3962
560a784f
UD
3963 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
3964 support for clock selection.
3965
95767b36
UD
3966 * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
3967 signalling waiters.
3968
043ad426
RM
39692003-03-18 Roland McGrath <roland@redhat.com>
3970
94659495
RM
3971 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
3972 Add __lll_rel_instr first. Add memory clobber.
3973 (lll_mutex_unlock): Use __lll_test_and_set.
3974 From Paul Mackerras <paulus@samba.org>.
3975
3976 * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
3977 unconditionally.
3978 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
3979 (SINGLE_THREAD_P): Add `header.' prefix.
3980 From Paul Mackerras <paulus@samba.org>.
3981
043ad426
RM
3982 * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
3983 pthread_timedjoin_np to ...
3984 (libpthread: GLIBC_2.3.3): ... here.
3985 (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
3986
3987 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
3988 Avoid shadowing VAL variable.
3989
3990 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
3991 New macro.
3992
86a9ee5e
UD
39932003-03-18 Ulrich Drepper <drepper@redhat.com>
3994
ac9e0aa1
UD
3995 * Makefile (tests): Add tst-cond11.
3996 * tst-cond11.c: New file.
3997
a14b373c
UD
3998 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
3999 struct passed to cleanup handler to eliminate one more
4000 instruction.
4001 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4002
24a49f38
UD
4003 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
4004 (pthrad_cond_t): Replace __unused field with __clock.
4005
4006 * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
4007 waken all waiters in cleanup handler.
4008 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4009 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4010
86a9ee5e
UD
4011 * pthread_condattr_getclock.c: New file.
4012 * pthread_condattr_setclock.c: New file.
4013 * sysdeps/pthread/pthread.h: Declare these new functions.
4014 * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
4015 * Makefile (libpthread-routines): Add the new functions.
4016 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
4017 Renamed field to value. Document use of the bits.
4018 * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
4019 change.
4020 * pthread_condattr_setpshared.c: Likewise.
d5cb8389 4021 * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
86a9ee5e
UD
4022 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
4023 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4024 Add __clock field.
4025 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4026 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4027 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4028 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4029 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
4030 Implement clock selection.
4031 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
4032 * pthread-errnos.sym: Add ENOSYS.
4033 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
4034 _POSIX_CLOCK_SELECTION.
4035 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4036
4037 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
4038 invalid .size directive.
4039
98054a05
RM
40402003-03-17 Roland McGrath <roland@redhat.com>
4041
4042 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
4043 Formatting tweaks.
4044
001bea71
UD
40452003-03-17 Ulrich Drepper <drepper@redhat.com>
4046
4773086e
UD
4047 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
4048 Use __lll_add instead of spelling it out. Use protected symbol names.
4049 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
4050 Use __lll_add.
4051 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
4052 Renamed from lll_compare_and_swap. Use new name where necessary.
4053 (__lll_add): Defined.
4054 (__lll_dec_if_positive): Defined.
4055 (__lll_test_and_set): Defined.
4056 * sysdeps/ia64/pthread_spin_init.c: Removed.
4057 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
4058 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
4059 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
4060 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
4061 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
4062 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
4063 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
001bea71
UD
4064 * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
4065 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
4066 __sync_lock_release_si.
4067 Patch by Jakub Jelinek.
4068
4069 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
4070 Fix timeout handling.
4071 (__lll_timedwait_tid): Likewise.
4072 (lll_unlock_wake_cb): Wake up other waiters if necessary.
4073 Patch by Jakub Jelinek.
4074
4075 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
4076
de4471dd
RM
40772003-03-17 Roland McGrath <roland@redhat.com>
4078
4079 PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
4080 * sysdeps/pthread/pthread_spin_init.c: New file.
4081 * sysdeps/pthread/pthread_spin_unlock.c: New file.
4082 * sysdeps/powerpc/Makefile: New file.
4083 * sysdeps/powerpc/pthread_spin_lock.c: New file.
4084 * sysdeps/powerpc/pthread_spin_trylock.c: New file.
4085 * sysdeps/powerpc/pthreaddef.h: New file.
4086 * sysdeps/powerpc/tcb-offsets.sym: New file.
4087 * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
4088 * sysdeps/powerpc/tls.h: New file.
4089 * sysdeps/powerpc/bits/atomic.h: New file.
4090 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
4091 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
4092 * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
98054a05 4093
de4471dd
RM
4094 * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
4095 * sysdeps/unix/sysv/linux/sem_post.c: New file.
4096 * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
4097 * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
4098 * sysdeps/unix/sysv/linux/sem_wait.c: New file.
4099 * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
4100 * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
4101 * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
4102 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
4103 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
4104 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
4105 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
4106 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
4107 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
4108 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
4109
4110 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
4111 not gettimeofday.
4112 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
4113 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
4114 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
4115 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
4116 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
4117
5778033f
UD
41182003-03-17 Ulrich Drepper <drepper@redhat.com>
4119
4120 * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
4121 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
4122 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4123 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4124 Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
4125
796038f8
RM
41262003-03-16 Roland McGrath <roland@redhat.com>
4127
4128 * tst-fork4.c: Include <string.h>.
4129 * tst-signal2.c: Likewise.
4130 * tst-mutex5.c (do_test): exit -> return.
4131 * tst-mutex2.c: Include <stdlib.h>.
4132
51d0678c
UD
41332003-03-16 Ulrich Drepper <drepper@redhat.com>
4134
5778033f
UD
4135 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
4136 (__lll_mutex_timedlock_wait): Correct expected value after
4137 spurious wakeup. Otherwise we would never wait again.
4138
b6e2f87a
UD
4139 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
4140 zone versus inline asm stupidity. Use correct instructions.
4141
51d0678c
UD
4142 * tst-rwlock6.c: Add some more status output.
4143
8112cc70
RM
41442003-03-15 Roland McGrath <roland@redhat.com>
4145
4146 * sysdeps/pthread/configure.in: New file.
4147 * sysdeps/pthread/configure: New file (generated).
4148
49773c19
UD
41492003-03-15 Ulrich Drepper <drepper@redhat.com>
4150
4151 * allocatestack.c (allocate_stack): Store the exact stack size of
4152 user allocated stacks.
4153
eec0ca9f
JJ
41542003-03-15 Jakub Jelinek <jakub@redhat.com>
4155
4156 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
4157 (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
4158 * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
4159 * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
4160 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
4161 Use `header.' prefix.
4162 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
4163
a87731e2
UD
41642003-03-15 Ulrich Drepper <drepper@redhat.com>
4165
4166 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
4167 __builtin_frame_address, use stack pointer.
4168
4169 * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
4170 instead of __builtin_frame_pointer.
4171
e22a221d
UD
41722003-03-14 Ulrich Drepper <drepper@redhat.com>
4173
92ed3daf
UD
4174 * tst-basic1.c (do_test): Add cast to avoid warning.
4175 * tst-basic2.c (do_test): Likewise.
4176
9b89567d
UD
4177 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
4178 amount of stack correction.
4179
e22a221d
UD
4180 * tst-fork4.c: Use test-skeleton.c.
4181
2e49caba
RM
41822003-03-14 Roland McGrath <roland@redhat.com>
4183
4184 * init.c: Fix typo "#eli" for "#else".
4185
415ef7d8
RM
41862003-03-14 Steven Munroe <sjmunroe@us.ibm.com>
4187
4188 * allocatestack.c (__stack_user): Use hidden_data_def.
4189 * pthread_create.c (__pthread_keys): Likewise.
4190
4191 * init.c [__powerpc__] (__NR_set_tid_address): Define it.
4192
52287505
RM
41932003-03-14 Roland McGrath <roland@redhat.com>
4194
415ef7d8
RM
4195 * tst-fork4.c: New file.
4196 * Makefile (tests): Add it.
4197
52287505
RM
4198 * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
4199 we always define the padding space.
4200 [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
4201 stopped supporting its own extensions fully.
4202 [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
4203 struct also called `header', so `header.multiple_threads' is the field
4204 name to use on all machines.
4205 * allocatestack.c (allocate_stack): Use `header.' prefix.
4206 * sysdeps/pthread/createthread.c (create_thread): Likewise.
4207 * pthread_create.c (__pthread_create_2_1): Likewise.
4208 * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
4209 (THREAD_SELF): Likewise.
4210 * sysdeps/x86_64/tls.h: Likewise.
4211 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
4212 (SINGLE_THREAD_P): Likewise.
4213 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
4214 (SINGLE_THREAD_P): Likewise.
4215 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
4216 (SINGLE_THREAD_P): Likewise.
4217
4218 * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
4219 value directly.
4220
c44bf9aa
UD
42212003-03-14 Ulrich Drepper <drepper@redhat.com>
4222
e22a221d
UD
4223 * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
4224 * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
4225
0eb18281
UD
4226 * pthread_create.c (start_thread): setjmp is expected to return 0.
4227
c44bf9aa
UD
4228 * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
4229 (THREAD_GETMEM_NC): Likewise.
4230
564cd8b6
UD
42312003-03-13 Ulrich Drepper <drepper@redhat.com>
4232
4233 * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
4234 and the size of the stack which must be allocated is a multiple,
4235 allocate one more page.
4236 * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
4237 MULTI_PAGE_ALIASING.
4238
6461e577
RM
42392003-03-13 Roland McGrath <roland@redhat.com>
4240
4241 * pthread_create.c (start_thread): Set EXITING_BIT after the
4242 event-reporting (and destructors), not before.
4243
b5ec5617
UD
42442003-03-13 Jakub Jelinek <jakub@redhat.com>
4245
6461e577
RM
4246 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
4247 lll_futex_wake): Declare register variables as long int instead of
4248 unsigned long int. Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
4249 Make syscall arguments clobbered by the syscall.
4250 (lll_futex_wait): Define using lll_futex_timed_wait.
4251
4252 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
4253 to void *.
4254
4255 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
4256 PPID if [! NDEBUG].
4257
4258 * allocatestack.c (nptl_ncreated): Only declare if
4259 COLORING_INCREMENT != 0.
4260
4261 * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
4262 (__libc_enable_asynccancel_2): Remove prototype.
4263
b5ec5617
UD
4264 * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
4265 ctid to match kernel.
4266
d0369fb8
UD
42672003-03-12 Ulrich Drepper <drepper@redhat.com>
4268
7588880f
UD
4269 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
4270 libc_multiple_threads.
4271 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
4272 __libc_multiple_threads to...
4273 * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here. New file.
4274
4275 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
4276 versioning.
4277 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
4278 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
4279
4280 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
4281 (__pthread_once_internal): Define.
4282
4283 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
4284 macros instead of .symver directly.
4285 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
4286 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
4287
d0369fb8
UD
4288 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
4289 * sysdeps/x86_64/tcb-offsets.sym: New file.
4290 * sysdeps/x86_64/Makefile: New file.
4291
4292 * sysdeps/i386/tcb-offsets.sym: Add SELF.
4293 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
4294 to access own pthread_t in TCB.
4295 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
4296 Likewise.
4297 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
4298 Likewise.
4299 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
4300
0bb2ac85
RM
43012003-03-12 Roland McGrath <roland@redhat.com>
4302
4303 * pthread-errnos.sym: New file.
4304 * Makefile (gen-as-const-headers): New variable, list that file.
4305 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
4306 header <pthread-errnos.h> instead of defining errno values here.
4307 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
4308 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
4309 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
4310 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
4311 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
4312 Likewise.
4313 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
4314 Likewise.
4315 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
4316 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4317 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
4318 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
4319 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
4320 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
4321 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
4322 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
4323 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4324 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
4325 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
4326 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
4327 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
4328 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
4329 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
4330 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
4331 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
4332 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
4333 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4334 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
4335 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
4336 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
4337 * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
4338 * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
4339 * sysdeps/sh/pthread_spin_trylock.S: Likewise.
4340 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
4341 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
4342
4343 * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
4344 CLONE_CHILD_SETTID worked.
4345
35e148cb
UD
43462003-03-12 Ulrich Drepper <drepper@redhat.com>
4347
d0369fb8
UD
4348 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
4349 file.
4350 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
4351 file.
4352
4353 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
4354 (pthread_cond_t): Add padding.
4355
da49194d
UD
4356 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
4357 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
4358 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
4359
35e148cb
UD
4360 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
4361 (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
4362 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
4363 (__pthread_rwlock_timedrdlock): Likewise.
4364 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
4365 (__pthread_rwlock_wrlock): Likewise.
4366 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
4367 (__pthread_rwlock_rdlock): Likewise.
4368
4369 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
4370
4371 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
4372 result of lock re-get if it fails.
4373
3e976b96
UD
43742003-03-11 Ulrich Drepper <drepper@redhat.com>
4375
5a03acfe
UD
4376 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
4377 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4378 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
4379 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
4380 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4381 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
4382 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
4383 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
4384 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
4385 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
4386
4387 * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
4388 THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
4389
4390 * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
4391 Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
4392 * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
4393 (create_thread): Likewise.
4394 Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
4395 * init.c (__pthread_initialize_minimal_internal): Initialize
4396 __libc_multiple_threads_ptr if necessary.
4397 * pthreadP.h: Adjust prototype for __libc_pthread_init. Declare
4398 __pthread_multiple_threads and __libc_multiple_threads_ptr.
4399 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
4400 __libc_multiple_threads.
4401 (__libc_pthread_init): Return pointer to __libc_pthread_init if
4402 necessary.
4403
4404 * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
4405 (THREAD_SETMEM_NC): Likewise.
4406
4407 * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
4408 * sysdeps/x86_64/pthread_spin_trylock.S: New file.
4409 * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
4410 * sysdeps/x86_64/pthread_spin_unlock.S: New file.
4411
4412 * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
4413 Eliminate one entire instruction.
4414
32a589b1
UD
4415 * cancellation.c (__pthread_enable_asynccancel_2): New function.
4416 * pthreadP.h: Declare __pthread_enable_asynccancel_2.
4417 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4418 (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
4419 instead of __pthread_enable_asynccancel.
4420 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
4421 (__pthread_cond_wait): Likewise.
4422 * sysdeps/pthread/pthread_cond_timedwait.c
4423 (__pthread_cond_timedwait): Likewise.
4424 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
4425
3e976b96
UD
4426 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
4427 (__condvar_cleanup): Wake up all waiters in case we got signaled
4428 after being woken up but before disabling asynchronous
4429 cancellation.
4430 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
4431 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
4432 (__condvar_cleanup): Likewise.
4433
4434 * init.c (__NR_set_tid_address): If already defined, don't redefine.
4435 Make it an error if architecture has no #if case. Add x86-64.
4436
4437 * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
4438 pt-initfini.s generation.
4439
4440 * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
4441 (TLS_INIT_TP): Fix typo.
4442
6c477888
UD
44432003-03-11 Jakub Jelinek <jakub@redhat.com>
4444
4445 * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
4446 3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
4447
4448 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
4449 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
4450 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
4451 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
4452 * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
4453 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
4454 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
4455 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
4456
ea694823
UD
44572003-03-11 Ulrich Drepper <drepper@redhat.com>
4458
6c477888
UD
4459 * sysdeps/pthread/pthread_cond_timedwait.c
4460 (__pthread_cond_timedwait): Return the result of the final
4461 locking. If it succeeds, the regular function return value.
4462
4463 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
4464 Return result of the final locking.
4465 * version.c (__nptl_main): Work around problems with the strange
4466 INTERNAL_SYSCALL macro on ppc32.
4467 * init.c (__pthread_initialize_minimal_internal): Unblock
4468 SIGCANCEL in case the parent blocked it.
4469 Reported by Paul Mackerras <paulus@samba.org>.
4470
ea694823
UD
4471 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
4472 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
4473 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
4474
b33e6163
RM
44752003-03-11 Jakub Jelinek <jakub@redhat.com>
4476
4477 * sysdeps/pthread/pthread_cond_timedwait.c
4478 (__pthread_cond_timedwait): Unlock and fail if
4479 __pthread_mutex_unlock_internal failed.
4480
4481 * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
4482 (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
4483 Use ARCH_CLONE.
4484 * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
4485 [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
4486 STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
4487 ALLOCATE_STACK): New macros.
4488 (TLS_TPADJ): New macro.
4489 (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
4490 (allocate_stack): Handle TLS_DTV_AT_TP and
4491 NEED_SEPARATE_REGISTER_STACK. Use TLS_TPADJ.
4492 * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
4493 Don't set PD->self.
4494 * init.c [__ia64__] (__NR_set_tid_address): Define.
4495
4496 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
4497 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
4498 * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
4499 * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
4500 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
4501 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
4502 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
4503 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
4504 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
4505 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
4506 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
4507 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
4508 * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
4509 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
4510 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
4511 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
4512 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
4513 * sysdeps/ia64/bits/atomic.h: New file.
4514 * sysdeps/ia64/Makefile: New file.
4515 * sysdeps/ia64/pthread_spin_init.c: New file.
4516 * sysdeps/ia64/pthread_spin_lock.c: New file.
4517 * sysdeps/ia64/pthread_spin_trylock.c: New file.
4518 * sysdeps/ia64/pthread_spin_unlock.c: New file.
4519 * sysdeps/ia64/pthreaddef.h: New file.
4520 * sysdeps/ia64/tcb-offsets.sym: New file.
4521 * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
4522 * sysdeps/ia64/tls.h: New file.
4523
4524 * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
4525 to syscall instead of no arguments.
4526
2b30b2e5
UD
45272003-03-10 Ulrich Drepper <drepper@redhat.com>
4528
db5f2fc9
UD
4529 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
4530 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
4531 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
4532 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
4533
4534 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
4535 unused code.
4536
6a4263e3
UD
4537 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
4538
3de7c2a9
UD
4539 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
4540 lowlevelbarrier.sym.
4541 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
4542 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
4543 Include lowlevelbarrier.h and don't define offsets locally.
6a4263e3 4544 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
3de7c2a9 4545
2a544d82
UD
4546 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
4547 (__lll_mutex_lock_wait): Reverse order of first two parameters.
4548 (__lll_mutex_timedlock_wait): Likewise.
4549 (lll_mutex_lock): Adjust asm for that.
4550 (lll_mutex_timedlock): Likewise. Mark cx, cc, r10 as clobbered.
4551 (lll_lock): Adjust asm for operand order change.
4552 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
4553 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
4554
ec06436c
UD
4555 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
4556 Reverse order of parameters.
4557 (__lll_timedwait_tid): Remove regparms attribute.
4558 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
4559 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
4560
3273832c
UD
4561 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4562 (__lll_timedwait_tid): Remove one unnecessary instruction.
4563
51f32ab8
UD
4564 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
4565 __lll_mutex_timedlock_wait only for NOT_IN_libc.
4566 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
4567 lowlevelmutex.S.
4568
4569 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
4570 lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
4571 for NOT_IN_libc.
4572 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
4573 lowlevellock.S.
4574
fad48d9e
UD
4575 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
4576 LOCK is already defined. Don't define __lll_mutex_timedlock_wait
4577 for libc.so.
4578 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
4579 define LOCK here (if UP is not defined). The actual code is in
4580 lowlevelmutex.S.
4581
9356d063
UD
4582 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
4583 LOCK is already defined. Don't define lll_unlock_wake_cb and
4584 __lll_timedwait_tid for libc.so.
4585 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
4586 define LOCK here (if UP is not defined). The actual code is in
4587 lowlevellock.S.
4588
ebf0cbc5 4589 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
106f6f9d
UD
4590 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
4591 * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
4592 instead of lowlevelsem.h.
4593 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
4594 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
4595 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
0be8ee21 4596
c915e5ad
UD
4597 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
4598 lowlevelrwlock.sym.
4599 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
4600 * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
146fa1ee 4601 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
c915e5ad 4602
4c3c2e8a
UD
4603 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
4604 register loading.
4605 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
4606 last changed. D'oh.
4607
2b30b2e5
UD
4608 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
4609
4610 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
4611 of __libc_locking_needed.
4612 (lll_trylock): Initialize %eax to zero.
4613
2b30b2e5
UD
4614 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
4615 pthread_cond_t definition.
4616
e48f9638
RM
46172003-03-10 Roland McGrath <roland@redhat.com>
4618
4619 * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
4620 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
4621 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
4622 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
4623 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
4624
4625 * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
4626 Instead of setting PD->multiple_threads, set globals
4627 __pthread_multiple_threads and __libc_multiple_threads.
4628 * sysdeps/pthread/createthread.c (create_thread): Likewise.
4629 * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
4630 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
4631
4632 * descr.h (struct pthread): Conditionalize first member on
4633 [!TLS_DTV_AT_TP]. Replace the `header' member with an anonymous union
4634 containing an anonymous tcbhead_t. Move `list' member out.
4635 [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
4636 * allocatestack.c: Remove use of `header.data.' prefix.
4637 * pthread_create.c: Likewise.
4638 * init.c (__pthread_initialize_minimal_internal): Likewise.
4639 * sysdeps/pthread/createthread.c (create_thread): Likewise.
4640 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
4641 (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
4642 * sysdeps/x86_64/tls.h: Likewise.
4643 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
4644 (SINGLE_THREAD_P): Likewise.
4645 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
4646 (SINGLE_THREAD_P): Likewise.
4647 * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
4648 * sysdeps/s390/tls.h (tcbhead_t): Likewise.
4649
c37cae9e
UD
46502003-03-09 Ulrich Drepper <drepper@redhat.com>
4651
d38c777e
RM
4652 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
4653
7b44a5e0 4654 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
2b30b2e5 4655 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
7b44a5e0 4656
c2e5e085
UD
4657 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
4658 leftovers from the ia32 code.
4659
4660 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
4661 memory load.
4662 (clear_once_control): Don't load %esi.
4663
4664 * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
4665 handling.
4666
4667 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
4668
cd4b2a55
UD
4669 * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
4670 * sysdeps/unix/sysv/linux/createthread.c: ...here.
4671
c37cae9e
UD
4672 * Makefile (tests): Add tst-cond10.
4673 * tst-cond10.c: New file.
4674
d130a341
UD
46752003-03-08 Ulrich Drepper <drepper@redhat.com>
4676
ccf1d573
UD
4677 * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
4678 * tst-signal3.c (do_test): Likewise.
4679 * tst-sem5.c (do_test): Likewise.
4680 * tst-kill6.c (do_test): Likewise.
4681 * tst-tls3.c (do_test): Likewise. Include <errno.h>.
4682
4683 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
4684 of inc/dec.
4685 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
4686 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
4687 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
4688 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
4689 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
4690 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
4691 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
4692 Likewise.
4693 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
4694 Likewise.
4695 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
4696 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4697 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4698 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
4699 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
4700 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
4701 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
4702 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
4703
d130a341
UD
4704 * allocatestack.c (allocate_stack): If mprotect() fails free the
4705 TLS memory.
4706
bc6389ad
UD
47072003-03-07 Ulrich Drepper <drepper@redhat.com>
4708
41d4d223
UD
4709 * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
4710
4711 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
4712 lll_wake_tid. This was used only to work around kernel limits in
4713 the early days.
4714 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
4715 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
4716 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
4717 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
4718
bc6389ad
UD
4719 * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
4720 (__pthread_initialize_minimal_internal): Change initialization of
4721 __static_tls_align_m1 appropriately.
4722 * pthreadP.h (__static_tls_align_m1): Renamed from
4723 __static_tls_align.
4724 * allocatestack.c (allocate_stack): Use __static_tls_align_m1
4725 instead of __static_tls_align-1.
4726
cc775edf
UD
47272003-03-04 Ulrich Drepper <drepper@redhat.com>
4728
0de28d5c 4729 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
6245b6ae 4730
518b5308
UD
4731 * pthread_create.c: Define __pthread_keys using nocommon
4732 attribute, not by placing it explicitly in bss.
4733 Remove DEFINE_DEALLOC definition. Not needed anymore.
4734
4735 * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
4736 Use it in mmap call to allocate stacks.
4737
4738 * sysdeps/pthread/createthread.c (create_thread): Fix comment.
4739
cc775edf
UD
4740 * pthread_create.c (start_thread): Use THREAD_SETMEM to store
4741 result of the thread function.
4742
4f6f0a8f
UD
47432003-03-03 Ulrich Drepper <drepper@redhat.com>
4744
f04a2721
UD
4745 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed. The generic
4746 version is just fine.
4747
4f6f0a8f
UD
4748 * sysdeps/unix/sysv/linux/libc_pthread_init.c
4749 (__pthread_child_handler): Renamed from pthread_child_handler,
4750 exported, and marked hidden. Change all users.
4751 * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
4752 free __pthread_child_handler from child list.
4753
7ce5c164
UD
47542003-03-03 Martin Schwidefsky <schwidefsky@de.ibm.com>
4755
4756 * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
4757
4758 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4759 Fix handling of cancellation and failing pthread_mutex_unlock call.
4760 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
4761 (__pthread_cond_wait): Likewise.
4762
4763 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
4764 (pthread_rwlock_timedrdlock): Fix clobber of result variable by
4765 lll_futex_timed_wait call.
4766 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4767 (pthread_rwlock_timedwrlock): Likewise.
4768
4769 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
4770 Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
4771 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
4772
4773 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
4774 check of lll_futex_wake return value.
4775
ea6a015b
RM
47762003-03-03 Roland McGrath <roland@redhat.com>
4777
4778 * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
4779
4780 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
4781 Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
4782 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
4783
4adacf57
UD
47842003-03-02 Ulrich Drepper <drepper@redhat.com>
4785
1be3d664
UD
4786 * sysdeps/pthread/timer_create.c (timer_create): Return correct
4787 error for CPU clocks.
4788
885bafa1
UD
4789 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
4790 _POSIX_MONOTONIC_CLOCK.
4791 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4792
4adacf57
UD
4793 * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
4794 recent kernels.
4795
86bfff4d
UD
47962003-03-01 Ulrich Drepper <drepper@redhat.com>
4797
4798 * descr.h (struct pthread): Move cleanup field to the front.
4799
d1149385
RM
48002003-03-01 Roland McGrath <roland@redhat.com>
4801
4802 * sem_open.c (sem_open): Braino fix.
4803
bd8bb78b
UD
48042003-03-01 Ulrich Drepper <drepper@redhat.com>
4805
748bec08
UD
4806 * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
4807 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
4808 __pthread_cleanup_pop functionality.
4809 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4810
bd8bb78b
UD
4811 * descr.h (struct pthread): Move tid field to the front now that
4812 it is often used.
4813
4814 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
4815 (__lll_mutex_timedlock_wait): Remove.
4816 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
4817 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
4818 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
4819 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4820 (lll_unlock_wake_cb): Don't save and restore %esi.
4821 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
4822 %esi.
4823 (__lll_timedwait_tid): Add alignment.
4824 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
4825 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
4826 %esi.
4827 (__lll_timedwait_tid): Removed.
4828 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
4829 (__pthread_cond_broadcast): Don't save, load, and restore %esi.
4830 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
4831 (pthread_barrier_wait): Don't save, load, and restore %esi for
4832 last thread.
4833 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
4834 (__pthread_cond_signal): Don't save, load, and restore %esi.
4835 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
4836 (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
4837 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
4838 Don't save, load, and restore %esi.
4839
d2637c70
UD
48402003-02-27 Ulrich Drepper <drepper@redhat.com>
4841
567fb22a
UD
4842 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
4843 Release lock before waking up the waiters.
4844
427f5fa1
UD
4845 * tst-exit1.c (do_test): Don't start more than one thread in parallel.
4846
a2d83cfb
UD
4847 * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
4848 (reader_thread): Likewise.
4849
d2637c70
UD
4850 * sysdeps/pthread/pthread_rwlock_unlock.c
4851 (__pthread_rwlock_unlock): Release internal lock early. Don't try
4852 to wake up readers if there are none.
4853
4854 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
4855 Release internal lock before wake threads.
4856
b1531183
UD
48572003-02-26 Ulrich Drepper <drepper@redhat.com>
4858
dbf6131c
UD
4859 * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
4860 * tst-rwlock8.c: Initialize lock with INIT. Allow INIT to be
4861 predefined.
4862 * tst-rwlock9.c: Likewise.
4863 * tst-rwlock10.c: New file.
4864 * tst-rwlock11.c: New file.
4865
695799fe
UD
4866 * Makefile (tests): Add tst-dlsym1.
4867 * tst-dlsym1.c: New file.
4868
b1531183
UD
4869 * init.c (__pthread_initialize_minimal_internal): Set
4870 GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
4871 * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
4872
3724f268
UD
48732003-02-24 Ulrich Drepper <drepper@redhat.com>
4874
3857ca78
UD
4875 * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
4876
80d80779
UD
4877 * tst-cond2.c: Fix sychronization with child.
4878
86371308
UD
4879 * tst-rwlock8.c (reader_thread): Remove unused variable.
4880
ffeb4481
UD
4881 * Makefile: Add rules to build and run tst-tls3.
4882 * tst-tls3.c: New file.
4883 * tst-tls3mod.c: New file.
4884
3724f268
UD
4885 * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
4886 * tst-rwlock8.c: New file.
4887 * tst-rwlock9.c: New file.
4888 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
4889 complete broken rwlock implementation.
4890 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
4891 Likewise.
4892 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
4893 Likewise.
4894 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
4895 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
18a53579
UD
4896 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
4897 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
4898 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
4899 * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
4900 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
3724f268 4901
8915cc40
RM
49022003-02-23 Roland McGrath <roland@redhat.com>
4903
4904 * Makefile (nptl-version): Change regexp so case sensitivity is ok.
4905
fd1a0d0c
UD
49062003-02-23 Ulrich Drepper <drepper@redhat.com>
4907
ecf28959
UD
4908 * Makefile (tests): Add tst-context1.
4909 * tst-context1.c: New file.
4910
5e47b76b
UD
4911 * Makefile (tests): Add tst-tls1 and tst-tls2.
4912 * tst-tls1.c: New file.
4913 * tst-tls2.c: New file.
4914
5a6bbb41
UD
4915 * libc-cancellation.c (__libc_enable_asynccancel): Correct test
4916 for failed cmpxchg.
4917
fd1a0d0c
UD
4918 * pthread_create.c (start_thread): Set EXITING_BIT early.
4919
4920 * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
4921 (THREAD_GETMEM_NC): Likewise.
4922
757f9fcb
UD
49232003-02-22 Ulrich Drepper <drepper@redhat.com>
4924
b1b8e747
UD
4925 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
4926 off 3 more bytes by using offset-less instructions when possible.
4927
c780aa21 4928 * Makefile: Add dependency for $(objpfx)version.d.
757f9fcb
UD
4929
4930 * eintr.c (eintr_source): Add unnecessary return but the compiler
4931 insists.
4932
4933 * tst-kill3.c: Include <unistd.h>.
4934
5148559c
RM
49352003-02-21 Roland McGrath <roland@redhat.com>
4936
4937 * pthread_create.c (start_thread): Call __libc_thread_freeres.
4938
ab2d98e3
UD
49392003-02-21 Ulrich Drepper <drepper@redhat.com>
4940
71028edd
UD
4941 * Makefile (tests): Add tst-eintr1.
4942 (distribute): Add eintr.c.
4943 * tst-eintr1.c: New file.
4944 * eintr.c: New file.
4945
e814f748
UD
4946 * pthread_cancel.c (pthread_cancel): Use tkill directly.
4947
4948 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
4949 Disallow sending SIGCANCEL.
4950
ab2d98e3 4951 * Makefile (tests): Remove tst-basic7. Add tst-kill1, tst-kill2,
9c03686d 4952 tst-kill3, tst-kill4, tst-kill5, tst-kill6.
e814f748
UD
4953 * tst-kill1.c: New file.
4954 * tst-kill2.c: New file.
4955 * tst-kill3.c: New file.
4956 * tst-kill5.c: New file.
9c03686d 4957 * tst-kill6.c: New file.
e814f748
UD
4958 * tst-basic7.c: Renamed to...
4959 * tst-kill4.c: ...this.
ab2d98e3 4960
59fed0e2
RM
49612003-02-21 Roland McGrath <roland@redhat.com>
4962
4963 * Makefile (install-lib-ldscripts): New variable.
4964
49dc759f
UD
49652003-02-21 Ulrich Drepper <drepper@redhat.com>
4966
8c2e9a29
UD
4967 * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
4968 * pthread_cancel.c: Use INVALID_TD_P.
4969 * pthread_detach.c: Likewise.
4970 * pthread_getschedparam.c: Likewise.
4971 * pthread_setschedparam.c: Likewise.
4972 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
4973 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
4974 * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
4975 * pthread_timedjoin.c: Likewise.
4976
4977 * tst-basic7.c: Include <signal.h>.
4978
49dc759f
UD
4979 * pthread_join.c (pthread_join): Limited checking for invalid
4980 descriptors.
4981 * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
4982
df5803bf
UD
49832003-02-20 Ulrich Drepper <drepper@redhat.com>
4984
c5acd3d7
UD
4985 * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
4986 beginning of the loop. Clear the entire first block of TSD.
df5803bf
UD
4987 * Makefile (tests): Add tst-key4.
4988 * tst-key4.c: New file.
4989
729924a0
UD
49902003-02-18 Ulrich Drepper <drepper@redhat.com>
4991
2f7dc594
UD
4992 * Makefile (tests): Add tst-basic7.
4993 * tst-basic7.c: New file.
4994
ba25bb0f
UD
4995 * pthread_create.c (deallocate_tsd): Mark as internal_function.
4996 Add some more __builtin_expect.
4997
12fd3c5f 4998 * pthreadP.h: Define dummy version of DEBUGGING_P.
729924a0 4999
5430d926
UD
50002003-02-17 Ulrich Drepper <drepper@redhat.com>
5001
b0db7fbe
UD
5002 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
5003 _POSIX_THREAD_PRIORITY_SCHEDULING.
5004 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
5005 _XOPEN_REALTIME_THREADS.
5006 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
5007
5008 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
5009 kernel returns EINVAL for PID <= 0, work around it.
5010
ecfda9bd
UD
5011 * Makefile (tests): Add tst-signal5.
5012 * tst-signal5.c: New file.
5013
7d78ab99
UD
5014 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
5015 and LOGIN_NAME_MAX.
5016
371a2972
UD
5017 * tst-cancel1.c (tf): Block all signals.
5018
5430d926
UD
5019 * Makefile (tests): Add tst-basic6.
5020 * tst-basic6.c: New file.
5021
5022 * tst-basic1.c: Add test for process ID.
5023
5024 * Makefile (tests): Add tst-cancel10.
5025 * tst-cancel10.c: New file.
5026
5027 * Makefile (tests): Add tst-signal4.
5028 * tst-signal4.c: New file.
5029
5030 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
5031 __sigismember instead of sigismember. Add __builtin_expect.
5032
1564916a
UD
50332003-02-16 Ulrich Drepper <drepper@redhat.com>
5034
179ff175
UD
5035 * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
5036 pthread_setcancelstate, and pthread_rwlock_setpshared.
5037
e4335f9a
UD
5038 * tst-cancel7.c (do_test): Make sure the pid file exists before
5039 canceling the thread.
5040
0a37669a
UD
5041 * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
5042 pthread_rwlock_timedrdlock tests.
5043 * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
5044 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
5045 Check for invalid tv_nsec field.
5046 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
5047 Likewise.
5048
5049 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
5050 recursive mutex of overflow.
5051
5052 * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
5053
e4335f9a 5054 * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
1564916a
UD
5055 going into an endless loop.
5056 * Makefile (tests): Add tst-cancel9.
5057 * tst-cancel9.c: New file.
5058
5059 * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
5060
b270b548
UD
50612003-02-15 Ulrich Drepper <drepper@redhat.com>
5062
1c82b97f
UD
5063 * tst-mutex5.c (do_test): Add more timedlock tests.
5064
b2f05465 5065 * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
c3bb9ee1
UD
5066 * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
5067
e798b60f
UD
5068 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
5069 use INLINE_SYSCALL. Error number is returned, not -1.
5070
90491dc4
UD
5071 * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
5072 and __deallocate_stack with internal_function.
5073 * pthread_create.c: Adjust definitions appropriately.
5074 * allocatestack.c: Likewise.
5075
5076 * pthread_join.c: Add one more __builtin_expect.
5077 * pthread_timedjoin.c: Likewise.
5078
5079 * pthread_getspecific.c (__pthread_getspecific): Clear data->data
5080 not data of sequence number does not match.
5081 Add one __builtin_expect.
5082
c6247c9d
UD
5083 * Makefile (tests): Add tst-clock1.
5084 * tst-clock1.c: New file.
5085
b270b548
UD
5086 * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
5087 negative arguments.
5088 * Makefile (tests): Add tst-basic5.
5089 * tst-basic5.c: New file.
5090
700bf7af
UD
50912003-02-14 Ulrich Drepper <drepper@redhat.com>
5092
757de559
UD
5093 * Makefile (tests): Add tst-basic4.
5094 * tst-basic4.c: New file.
5095
47202270
UD
5096 * pthreadP.h: Add declaraction for __nptl_nthreads.
5097 * pthread_create.c: Define __nptl_nthreads
5098 (start_thread): Increment __nptl_nthreads at beginning. Decrement
b270b548 5099 after thread is done. If then zero, call exit(0).
47202270
UD
5100 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
5101 Add ptr_nthreads. Define HAVE_PTR_NTHREADS.
5102 * init.c (pthread_functions): Initialize ptr_nthreads.
5103 * allocatestack.c (nptl_nthreads): Remove definition and all uses.
5104 (__reclaim_stacks): Decrement __nptl_nthreads.
5105 * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
5106 Define.
5107 * Makefile (tests): Add tst-basic3.
5108 * tst-basic3.c: New file.
5109
e320ef46
UD
5110 * descr.h: Define CANCELING_BIT and CANCELING_BITMASK. Introduce
5111 after CANCELTYPE_BIT, move the other bits up. Update CANCEL_RESTMASK.
5112 * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
5113 * pthread_cancel.c (pthread_cancel): Likewise. Also set CANCELING_BIT
5114 if asynchronous canceling is enabled.
5115 * pthread_join.c (pthread_join): When recognizing circular joins,
5116 take into account the other thread might be already canceled.
5117 * Makefile (tests): Add tst-join5.
5118 * tst-join5.c: New file.
5119
700bf7af
UD
5120 * Makefile (tests): Add tst-join4.
5121 * tst-join4.c: New file.
5122
51232003-02-13 Ulrich Drepper <drepper@redhat.com>
5124
5125 * tst-cond4.c (main): Add test of pthread_attr_getpshared.
5126
dac0f772
UD
51272003-02-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
5128
5129 * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
5130 THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
5131 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
5132 warning.
5133 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
5134 to avoid warning.
5135 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
5136 error if lll_futex_wake failed.
5137
e8cda341
UD
51382003-02-13 Ulrich Drepper <drepper@redhat.com>
5139
a7720b5e
UD
5140 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
5141 handling of cancellation and failung pthread_mutex_unlock call.
5142 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5143 * Makefile (tests): Add tst-cond8 and tst-cond9.
5144 * tst-cond8.c: New file.
5145 * tst-cond9.c: New file.
5146
a1ea4c06
UD
5147 * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
5148
5149 * sysdeps/pthread/pthread.h: Add missing initializers. Protect
5150 non-standard initializers with __USE_GNU.
5151
e8cda341
UD
5152 * Makefile (tests): Add tst-cleanup3.
5153 * tst-cleanup3.c: New file.
5154
2067577c
UD
51552003-02-12 Ulrich Drepper <drepper@redhat.com>
5156
89e78a95
UD
5157 * Makefile (tests): Add tst-attr1 and tst-attr2.
5158 * tst-attr1.c: New file.
5159 * tst-attr2.c: New file.
5160
dfdd294a
UD
5161 * Makefile: Add rules to build and run tst-atfork2 test.
5162 * tst-atfork2.c: New file.
5163 * tst-atfork2mod.c: New file.
5164
5165 * sysdeps/unix/sysv/linux/unregister-atfork.c
5166 (__unregister_atfork): Free the memory allocated for the handlers
5167 after removing them from the lists.
5168
5169 * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
5170 cleanup function.
5171
5172 * tst-atfork1.c (do_test): Wait for the child we forked.
5173 Report error in child.
5174
5175 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
5176
2067577c
UD
5177 * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
5178
2a8a8a84
UD
51792003-02-10 Ulrich Drepper <drepper@redhat.com>
5180
d9dd121e
UD
5181 * Makefile (tests): Add tst-cancel8.
5182 * tst-cancel8.c: New file.
5183
2a8a8a84
UD
5184 * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
5185 clearing of control variable.
defd1870 5186 * Makefile (tests): Add tst-once3 and tst-once4.
2a8a8a84 5187 * tst-once3.c: New file.
defd1870 5188 * tst-once4.c: New file.
2a8a8a84 5189
a54e8d33
UD
51902003-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
5191
5192 * sysdeps/sh/Makefile: New file.
5193 * sysdeps/sh/bits/atomic.h: New file.
5194 * sysdeps/sh/pthread_spin_init.c: New file.
5195 * sysdeps/sh/pthread_spin_lock.c: New file.
5196 * sysdeps/sh/pthread_spin_trylock.S: New file.
5197 * sysdeps/sh/pthread_spin_unlock.S: New file.
5198 * sysdeps/sh/pthreaddef.h: New file.
5199 * sysdeps/sh/tcb-offsets.sym: New file.
5200 * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
5201 * sysdeps/sh/tls.h: New file.
5202 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
5203 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
5204 * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
5205 * sysdeps/unix/sysv/linux/sh/fork.c: New file.
5206 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
5207 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
5208 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
5209 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
5210 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
5211 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
5212 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
5213 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
5214 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
5215 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
5216 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
5217 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
5218 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
5219 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
5220 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
5221 * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
5222 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
5223 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
5224 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
5225 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
5226 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
5227 * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
5228 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
5229 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
5230 * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
5231 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
5232
696e556e
UD
52332003-02-08 Ulrich Drepper <drepper@redhat.com>
5234
5235 * tst-cond2.c: Rearrange code to not rely on behavior undefined
5236 according to POSIX.
5237
5238 * tst-basic2.c (do_test): Lock mutex before creating the thread.
5239
fef710d6
UD
52402003-02-07 Ulrich Drepper <drepper@redhat.com>
5241
c6180643
UD
5242 * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
5243 (TLS_GET_FS): New #define.
5244 (TLS_SET_FS): New #define.
5245 Correct value of __NR_set_thread_area.
5246
fef710d6
UD
5247 * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
5248
11090a99
UD
52492003-02-06 Ulrich Drepper <drepper@redhat.com>
5250
65c68990
UD
5251 * Makefile (tests): Add tst-popen1.
5252 * tst-popen1.c: New file.
5253
11090a99
UD
5254 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
5255 but inactive generalization.
5256 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5257 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
5258 Minor optimization, remove one instruction.
5259 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
5260
a88c9263
UD
52612003-02-04 Martin Schwidefsky <schwidefsky@de.ibm.com>
5262
5263 * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
5264
52652003-01-31 Martin Schwidefsky <schwidefsky@de.ibm.com>
5266
5267 * init.c (__NR_set_tid_address): Add #ifdef for s390.
5268 * sysdeps/pthread/pthread_barrier_wait.c: New file.
5269 * sysdeps/pthread/pthread_cond_broadcast.c: New file.
5270 * sysdeps/pthread/pthread_cond_signal.c: New file.
5271 * sysdeps/pthread/pthread_cond_timedwait.c: New file.
5272 * sysdeps/pthread/pthread_cond_wait.c: New file.
5273 * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
5274 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
5275 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
5276 * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
5277 * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
5278 * sysdeps/s390/Makefile: New file.
5279 * sysdeps/s390/bits/atomic.h: New file.
5280 * sysdeps/s390/pthread_spin_init.c: New file.
5281 * sysdeps/s390/pthread_spin_lock.c: New file.
5282 * sysdeps/s390/pthread_spin_trylock.c: New file.
5283 * sysdeps/s390/pthread_spin_unlock.c: New file.
5284 * sysdeps/s390/pthreaddef.h: New file.
5285 * sysdeps/s390/tcb-offsets.sym: New file.
5286 * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
5287 * sysdeps/s390/tls.h: New file.
5288 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
5289 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
5290 * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
5291 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
5292 * sysdeps/unix/sysv/linux/s390/fork.c: New file.
5293 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
5294 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
5295 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
5296 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
5297 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
5298 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
5299 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
5300 * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
5301 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
5302 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
5303 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
5304 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
5305 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
5306 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
5307 * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
5308 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
5309 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
5310 * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
5311
6f1cff95
UD
53122003-02-04 Ulrich Drepper <drepper@redhat.com>
5313
ec609a8e
UD
5314 * atomic.h: Add a couple more default implementations.
5315 (atomic_compare_and_exchange_acq): Use
d45e8740
UD
5316 __arch_compare_and_exchange_32_acq in return value definition. It
5317 always exists.
5318 (atomic_bit_set): Renamed from atomic_set_bit.
0289bef9 5319 Add missing atomic_ prefixes.
e3ec8904 5320
6f1cff95
UD
5321 * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
5322 thread library is available, use correct value to mark initialized
5323 once variable.
5324
4f088329
UD
53252003-02-03 Ulrich Drepper <drepper@redhat.com>
5326
6f1cff95
UD
5327 * allocatestack.c (allocate_stack): Use __getpagesize instead of
5328 __sysconf to determine pagesize.
5329
3e4fc359 5330 * pthread_create.c: Include <atomic.h>.
4f088329
UD
5331 * allocatestack.c (allocate_stack): Implement coloring of the
5332 allocated stack memory. Rename pagesize to pagesize_m1. It's the
5333 size minus one. Adjust users.
3e4fc359 5334 * sysdeps/i386/i686/Makefile: New file.
4f088329 5335
2f42e8be
UD
53362003-02-02 Ulrich Drepper <drepper@redhat.com>
5337
4301f7e2
UD
5338 * allocatestack.c: Improve comment throughout the file.
5339
2f42e8be 5340 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
a37818b3 5341 (__lll_lock_wait): Add branch prediction.
2f42e8be
UD
5342 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
5343 (__lll_lock_wait): Likewise.
5344 (lll_unlock_wake_cb): Removed.
5345
4a7d6545
UD
53462003-01-31 Ulrich Drepper <drepper@redhat.com>
5347
5348 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
5349 _POSIX_THREAD_PRIORITY_SCHEDULING.
5350
886d5973
UD
53512003-01-30 Jakub Jelinek <jakub@redhat.com>
5352
5353 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
5354 Fix return type of ptr___pthread_getspecific.
5355
e474ca78
UD
53562003-01-29 Ulrich Drepper <drepper@redhat.com>
5357
5358 * Makefile (tests): Add tst-umask1.
5359 (tst-umask1-ARGS): Define.
5360 * tst-umask1.c: New file.
5361
e6ebd2e4
UD
53622003-01-28 Ulrich Drepper <drepper@redhat.com>
5363
6cf26f41
UD
5364 * Makefile (libpthread-routines): Remove lowlevelrwlock. Add
5365 pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
5366 pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
5367 pthread_rwlock_unlock.
5368 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
5369 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
5370 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
5371 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
5372 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
5373 New file.
5374 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
5375 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
5376 New file.
5377 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
5378 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
5379 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
5380 New file.
5381 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
5382 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
5383 New file.
5384 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
5385 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
5386 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
5387 New file.
5388 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
5389 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
5390 New file.
5391 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
5392
1d087a7e
UD
5393 * Makefile (libpthread-routines): Remove lowlevelcond and
5394 lowlevelsem. Add sem_wait, sem_trywait, sem_timedwait, sem_post,
5395 pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
5396 and pthread_cond_broadcast.
4a99d160
UD
5397 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
5398 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
5399 * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
5400 * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
5401 * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
5402 * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
5403 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
5404 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
5405 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
5406 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
5407 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
5408 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
5409 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
5410 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
5411 * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
5412 * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
5413 * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
5414 * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
5415 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
5416 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
5417 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
5418 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
5419 * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
5420 * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
5421 * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
5422 * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
5423 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
5424 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
5425 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
5426 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
5427 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
1d087a7e 5428
e6ebd2e4
UD
5429 * sysdeps/unix/sysv/linux/i386/createthread.c: Define
5430 PREPARE_CREATE and TLS_VALUE with x86-specific bits. All the rest
5431 of the code is moved to ...
5432 * sysdeps/pthread/createthread.c: ...here. New file.
5433
a15698cb
UD
54342003-01-27 Ulrich Drepper <drepper@redhat.com>
5435
0566b130
UD
5436 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
5437 (__new_sem_post): Clear %eax before returning.
5438 Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
5439
e6fb8846
UD
5440 * Makefile (tests): Add tst-cleanup2.
5441 * tst-cleanup2.c: New file.
5442
a15698cb
UD
5443 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
5444 Interpret first parameter correctly.
5445
8824b0a1
UD
54462003-01-17 Ulrich Drepper <drepper@redhat.com>
5447
5448 * Makefile (headers): Add bits/semaphore.h.
5449
850dcfca
UD
54502003-01-16 Jakub Jelinek <jakub@redhat.com>
5451
5452 * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
5453 if not SHARED.
5454
574b892e
UD
54552003-01-14 Ulrich Drepper <drepper@redhat.com>
5456
a8d87c92
UD
5457 * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
5458 must be used and mapping failed.
5459 Reported by Luke Elliott <luke.elliott@activfinancial.com>.
5460
574b892e
UD
5461 * Makefile (CFLAGS-pthread_self.os): Define this, not
5462 CFLAGS-pthread_self.c.
5463
fb48047a
UD
54642003-01-13 Ulrich Drepper <drepper@redhat.com>
5465
47805511
UD
5466 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
5467 lll_unlock_wake_cb.
5468
fb48047a
UD
5469 * Makefile (libpthread-routines): Add version. Add rules to build
5470 version.os and banner.h.
5471 * version.c: New file.
5472
115bb61d
UD
54732003-01-13 Jakub Jelinek <jakub@redhat.com>
5474
5475 * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
5476 the alias unconditional.
5477 * pthread_mutex_unlock.c (__pthread_mutex_unlock_internal): Likewise.
5478
54792003-01-13 Ulrich Drepper <drepper@redhat.com>
5480
5481 * Makefile (CFLAGS-pthread_self.c): New definition.
5482
6aca81bb
UD
54832003-01-06 Jakub Jelinek <jakub@redhat.com>
5484
5485 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
5486 INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
5487 * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
5488 * init.c (__pthread_initialize_minimal_internal): Likewise.
5489
e9c7764e
UD
54902003-01-07 Jakub Jelinek <jakub@redhat.com>
5491
b5facfda
UD
5492 * pthreadP.h (__pthread_cond_timedwait): Add prototype.
5493
e9c7764e
UD
5494 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
5495 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
5496 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
5497 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
5498 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
5499 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
5500
bef1e42f
UD
55012003-01-06 Jakub Jelinek <jakub@redhat.com>
5502
5503 * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
5504 * pt-system.c (LIBC_CANCEL_HANDLED): Add.
5505 * tst-cancel-wrappers.sh: Remove all exceptions.
5506
bbd17455
UD
55072003-01-05 Ulrich Drepper <drepper@redhat.com>
5508
a73ab6df
UD
5509 * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
5510 features. Reported by Marijn Ros <marijn@mad.scientist.com>.
5511
bbd17455
UD
5512 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
5513 Use __libc_pthread_functions array if SHARED.
5514
5515 * pthreadP.h: Move pthread_cond_2_0_t definition to...
5516 * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
5517
5518 * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
5519 (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
5520 __libc_key_create, __libc_getspecific, __libc_setspecific): Use
5521 __libc_ptf_call instead of __libc_maybe_call.
5522 (PTF): New #define.
5523 (__libc_cleanup_region_start): Wrap function name with PTF call.
5524 (__libc_cleanup_region_end): Likewise.
5525 (__libc_cleanup_end): Likewise.
5526
5527 * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
5528 * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
5529 * pthread_key_create.c: Add __pthread_key_create_internal alias.
5530 * pthreadP.h: Add prototypes.
5531
5532 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
5533 __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
5534 __pthread_rwlock_unlock aliases.
5535 * pthreadP.h: Add prototypes for new aliases.
5536
5537 * pthreadP.h (struct pthead_functions): Moved to...
5538 * sysdeps/pthread/pthread-functions.h: ...here. New file.
5539 * init.c (pthread_functions): Add initializers for new elements.
5540
5541 * cleanup_defer.c: Add __pthread_cleanup_push_defer and
5542 __pthread_cleanup_pop_restore aliases.
5543 * pthreadP.h: Add prototypes.
5544
5545 * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
5546 and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
5547 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
5548 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
5549 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
5550 * pthreadP.h: Adjust prototypes and callers.
5551
d27a78be
UD
55522003-01-04 Ulrich Drepper <drepper@redhat.com>
5553
b74121ae
UD
5554 * Makefile (tests): Add tst-cancel7.
5555 (tst-cancel7-ARGS): New variable.
bbd17455 5556 * tst-cancel7.c: New file.
b74121ae 5557
29bc410c
UD
5558 * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
5559 around gcc defficiencies.
5560 * old_pthread_cond_signal.c: Likewise.
5561 * old_pthread_cond_timedwait.c: Likewise.
5562 * old_pthread_cond_wait.c: Likewise.
5563
d27a78be
UD
5564 * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
5565
733f25e6
UD
55662003-01-03 Ulrich Drepper <drepper@redhat.com>
5567
7edb2ae3
UD
5568 * Makefile (tests): Add tst-cond7.
5569 * tst-cond7.c: New file.
5570
b1151300
UD
5571 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
5572 (condvar_cleanup): Get condvar address from the right place.
5573
733f25e6
UD
5574 * atomic.h: Correct definitions of atomic_full_barrier,
5575 atomic_read_barrier, atomic_write_barrier.
5576
5577 * old_pthread_cond_broadcast.c: Make memory allocate and initialization
5578 race-free.
5579 * old_pthread_cond_signal.c: Likewise.
5580 * old_pthread_cond_timedwait.c: Likewise.
5581 * old_pthread_cond_wait.c: Likewise.
5582
686b7223
UD
55832003-01-03 Jakub Jelinek <jakub@redhat.com>
5584
5585 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
5586
0e07706e
UD
55872003-01-03 Ulrich Drepper <drepper@redhat.com>
5588
997256dd
UD
5589 * pthreadP.h (pthread_cond_2_0_t): New type.
5590 (struct pthread_functions): Use new type for 2.0 condvar callbacks.
5591 Use new type for the 2.0 condvar function prototypes.
5592 * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
5593 * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
5594 parameter.
5595 * old_pthread_cond_destroy.c: Likewise.
5596 * old_pthread_cond_broadcast.c: Likewise. Lock appropriately.
5597 * old_pthread_cond_signal.c: Likewise.
5598 * old_pthread_cond_timedwait.c: Likewise.
5599 * old_pthread_cond_wait.c: Likewise.
5600
842d2817
UD
5601 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
5602 (__pthread_cond_wait): Don't save cancellation mode and seq value
5603 in same location.
5604
0e07706e
UD
5605 * herrno.c (__h_errno_location): Don't define as weak.
5606
bf293afe
UD
56072003-01-02 Jakub Jelinek <jakub@redhat.com>
5608
5609 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
5610 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
5611 and pthread_cond_wait.
5612 * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
5613 Renamed to...
5614 (__pthread_cond_broadcast_2_0): ... this.
5615 * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
5616 Renamed to...
5617 (__pthread_cond_destroy_2_0): ... this.
5618 * old_pthread_cond_init.c (__old_pthread_cond_init):
5619 Renamed to...
5620 (__pthread_cond_init_2_0): ... this.
5621 * old_pthread_cond_signal.c (__old_pthread_cond_signal):
5622 Renamed to...
5623 (__pthread_cond_signal_2_0): ... this.
5624 * old_pthread_cond_wait.c (__old_pthread_cond_wait):
5625 Renamed to...
5626 (__pthread_cond_wait_2_0): ... this.
5627 * pthread_cond_destroy.c: Include shlib-compat.h.
5628 (pthread_cond_destroy): Change strong_alias into versioned_symbol.
5629 * pthread_cond_init.c: Include shlib-compat.h.
5630 (pthread_cond_init): Change strong_alias into versioned_symbol.
5631 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
5632 fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
5633 fields.
5634 (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
5635 __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
5636 __pthread_cond_wait_2_0): New prototypes.
5637 (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
5638 __old_pthread_cond_init, __old_pthread_cond_signal,
5639 __old_pthread_cond_wait): Removed.
5640 * init.c: Include shlib-compat.h.
5641 (pthread_functions): Guard ptr___pthread_attr_init_2_0
5642 initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
5643 Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
5644 ptr___pthread_cond_*_2_0 fields.
5645 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
5646 pthread_cond_*@GLIBC_2.0 compatibility symbols.
5647
5648 * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
5649 LIBC_SIGACTION was not yet defined.
5650 [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
5651 [!defined LIBC_SIGACTION] (__sigaction): New function and
5652 libc_hidden_weak.
5653 [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
5654 [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
5655
56562003-01-02 Jakub Jelinek <jakub@redhat.com>
5657
5658 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
5659
05df18c3
UD
56602003-01-02 Ulrich Drepper <drepper@redhat.com>
5661
5662 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
5663 New, larger type definition.
5664 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
5665 implementation.
5666 * Versions [libpthread]: Add definitions for new pthread_cond_*
5667 interfaces for version GLIBC_2.3.2.
5668 * pthread_cond_init.c: Update initialization for new type definition.
5669 * Makefile (libpthread-routines): Remove pthread_cond_wait,
5670 pthread_cond_timedwait, pthread_cond_signal, and
5671 pthread_cond_broadcast. Add old_pthread_cond_init,
5672 old_pthread_cond_destroy, old_pthread_cond_wait,
5673 old_pthread_cond_timedwait, old_pthread_cond_signal, and
5674 old_pthread_cond_broadcast.
5675 * old_pthread_cond_broadcast.c: New file.
5676 * old_pthread_cond_destroy.c: New file.
5677 * old_pthread_cond_init.c: New file.
5678 * old_pthread_cond_signal.c: New file.
5679 * old_pthread_cond_timedwait.c: New file.
5680 * old_pthread_cond_wait.c: New file.
5681 * pthreadP.h: Add prototypes for the compatibility interfaces.
5682
5683 * pthread_cond_destroy.c: Don't include <errno.h>.
5684
fd8979e4
UD
56852003-01-01 Ulrich Drepper <drepper@redhat.com>
5686
5687 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
5688 unnecessary zero offset when addressing MUTEX.
5689
6d6ee629
UD
56902002-12-31 Ulrich Drepper <drepper@redhat.com>
5691
5692 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
5693 __register_atfork.
5694 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
5695 for __register_atfork.
5696
a4baf360
UD
56972002-12-31 Jakub Jelinek <jakub@redhat.com>
5698
5699 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
5700 instead of ASSEMBLER test macro.
5701
5702 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
5703 __libc_current_sigrtmax): Add libc_hidden_def.
5704
5705 * sysdeps/pthread/list.h: Remove assert.h include.
5706
e9395a94
UD
57072002-12-31 Ulrich Drepper <drepper@redhat.com>
5708
5709 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
5710 __pthread_initialize_minimal_internal not
5711 __pthread_initialize_minimal.
5712
89d6e444
UD
57132002-12-30 Ulrich Drepper <drepper@redhat.com>
5714
416d2de6
UD
5715 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
5716 __pthread_initialize_minimal as hidden.
5717
89d6e444
UD
5718 * init.c (__pthread_initialize_minimal_internal): Don't mark as
5719 constructor.
5720
57212002-12-31 Jakub Jelinek <jakub@redhat.com>
5722
5723 * Makefile ($(inst_libdir)/libpthread.so): Depend on
5724 $(common-objpfx)format.lds, include that into the output script.
5725 Fix comment.
5726 (extra-B-pthread.so): Change linuxthreads/ into nptl/.
5727
8cac677c
UD
57282002-12-28 Andreas Jaeger <aj@suse.de>
5729
5730 * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
5731 nsec resolution changes.
5732 (xstat64_conv): Likewise.
5733 (xstat32_conv): Likewise.
5734 * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
5735 struct kernel_stat.
5736 * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
5737 structs stat and stat64.
5738 * time/time.h (__timespec_defined): Define for __USE_MISC.
89d6e444 5739 * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
8cac677c 5740
49e9f864
UD
57412002-12-30 Jakub Jelinek <jakub@redhat.com>
5742
5743 * forward.c (FORWARD2): Renamed from FORWARD3. Remove unused export
5744 argument.
5745 (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
5746 (pthread_exit): Use strong_alias to avoid warnings.
5747 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
5748 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
5749 ptr___pthread_attr_init_2_*.
5750 * init.c (pthread_functions): Adjust.
5751
bab09b26
UD
57522002-12-29 Ulrich Drepper <drepper@redhat.com>
5753
598d7a42
UD
5754 * forward.c: Make all functions available by default again. It
5755 caused too much trouble.
5756
bab09b26
UD
5757 * pt-siglongjmp.c: Removed.
5758
3b7ed871
UD
57592002-12-28 Jakub Jelinek <jakub@redhat.com>
5760
5761 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
5762 (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
5763 * sysdeps/i386/Makefile: New file.
5764 * sysdeps/i386/tcb-offsets.sym: New file.
5765 * sysdeps/pthread/tcb-offsets.h: New file.
5766 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
5767 Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
5768
5769 * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
5770 __register_atfork...
5771 (GLIBC_2.3.2): ...here.
5772
57732002-12-28 Ulrich Drepper <drepper@redhat.com>
5774
5775 * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
5776 pthread_attr_setstackaddr with __attribute_deprecated__.
5777
270d9d47
UD
57782002-12-27 Jakub Jelinek <jakub@redhat.com>
5779
5780 * pt-system.c (system): Remove cancellation handling.
5781 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
5782 cancellation routines.
5783
131fd126
UD
57842002-12-28 Ulrich Drepper <drepper@redhat.com>
5785
afb2e954
UD
5786 * descr.h: Include <dl-sysdep.h>.
5787 (struct pthread): Move header.data.list to the back of the struct.
131fd126
UD
5788 * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
5789 (MULTIPLE_THREADS_OFFSET): Adjust offset.
5790 (SYSINFO_OFFSEET): Likewise.
5791
57922002-12-27 Jakub Jelinek <jakub@redhat.com>
5793
5794 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
5795 Define.
5796 (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
5797 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
5798 DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
5799 (USE_DL_SYSINFO): Undef.
5800
58012002-12-22 Jakub Jelinek <jakub@redhat.com>
5802
5803 * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
5804 $(common-objpfx)libc.so.
5805 * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
5806 it is bigger than pipe buffer size even on arches with bigger
5807 page size.
5808 (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
5809
a218c9cf
UD
58102002-12-25 Ulrich Drepper <drepper@redhat.com>
5811
5812 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
5813 correct errno access for case that USE___THREAD is not defined.
5814
015a2dc9
UD
58152002-12-24 Ulrich Drepper <drepper@redhat.com>
5816
5817 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
5818 Patch by Marijn Ros <marijn@mad.scientist.com>.
5819
5220f9ac
RM
58202002-12-22 Roland McGrath <roland@redhat.com>
5821
5822 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
5823
1561bf63
UD
58242002-12-20 Ulrich Drepper <drepper@redhat.com>
5825
5826 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
5827
3325198e
UD
58282002-12-19 Ulrich Drepper <drepper@redhat.com>
5829
057c823f
UD
5830 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
5831 NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
5832 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
5833
097eca29
UD
5834 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
5835 of int $0x80.
5836 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
5837 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
5838 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
5839 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
5840 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
5841 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
5842 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
5843 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
5844
5845 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
5846 sysenter.
5847 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
5848
5849 * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
5850
5f5843e3
UD
5851 * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
5852 in new TCB.
5853 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
5854 that sysinfo is properly initialized.
5855 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
5856 to 1 only for ld.so.
5857
3325198e
UD
5858 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
5859 RTLD_CORRECT_DYNAMIC_WEAK.
5860
74e8f2dc
UD
58612002-12-19 Jakub Jelinek <jakub@redhat.com>
5862
5863 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
5864 Use return 0 as 6th argument to FORWARD4.
5865 * pthread_equal.c: Include pthreadP.h instead of pthread.h.
5866
df45b31e
UD
58672002-12-18 Ulrich Drepper <drepper@redhat.com>
5868
5869 * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
5870 * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
5871 Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
5872 (INIT_SYSINFO): New #define.
5873 (TLS_TP_INIT): Use INIT_SYSINFO.
5874 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
5875 At test to make sure SYSINFO_OFFSET value is correct.
5876 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
5877
3d539579
UD
58782002-12-18 Jakub Jelinek <jakub@redhat.com>
5879
5880 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
5881 * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
5882 * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
5883 [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
5884 __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
5885 __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
5886 __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
5887
d7913e0e
UD
58882002-12-18 Ulrich Drepper <drepper@redhat.com>
5889
f051627f
UD
5890 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
5891 macro instead of using int $0x80 directly.
5892
d7913e0e
UD
5893 * sysdeps/pthread/bits/stdio-lock.h: New file.
5894 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
5895 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
5896 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
5897 * Makefile (routines): Add libc-lowlevelmutex.
5898
5899 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
5900 __i686.get_pc_thunk.dx.
5901
f077a4a9
UD
59022002-12-17 Jakub Jelinek <jakub@redhat.com>
5903
5904 * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
5905 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
5906 ($(objpfx)tst-cancel-wrappers.out): New rule.
5907 * tst-cancel-wrappers.sh: New test.
5908 * tst-locale1.c: Include signal.h.
5909 (uselocale): Test static linking of __libc_current_sigrt*.
5910
59112002-12-17 Ulrich Drepper <drepper@redhat.com>
5912
5913 * Makefile (tests): Add tst-cancel6.
5914 * tst-cancel6.c: New file
5915
bd499a3b
UD
59162002-12-17 Jakub Jelinek <jakub@redhat.com>
5917
5918 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
5919 Define meaningfully for assembler as well.
5920 * pthreadP.h (struct pthread_functions): Remove
5921 ptr_pthread_attr_init field. Add ptr_pthread_attr_init_2_0
5922 and ptr_pthread_attr_init_2_1 fields.
5923 * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
5924 and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
5925 * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
5926 (FORWARD3): Define using FORWARD4.
5927 (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
5928 versions.
5929 * pt-system.c: Remove duplicate stdlib.h include.
5930
0a1063f4
UD
59312002-12-16 Ulrich Drepper <drepper@redhat.com>
5932
87d60668
UD
5933 * sem_init.c: Define sem_init@GLIBC_2.0.
5934 * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
5935 * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
5936
0a1063f4
UD
5937 * flockfile.c: Moved to...
5938 * sysdeps/pthread/flockfile.c: ...here. New file.
5939 * funlockfile.c: Moved to...
5940 * sysdeps/pthread/funlockfile.c: ...here. New file.
5941 * ftrylockfile.c: Moved to...
5942 * sysdeps/pthread/ftrylockfile.c: ...here. New file.
5943
9634cf9d
UD
59442002-12-16 Jakub Jelinek <jakub@redhat.com>
5945
5946 * libc-cancellation.c: Guard both function with
5947 #if !defined NOT_IN_libc.
5948 * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
5949 automatically provided pthread wrappers.
5950 * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
5951 CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
5952 nor in libpthread.
5953 * pt-open.c: Removed.
5954 * pt-fcntl.c: Removed.
5955 * pt-fsync.c: Removed.
5956 * pt-lseek.c: Removed.
5957 * pt-msgrcv.c: Removed.
5958 * pt-msgsnd.c: Removed.
5959 * pt-msync.c: Removed.
5960 * pt-nanosleep.c: Removed.
5961 * pt-open64.c: Removed.
5962 * pt-pause.c: Removed.
5963 * pt-pread.c: Removed.
5964 * pt-pread64.c: Removed.
5965 * pt-pwrite.c: Removed.
5966 * pt-pwrite64.c: Removed.
5967 * pt-read.c: Removed.
5968 * pt-recv.c: Removed.
5969 * pt-recvfrom.c: Removed.
5970 * pt-recvmsg.c: Removed.
5971 * pt-send.c: Removed.
5972 * pt-sendto.c: Removed.
5973 * pt-sigtimedwait.c: Removed.
5974 * pt-sigwait.c: Removed.
5975 * pt-wait.c: Removed.
5976 * pt-waitpid.c: Removed.
5977 * pt-write.c: Removed.
5978 * pt-accept.c: Removed.
5979 * pt-close.c: Removed.
5980 * pt-connect.c: Removed.
5981 * pt-lseek64.c: Removed.
5982 * pt-sendmsg.c: Removed.
5983 * pt-tcdrain.c: Removed.
5984
6ee8d334
UD
59852002-12-15 Ulrich Drepper <drepper@redhat.com>
5986
81fa9371
UD
5987 * init.c (__pthread_initialize_minimal_internal): Renamed from
5988 __pthread_initialize_minimal. Make old name an alias. This
5989 converts a normal relocation into a relative relocation.
5990
f3015aa5
UD
5991 * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
5992
4cbc1950
UD
5993 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
5994 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
5995 * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
5996 pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
5997 pt-sigwaitinfo, pt-waitid, and pt-writev.
5998 * pt-creat.c: Removed.
5999 * pt-poll.c: Removed.
6000 * pt-pselect.c: Removed.
6001 * pt-readv.c: Removed.
6002 * pt-select.c: Removed.
6003 * pt-sigpause.c: Removed.
6004 * pt-sigsuspend.c: Removed.
6005 * pt-sigwaitinfo.c: Removed.
6006 * pt-waitid.c: Removed.
6007 * pt-writev.c: Removed.
6008
8454830b
UD
6009 * init.c (pthread_functions): New variable.
6010 (__pthread_initialize_minimal): Pass pointer to pthread_functions
6011 (or NULL) to __libc_pthread_init.
6012 * forward.c: Rewrite to use __libc:pthread_functions array to get
6013 function addresses.
6014 * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
6015 prototype.
6016 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
6017 Take new parameter. Copy content of variable pointed to by it
6018 to __libc_pthread_init.
6019
6020 * pthreadP.h (struct pthread_functions): New type.
6021 (__libc_pthread_init): Declare.
6022
6023 * pthread_attr_destroy.c: Add namespace protected alias.
6024 * pthread_attr_getdetachstate.c: Likewise.
6025 * pthread_attr_getinheritsched.c: Likewise.
6026 * pthread_attr_getschedparam.c: Likewise.
6027 * pthread_attr_getschedpolicy.c: Likewise.
6028 * pthread_attr_getscope.c: Likewise.
6029 * pthread_attr_setdetachstate.c: Likewise.
6030 * pthread_attr_setinheritsched.c: Likewise.
6031 * pthread_attr_setschedparam.c: Likewise.
6032 * pthread_attr_setschedpolicy.c: Likewise.
6033 * pthread_attr_setscope.c: Likewise.
6034 * pthread_cond_broadcast.c: Likewise.
6035 * pthread_cond_destroy.c: Likewise.
6036 * pthread_cond_init.c: Likewise.
6037 * pthread_cond_signal.c: Likewise.
6038 * pthread_cond_wait.c: Likewise.
6039 * pthread_condattr_destroy.c: Likewise.
6040 * pthread_condattr_init.c: Likewise.
6041 * pthread_equal.c: Likewise.
6042 * pthread_exit.c: Likewise.
6043 * pthread_getschedparam.c: Likewise.
6044 * pthread_self.c: Likewise.
6045 * pthread_setcancelstate.c: Likewise.
6046 * pthread_setschedparam.c: Likewise.
6047 * pthread_mutex_destroy.c: Likewise.
6048 * pthread_mutex_init.c: Likewise.
6049 * pthreadP.h: Add prototypes for the aliases.
6050
0d5f4929
UD
6051 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
6052 multiple_threads member in correct TCB to 1.
6053
6ee8d334
UD
6054 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
6055 SINGLE_THREAD_P. If in libc or libpthread examine multiple_thread
6056 member of thread decriptor, otherwise return unconditionally 1.
6057
2fb6444d
UD
60582002-12-14 Ulrich Drepper <drepper@redhat.com>
6059
6060 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
6061 regular Linux version. Remove file.
6062 * sysdeps/unix/sysv/linux/connect.S: Likewise. Remove file.
6063 * sysdeps/unix/sysv/linux/llseek.c: Likewise. Remove file.
6064 * sysdeps/unix/sysv/linux/msgrcv.c: Likewise. Remove file.
6065 * sysdeps/unix/sysv/linux/msgsnd.c: Likewise. Remove file.
6066 * sysdeps/unix/sysv/linux/open64.c: Likewise. Remove file.
6067 * sysdeps/unix/sysv/linux/poll.c: Likewise. Remove file.
6068 * sysdeps/unix/sysv/linux/pread.c: Likewise. Remove file.
6069 * sysdeps/unix/sysv/linux/pread64.c: Likewise. Remove file.
6070 * sysdeps/unix/sysv/linux/pselect.c: Likewise. Remove file.
6071 * sysdeps/unix/sysv/linux/pwrite.c: Likewise. Remove file.
6072 * sysdeps/unix/sysv/linux/pwrite64.c: Likewise. Remove file.
6073 * sysdeps/unix/sysv/linux/readv.c: Likewise. Remove file.
6074 * sysdeps/unix/sysv/linux/recv.S: Likewise. Remove file.
6075 * sysdeps/unix/sysv/linux/recvfrom.S: Likewise. Remove file.
6076 * sysdeps/unix/sysv/linux/recvmsg.S: Likewise. Remove file.
6077 * sysdeps/unix/sysv/linux/send.S: Likewise. Remove file.
6078 * sysdeps/unix/sysv/linux/sendmsg.S: Likewise. Remove file.
6079 * sysdeps/unix/sysv/linux/sendto.S: Likewise. Remove file.
6080 * sysdeps/unix/sysv/linux/sigpause.c: Likewise. Remove file.
6081 * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise. Remove file.
6082 * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise. Remove file.
6083 * sysdeps/unix/sysv/linux/sigwait.c: Likewise. Remove file.
6084 * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise. Remove file.
6085 * sysdeps/unix/sysv/linux/system.c: Likewise. Remove file.
6086 * sysdeps/unix/sysv/linux/tcdrain.c: Likewise. Remove file.
6087 * sysdeps/unix/sysv/linux/wait.c: Likewise. Remove file.
6088 * sysdeps/unix/sysv/linux/waitid.c: Likewise. Remove file.
6089 * sysdeps/unix/sysv/linux/waitpid.c: Likewise. Remove file.
6090 * sysdeps/unix/sysv/linux/writev.c: Likewise. Remove file.
6091 * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise. Remove file.
6092
86b2dc40
UD
60932002-12-14 Jakub Jelinek <jakub@redhat.com>
6094
6095 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
6096 * sysdeps/unix/sysv/linux/open.c: Removed.
6097 * sysdeps/unix/sysv/linux/fsync.c: Removed.
6098 * sysdeps/unix/sysv/linux/lseek.c: Removed.
6099 * sysdeps/unix/sysv/linux/msync.c: Removed.
6100 * sysdeps/unix/sysv/linux/read.c: Removed.
6101 * sysdeps/unix/sysv/linux/close.c: Removed.
6102 * sysdeps/unix/sysv/linux/creat.c: Removed.
6103 * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
6104 * sysdeps/unix/sysv/linux/pause.c: Removed.
6105 * sysdeps/unix/sysv/linux/select.c: Removed.
6106 * sysdeps/unix/sysv/linux/write.c: Removed.
6107
9d263d72
UD
61082002-12-14 Ulrich Drepper <drepper@redhat.com>
6109
6110 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
6111 element in TCB to see whether locking is needed.
6112
6113 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
6114 MULTIPLE_THREADS_OFFSET value is correct.
6115
6116 * sysdeps/unix/sysv/linux/close.c: New file.
6117 * sysdeps/unix/sysv/linux/connect.S: New file.
6118 * sysdeps/unix/sysv/linux/creat.c: New file.
6119 * sysdeps/unix/sysv/linux/fsync.c: New file.
6120 * sysdeps/unix/sysv/linux/llseek.c: New file.
6121 * sysdeps/unix/sysv/linux/lseek.c: New file.
6122 * sysdeps/unix/sysv/linux/msgrcv.c: New file.
6123 * sysdeps/unix/sysv/linux/msgsnd.c: New file.
6124 * sysdeps/unix/sysv/linux/msync.c: New file.
6125 * sysdeps/unix/sysv/linux/nanosleep.c: New file.
6126 * sysdeps/unix/sysv/linux/open.c: New file.
6127 * sysdeps/unix/sysv/linux/open64.c: New file.
6128 * sysdeps/unix/sysv/linux/pause.c: New file.
6129 * sysdeps/unix/sysv/linux/poll.c: New file.
6130 * sysdeps/unix/sysv/linux/pread.c: New file.
6131 * sysdeps/unix/sysv/linux/pread64.c: New file.
6132 * sysdeps/unix/sysv/linux/pselect.c: New file.
6133 * sysdeps/unix/sysv/linux/pwrite.c: New file.
6134 * sysdeps/unix/sysv/linux/pwrite64.c: New file.
6135 * sysdeps/unix/sysv/linux/readv.c: New file.
6136 * sysdeps/unix/sysv/linux/recv.S: New file.
6137 * sysdeps/unix/sysv/linux/recvfrom.S: New file.
6138 * sysdeps/unix/sysv/linux/recvmsg.S: New file.
6139 * sysdeps/unix/sysv/linux/select.c: New file.
6140 * sysdeps/unix/sysv/linux/send.S: New file.
6141 * sysdeps/unix/sysv/linux/sendmsg.S: New file.
6142 * sysdeps/unix/sysv/linux/sendto.S: New file.
6143 * sysdeps/unix/sysv/linux/sigpause.c: New file.
6144 * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
6145 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
6146 * sysdeps/unix/sysv/linux/sigwait.c: New file.
6147 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
6148 * sysdeps/unix/sysv/linux/system.c: New file.
6149 * sysdeps/unix/sysv/linux/tcdrain.c: New file.
6150 * sysdeps/unix/sysv/linux/wait.c: New file.
6151 * sysdeps/unix/sysv/linux/waitid.c: New file.
6152 * sysdeps/unix/sysv/linux/waitpid.c: New file.
6153 * sysdeps/unix/sysv/linux/writev.c: New file.
6154 * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
6155
6156 * pt-readv.c: Fix comment.
6157
61582002-12-14 Jakub Jelinek <jakub@redhat.com>
6159
6160 * tst-cleanup1.c: Include stdlib.h.
6161
6162 * tst-cancel5.c: New test.
6163 * Makefile (tests): Add tst-cancel5.
6164 (tst-cancel5): Link against libc.so libpthread.so in that order.
6165
9ae0909b
UD
61662002-12-13 Ulrich Drepper <drepper@redhat.com>
6167
b7bdd9c4
UD
6168 * forward.c (test_loaded): Prevent recursive calls.
6169
9ae0909b
UD
6170 * Makefile (routines): Add libc-cancellation.
6171 * libc-cancellation.c: New file.
6172 * descr.h (struct pthread): Add multiple_threads field.
6173 * allocatestack.c (allocate_stack): Initialize multiple_header field of
6174 new thread descriptor to 1.
6175 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
6176 Initialize multiple_thread field after successful thread creation.
6177 * cancellation.c (__do_cancel): Move to pthreadP.h.
6178 (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
6179 (__pthread_disable_asynccancel): Add internal_function attribute.
6180 * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
6181 * pthread_setcancelstate.c: Likewise.
6182 * pthread_setcanceltype.c: Likewise.
6183 * pthread_exit.c: Likewise.
6184 * pthreadP.h (CANCELLATION_P): Likewise.
6185 (__do_cancel): Define as static inline.
6186 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
6187 (__libc_enable_asynccancel, __libc_disable_asynccancel): New
6188 declarations.
6189 * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
6190 fields. Define MULTIPLE_THREADS_OFFSET.
6191 * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
6192 declaration.
6193 * sysdeps/unix/sysv/linux/accept.S: New file.
6194 * sysdeps/unix/sysv/linux/read.c: New file.
6195 * sysdeps/unix/sysv/linux/write.c: New file.
6196 * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
6197 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
6198 initialization of __libc_locking_needed.
6199 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
6200 __libc_locking_needed, use multiple_threads field in TCB.
6201 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
6202
22f20674
UD
62032002-12-12 Ulrich Drepper <drepper@redhat.com>
6204
2ad2e1e7
UD
6205 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
6206 version.
6207 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
6208
22f20674
UD
6209 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
6210 access to __libc_locking_needed for PIC.
6211
aa80bf86
UD
62122002-12-12 Jakub Jelinek <jakub@redhat.com>
6213
6214 * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
6215 declare for libc.so.
6216 (__libc_lock_init, __libc_lock_init_recursive): Change into comma
6217 expression.
6218 (__libc_lock_lock): Put into statement expression.
6219 (__libc_lock_unlock): Remove trailing semicolon.
6220 * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
6221
24021373
RM
62222002-12-12 Roland McGrath <roland@redhat.com>
6223
6224 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
6225 "m" constraint to refer to __libc_locking_needed. Declare it here.
6226
14e7aece
UD
62272002-12-12 Ulrich Drepper <drepper@redhat.com>
6228
6229 * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
6230 * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
6231 Initialize __libc_locking_needed.
6232 * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
6233 instead of __register_pthread_fork_handler.
6234 * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
6235 * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
6236 fork-gen with libc_pthread_init.
6237 * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
6238 of __register_pthread_fork_handler.
6239 * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
6240 of __register_pthread_fork_handler.
6241 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
6242 __libc_locking_needed to determine whether lock prefix can be avoided.
6243 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
6244
85631c8e
UD
62452002-12-11 Ulrich Drepper <drepper@redhat.com>
6246
da63009e
UD
6247 * Makefile (tests): Add tst-cleanup1.
6248 * tst-cleanup1.c: New file.
6249 * cancellation.c (__cleanup_thread): Removed.
6250 (__do_cancel): Remove call to __cleanup_thread.
6251 * pthreadP.h: Remove __cleanup_thread prorotype.
6252
000160a2
UD
6253 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
6254 Remember function and argument even if cancellation handler
6255 function is not available.
6256 (__libc_cleanup_region_end): Execute registered function directly if
6257 pthread functions are not available.
6258 (__libc_cleanup_end): Likewise.
6259
85631c8e
UD
6260 * init.c (__pthread_initialize_minimal): Fix initialization in
6261 static lib by preventing gcc from being too clever.
6262
dce8f2b6
UD
62632002-12-10 Ulrich Drepper <drepper@redhat.com>
6264
34a075be
UD
6265 * init.c (__pthread_initialize_minimal): Remove unneccesary
6266 sigaddset call.
6267
dce8f2b6
UD
6268 * Makefile (tests): We can run tst-locale2 now.
6269
e5e45b53
UD
62702002-12-09 Ulrich Drepper <drepper@redhat.com>
6271
6272 * Versions: Remove duplicated sigwait entry.
6273
bdb04f92
UD
62742002-12-08 Ulrich Drepper <drepper@redhat.com>
6275
1e506629
UD
6276 * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
6277 inside libpthread.
6278
a3957dd5
UD
6279 * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
6280
bdb04f92
UD
6281 * pthreadP.h: Declare __pthread_enable_asynccancel and
6282 __pthread_disable_asynccancel.
6283 (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
6284 (CANCEL_RESET): Use __pthread_disable_asynccancel.
6285 * cancellation.c (__pthread_enable_asynccancel): New function.
6286 (__pthread_disable_asynccancel): New function.
6287 * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
6288 * pt-close.c: Likewise.
6289 * pt-connect.c: Likewise.
6290 * pt-creat.c: Likewise.
6291 * pt-fcntl.c: Likewise.
6292 * pt-fsync.c: Likewise.
6293 * pt-lseek.c: Likewise.
6294 * pt-lseek64.c: Likewise.
6295 * pt-msgrcv.c: Likewise.
6296 * pt-msgsnd.c: Likewise.
6297 * pt-msync.c: Likewise.
6298 * pt-nanosleep.c: Likewise.
6299 * pt-open.c: Likewise.
6300 * pt-open64.c: Likewise.
6301 * pt-pause.c: Likewise.
6302 * pt-poll.c: Likewise.
6303 * pt-pread.c: Likewise.
6304 * pt-pread64.c: Likewise.
6305 * pt-pselect.c: Likewise.
6306 * pt-pwrite.c: Likewise.
6307 * pt-pwrite64.c: Likewise.
6308 * pt-read.c: Likewise.
6309 * pt-readv.c: Likewise.
6310 * pt-recv.c: Likewise.
6311 * pt-recvfrom.c: Likewise.
6312 * pt-recvmsg.c: Likewise.
6313 * pt-select.c: Likewise.
6314 * pt-send.c: Likewise.
6315 * pt-sendmsg.c: Likewise.
6316 * pt-sendto.c: Likewise.
6317 * pt-sigpause.c: Likewise.
6318 * pt-sigsuspend.c: Likewise.
6319 * pt-sigtimedwait.c: Likewise.
6320 * pt-sigwait.c: Likewise.
6321 * pt-sigwaitinfo.c: Likewise.
6322 * pt-system.c: Likewise.
6323 * pt-tcdrain.c: Likewise.
6324 * pt-wait.c: Likewise.
6325 * pt-waitid.c: Likewise.
6326 * pt-waitpid.c: Likewise.
6327 * pt-write.c: Likewise.
6328 * pt-writev.c: Likewise.
a3957dd5
UD
6329 * pthread_join.c: Likewise.
6330 * pthread_timedjoin.c: Likewise.
bdb04f92
UD
6331
6332 * pt-sigpause.c (sigsuspend): Call __sigsuspend.
6333 (__xpg_sigpause): New function.
6334 * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
6335
6ccb3834
UD
63362002-12-07 Ulrich Drepper <drepper@redhat.com>
6337
09efc3ba
UD
6338 * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
6339
6340 * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
6341 _GI_pthread_cleanup_pop to pthreadP.h.
6342
6343 * ftrylockfile.c: Use _IO_lock_trylock instead of
6344 pthread_mutex_trylock.
6345
6346 * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
6347 (CANCEL_RESET): Likewise.
6348 (__pthread_setcanceltype_): Declare.
6349 (__pthread_mutex_lock_internal): Declare.
6350 (__pthread_mutex_unlock_internal): Declare.
6351 (__pthread_once_internal): Declare.
6352 (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
6353 (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
6354
6355 * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
6356 and pthread_mutex_unlock.
6357 * pthread_cond_wait.c: Likewise.
6358 * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
6359 * pthread_mutex_unlock.c: Likewise.
6360
6361 * pthread_setcanceltype.c: Add additional alias
6362 __pthread_setcanceltype.
6363
6364 * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
6365 * sem_open.c (sem_open): Likewise.
6366 Use __libc_open, __libc_write, and __libc_close instead of
6367 open, write, and close respectively.
6368
6369 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
6370 Rewrite as statement expression since it must return a value.
6371
6372 * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
6373 * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
6374 __pthread_kill.
6375
6376 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
6377 alias __pthread_once_internal.
6378
6ccb3834
UD
6379 * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
6380
d3c9f895
UD
63812002-12-06 Ulrich Drepper <drepper@redhat.com>
6382
4614167a
UD
6383 * Makefile (tests): Add tst-stdio1 and tst-stdio2.
6384 * tst-stdio1.c: New file.
6385 * tst-stdio2.c: New file.
6386
a4548cea
UD
6387 * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
6388
d3c9f895
UD
6389 * Makefile (tests): Comment out tst-locale2 for now.
6390 (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
6391
6392 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
6393 -D_IO_MTSAFE_IO.
6394 * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
6395 Use _IO_lock_init instead of explicit assignment.
6396
6397 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
6398 Define __libc_lock_* and __libc_lock_recursive macros with
6399 lowlevellock macros, not pthread mutexes.
6400
6401 * flockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_lock instead
6402 of pthread_mutex_lock.
6403 * funlockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_unlock
6404 instead of pthread_mutex_unlock.
6405
fde89ad0
RM
64062002-12-06 Roland McGrath <roland@redhat.com>
6407
6408 * allocatestack.c (__stack_user): Use uninitialized defn.
6409 * init.c (__pthread_initialize_minimal): Initialize it here.
6410
11767d47
RM
64112002-12-05 Roland McGrath <roland@redhat.com>
6412
fde89ad0
RM
6413 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
6414 string.
6415 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
6416
11767d47
RM
6417 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
6418 missing & here too.
6419
440d8bc2
UD
64202002-12-05 Ulrich Drepper <drepper@redhat.com>
6421
6422 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
6423 lowlevellock.
6424 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
6425 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
6426 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
6427 * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
6428 for __libc_lock_* macros.
6429 * Makefile (routines): Add libc-lowlevellock.
6430
64312002-10-09 Roland McGrath <roland@redhat.com>
6432
6433 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
6434 Under [__PIC__], call the function via the pointer fetched for
6435 comparison rather than a call by name that uses the PLT.
6436 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
6437 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
6438 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
6439 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
6440 (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
6441
d5ed0118
RM
64422002-12-04 Roland McGrath <roland@redhat.com>
6443
6444 * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
6445
6446 * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
6447 * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
6448
6449 * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
6450
eaa4099f
UD
64512002-12-04 Ulrich Drepper <drepper@redhat.com>
6452
6453 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
6454 a completely opaque, non-integer type.
6455 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6456
33b5d0cc
UD
64572002-12-05 Jakub Jelinek <jakub@redhat.com>
6458
6459 * sysdeps/i386/tls.h: Include stdlib.h.
6460 * sysdeps/x86_64/tls.h: Likewise.
6461
7a5cdb30
UD
64622002-12-04 Ulrich Drepper <drepper@redhat.com>
6463
c4a6d859
UD
6464 * Makefile (tests): Add tst-locale2.
6465 (tests-static): Likewise.
6466 * tst-locale2.c: New file.
6467
7a5cdb30
UD
6468 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
6469 volatile and add memory clobbers to lock operations.
6470
d82d5d12
UD
64712002-12-03 Ulrich Drepper <drepper@redhat.com>
6472
69cae3cf
UD
6473 * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
6474 * sysdeps/i386/i486/bits/atomic.h: New file.
6475 * sysdeps/i386/i586/bits/atomic.h: New file.
6476 * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
6477 include i486 version.
6478 * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
6479 * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
c97c64de 6480 Patch by Marijn Ros <marijn@mad.scientist.com>.
69cae3cf 6481
e4044c01
UD
6482 * allocatestack.c (get_cached_stack): Don't crash if we first
6483 found a stack with a larger size then needed.
6484 Reported by Hui Huang <hui.huang@sun.com>.
6485
d82d5d12
UD
6486 * Makefile (tests): Add tst-sysconf.
6487 * tst-sysconf.c: New file.
6488
6489 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
6490 PTHREAD_THREADS_MAX.
6491
fa9a4ff0
RM
64922002-12-02 Roland McGrath <roland@redhat.com>
6493
6494 * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
6495 Declare using hidden_proto instead of attribute_hidden, so there are
6496 non-.hidden static symbols for gdb to find.
6497 (__pthread_keys): Likewise.
6498 * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
6499 * allocatestack.c (__stack_user): Likewise.
6500 * pthread_create.c (__pthread_keys): Likewise.
6501 (__nptl_threads_events, __nptl_last_event): Make these static instead
6502 of hidden.
6503 * pthread_key_create.c (__pthread_pthread_keys_max,
6504 __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
6505
91949a33
UD
65062002-12-02 Ulrich Drepper <drepper@redhat.com>
6507
c22b52fa
UD
6508 * Makefile (tests): Add tst-locale1. If buid-static is yes link
6509 statically.
6510 * tst-locale1.c: New file.
6511
beb6aa41
UD
6512 * pthread_cond_timedwait.c: Include <stdlib.h>.
6513
91949a33
UD
6514 * Makefile (tests): Add tst-fork2 and tst-fork3.
6515 * tst-fork2.c: New file.
6516 * tst-fork3.c: New file.
6517
654dff90
UD
65182002-11-28 Ulrich Drepper <drepper@redhat.com>
6519
cb0e76b4
UD
6520 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
6521
6522 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
6523 require it to 200112L.
6524
6525 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
6526 instruction only if HAVE_CMOV is defined.
6527 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
6528
975aa229
UD
6529 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
6530
654dff90
UD
6531 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
6532
6533 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
6534
6535 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
6536
a3931336
UD
65372002-11-27 Ulrich Drepper <drepper@redhat.com>
6538
c10c099c
UD
6539 * sysdeps/x86_64/bits/atomic.h: New file.
6540
6541 * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
6542 16-bit operations.
6543
dca99d27
UD
6544 * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
6545 possible since gettid cannot fail.
6546
f78deea6
UD
6547 * sysdeps/x86_64/pthreaddef.h: New file.
6548
6549 * sysdeps/i386/pthreaddef.h (gettid): Removed.
6550
6551 * sysdeps/x86_64/pthread_spin_init.c: New file.
6552 * sysdeps/x86_64/pthread_spin_lock.c: New file.
6553 * sysdeps/x86_64/pthread_spin_trylock.c: New file.
6554 * sysdeps/x86_64/pthread_spin_unlock.c: New file.
6555
6556 * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
6557 Add missing lock prefix. Minute optimization.
6558
6559 * tst-spin2.c (main): Also check successful trylock call.
6560
6561 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
6562 syscall. Fix typo in case INTERNAL_SYSCALL is not used.
6563
6564 * sysdeps/i386/pthread_spin_destroy.c: Moved to...
6565 * sysdeps/pthread/pthread_spin_destroy.c: ...here. New file.
6566
6567 * sysdeps/i386/pthread_sigmask.c: Removed. Use the generic code.
6568 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
6569 value in case of an error. Add support for INTERNAL_SYSCALL.
b54e18eb
UD
6570
6571 * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
6572 value in case of an error.
6573
a3931336
UD
6574 * sysdeps/x86_64/tls.h: New file.
6575
76a50749
UD
65762002-11-26 Ulrich Drepper <drepper@redhat.com>
6577
117c452c
UD
6578 * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface. It now
6579 takes the array member name and the index as parameters.
6580 (THREAD_SETMEM_NC): Likewise.
6581 * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
6582 * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
6583 interfaces.
6584
6585 * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
6586 to decide which code to use.
6587 (THREAD_SETMEM_NC): Likewise.
6588
76a50749
UD
6589 * allocatestack.c (queue_stack): Don't remove stack from list here.
6590 Do it in the caller. Correct condition to prematurely terminate
6591 loop to free stacks.
6592 (__deallocate_stack): Remove stack from list here.
6593
65942002-11-26 Ulrich Drepper <drepper@redhat.com>
6595
6596 * Makefile (tests): Add tst-stack1.
6597 * tst-stack1.c: New file.
6598
6599 * allocatestack.c (allocate_stack): Initialize the TCB on a user
6600 provided stack.
6601
6602 * pthread_attr_getstack.c: Return bottom of the thread area.
6603
66042002-11-25 Ulrich Drepper <drepper@redhat.com>
6605
6606 * Makefile (libpthread-routines): Add pt-allocrtsig and
6607 pthread_kill_other_threads.
6608 * pt-allocrtsig.c: New file.
6609 * pthread_kill_other_threads.c: New file.
6610 * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
6611 all three functions.
6612 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
6613 allocrtsig.
6614 * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
6615 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
6616 and __libc_allocate_rtsig_private.
6617 * Versions (libpthread): Export pthread_kill_other_threads_np,
6618 __libc_current_sigrtmin, and __libc_current_sigrtmax.
6619
66202002-11-24 Ulrich Drepper <drepper@redhat.com>
6621
6622 * allocatestack.c (allocate_stack): stackaddr in attribute points to
6623 the end of the stack. Adjust computations.
6624 When mprotect call fails dequeue stack and free it.
6625 * pthread_attr_setstack.c: Store top of the stack in stackaddr
6626 attribute.
6627 * pthread_getattr_np.c: Likewise.
6628
6629 * descr.h (IS_DETACHED): Add some more parenthesis to prevent
6630 surprises.
6631
66322002-11-23 Ulrich Drepper <drepper@redhat.com>
6633
6634 * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
6635 attribute definitions. Patch by Luca Barbieri <ldb@ldb.ods.org>.
6636
66372002-11-22 Ulrich Drepper <drepper@redhat.com>
6638
6639 * pthread_getspecific.c: Optimize access to first 2nd-level array.
6640 * pthread_setspecific.c: Likewise.
6641
66422002-11-21 Ulrich Drepper <drepper@redhat.com>
6643
6644 * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
6645 definitions. Get them from the official place.
6646 * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
6647
6648 * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
6649 Use new CLONE_ flags in clone() calls.
6650
6651 * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
6652 * sysdeps/unix/sysv/linux/i386/fork.c: New file.
6653
6654 * Versions: Add pthread_* functions for libc.
6655 * forward.c: New file.
6656
6657 * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
6658 errno-loc.
6659 * herrno.c: New file.
6660 * res.c: New file.
6661
6662 * Makefile (libpthread-routines): Remove sem_post, sem_wait,
6663 sem_trywait, and sem_timedwait. Add herrno and res.
6664 * sem_init.c: Don't initialize lock and waiters members.
6665 * sem_open.c: Likewise.
6666 * sem_post.c: Removed.
6667 * sem_wait.c: Removed.
6668 * sem_trywait.c: Removed.
6669 * sem_timedwait.c: Removed.
6670 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
6671 Includes full implementations of sem_post, sem_wait, sem_trywait,
6672 and sem_timedwait.
6673 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
6674 for new implementation.
6675 * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
6676 and waiters fields.
6677
6678 * tst-sem3.c: Improve error message.
6679 * tst-signal3.c: Likewise.
6680
6681 * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
6682 to tell the kernel about the termination futex and to initialize tid
6683 member. Don't initialize main_thread.
6684 * descr.h (struct pthread): Remove main_thread member.
6685 * cancelllation.c (__do_cancel): Remove code handling main thread.
6686 The main thread is not special anymore.
6687
6688 * allocatestack.c (__reclaim_stacks): Mark stacks as unused. Add
6689 size of the stacks to stack_cache_actsize.
6690
6691 * pt-readv.c: Add missing "defined".
6692 * pt-sigwait.c: Likewise.
6693 * pt-writev.c: Likewise.
6694
66952002-11-09 Ulrich Drepper <drepper@redhat.com>
6696
6697 * Versions: Export __connect from libpthread.
6698 Patch by Luca Barbieri <ldb@ldb.ods.org>.
6699
6700 * Makefile (libpthread-routines): Add pt-raise.
6701 * sysdeps/unix/sysv/linux/raise.c: New file.
6702 * sysdeps/unix/sysv/linux/pt-raise.c: New file.
6703 * sysdeps/generic/pt-raise.c: New file.
6704
6705 * pthread_cond_init.c: Initialize all data elements of the condvar
6706 structure. Patch by Luca Barbieri <ldb@ldb.ods.org>.
6707
6708 * pthread_attr_init.c: Actually implement 2.0 compatibility version.
6709 * pthread_create.c: Likewise.
6710
6711 * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
6712 * tst-key1.c: New file.
6713 * tst-key2.c: New file.
6714 * tst-key3.c: New file.
6715
6716 * Versions: Export pthread_detach for version GLIBC_2.0.
6717 Reported by Saurabh Desai <sdesai@austin.ibm.com>.
6718
67192002-11-08 Ulrich Drepper <drepper@redhat.com>
6720
6721 * pthread_key_create.c: Terminate search after an unused key was found.
6722 Patch by Luca Barbieri <ldb@ldb.ods.org>.
6723
6724 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
6725 Patch by Luca Barbieri <ldb@ldb.ods.org>.
6726
67272002-10-10 Ulrich Drepper <drepper@redhat.com>
6728
6729 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
6730 dynamic lookup for errno in PIC.
6731
6732 * allocatestack.c (get_cached_stack): Rearrange code slightly to
6733 release the stack lock as soon as possible.
6734 Call _dl_allocate_tls_init for TCB from the cache to re-initialize
6735 the static TLS block.
6736 (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
6737
6738 * cancellation.c: Renamed from cancelation.c.
6739 * Makefile: Adjust accordingly.
6740 * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
6741 * cleanup_defer.c: Use CANCELLATION_P.
6742 * pthread_testcancel.c: Likewise.
6743 * descr.h: Fix spelling in comments.
6744 * init.c: Likewise.
6745 * pthread_getattr_np.c: Likewise.
6746 * pthread_getschedparam.c: Likewise.
6747 * pthread_setschedparam.c: Likewise.
6748 * Versions: Likewise.
6749
6750 * pt-pselect.c: New file.
6751 * Makefile (libpthread-routines): Add pt-pselect.
6752 * Versions: Add pselect.
6753
6754 * tst-cancel4.c: New file.
6755 * Makefile (tests): Add tst-cancel4.
6756
67572002-10-09 Ulrich Drepper <drepper@redhat.com>
6758
6759 * pthread_mutex_lock.c: Always record lock ownership.
6760 * pthread_mutex_timedlock.c: Likewise.
6761 * pthread_mutex_trylock.c: Likewise.
6762
6763 * pt-readv.c: New file.
6764 * pt-writev.c: New file.
6765 * pt-creat.c: New file.
6766 * pt-msgrcv.c: New file.
6767 * pt-msgsnd.c: New file.
6768 * pt-poll.c: New file.
6769 * pt-select.c: New file.
6770 * pt-sigpause.c: New file.
6771 * pt-sigsuspend.c: New file.
6772 * pt-sigwait.c: New file.
6773 * pt-sigwaitinfo.c: New file.
6774 * pt-waitid.c: New file.
6775 * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
6776 pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
6777 pt-sigwait, pt-sigwaitinfo, and pt-waitid.
6778 * Versions: Add all the new functions.
6779
6780 * tst-exit1.c: New file.
6781 * Makefile (tests): Add tst-exit1.
6782
6783 * sem_timedwait.c: Minor optimization for more optimal fastpath.
6784
67852002-10-08 Ulrich Drepper <drepper@redhat.com>
6786
6787 * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
6788
6789 * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
6790 call. pthread_join is an official cancellation point.
6791 * pthread_timedjoin.c: Likewise.
6792
6793 * pthread_cond_wait.c: Revert order in which internal lock are dropped
6794 and the condvar's mutex are retrieved.
6795 * pthread_cond_timedwait.c: Likewise.
6796 Reported by dice@saros.East.Sun.COM.
6797
67982002-10-07 Ulrich Drepper <drepper@redhat.com>
6799
6800 * pthreadP.h: Cut out all type definitions and move them...
6801 * sysdeps/unix/sysv/linux/internaltypes.h: ...here. New file.
6802 * pthreadP.h: Include <internaltypes.h>.
6803
6804 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
6805 performance tweaks.
6806
6807 * sem_trywait.c: Shuffle #includes around to get right order.
6808 * sem_timedwait.c: Likewise.
6809 * sem_post.c: Likewise.
6810 * sem_wait.c: Likewise.
6811
6812 * nptl 0.3 released.
6813
6814 * Makefile (tests): Add tst-signal3.
6815 * tst-signal3.c: New file.
6816
68172002-10-05 Ulrich Drepper <drepper@redhat.com>
6818
6819 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
6820 the asms modify the sem object.
6821 (__lll_sem_timedwait): Now takes struct sem* as first parameter.
6822
6823 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
6824 the actual members.
6825 * pthreadP.h (struct sem): New type. Actual semaphore type.
6826 * semaphoreP.h: Include pthreadP.h.
6827 * sem_getvalue.c: Adjust to sem_t change.
6828 * sem_init.c: Likewise.
6829 * sem_open.c: Likewise.
6830 * sem_post.c: Likewise.
6831 * sem_timedwait.c: Likewise.
6832 * sem_trywait.c: Likewise.
6833 * sem_wait.c: Likewise.
6834
68352002-10-04 Ulrich Drepper <drepper@redhat.com>
6836
6837 * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
6838 * tst-basic2.c: New file.
6839 * tst-exec1.c: New file.
6840 * tst-exec2.c: New file.
6841 * tst-exec3.c: New file.
6842
6843 * tst-fork1.c: Remove extra */.
6844
6845 * nptl 0.2 released. The API for IA-32 is complete.