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