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