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