]> git.ipfire.org Git - thirdparty/glibc.git/blame - nptl/ChangeLog
Update.
[thirdparty/glibc.git] / nptl / ChangeLog
CommitLineData
86a0c4fa
UD
12003-07-04 Ulrich Drepper <drepper@redhat.com>
2
3 * init.c (sigcancel_handler): Change parameters to match handler
4 for SA_SIGACTION. Check signal number and code to recognize
5 invalid invocations.
6
bdbecaa3
RM
72003-07-03 Roland McGrath <roland@redhat.com>
8
9 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
10 Apply sizeof (struct pthread) bias to r13 value.
11
56421b23
UD
122003-07-03 Ulrich Drepper <drepper@redhat.com>
13
fbd90f6c
UD
14 * sysdeps/pthread/configure.in: Require CFI directives.
15
56421b23
UD
16 * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
17 definition.
18 * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
19 libpthread compilation.
20 * unwind.c (__pthread_unwind): Add hidden_def.
21 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
22
ca2b4cd7
UD
232003-07-01 Ulrich Drepper <drepper@redhat.com>
24
25 * libc-cancellation.c (__libc_cleanup_routine): Define.
26 * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
27 (__pthread_cleanup_pop): Define.
28
f036e569
UD
292003-07-01 Richard Henderson <rth@redhat.com>
30
31 * sysdeps/alpha/elf/pt-initfini.c: New file.
32 * sysdeps/alpha/pthread_spin_lock.S: New file.
33 * sysdeps/alpha/pthread_spin_trylock.S: New file.
34 * sysdeps/alpha/pthreaddef.h: New file.
35 * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
36 * sysdeps/alpha/tls.h: New file.
37 * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
38 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
39 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
40 * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
41 * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
42 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
43 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
44 * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
45 * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
46 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
47
3b985826
UD
482003-07-01 Ulrich Drepper <drepper@redhat.com>
49
50 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
51 cleanup support and unwind info.
52
3a4d1e1e
UD
532003-06-30 Ulrich Drepper <drepper@redhat.com>
54
55 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
56 Use correct cleanup handler registration. Add unwind info.
96c814d3
UD
57 * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
58 * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
3a4d1e1e
UD
59 * tst-once3.c: Add cleanup handler and check it is called.
60 * tst-once4.c: Likewise.
61 * tst-oncex3.c: New file.
62 * tst-oncex4.c: New file.
63 * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
64
e479cc8e
UD
652003-06-29 Ulrich Drepper <drepper@redhat.com>
66
67 * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
68
7d7ff54c
UD
692003-06-27 Ulrich Drepper <drepper@redhat.com>
70
483e95d0
UD
71 * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
72 (tf_msgsnd): Likewise.
73
7d7ff54c
UD
74 * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
75 premature returns a bit more.
76
7539c7ec
UD
772003-06-26 Ulrich Drepper <drepper@redhat.com>
78
79 * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
80 definition to the front.
81
82 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
83 the cleanup functions to make the names unique. Fix dwarf opcode
84 un unwind table.
85 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
86 functions to make the names unique. Fix CFA offset for two blocks.
87
0af6a1d9
UD
882003-06-25 Ulrich Drepper <drepper@redhat.com>
89
90 * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
91 missing closing braces.
92 Patch by Christophe Saout <christophe@saout.de>.
93
eef4a9f3
RM
942003-06-24 Roland McGrath <roland@redhat.com>
95
96 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
97
4165d44d
UD
982003-06-24 Ulrich Drepper <drepper@redhat.com>
99
7f8f7b9d
UD
100 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
101 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
102
4165d44d
UD
103 * pthreadP.h: Declare __find_thread_by_id.
104 * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
105 * pthread_clock_gettime.c: Allow using other thread's clock.
106 * pthread_clock_settime.c: Likewise.
107 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
108 * Makefile: Add rules to build and run tst-clock2.
109 * tst-clock2.c: New file.
110
67b78ef9
UD
1112003-06-23 Ulrich Drepper <drepper@redhat.com>
112
113 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
114 to use exception-based cleanup handler.
115 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
116
117 * tst-cond8.c (ch): Announce that we are done.
118
119 * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
120
121 * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
122 Also test aio_suspend with timeout value.
123
61623643
UD
1242003-06-22 Ulrich Drepper <drepper@redhat.com>
125
3a4f2043
UD
126 * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
127 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
128 attribute_hidden.
129
61623643
UD
130 * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
131 (__pthread_mutex_lock_internal): Likewise.
132 (__pthread_mutex_unlock_internal): Likewise.
133 (__pthread_mutex_unlock_usercnt): Declare.
134 * pthread_mutex_destroy.c: Always fail if used in any way.
135 * pthread_mutex_init.c: Update comment.
136 * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
137 * pthread_mutex_timedlock.c: Adjust __nusers.
138 * pthread_mutex_trylock.c: Adjust __nusers.
139 * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
140 and public interfaces are wrapper with pass additional parameter.
141 __pthread_mutex_unlock_usercnt does not adjust __nusers if second
142 parameter zero.
143 * tst-mutex8.c: New file.
144 * Makefile (tests): Add tst-mutex8.
145 * sysdeps/pthread/pthread_cond_timedwait.c: Call
146 __pthread_mutex_unlock_usercnt.
147 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
148 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
149 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
150 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
151 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
152 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
153 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
154 Add __nusers.
155 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
156 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
157 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
158 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
159 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
160
161 * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
162 * pthread_mutex_timedlock.c: Likewise.
163 * pthread_mutex_trylock.c: Adjust __nusers.
164 * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
165 * tst-mutex9.c: New file.
166 * Makefile (tests): Add tst-mutex9.
167 * sysdeps/i386/tls.h: Remove THREAD_ID definition.
168 * sysdeps/ia64/tls.h: Likewise.
169 * sysdeps/powerpc/tls.h: Likewise.
170 * sysdeps/s390/tls.h: Likewise.
171 * sysdeps/sh/tls.h: Likewise.
172 * sysdeps/x86_64/tls.h: Likewise.
173 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
174 Change type of __owner.
175 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
176 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
177 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
178 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
179 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
180
9bdabb94
UD
1812003-06-19 Jakub Jelinek <jakub@redhat.com>
182
183 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
184 * sysdeps/unix/sysv/linux/sem_post.c: ...here.
185
186 * sysdeps/unix/sysv/linux/sem_post.c: Move to...
187 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here. Pass nr + 1
188 instead of nr to lll_futex_wake. Only set errno and return -1
189 if err < 0.
190
191 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
192 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
193 return actual return value from the syscall, not 0.
194
f6c93bd9
UD
1952003-06-18 Ulrich Drepper <drepper@redhat.com>
196
ca343e73
UD
197 * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
198 find a random value.
199 (tf_msgrcv): Likewise. Also don't report msgrcv returns if
200 errno==EIDRM.
201
50441a98
UD
202 * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
203 compat_timer_settime.
204 * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
205 compat_timer_gettime.
206 * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
9bdabb94 207 compat_timer_getoverrun.
50441a98
UD
208 * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
209 compat_timer_delete.
210
f6c93bd9
UD
211 * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
212 error-checking mutex detect busy mutexes.
213
047aec8f
UD
2142003-06-17 Ulrich Drepper <drepper@redhat.com>
215
1d53508d
UD
216 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
217 Add ax to clobber list.
218 (lll_mutex_cond_lock): Likewise.
219 (lll_mutex_unlock): Likewise.
220 (lll_lock): Likewise.
221 (lll_unlock): Likewise.
222
f23b30e2
UD
223 * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
224 * tst-cancel18.c: New file.
225 * tst-cancelx18.c: New file.
226
227 * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
228 and tcdrain.
229
230 * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
231 * tst-cancel17.c: New file.
232 * tst-cancelx17.c: New file.
233
234 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
235 * sysdeps/unix/sysv/linux/sigwait.c: New file.
236 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
237
047aec8f
UD
238 * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
239
bbde8527
UD
2402003-06-16 Jakub Jelinek <jakub@redhat.com>
241
242 * sysdeps/pthread/createthread.c (create_thread): Set
243 header.multiple_threads unconditionally.
244 * allocatestack.c (allocate_stack): Likewise.
245 * descr.h (struct pthread): Add header.multiple_threads
246 unconditionally.
247 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
248 Define for librt. #error if neither libpthread, libc nor librt.
249 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
250 Likewise.
251 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
252 CDISABLE): Likewise.
253 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
254 CDISABLE): Likewise.
255 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
256 CDISABLE): Likewise.
257 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
258 CDISABLE): Likewise. Access header.multiple_threads outside of
259 libc and libpthread.
260 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
261 Likewise.
262 * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
263 * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
264
26676450
UD
2652003-06-17 Ulrich Drepper <drepper@redhat.com>
266
267 * tst-cancel4.c: Add tests for the socket and signal functions, pause.
268 Also test early cancellation before the thread reaches the cancellation
269 point.
270
271 * Makefile: Compile forward.c with exceptions.
272
273 * sysdeps/unix/sysv/linux/sleep.c: New file.
274
301a6724
UD
2752003-06-16 Ulrich Drepper <drepper@redhat.com>
276
0e0deb03
UD
277 * Makefile: Add CFLAGS definition to compile function wrappers
278 duplicated from libc with exceptions.
279 * tst-cancel4.c: Also check cancellation handlers.
280
301a6724
UD
281 * Makefile: Add rules to build and run tst-cancel16 and
282 tst-cancelx16. Add missing CFLAGS definitions.
283 * tst-cancel16.c: New file.
284 * tst-cancelx16.c: New file.
285
7a114794
UD
2862003-06-15 Ulrich Drepper <drepper@redhat.com>
287
452aea84
UD
288 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
289 (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
290 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
291 (DL_SYSINFO_IMPLEMENTATION): Likewise.
292
7a114794
UD
293 * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
294 (LIBC_CANCEL_RESET): Likewise.
295 Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
296 * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
297 librt-cancellation.
298 (CFLAGS-libcrt-cancellation.c): Define.
299 * sysdeps/pthread/librt-cancellation.c: New file.
300 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
301 macros also when compiling librt.
302 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
303 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
304 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
305 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
306 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
307 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
308 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
309
310 * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
311 compat_timer_create.
312
8ba1d429
UD
3132003-06-14 Ulrich Drepper <drepper@redhat.com>
314
cc8fb6f3
UD
315 * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
316
8ba1d429
UD
317 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
318 __register_atfork.
319 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
320 Add libc_hidden_def.
321
d4f100e2
RM
3222003-06-13 Roland McGrath <roland@redhat.com>
323
324 * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
325 constant from <sys/reg.h> to ps_get_thread_area, not register contents.
326
dd9423a6
UD
3272003-06-11 Ulrich Drepper <drepper@redhat.com>
328
329 * allocatestack.c (queue_stack): Always inline.
330 * ptreadhP.h (__do_cancel): Likewise.
331
ed24330d
JJ
3322003-06-10 Jakub Jelinek <jakub@redhat.com>
333
334 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
335 a typo.
336
06120d79
UD
3372003-06-10 Ulrich Drepper <drepper@redhat.com>
338
339 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
340 (__pthread_cond_signal): Remove incorrect second addition for
341 cond_lock!=0.
342
b1720346
UD
3432003-06-09 Ulrich Drepper <drepper@redhat.com>
344
5b318f85
UD
345 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
346 (__pthread_cond_signal): Use correct futex pointer in
347 __lll_mutex_lock_wait call.
348
b1720346
UD
349 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
350 (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
351
3e36c37d
UD
3522003-06-08 Ulrich Drepper <drepper@redhat.com>
353
ecf7955d
UD
354 * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
355 cancelable.
ed24330d 356 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
ecf7955d
UD
357 Likewise.
358
3e36c37d
UD
359 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
360 hand-written CFI generation code. Since ENTRY/END also initiated
361 CFI frames this caused two CFI sets to be generated.
362
7726edc2
UD
3632003-06-07 Ulrich Drepper <drepper@redhat.com>
364
365 * cleanup_routine.c: New file.
366 * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
367 * sysdeps/pthread/pthread.h: Add support for fully exception-based
368 cleanup handling.
369 * Makefile (libpthread-routines): Add cleanup_routine.
370 Add more CFLAGS variables to compile with exceptions. Add comments
371 why which file needs unwind tables.
372 (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
373 tests.
374 * tst-cancelx1.c: New file.
375 * tst-cancelx2.c: New file.
376 * tst-cancelx3.c: New file.
377 * tst-cancelx4.c: New file.
378 * tst-cancelx5.c: New file.
379 * tst-cancelx6.c: New file.
380 * tst-cancelx7.c: New file.
381 * tst-cancelx8.c: New file.
382 * tst-cancelx9.c: New file.
383 * tst-cancelx10.c: New file.
384 * tst-cancelx11.c: New file.
385 * tst-cancelx12.c: New file.
386 * tst-cancelx13.c: New file.
387 * tst-cancelx14.c: New file.
388 * tst-cancelx15.c: New file.
389 * tst-cleanupx0.c: New file.
390 * tst-cleanupx0.expect: New file.
391 * tst-cleanupx1.c: New file.
392 * tst-cleanupx2.c: New file.
393 * tst-cleanupx3.c: New file.
394
395 * tst-cleanup0.c: Make standard compliant.
396 * tst-cleanup1.c: Likewise.
397
398 * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
399 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
400 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
401 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
402 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
403 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
404 * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
405 CLEANUP_JMP_BUF.
406 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
407 * tst-cancel12.c: New file.
408 * tst-cancel13.c: New file.
409 * tst-cancel14.c: New file.
410 * tst-cancel15.c: New file.
411 * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
412 and tst-cancel15.
413
414 * tst-cancel1.c: Add some comments.
415
416 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
417 timeout correctly.
418
7a8a8e21
UD
4192003-06-06 Ulrich Drepper <drepper@redhat.com>
420
421 * Makefile (CFLAGS-pthread_cancel.c): Define.
422
4ad0bbf4
UD
4232003-06-05 Ulrich Drepper <drepper@redhat.com>
424
425 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
426 Change type of __writer element to int.
427 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
428 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
429 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
430 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
431 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
432 * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
433 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
434 * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
435 Compare with TID to determine deadlocks.
436 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
437 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
438 * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
439 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
440 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
441 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
442 Likewise.
443 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
444 Likewise.
445 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
446 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
447 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
448 Likewise.
449 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
450 Likewise.
451 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
452 * Makefile (tests): Add tst-rwlock12.
453 * tst-rwlock12.c: New file.
454
332faa96
JJ
4552003-06-05 Jakub Jelinek <jakub@redhat.com>
456
457 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
458 __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
459 Remove bogus hidden_proto.
460 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
461 Likewise.
462 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
463 lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
464 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
465 ___lll_mutex_timedlock): Likewise.
466
29d9e2fd
UD
4672003-06-04 Ulrich Drepper <drepper@redhat.com>
468
469 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
470 (__pthread_cond_signal): Add some code to eventually handle
471 cond_lock!=0.
472
6f1acb30
UD
4732003-06-01 Ulrich Drepper <drepper@redhat.com>
474
475 * Makefile (tests): Add tst-exec4.
476 (tst-exec4-ARGS): Define.
477 * tst-exec4.c: New file.
478
49b65043
UD
4792003-05-31 Ulrich Drepper <drepper@redhat.com>
480
31195be2
UD
481 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
482 Also fail if tv_nsec < 0.
483 (__lll_timedwait_tid): Likewise.
484 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
485 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
486 Likewise.
487 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
488 Likewise.
489 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
490 Likewise.
491 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
492 Likewise.
80b54217
UD
493 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
494 Likewise.
495 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
496 Likewise.
31195be2 497
dcfc8224
UD
498 * Makefile (tests): Add tst-sem8 and tst-sem9.
499 * tst-sem8.c: New file.
500 * tst-sem9.c: New file.
501 * sem_open.c: Fix creation of in_use record if the file exists but
502 no internal record.
503
49b65043
UD
504 * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
505 definitions.
506
507 * sysdeps/pthread/timer_create.c (timer_create): In case
508 evp==NULL, assign timer ID to sival_ptr.
509
510 * descr.h (struct pthread_unwind_buf): Change type of prev element to
511 struct pthread_unwind_buf *.
512 (struct pthread): Likewise for cleanup_jmp_buf element.
513
514 * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
515 * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
516 * unwind.c (__pthread_unwind_next): Likewise.
517
50794a45
UD
5182003-05-30 Ulrich Drepper <drepper@redhat.com>
519
5d4f57bd
UD
520 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
521 (lll_futex_timed_wait): Use int for futex value parameter.
522 (lll_futex_wake): Likewise.
523 (lll_futex_requeue): Likewise.
524
525 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
526 Replace one memory operation with one register operation.
527
528 * tst-join4.c (do_test): Fix error message.
529
7ab7ea33
UD
530 * tst-rwlock6.c (do_test): Use correct format specifier.
531
532 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
533 (__lll_mutex_lock_wait): Replace one memory operation with one
534 register operation.
535 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
536 (__lll_mutex_lock_wait): Likewise.
537
50794a45
UD
538 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
539 (__lll_mutex_cond_lock): Add one to value parameter of
540 __lll_lock_wait to reflect reality in the futex syscall.
541 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
542 (lll_mutex_cond_lock): Likewise.
543
5a70784e
JJ
5442003-05-30 Jakub Jelinek <jakub@redhat.com>
545
546 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
547 New function.
548 (lll_mutex_cond_lock): Define.
549
e7c5ac68
UD
5502003-05-29 Ulrich Drepper <drepper@redhat.com>
551
586d1748
UD
552 * Makefile (tests): Add tst-signal6.
553 * tst-signal6.c: New file.
554
b8ba4a27
UD
555 * sysdeps/unix/sysv/linux/s390/lowlevellock.h
556 (__lll_mutex_unlock_force): New function
557 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
558
65d46efe
UD
559 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
560 (__lll_mutex_unlock_force): New function.
561 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
562
563 * tst-rwlock7.c (do_test): Use correct format specifier.
564
e7c5ac68
UD
565 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
566 Find break parameter in correct asm argument.
567
284bdc42
UD
5682003-05-27 Jakub Jelinek <jakub@redhat.com>
569
570 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
571 Remove out4.
572 (lll_futex_requeue): Fix __o3 constraint, return negative errno if
573 error occured.
574 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
575 Add __mutex.
576 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
577 lll_futex_requeue, lll_mutex_unlock_force): Define.
578
e7c5ac68
UD
5792003-05-30 Jakub Jelinek <jakub@redhat.com>
580
581 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
582 (pthread_cond_t): Add __mutex.
583 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
584 lll_futex_requeue, lll_mutex_unlock_force): Define.
585
ea2630c6
UD
5862003-05-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
587
588 * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
589 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
590 Add __mutex field.
591 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
592 Define.
593 (lll_futex_wait, lll_futex_wake): Define.
594 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
595 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
596 FUTEX_REQUEUE instead of FUTEX_WAIT.
597 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
598 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
599 mutex which was used in condvar structure. Call
600 __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
601 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
602
603 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
604 include tcb-offsets.h. Read wakeup value in locked region.
605 Use the value of gbr register as THREAD_ID.
606 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
607 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
608 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
609
610 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
611 macros.
612
5a77f150
UD
6132003-05-28 Ulrich Drepper <drepper@redhat.com>
614
615 * sysdeps/pthread/pthread_cond_broadcast.c
616 (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
617
7661d9f7
UD
6182003-05-26 Ulrich Drepper <drepper@redhat.com>
619
620 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
621 typo in register name.
622 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
623 correctly. Actually use requeue. Little optimization.
624 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
625 mutex address early. Handle cancellation state as 32-bit value.
626 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
627 Remove unnecessary label.
628
69431c9a
UD
6292003-05-25 Ulrich Drepper <drepper@redhat.com>
630
631 * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
632 instead of FUTEX_WAIT.
633 * sysdeps/pthread/pthread_cond_signal.c: Likewise.
634 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
635 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
636 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
637 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
638 * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
639 used in condvar structure. Call __pthread_mutex_cond_lock instead
640 of __pthread_mutex_lock_internal.
641 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
642 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
643 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
644 (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
645 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
646 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
647 * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
648 Add pthread_mutex_cond_lock.
649 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
650 * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
651 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
652 lll_mutex_cond_lock.
653 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
654 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
248a3490 655 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
69431c9a 656 Add __mutex field.
248a3490 657 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
69431c9a
UD
658 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
659
660 * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
661 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
662
663 * pthreadP.h: Declare __pthread_mutex_cond_lock.
664 * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
665 Use it instead of lll_mutex_lock. If __pthread_mutex_lock is a
666 macro don't define aliases.
667
668 * cancellation.c: Remove __pthread_enable_asynccancel_2.
669 * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
670 * sysdeps/pthread/pthread_cond_timedwait.c: Use
671 __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
672 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
673 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
674 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
675 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
676 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
677
fddfebbd
UD
6782003-05-17 Ulrich Drepper <drepper@redhat.com>
679
680 * sem_open.c: Fix one endless loop. Implement correct semantics
681 wrt opening the same semaphore more then once.
682 * sem_close.c: Adjust for sem_open change.
683 * semaphoreP.h: Include <semaphore.h>. Define struct inuse_sem.
684 Declare __sem_mappings, __sem_mappings_lock, __sem_search.
685 * Makefile (tests): Add tst-sem7.
686 * tst-sem7.c: New file.
687
1eefffb0
RM
6882003-05-16 Roland McGrath <roland@redhat.com>
689
690 * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
691 uninitialized variable braino.
692
6e66dc78
UD
6932003-05-16 Ulrich Drepper <drepper@redhat.com>
694
23ae6451
UD
695 * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
696 test for syscall availability.
697
698 * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
699 __no_posix_timers to -1 if the syscalls don't exist.
700
7ac5b8e2
UD
701 * pthread_join.c (pthread_join): Set tid field of the joined
702 thread to -1. This isn't necessary but helps to recognize some
703 error conditions with almost no cost.
704
705 * allocatestack.c (FREE_P): Also negative values indicate an
706 unused stack.
707
6e66dc78
UD
708 * unwind.c: Include <unistd.h>.
709
855dba3c
UD
7102003-05-14 Ulrich Drepper <drepper@redhat.com>
711
712 * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
713
81f3ac4c
UD
7142003-05-14 Jakub Jelinek <jakub@redhat.com>
715
716 * Makefile (crti-objs, crtn-objs): New variables.
717 (omit-deps, extra-objs): Add crtn.
718 ($(objpfx)libpthread.so): Depend on both crti and crtn
719 and links to them in multidir.
720 ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
721
7158eae4
UD
7222003-05-12 Steven Munroe <sjmunroe@us.ibm.com>
723
724 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
725 (lll_mutex_unlock): Use atomic_exchange_rel.
726
edf205d5
UD
7272003-05-11 Ulrich Drepper <drepper@redhat.com>
728
729 * cond-perf.c (cons): Add missing locking around setting of alldone.
730
a3f979a7
UD
7312003-05-10 Ulrich Drepper <drepper@redhat.com>
732
733 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
734 related macros.
735 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
736
880867a4
UD
7372003-05-09 Ulrich Drepper <drepper@redhat.com>
738
949ec764
UD
739 * tst-sem6.c: New file.
740 * Makefile (tests): Add tst-sem6.
741
742 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
743 Use atomic_exchange_rel instead of atomic_exchange.
744 * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
745 Likewise.
746
747 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
748 code for lll_futex_wait and lll_futex_wake in static apps. Use
749 vsyscall is possible.
750
751 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
752 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
753 * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
754 pthread_setaffinity_np.
755 * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
756 and pthread_setaffinity_np.
757 * Makefile (libpthread-routines): Add pthread_getaffinity and
758 pthread_setaffinity.
759
880867a4
UD
760 * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
761 use it in case mmap to allocate the stack fails.
762 * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
763 ARCH_MAP_FLAGS here.
764 * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
765 ARCH_RETRY_MMAP.
766
92d83c72
UD
7672003-05-08 Ulrich Drepper <drepper@redhat.com>
768
769 * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
770 handler implementation. It is now lockless in fork().
771 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
772 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
773 * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>. Don't
774 declare the __fork_*_lists.
775 (struct fork_handler): Include pointers to all three functions.
776 Add next, refcntr and need_signal elements.
777 (__fork_handlers): New declaration.
778 (__register_atfork_malloc): Remove declaration.
779 (HAVE_register_atfork_malloc): Remove definition.
780 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
781 __pthread_child_handler variable.
782 (__libc_pthread_init): Use __register_atfork instead of explicitly
783 adding to the list.
784 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
785 and lll_futex_wake.
786 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
787
788 * unwind.c (unwind_cleanup): Print error message and then abort. This
789 function must never be reached.
790
791 * cond-perf.c: New file.
792
be4d8038
UD
7932003-05-05 Ulrich Drepper <drepper@redhat.com>
794
795 * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
796
c6696b79
RM
7972003-05-04 Roland McGrath <roland@redhat.com>
798
799 * Makefile ($(objpfx)../libc.so): New target.
800
7da168bf
UD
8012003-05-02 Ulrich Drepper <drepper@redhat.com>
802
803 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
804 (pthread_condattr_t): Size is only an int, don't use long for
805 alignment.
806 (pthread_mutexattr_t): Likewise.
7da168bf
UD
807 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
808 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
809 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
810
9a7178d6
UD
8112003-05-01 Ulrich Drepper <drepper@redhat.com>
812
813 * sysdeps/i386/tls.h: Define THREAD_ID.
814 * sysdeps/ia64/tls.h: Likewise.
815 * sysdeps/powerpc/tls.h: Likewise.
816 * sysdeps/s390/tls.h: Likewise.
817 * sysdeps/sh/tls.h: Likewise.
818 * sysdeps/x86_64/tls.h: Likewise.
819 * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
820 record ownership.
821 * pthread_mutex_timedlock.c: Likewise.
822 * pthread_mutex_trylock.c: Likewise.
823 * pthread_mutex_unlock.c: Likewise.
824 * pthread_rwlock_trywrlock.c: Likewise.
825 * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
826 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
827 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
828 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
829
830 * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
831 flag.
832
a234e27d
UD
8332003-04-29 Jakub Jelinek <jakub@redhat.com>
834
835 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
836 (__SIZEOF_PTHREAD_COND_T): Define to 48.
837 (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
838 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
839 Make __align long long instead of long.
840 (pthread_rwlock_t): Formatting.
841 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
842 (pthread_rwlock_t): Formatting.
843 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
844 (pthread_cond_t): Make __align long long instead of long.
845 (pthread_rwlock_t): Move __flags field to the same position as in
846 linuxthreads.
847
f025c136
UD
8482003-04-30 Ulrich Drepper <drepper@redhat.com>
849
850 * tst-rwlock6.c (do_test): Use correct printf format specifiers.
851 * tst-rwlock7.c (do_test): Likewise.
852
7531ab9e
RM
8532003-04-26 Roland McGrath <roland@redhat.com>
854
855 * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
856
299601a1
UD
8572003-04-22 Jakub Jelinek <jakub@redhat.com>
858
299601a1
UD
859 * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
860 sizeof (struct pthread).
861 (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
468777e1 862 1 struct pthread.
299601a1
UD
863 * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
864 to 0.
865 (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
866 struct pthread.
867 (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
868 to 32-bit bytes.
869 (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
870 tcbp.
871 (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
872 unneccessarily.
873 (NO_TLS_OFFSET): Define.
299601a1
UD
874 * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
875 add TLS_TCB_SIZE unnecessarily.
299601a1 876
950094f8
RM
8772003-04-22 Roland McGrath <roland@redhat.com>
878
879 * Makeconfig (shared-thread-library): Reverse link order to work
880 around linker bug.
881
dc2f6455
UD
8822003-04-22 Ulrich Drepper <drepper@redhat.com>
883
884 * semaphore.h: Fix typo in comment.
885
e7608d77
UD
8862003-04-21 Ulrich Drepper <drepper@redhat.com>
887
6a87ee19
UD
888 * sysdeps/pthread/sigfillset.c: New file.
889
e7608d77
UD
890 * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
891 * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
892 * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
893 * sysdeps/pthread/sigaction.c: Likewise.
894 * sysdeps/pthread/sigprocmask.c: New file.
895 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
896 __SIGRTMIN+1.
897 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
898 Block SIGTIMER. Also handle SI_TKILL events and terminate thread
899 in this case.
900
0b3df49e
UD
9012003-04-19 Ulrich Drepper <drepper@redhat.com>
902
58a7a325
UD
903 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
904 (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
905
0b3df49e
UD
906 * sysdeps/unix/sysv/linux/unregister-atfork.c
907 (__unregister_atfork): Don't free memory not allocated dynamically.
908
909 * semaphore.h: Remove __THROW marker from cancellation points.
910 * nptl/sysdeps/pthread/pthread.h: Likewise.
911
7d74651e
UD
9122003-04-18 Ulrich Drepper <drepper@redhat.com>
913
76a67697
UD
914 * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
915 pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
7d74651e
UD
916 __THROW.
917
dd9d6538
JJ
9182003-04-16 Jakub Jelinek <jakub@redhat.com>
919
920 * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
921
4ab6f47c
RM
9222003-04-15 Roland McGrath <roland@redhat.com>
923
924 * forward.c (__pthread_unwind): Tweak to avoid warning.
925
162434a6
UD
9262003-04-15 Ulrich Drepper <drepper@redhat.com>
927
928 * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
929
35909161
UD
9302003-04-14 Ulrich Drepper <drepper@redhat.com>
931
18ddd3aa 932 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
35909161
UD
933 overflow CFA advance instructions.
934 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
935
18a8e730
UD
9362003-04-14 Jakub Jelinek <jakub@redhat.com>
937
bd4f43b4
UD
938 * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
939 * sysdeps/i386/pthread_spin_lock.c: Likewise.
940 * sysdeps/x86_64/tls.h: Likewise. Define LOCK_PREFIX if not already
941 defined.
942
18a8e730
UD
943 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
944 DW_CFA_advance_loc2 for .Laddl-.Lsubl.
945 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
946 DW_CFA_advance_loc for .Laddl-.Lsubl.
947
08c765fa
UD
9482003-04-13 Ulrich Drepper <drepper@redhat.com>
949
18a8e730
UD
950 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
951 position-independent unwind data for static libraries.
952 Add missing unwind info. Add comments.
953
ad2be852
UD
954 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
955 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
956 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
08c765fa
UD
957 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
958
177d1ad3
UD
9592003-04-12 Ulrich Drepper <drepper@redhat.com>
960
08c765fa
UD
961 * Makefile: Make sure all cancellation points are compiled with
962 exception and asynchronous unwind tables.
963
177d1ad3
UD
964 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
965 which mishandles loading of global object addresses in PIC.
966 (THREAD_SETMEM_NC): Likewise.
967
09d65ff3
UD
9682003-04-11 Ulrich Drepper <drepper@redhat.com>
969
970 * pthread.h: Define new data structure for cleanup buffer. Declare
971 new cleanup handler interfaces.
972 * descr.h: Include <unwind.h> if necessary. Define pthread_unwind_buf.
973 (struct pthread): Add cleanup_jmp_buf pointer. Define
974 HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
975 * pthreadP.h: Declare __pthread_unwind. Define __do_cancel to use
976 it. Declare old cleanup handler installation functions.
977 * cleanup.c: Rewrite. Install handler for unwind-based cleanup
978 handling.
979 * cleanup_defer.c: Likewise.
980 * cleanup_compat.c: New file. Old cleanup code.
981 * cleanup_def_compat.c: New file. Old cleanup code.
982 * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
983 if own thread descriptor.
984 * unwind.c: New file.
985 * forward.c: Add __pthread_unwind.
986 * init.c (pthread_functions): Add __pthread_unwind.
987 * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
988 Add ptr___pthread_unwind.
989 * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
990 and unwind function.
991 * Makefile (libpthread-routines): Add cleanup_compat,
992 cleanup_def_compat, and unwind. Define CFLAGS to enable unwind
993 table generation if necessary.
994 * version.c: Record whether unwind support is compiled in.
995 * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
996 * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
997 handler interfaces.
998 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
999 complication to generate unwind information for syscall wrappers.
68107ec0 1000 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
09d65ff3
UD
1001 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
1002 __cleanup_fct_attribute.
1003
1004 * Makefile: Add rules to build and run tst-cleanup0.
1005 * tst-cleanup0.c: New file.
1006 * tst-cleanup0.expect: New file.
1007
1008 * pthread_create.c (deallocate_tsd): Don't take parameter. Adjust
1009 caller. Optimize to avoid often unecessary local variable.
1010
0dc44b51
RM
10112003-04-11 Roland McGrath <roland@redhat.com>
1012
1013 * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
1014 sets variable `multidir'; include that.
1015 (generated): Add it.
1016 ($(objpfx)$(multidir)/crti.o): New target.
1017 [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
1018
84a80719
UD
10192003-04-11 Ulrich Drepper <drepper@redhat.com>
1020
1021 * tst-attr2.c (do_test): Add cast to avoid warning.
1022 * tst-mutex4.c (do_test): Likewise.
1023
88ff4759
UD
10242003-04-10 Ulrich Drepper <drepper@redhat.com>
1025
1026 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
1027 in child.
1028
b2041097
UD
10292003-04-09 Ulrich Drepper <drepper@redhat.com>
1030
1031 * Makefile (tests): Add tst-detach1.
1032 * tst-detach1.c: New file.
1033
f9657e88
UD
10342003-04-08 Ulrich Drepper <drepper@redhat.com>
1035
9afe4964
UD
1036 * sysdeps/pthread/pthread.h: Remove duplicate
1037 pthread_cleanup_{push,pop} definitions.
1038
f9657e88
UD
1039 * tst-barrier2.c: Eliminate warnings.
1040 * tst-cancel4.c: Likewise.
1041 * tst-cond4.c: Likewise.
1042 * tst-cond6.c: Likewise.
1043 * tst-detach1.c: Likewise.
1044 * tst-rwlock4.c: Likewise.
1045 * tst-rwlock6.c: Likewise.
1046 * tst-rwlock7.c: Likewise.
1047 * tst-sem3.c: Likewise.
1048 * tst-spin2.c: Likewise.
1049 * tst-umask1.c: Likewise.
1050
69b35e86
UD
10512003-04-07 Ulrich Drepper <drepper@redhat.com>
1052
1053 * pthread_detach.c (pthread_detach): Fix test for invalid TID.
1054
c70ad7d7
UD
10552003-04-06 Ulrich Drepper <drepper@redhat.com>
1056
1057 * descr.h (struct pthread): Move cancelhandling member to the front.
1058
54e0138f
UD
10592003-04-05 Ulrich Drepper <drepper@redhat.com>
1060
1061 * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
1062 malloc_parent, and malloc_child statically.
1063 (__register_atfork_malloc): New function.
1064 (free_mem): Don't free any of the malloc_* variables on the list.
1065 * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
1066 Define HAVE_register_atfork_malloc.
1067
b22d701b
UD
10682003-04-04 Ulrich Drepper <drepper@redhat.com>
1069
1070 * sysdeps/pthread/createthread.c (create_thread): Add some more
1071 comments explaining when to set multiple_threads and when not.
1072
1073 * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
1074 THREAD_ATOMIC_BIT_SET if not already defined.
1075 * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
1076 THREAD_ATOMIC_BIT_SET:
1077 * sysdeps/x86_64/tls.h: Likewise.
1078 * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
1079 THREAD_ATOMIC_CMPXCHG_VAL.
1080 (_pthread_cleanup_pop_restore): Likewise.
1081 * cancellation.c (__pthread_enable_asynccancel): Likewise.
1082 (__pthread_enable_asynccancel_2): Likewise.
1083 (__pthread_disable_asynccancel): Likewise.
1084 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
1085 (__libc_disable_asynccancel): Likewise.
1086 * init.c (sigcancel_handler): Likewise.
1087 * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
1088 * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
1089
86246935
UD
10902003-04-03 Ulrich Drepper <drepper@redhat.com>
1091
1092 * init.c (sigcancel_handler): Don't set EXITING_BIT here.
1093 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
1094 * pthreadP.h (__do_cancel): Set EXITING_BIT here.
1095 * Makefile (tests): Add tst-cancel11.
1096 * tst-cancel11.c: New file.
1097
6b4686a5
UD
10982003-04-01 Ulrich Drepper <drepper@redhat.com>
1099
1100 * pthread_create.c (deallocate_tsd): Clear/free memory after the last
1101 round, not the first. Use specific_used flag instead of local
1102 found_nonzero variable. Use THREAD_[SG]ETMEM where possible.
1103 (__free_tcb): Don't call deallocate_tsd here.
1104 (start_thread): Call deallocate_tsd here.
1105 * pthread_setspecific.c: Set specific_used flag really only when
1106 needed.
0d73a73b 1107 * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
6b4686a5 1108 * tst-tsd3.c: New file.
0d73a73b 1109 * tst-tsd4.c: New file.
6b4686a5 1110
42b2395d
UD
11112003-03-31 Ulrich Drepper <drepper@redhat.com>
1112
211d90c5
UD
1113 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
1114 Use atomic_exchange_and_add instead of __lll_add.
1115 (__lll_mutex_timedlock): Likewise.
1116 Patch by Ian Wienand.
1117
11182003-03-24 Steven Munroe <sjmunroe@us.ibm.com>
1119
1120 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
1121 (SINGLE_THREAD_P): Fix typo.
1122 * tst-cancel-wrappers.sh: Handle '.'ed symbols.
1123
11242003-03-31 Ulrich Drepper <drepper@redhat.com>
1125
1126 * Makefile (tests): Add tst-align.
1127 * tst-align.c: New file.
1128 * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
211d90c5 1129
42b2395d
UD
1130 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
1131 function correctly.
1132
211d90c5
UD
1133 * tst-tsd2.c: Add casts to avoid warnings.
1134
163b180f
UD
11352003-03-30 Ulrich Drepper <drepper@redhat.com>
1136
1137 * descr.h (struct pthread): Move most often used elements to the front.
1138
ea473bad
UD
11392003-03-29 Ulrich Drepper <drepper@redhat.com>
1140
1141 * Makefile (libpthread-routines): Add pthread_atfork.
1142 (libpthread-static-only-routines): Add pthread_atfork.
1143
dd731d53
UD
11442003-03-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1145
1146 * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
1147 of TLS_DTV_AT_TP.
1148 (INSTALL_DTV): Add parens.
1149 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
1150 Use passed descr instead of THREAD_SELF.
1151 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
1152 (__lll_mutex_timedlock_wait): Correct expected value after
1153 spurious wakeup.
1154 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
1155 Release lock before waking up the waiters.
1156 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
1157 criteria. Reorderstruct passed to cleanup handler. Fix
1158 handling of cancellation and failung pthread_mutex_unlock call.
1159 Use __pthread_enable_asynccancel_2 instead of
1160 __pthread_enable_asynccancel.
1161 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
1162 Return result of lock re-get if it fails.
1163 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
1164 for __pthread_cleanup_push.
1165 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
1166 completely broken rwlock implementation.
1167 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1168 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
1169 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
1170 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
1171 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1172 * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value. Use
1173 versioned_symbol macro.
1174 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
1175 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
1176
c75d02f0
UD
11772003-03-27 Ulrich Drepper <drepper@redhat.com>
1178
5f5004df
UD
1179 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
1180 __timer_helper_thread. Declare __start_helper_thread, __helper_once,
1181 and __helper_tid.
1182 (struct timer): Remove th and bar field.
1183 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
1184 debugging code. Create only one helper thread.
1185 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
1186 helper thread.
1187 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
1188 Renamed. Define statically. Use thread info from siginfo.
1189 (__helper_once): New variable.
1190 (__helper_tid): New variable.
1191 (__reset_helper_control): New function.
1192 (__start_helper_thread): New function.
1193
18d009ca
UD
1194 * pthread_create.c (start_thread): Don't use setjmp inside
1195 __builtin_expect to work around gcc bug.
1196
c75d02f0
UD
1197 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
1198 timer_delete syscall fails, but not with ENOSYS, set
1199 __no_posix_timers.
1200
1201 * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
1202 (timer_settime): Fix typo.
28cf3058
UD
1203 * sysdeps/unix/sysv/linux/timer_getoverr.c
1204 [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
c75d02f0 1205
049ac259
JJ
12062003-03-27 Jakub Jelinek <jakub@redhat.com>
1207
1208 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
1209 offset of cleanupbuf.__prev.
1210
f93d39dd
JJ
12112003-03-26 Jakub Jelinek <jakub@redhat.com>
1212
1213 * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
1214 of included file.
1215
f064e4c5
UD
12162003-03-26 Ulrich Drepper <drepper@redhat.com>
1217
1218 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
1219 NULL provide default definition to syscall.
1220
83e886a3
RM
12212003-03-25 Roland McGrath <roland@redhat.com>
1222
1223 * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
1224 (timer_id2ptr): Fix typo.
1225
09402f5b
UD
12262003-03-25 Ulrich Drepper <drepper@redhat.com>
1227
1228 * pthreadP.h: Define SIGCANCEL and SIGTIMER.
1229 * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
1230 * sysdeps/ia64/pthreaddef.h: Likewise.
1231 * sysdeps/powerpc/pthreaddef.h: Likewise.
1232 * sysdeps/s390/pthreaddef.h: Likewise.
1233 * sysdeps/sh/pthreaddef.h: Likewise.
1234 * sysdeps/x86_64/pthreaddef.h: Likewise.
1235 * init.c (__pthread_initialize_minimal): Block SIGTIMER.
1236 * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
1237 being changed.
1238 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
1239 SIGTIMER is not unblocked.
1240 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
1241 RT signal taken.
1242 * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
1243 be send.
1244 * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
1245 pass pointer through as ID.
1246 * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
1247 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
1248 * sysdeps/unix/sysv/linux/timer_create.c: New file.
1249 * sysdeps/unix/sysv/linux/timer_delete.c: New file.
1250 * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
1251 * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
1252 * sysdeps/unix/sysv/linux/timer_routines.c: New file.
1253 * sysdeps/unix/sysv/linux/timer_settime.c: New file.
1254 * sysdeps/unix/sysv/linux/ia64/Versions: New file.
1255 * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
1256 * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
1257 * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
1258 * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
1259 * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
1260 * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
1261 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
1262 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
1263 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
1264 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
1265 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
1266 * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
1267 * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
1268 * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
1269 * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
1270 * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
1271 * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
1272 * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
1273 * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
1274 * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
1275 * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
1276 * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
1277 * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
1278 * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
1279
1280 * pthreadP.h: Remove FRAME_LEFT definition.
1281 * cleanup.c (_pthread_cleanup_push): Don't check for reference to
1282 already left frame. Programs which have this problem are not POSIX
1283 compliant.
1284 * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
1285
5e826ab5
UD
12862003-03-24 Ulrich Drepper <drepper@redhat.com>
1287
1288 * sysdeps/pthread/tst-timer.c: Check return values of the
1289 functions we test.
1290
b910f788
RM
12912003-03-23 Roland McGrath <roland@redhat.com>
1292
3045a1fe
RM
1293 * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
1294 * tst-tls3mod.c: Likewise.
1295 * tst-tls1.c: Likewise.
1296 * tst-tls2.c: Likewise.
1297
85047fe3
RM
1298 * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
1299 undefined behavior.
1300
b910f788
RM
1301 * tst-join5.c (tf1, tf2): Add a cast.
1302
1303 * Makeconfig (includes): Append -I$(..)nptl to this variable.
1304
1305 * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
1306 Don't test anything.
1307 * tst-cond4.c: Likewise.
1308 * tst-cond6.c: Likewise.
1309 * tst-flock2.c: Likewise.
1310 * tst-mutex4.c: Likewise.
1311 * tst-rwlock4.c: Likewise.
1312 * tst-signal1.c: Likewise.
1313 * tst-spin2.c: Likewise.
1314 * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
1315
1316 * tst-mutex4.c: Use test-skeleton.c.
1317 * tst-spin2.c: Likewise.
1318 * tst-sysconf.c: Likewise.
1319 * tst-barrier2.c: Likewise.
1320 * tst-cond4.c: Likewise.
1321 * tst-cond6.c: Likewise.
1322 * tst-rwlock4.c: Likewise.
1323 * tst-unload.c: Likewise.
1324 * tst-flock2.c (do_test): Use return instead of exit.
1325
4baa087a
RM
13262003-03-22 Jakub Jelinek <jakub@redhat.com>
1327
1328 * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
1329
5a3ab2fc
UD
13302003-03-21 Ulrich Drepper <drepper@redhat.com>
1331
9f07eae2
UD
1332 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
1333 (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
1334 instead of __lll_compare_and_swap.
1335 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
1336 Likewise.
1337 Removed definition if __lll_compare_and_swap.
1338
5a3ab2fc
UD
1339 * cancellation.c: Adjust for new form of compare&exchange macros.
1340 * cleanup_defer.c: Likewise.
1341 * init.c: Likewise.
1342 * libc-cancellation.c: Likewise.
1343 * old_pthread_cond_broadcast.c: Likewise.
1344 * old_pthread_cond_signal.c: Likewise.
1345 * old_pthread_cond_timedwait.c: Likewise.
1346 * old_pthread_cond_wait.c: Likewise.
1347 * pthread_cancel.c: Likewise.
1348 * pthread_create.c: Likewise.
1349 * pthread_detach.c: Likewise.
1350 * pthread_join.c: Likewise.
1351 * pthread_key_delete.c: Likewise.
1352 * pthread_setcancelstate.c: Likewise.
1353 * pthread_setcanceltype.c: Likewise.
1354 * pthread_timedjoin.c: Likewise.
1355 * pthread_tryjoin.c: Likewise.
1356 * sysdeps/pthread/createthread.c: Likewise.
1357
b1aea098
UD
13582003-03-20 Ulrich Drepper <drepper@redhat.com>
1359
1360 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
4baa087a 1361 Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
b1aea098
UD
1362 definitions. Replace uses with calls to atomic_* functions.
1363 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1364 * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
1365 __lll_test_and_set calls with atomic_exchange_and_add and
1366 atomic_exchange calls respectively.
1367 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
1368 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
1369 * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
1370 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
1371 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
1372 * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
1373 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
1374
1375 * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
1376 returns the old value.
1377
100a7100
RM
13782003-03-20 Martin Schwidefsky <sky@mschwid3.boeblingen.de.ibm.com>
1379
1380 * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
1381 int for variable OLDVAL and correct inline assembler contraint.
1382 * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
1383 type int for variable OLD.
1384
1385 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
1386 only for s390-32.
1387 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
1388 (SINGLE_THREAD_P): Use global variable __local_multiple_threads
1389 instead of multiple_threads field in the TCB.
1390
95767b36
UD
13912003-03-19 Ulrich Drepper <drepper@redhat.com>
1392
4009bf40
UD
1393 * sysdeps/i386/i686/bits/atomic.h: Removed.
1394 * sysdeps/i386/i586/bits/atomic.h: Removed.
1395 * sysdeps/i386/i486/bits/atomic.h: Removed. Moved to glibc.
1396 * sysdeps/x86_64/bits/atomic.h: Removed. Moved to glibc.
1397 * sysdeps/s390/bits/atomic.h: Removed. Moved to glibc.
1398 * sysdeps/sh/bits/atomic.h: Removed. Moved to glibc.
1399 * sysdeps/ia64/bits/atomic.h: Removed. Moved to glibc.
1400 * sysdeps/powerpc/bits/atomic.h: Removed. Moved to glibc.
1401 * atomic.h: Removed. Moved to glibc.
1402
560a784f
UD
1403 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
1404 support for clock selection.
1405
95767b36
UD
1406 * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
1407 signalling waiters.
1408
043ad426
RM
14092003-03-18 Roland McGrath <roland@redhat.com>
1410
94659495
RM
1411 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
1412 Add __lll_rel_instr first. Add memory clobber.
1413 (lll_mutex_unlock): Use __lll_test_and_set.
1414 From Paul Mackerras <paulus@samba.org>.
1415
1416 * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
1417 unconditionally.
1418 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
1419 (SINGLE_THREAD_P): Add `header.' prefix.
1420 From Paul Mackerras <paulus@samba.org>.
1421
043ad426
RM
1422 * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
1423 pthread_timedjoin_np to ...
1424 (libpthread: GLIBC_2.3.3): ... here.
1425 (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
1426
1427 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
1428 Avoid shadowing VAL variable.
1429
1430 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
1431 New macro.
1432
86a9ee5e
UD
14332003-03-18 Ulrich Drepper <drepper@redhat.com>
1434
ac9e0aa1
UD
1435 * Makefile (tests): Add tst-cond11.
1436 * tst-cond11.c: New file.
1437
a14b373c
UD
1438 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
1439 struct passed to cleanup handler to eliminate one more
1440 instruction.
1441 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1442
24a49f38
UD
1443 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
1444 (pthrad_cond_t): Replace __unused field with __clock.
1445
1446 * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
1447 waken all waiters in cleanup handler.
1448 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1449 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1450
86a9ee5e
UD
1451 * pthread_condattr_getclock.c: New file.
1452 * pthread_condattr_setclock.c: New file.
1453 * sysdeps/pthread/pthread.h: Declare these new functions.
1454 * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
1455 * Makefile (libpthread-routines): Add the new functions.
1456 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
1457 Renamed field to value. Document use of the bits.
1458 * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
1459 change.
1460 * pthread_condattr_setpshared.c: Likewise.
d5cb8389 1461 * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
86a9ee5e
UD
1462 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
1463 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
1464 Add __clock field.
1465 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
1466 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1467 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1468 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
1469 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1470 Implement clock selection.
1471 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
1472 * pthread-errnos.sym: Add ENOSYS.
1473 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1474 _POSIX_CLOCK_SELECTION.
1475 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1476
1477 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
1478 invalid .size directive.
1479
98054a05
RM
14802003-03-17 Roland McGrath <roland@redhat.com>
1481
1482 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
1483 Formatting tweaks.
1484
001bea71
UD
14852003-03-17 Ulrich Drepper <drepper@redhat.com>
1486
4773086e
UD
1487 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
1488 Use __lll_add instead of spelling it out. Use protected symbol names.
1489 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
1490 Use __lll_add.
1491 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
1492 Renamed from lll_compare_and_swap. Use new name where necessary.
1493 (__lll_add): Defined.
1494 (__lll_dec_if_positive): Defined.
1495 (__lll_test_and_set): Defined.
1496 * sysdeps/ia64/pthread_spin_init.c: Removed.
1497 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
1498 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
1499 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
1500 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
1501 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
1502 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
1503 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
001bea71
UD
1504 * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
1505 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
1506 __sync_lock_release_si.
1507 Patch by Jakub Jelinek.
1508
1509 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
1510 Fix timeout handling.
1511 (__lll_timedwait_tid): Likewise.
1512 (lll_unlock_wake_cb): Wake up other waiters if necessary.
1513 Patch by Jakub Jelinek.
1514
1515 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
1516
de4471dd
RM
15172003-03-17 Roland McGrath <roland@redhat.com>
1518
1519 PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
1520 * sysdeps/pthread/pthread_spin_init.c: New file.
1521 * sysdeps/pthread/pthread_spin_unlock.c: New file.
1522 * sysdeps/powerpc/Makefile: New file.
1523 * sysdeps/powerpc/pthread_spin_lock.c: New file.
1524 * sysdeps/powerpc/pthread_spin_trylock.c: New file.
1525 * sysdeps/powerpc/pthreaddef.h: New file.
1526 * sysdeps/powerpc/tcb-offsets.sym: New file.
1527 * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
1528 * sysdeps/powerpc/tls.h: New file.
1529 * sysdeps/powerpc/bits/atomic.h: New file.
1530 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
1531 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
1532 * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
98054a05 1533
de4471dd
RM
1534 * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
1535 * sysdeps/unix/sysv/linux/sem_post.c: New file.
1536 * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
1537 * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
1538 * sysdeps/unix/sysv/linux/sem_wait.c: New file.
1539 * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
1540 * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
1541 * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
1542 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
1543 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
1544 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
1545 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
1546 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
1547 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
1548 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
1549
1550 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
1551 not gettimeofday.
1552 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
1553 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
1554 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
1555 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
1556 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
1557
5778033f
UD
15582003-03-17 Ulrich Drepper <drepper@redhat.com>
1559
1560 * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
1561 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
1562 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1563 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1564 Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
1565
796038f8
RM
15662003-03-16 Roland McGrath <roland@redhat.com>
1567
1568 * tst-fork4.c: Include <string.h>.
1569 * tst-signal2.c: Likewise.
1570 * tst-mutex5.c (do_test): exit -> return.
1571 * tst-mutex2.c: Include <stdlib.h>.
1572
51d0678c
UD
15732003-03-16 Ulrich Drepper <drepper@redhat.com>
1574
5778033f
UD
1575 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
1576 (__lll_mutex_timedlock_wait): Correct expected value after
1577 spurious wakeup. Otherwise we would never wait again.
1578
b6e2f87a
UD
1579 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
1580 zone versus inline asm stupidity. Use correct instructions.
1581
51d0678c
UD
1582 * tst-rwlock6.c: Add some more status output.
1583
8112cc70
RM
15842003-03-15 Roland McGrath <roland@redhat.com>
1585
1586 * sysdeps/pthread/configure.in: New file.
1587 * sysdeps/pthread/configure: New file (generated).
1588
49773c19
UD
15892003-03-15 Ulrich Drepper <drepper@redhat.com>
1590
1591 * allocatestack.c (allocate_stack): Store the exact stack size of
1592 user allocated stacks.
1593
eec0ca9f
JJ
15942003-03-15 Jakub Jelinek <jakub@redhat.com>
1595
1596 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
1597 (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
1598 * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
1599 * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
1600 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
1601 Use `header.' prefix.
1602 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
1603
a87731e2
UD
16042003-03-15 Ulrich Drepper <drepper@redhat.com>
1605
1606 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
1607 __builtin_frame_address, use stack pointer.
1608
1609 * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
1610 instead of __builtin_frame_pointer.
1611
e22a221d
UD
16122003-03-14 Ulrich Drepper <drepper@redhat.com>
1613
92ed3daf
UD
1614 * tst-basic1.c (do_test): Add cast to avoid warning.
1615 * tst-basic2.c (do_test): Likewise.
1616
9b89567d
UD
1617 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
1618 amount of stack correction.
1619
e22a221d
UD
1620 * tst-fork4.c: Use test-skeleton.c.
1621
2e49caba
RM
16222003-03-14 Roland McGrath <roland@redhat.com>
1623
1624 * init.c: Fix typo "#eli" for "#else".
1625
415ef7d8
RM
16262003-03-14 Steven Munroe <sjmunroe@us.ibm.com>
1627
1628 * allocatestack.c (__stack_user): Use hidden_data_def.
1629 * pthread_create.c (__pthread_keys): Likewise.
1630
1631 * init.c [__powerpc__] (__NR_set_tid_address): Define it.
1632
52287505
RM
16332003-03-14 Roland McGrath <roland@redhat.com>
1634
415ef7d8
RM
1635 * tst-fork4.c: New file.
1636 * Makefile (tests): Add it.
1637
52287505
RM
1638 * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
1639 we always define the padding space.
1640 [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
1641 stopped supporting its own extensions fully.
1642 [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
1643 struct also called `header', so `header.multiple_threads' is the field
1644 name to use on all machines.
1645 * allocatestack.c (allocate_stack): Use `header.' prefix.
1646 * sysdeps/pthread/createthread.c (create_thread): Likewise.
1647 * pthread_create.c (__pthread_create_2_1): Likewise.
1648 * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
1649 (THREAD_SELF): Likewise.
1650 * sysdeps/x86_64/tls.h: Likewise.
1651 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
1652 (SINGLE_THREAD_P): Likewise.
1653 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
1654 (SINGLE_THREAD_P): Likewise.
1655 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
1656 (SINGLE_THREAD_P): Likewise.
1657
1658 * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
1659 value directly.
1660
c44bf9aa
UD
16612003-03-14 Ulrich Drepper <drepper@redhat.com>
1662
e22a221d
UD
1663 * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
1664 * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
1665
0eb18281
UD
1666 * pthread_create.c (start_thread): setjmp is expected to return 0.
1667
c44bf9aa
UD
1668 * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
1669 (THREAD_GETMEM_NC): Likewise.
1670
564cd8b6
UD
16712003-03-13 Ulrich Drepper <drepper@redhat.com>
1672
1673 * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
1674 and the size of the stack which must be allocated is a multiple,
1675 allocate one more page.
1676 * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
1677 MULTI_PAGE_ALIASING.
1678
6461e577
RM
16792003-03-13 Roland McGrath <roland@redhat.com>
1680
1681 * pthread_create.c (start_thread): Set EXITING_BIT after the
1682 event-reporting (and destructors), not before.
1683
b5ec5617
UD
16842003-03-13 Jakub Jelinek <jakub@redhat.com>
1685
6461e577
RM
1686 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
1687 lll_futex_wake): Declare register variables as long int instead of
1688 unsigned long int. Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
1689 Make syscall arguments clobbered by the syscall.
1690 (lll_futex_wait): Define using lll_futex_timed_wait.
1691
1692 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
1693 to void *.
1694
1695 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
1696 PPID if [! NDEBUG].
1697
1698 * allocatestack.c (nptl_ncreated): Only declare if
1699 COLORING_INCREMENT != 0.
1700
1701 * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
1702 (__libc_enable_asynccancel_2): Remove prototype.
1703
b5ec5617
UD
1704 * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
1705 ctid to match kernel.
1706
d0369fb8
UD
17072003-03-12 Ulrich Drepper <drepper@redhat.com>
1708
7588880f
UD
1709 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
1710 libc_multiple_threads.
1711 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
1712 __libc_multiple_threads to...
1713 * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here. New file.
1714
1715 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
1716 versioning.
1717 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
1718 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1719
1720 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
1721 (__pthread_once_internal): Define.
1722
1723 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
1724 macros instead of .symver directly.
1725 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
1726 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1727
d0369fb8
UD
1728 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
1729 * sysdeps/x86_64/tcb-offsets.sym: New file.
1730 * sysdeps/x86_64/Makefile: New file.
1731
1732 * sysdeps/i386/tcb-offsets.sym: Add SELF.
1733 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
1734 to access own pthread_t in TCB.
1735 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1736 Likewise.
1737 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1738 Likewise.
1739 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1740
0bb2ac85
RM
17412003-03-12 Roland McGrath <roland@redhat.com>
1742
1743 * pthread-errnos.sym: New file.
1744 * Makefile (gen-as-const-headers): New variable, list that file.
1745 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
1746 header <pthread-errnos.h> instead of defining errno values here.
1747 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
1748 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1749 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1750 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1751 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1752 Likewise.
1753 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1754 Likewise.
1755 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1756 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1757 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
1758 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1759 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1760 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
1761 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1762 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1763 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1764 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
1765 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1766 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
1767 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
1768 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
1769 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
1770 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1771 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
1772 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
1773 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
1774 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
1775 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
1776 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
1777 * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
1778 * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
1779 * sysdeps/sh/pthread_spin_trylock.S: Likewise.
1780 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
1781 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1782
1783 * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
1784 CLONE_CHILD_SETTID worked.
1785
35e148cb
UD
17862003-03-12 Ulrich Drepper <drepper@redhat.com>
1787
d0369fb8
UD
1788 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
1789 file.
1790 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
1791 file.
1792
1793 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
1794 (pthread_cond_t): Add padding.
1795
da49194d
UD
1796 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
1797 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
1798 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
1799
35e148cb
UD
1800 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
1801 (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
1802 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
1803 (__pthread_rwlock_timedrdlock): Likewise.
1804 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
1805 (__pthread_rwlock_wrlock): Likewise.
1806 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
1807 (__pthread_rwlock_rdlock): Likewise.
1808
1809 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
1810
1811 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
1812 result of lock re-get if it fails.
1813
3e976b96
UD
18142003-03-11 Ulrich Drepper <drepper@redhat.com>
1815
5a03acfe
UD
1816 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
1817 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1818 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
1819 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
1820 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1821 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
1822 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1823 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1824 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
1825 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1826
1827 * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
1828 THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
1829
1830 * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
1831 Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
1832 * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
1833 (create_thread): Likewise.
1834 Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
1835 * init.c (__pthread_initialize_minimal_internal): Initialize
1836 __libc_multiple_threads_ptr if necessary.
1837 * pthreadP.h: Adjust prototype for __libc_pthread_init. Declare
1838 __pthread_multiple_threads and __libc_multiple_threads_ptr.
1839 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
1840 __libc_multiple_threads.
1841 (__libc_pthread_init): Return pointer to __libc_pthread_init if
1842 necessary.
1843
1844 * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
1845 (THREAD_SETMEM_NC): Likewise.
1846
1847 * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
1848 * sysdeps/x86_64/pthread_spin_trylock.S: New file.
1849 * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
1850 * sysdeps/x86_64/pthread_spin_unlock.S: New file.
1851
1852 * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
1853 Eliminate one entire instruction.
1854
32a589b1
UD
1855 * cancellation.c (__pthread_enable_asynccancel_2): New function.
1856 * pthreadP.h: Declare __pthread_enable_asynccancel_2.
1857 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
1858 (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
1859 instead of __pthread_enable_asynccancel.
1860 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
1861 (__pthread_cond_wait): Likewise.
1862 * sysdeps/pthread/pthread_cond_timedwait.c
1863 (__pthread_cond_timedwait): Likewise.
1864 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
1865
3e976b96
UD
1866 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
1867 (__condvar_cleanup): Wake up all waiters in case we got signaled
1868 after being woken up but before disabling asynchronous
1869 cancellation.
1870 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
1871 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1872 (__condvar_cleanup): Likewise.
1873
1874 * init.c (__NR_set_tid_address): If already defined, don't redefine.
1875 Make it an error if architecture has no #if case. Add x86-64.
1876
1877 * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
1878 pt-initfini.s generation.
1879
1880 * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
1881 (TLS_INIT_TP): Fix typo.
1882
6c477888
UD
18832003-03-11 Jakub Jelinek <jakub@redhat.com>
1884
1885 * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
1886 3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
1887
1888 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
1889 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
1890 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
1891 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
1892 * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
1893 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
1894 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
1895 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
1896
ea694823
UD
18972003-03-11 Ulrich Drepper <drepper@redhat.com>
1898
6c477888
UD
1899 * sysdeps/pthread/pthread_cond_timedwait.c
1900 (__pthread_cond_timedwait): Return the result of the final
1901 locking. If it succeeds, the regular function return value.
1902
1903 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
1904 Return result of the final locking.
1905 * version.c (__nptl_main): Work around problems with the strange
1906 INTERNAL_SYSCALL macro on ppc32.
1907 * init.c (__pthread_initialize_minimal_internal): Unblock
1908 SIGCANCEL in case the parent blocked it.
1909 Reported by Paul Mackerras <paulus@samba.org>.
1910
ea694823
UD
1911 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
1912 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
1913 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
1914
b33e6163
RM
19152003-03-11 Jakub Jelinek <jakub@redhat.com>
1916
1917 * sysdeps/pthread/pthread_cond_timedwait.c
1918 (__pthread_cond_timedwait): Unlock and fail if
1919 __pthread_mutex_unlock_internal failed.
1920
1921 * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
1922 (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
1923 Use ARCH_CLONE.
1924 * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
1925 [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
1926 STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
1927 ALLOCATE_STACK): New macros.
1928 (TLS_TPADJ): New macro.
1929 (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
1930 (allocate_stack): Handle TLS_DTV_AT_TP and
1931 NEED_SEPARATE_REGISTER_STACK. Use TLS_TPADJ.
1932 * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
1933 Don't set PD->self.
1934 * init.c [__ia64__] (__NR_set_tid_address): Define.
1935
1936 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
1937 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
1938 * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
1939 * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
1940 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
1941 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
1942 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
1943 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
1944 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
1945 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
1946 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
1947 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
1948 * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
1949 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
1950 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
1951 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
1952 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
1953 * sysdeps/ia64/bits/atomic.h: New file.
1954 * sysdeps/ia64/Makefile: New file.
1955 * sysdeps/ia64/pthread_spin_init.c: New file.
1956 * sysdeps/ia64/pthread_spin_lock.c: New file.
1957 * sysdeps/ia64/pthread_spin_trylock.c: New file.
1958 * sysdeps/ia64/pthread_spin_unlock.c: New file.
1959 * sysdeps/ia64/pthreaddef.h: New file.
1960 * sysdeps/ia64/tcb-offsets.sym: New file.
1961 * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
1962 * sysdeps/ia64/tls.h: New file.
1963
1964 * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
1965 to syscall instead of no arguments.
1966
2b30b2e5
UD
19672003-03-10 Ulrich Drepper <drepper@redhat.com>
1968
db5f2fc9
UD
1969 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
1970 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
1971 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
1972 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
1973
1974 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
1975 unused code.
1976
6a4263e3
UD
1977 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
1978
3de7c2a9
UD
1979 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
1980 lowlevelbarrier.sym.
1981 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
1982 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
1983 Include lowlevelbarrier.h and don't define offsets locally.
6a4263e3 1984 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
3de7c2a9 1985
2a544d82
UD
1986 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1987 (__lll_mutex_lock_wait): Reverse order of first two parameters.
1988 (__lll_mutex_timedlock_wait): Likewise.
1989 (lll_mutex_lock): Adjust asm for that.
1990 (lll_mutex_timedlock): Likewise. Mark cx, cc, r10 as clobbered.
1991 (lll_lock): Adjust asm for operand order change.
1992 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
1993 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
1994
ec06436c
UD
1995 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
1996 Reverse order of parameters.
1997 (__lll_timedwait_tid): Remove regparms attribute.
1998 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
1999 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
2000
3273832c
UD
2001 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
2002 (__lll_timedwait_tid): Remove one unnecessary instruction.
2003
51f32ab8
UD
2004 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
2005 __lll_mutex_timedlock_wait only for NOT_IN_libc.
2006 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
2007 lowlevelmutex.S.
2008
2009 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
2010 lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
2011 for NOT_IN_libc.
2012 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
2013 lowlevellock.S.
2014
fad48d9e
UD
2015 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
2016 LOCK is already defined. Don't define __lll_mutex_timedlock_wait
2017 for libc.so.
2018 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
2019 define LOCK here (if UP is not defined). The actual code is in
2020 lowlevelmutex.S.
2021
9356d063
UD
2022 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
2023 LOCK is already defined. Don't define lll_unlock_wake_cb and
2024 __lll_timedwait_tid for libc.so.
2025 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
2026 define LOCK here (if UP is not defined). The actual code is in
2027 lowlevellock.S.
2028
ebf0cbc5 2029 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
106f6f9d
UD
2030 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
2031 * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
2032 instead of lowlevelsem.h.
2033 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
2034 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
2035 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
0be8ee21 2036
c915e5ad
UD
2037 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
2038 lowlevelrwlock.sym.
2039 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
2040 * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
146fa1ee 2041 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
c915e5ad 2042
4c3c2e8a
UD
2043 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
2044 register loading.
2045 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
2046 last changed. D'oh.
2047
2b30b2e5
UD
2048 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
2049
2050 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
2051 of __libc_locking_needed.
2052 (lll_trylock): Initialize %eax to zero.
2053
2b30b2e5
UD
2054 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
2055 pthread_cond_t definition.
2056
e48f9638
RM
20572003-03-10 Roland McGrath <roland@redhat.com>
2058
2059 * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
2060 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
2061 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
2062 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
2063 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
2064
2065 * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
2066 Instead of setting PD->multiple_threads, set globals
2067 __pthread_multiple_threads and __libc_multiple_threads.
2068 * sysdeps/pthread/createthread.c (create_thread): Likewise.
2069 * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
2070 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
2071
2072 * descr.h (struct pthread): Conditionalize first member on
2073 [!TLS_DTV_AT_TP]. Replace the `header' member with an anonymous union
2074 containing an anonymous tcbhead_t. Move `list' member out.
2075 [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
2076 * allocatestack.c: Remove use of `header.data.' prefix.
2077 * pthread_create.c: Likewise.
2078 * init.c (__pthread_initialize_minimal_internal): Likewise.
2079 * sysdeps/pthread/createthread.c (create_thread): Likewise.
2080 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
2081 (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
2082 * sysdeps/x86_64/tls.h: Likewise.
2083 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
2084 (SINGLE_THREAD_P): Likewise.
2085 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
2086 (SINGLE_THREAD_P): Likewise.
2087 * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
2088 * sysdeps/s390/tls.h (tcbhead_t): Likewise.
2089
c37cae9e
UD
20902003-03-09 Ulrich Drepper <drepper@redhat.com>
2091
d38c777e
RM
2092 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
2093
7b44a5e0 2094 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
2b30b2e5 2095 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
7b44a5e0 2096
c2e5e085
UD
2097 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
2098 leftovers from the ia32 code.
2099
2100 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
2101 memory load.
2102 (clear_once_control): Don't load %esi.
2103
2104 * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
2105 handling.
2106
2107 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
2108
cd4b2a55
UD
2109 * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
2110 * sysdeps/unix/sysv/linux/createthread.c: ...here.
2111
c37cae9e
UD
2112 * Makefile (tests): Add tst-cond10.
2113 * tst-cond10.c: New file.
2114
d130a341
UD
21152003-03-08 Ulrich Drepper <drepper@redhat.com>
2116
ccf1d573
UD
2117 * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
2118 * tst-signal3.c (do_test): Likewise.
2119 * tst-sem5.c (do_test): Likewise.
2120 * tst-kill6.c (do_test): Likewise.
2121 * tst-tls3.c (do_test): Likewise. Include <errno.h>.
2122
2123 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
2124 of inc/dec.
2125 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
2126 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
2127 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2128 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
2129 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2130 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2131 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2132 Likewise.
2133 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2134 Likewise.
2135 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2136 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2137 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2138 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
2139 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
2140 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
2141 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
2142 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2143
d130a341
UD
2144 * allocatestack.c (allocate_stack): If mprotect() fails free the
2145 TLS memory.
2146
bc6389ad
UD
21472003-03-07 Ulrich Drepper <drepper@redhat.com>
2148
41d4d223
UD
2149 * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
2150
2151 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
2152 lll_wake_tid. This was used only to work around kernel limits in
2153 the early days.
2154 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2155 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
2156 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
2157 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
2158
bc6389ad
UD
2159 * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
2160 (__pthread_initialize_minimal_internal): Change initialization of
2161 __static_tls_align_m1 appropriately.
2162 * pthreadP.h (__static_tls_align_m1): Renamed from
2163 __static_tls_align.
2164 * allocatestack.c (allocate_stack): Use __static_tls_align_m1
2165 instead of __static_tls_align-1.
2166
cc775edf
UD
21672003-03-04 Ulrich Drepper <drepper@redhat.com>
2168
0de28d5c 2169 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
6245b6ae 2170
518b5308
UD
2171 * pthread_create.c: Define __pthread_keys using nocommon
2172 attribute, not by placing it explicitly in bss.
2173 Remove DEFINE_DEALLOC definition. Not needed anymore.
2174
2175 * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
2176 Use it in mmap call to allocate stacks.
2177
2178 * sysdeps/pthread/createthread.c (create_thread): Fix comment.
2179
cc775edf
UD
2180 * pthread_create.c (start_thread): Use THREAD_SETMEM to store
2181 result of the thread function.
2182
4f6f0a8f
UD
21832003-03-03 Ulrich Drepper <drepper@redhat.com>
2184
f04a2721
UD
2185 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed. The generic
2186 version is just fine.
2187
4f6f0a8f
UD
2188 * sysdeps/unix/sysv/linux/libc_pthread_init.c
2189 (__pthread_child_handler): Renamed from pthread_child_handler,
2190 exported, and marked hidden. Change all users.
2191 * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
2192 free __pthread_child_handler from child list.
2193
7ce5c164
UD
21942003-03-03 Martin Schwidefsky <schwidefsky@de.ibm.com>
2195
2196 * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
2197
2198 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
2199 Fix handling of cancellation and failing pthread_mutex_unlock call.
2200 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
2201 (__pthread_cond_wait): Likewise.
2202
2203 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
2204 (pthread_rwlock_timedrdlock): Fix clobber of result variable by
2205 lll_futex_timed_wait call.
2206 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2207 (pthread_rwlock_timedwrlock): Likewise.
2208
2209 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
2210 Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
2211 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
2212
2213 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
2214 check of lll_futex_wake return value.
2215
ea6a015b
RM
22162003-03-03 Roland McGrath <roland@redhat.com>
2217
2218 * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
2219
2220 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
2221 Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
2222 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
2223
4adacf57
UD
22242003-03-02 Ulrich Drepper <drepper@redhat.com>
2225
1be3d664
UD
2226 * sysdeps/pthread/timer_create.c (timer_create): Return correct
2227 error for CPU clocks.
2228
885bafa1
UD
2229 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2230 _POSIX_MONOTONIC_CLOCK.
2231 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2232
4adacf57
UD
2233 * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
2234 recent kernels.
2235
86bfff4d
UD
22362003-03-01 Ulrich Drepper <drepper@redhat.com>
2237
2238 * descr.h (struct pthread): Move cleanup field to the front.
2239
d1149385
RM
22402003-03-01 Roland McGrath <roland@redhat.com>
2241
2242 * sem_open.c (sem_open): Braino fix.
2243
bd8bb78b
UD
22442003-03-01 Ulrich Drepper <drepper@redhat.com>
2245
748bec08
UD
2246 * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
2247 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
2248 __pthread_cleanup_pop functionality.
2249 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2250
bd8bb78b
UD
2251 * descr.h (struct pthread): Move tid field to the front now that
2252 it is often used.
2253
2254 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
2255 (__lll_mutex_timedlock_wait): Remove.
2256 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
2257 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
2258 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
2259 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
2260 (lll_unlock_wake_cb): Don't save and restore %esi.
2261 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
2262 %esi.
2263 (__lll_timedwait_tid): Add alignment.
2264 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
2265 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
2266 %esi.
2267 (__lll_timedwait_tid): Removed.
2268 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
2269 (__pthread_cond_broadcast): Don't save, load, and restore %esi.
2270 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
2271 (pthread_barrier_wait): Don't save, load, and restore %esi for
2272 last thread.
2273 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
2274 (__pthread_cond_signal): Don't save, load, and restore %esi.
2275 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
2276 (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
2277 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
2278 Don't save, load, and restore %esi.
2279
d2637c70
UD
22802003-02-27 Ulrich Drepper <drepper@redhat.com>
2281
567fb22a
UD
2282 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
2283 Release lock before waking up the waiters.
2284
427f5fa1
UD
2285 * tst-exit1.c (do_test): Don't start more than one thread in parallel.
2286
a2d83cfb
UD
2287 * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
2288 (reader_thread): Likewise.
2289
d2637c70
UD
2290 * sysdeps/pthread/pthread_rwlock_unlock.c
2291 (__pthread_rwlock_unlock): Release internal lock early. Don't try
2292 to wake up readers if there are none.
2293
2294 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
2295 Release internal lock before wake threads.
2296
b1531183
UD
22972003-02-26 Ulrich Drepper <drepper@redhat.com>
2298
dbf6131c
UD
2299 * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
2300 * tst-rwlock8.c: Initialize lock with INIT. Allow INIT to be
2301 predefined.
2302 * tst-rwlock9.c: Likewise.
2303 * tst-rwlock10.c: New file.
2304 * tst-rwlock11.c: New file.
2305
695799fe
UD
2306 * Makefile (tests): Add tst-dlsym1.
2307 * tst-dlsym1.c: New file.
2308
b1531183
UD
2309 * init.c (__pthread_initialize_minimal_internal): Set
2310 GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
2311 * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
2312
3724f268
UD
23132003-02-24 Ulrich Drepper <drepper@redhat.com>
2314
3857ca78
UD
2315 * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
2316
80d80779
UD
2317 * tst-cond2.c: Fix sychronization with child.
2318
86371308
UD
2319 * tst-rwlock8.c (reader_thread): Remove unused variable.
2320
ffeb4481
UD
2321 * Makefile: Add rules to build and run tst-tls3.
2322 * tst-tls3.c: New file.
2323 * tst-tls3mod.c: New file.
2324
3724f268
UD
2325 * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
2326 * tst-rwlock8.c: New file.
2327 * tst-rwlock9.c: New file.
2328 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
2329 complete broken rwlock implementation.
2330 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2331 Likewise.
2332 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2333 Likewise.
2334 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2335 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
18a53579
UD
2336 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
2337 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
2338 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
2339 * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
2340 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
3724f268 2341
8915cc40
RM
23422003-02-23 Roland McGrath <roland@redhat.com>
2343
2344 * Makefile (nptl-version): Change regexp so case sensitivity is ok.
2345
fd1a0d0c
UD
23462003-02-23 Ulrich Drepper <drepper@redhat.com>
2347
ecf28959
UD
2348 * Makefile (tests): Add tst-context1.
2349 * tst-context1.c: New file.
2350
5e47b76b
UD
2351 * Makefile (tests): Add tst-tls1 and tst-tls2.
2352 * tst-tls1.c: New file.
2353 * tst-tls2.c: New file.
2354
5a6bbb41
UD
2355 * libc-cancellation.c (__libc_enable_asynccancel): Correct test
2356 for failed cmpxchg.
2357
fd1a0d0c
UD
2358 * pthread_create.c (start_thread): Set EXITING_BIT early.
2359
2360 * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
2361 (THREAD_GETMEM_NC): Likewise.
2362
757f9fcb
UD
23632003-02-22 Ulrich Drepper <drepper@redhat.com>
2364
b1b8e747
UD
2365 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
2366 off 3 more bytes by using offset-less instructions when possible.
2367
c780aa21 2368 * Makefile: Add dependency for $(objpfx)version.d.
757f9fcb
UD
2369
2370 * eintr.c (eintr_source): Add unnecessary return but the compiler
2371 insists.
2372
2373 * tst-kill3.c: Include <unistd.h>.
2374
5148559c
RM
23752003-02-21 Roland McGrath <roland@redhat.com>
2376
2377 * pthread_create.c (start_thread): Call __libc_thread_freeres.
2378
ab2d98e3
UD
23792003-02-21 Ulrich Drepper <drepper@redhat.com>
2380
71028edd
UD
2381 * Makefile (tests): Add tst-eintr1.
2382 (distribute): Add eintr.c.
2383 * tst-eintr1.c: New file.
2384 * eintr.c: New file.
2385
e814f748
UD
2386 * pthread_cancel.c (pthread_cancel): Use tkill directly.
2387
2388 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
2389 Disallow sending SIGCANCEL.
2390
ab2d98e3 2391 * Makefile (tests): Remove tst-basic7. Add tst-kill1, tst-kill2,
9c03686d 2392 tst-kill3, tst-kill4, tst-kill5, tst-kill6.
e814f748
UD
2393 * tst-kill1.c: New file.
2394 * tst-kill2.c: New file.
2395 * tst-kill3.c: New file.
2396 * tst-kill5.c: New file.
9c03686d 2397 * tst-kill6.c: New file.
e814f748
UD
2398 * tst-basic7.c: Renamed to...
2399 * tst-kill4.c: ...this.
ab2d98e3 2400
59fed0e2
RM
24012003-02-21 Roland McGrath <roland@redhat.com>
2402
2403 * Makefile (install-lib-ldscripts): New variable.
2404
49dc759f
UD
24052003-02-21 Ulrich Drepper <drepper@redhat.com>
2406
8c2e9a29
UD
2407 * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
2408 * pthread_cancel.c: Use INVALID_TD_P.
2409 * pthread_detach.c: Likewise.
2410 * pthread_getschedparam.c: Likewise.
2411 * pthread_setschedparam.c: Likewise.
2412 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
2413 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
2414 * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
2415 * pthread_timedjoin.c: Likewise.
2416
2417 * tst-basic7.c: Include <signal.h>.
2418
49dc759f
UD
2419 * pthread_join.c (pthread_join): Limited checking for invalid
2420 descriptors.
2421 * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
2422
df5803bf
UD
24232003-02-20 Ulrich Drepper <drepper@redhat.com>
2424
c5acd3d7
UD
2425 * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
2426 beginning of the loop. Clear the entire first block of TSD.
df5803bf
UD
2427 * Makefile (tests): Add tst-key4.
2428 * tst-key4.c: New file.
2429
729924a0
UD
24302003-02-18 Ulrich Drepper <drepper@redhat.com>
2431
2f7dc594
UD
2432 * Makefile (tests): Add tst-basic7.
2433 * tst-basic7.c: New file.
2434
ba25bb0f
UD
2435 * pthread_create.c (deallocate_tsd): Mark as internal_function.
2436 Add some more __builtin_expect.
2437
12fd3c5f 2438 * pthreadP.h: Define dummy version of DEBUGGING_P.
729924a0 2439
5430d926
UD
24402003-02-17 Ulrich Drepper <drepper@redhat.com>
2441
b0db7fbe
UD
2442 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
2443 _POSIX_THREAD_PRIORITY_SCHEDULING.
2444 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
2445 _XOPEN_REALTIME_THREADS.
2446 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
2447
2448 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
2449 kernel returns EINVAL for PID <= 0, work around it.
2450
ecfda9bd
UD
2451 * Makefile (tests): Add tst-signal5.
2452 * tst-signal5.c: New file.
2453
7d78ab99
UD
2454 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
2455 and LOGIN_NAME_MAX.
2456
371a2972
UD
2457 * tst-cancel1.c (tf): Block all signals.
2458
5430d926
UD
2459 * Makefile (tests): Add tst-basic6.
2460 * tst-basic6.c: New file.
2461
2462 * tst-basic1.c: Add test for process ID.
2463
2464 * Makefile (tests): Add tst-cancel10.
2465 * tst-cancel10.c: New file.
2466
2467 * Makefile (tests): Add tst-signal4.
2468 * tst-signal4.c: New file.
2469
2470 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
2471 __sigismember instead of sigismember. Add __builtin_expect.
2472
1564916a
UD
24732003-02-16 Ulrich Drepper <drepper@redhat.com>
2474
179ff175
UD
2475 * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
2476 pthread_setcancelstate, and pthread_rwlock_setpshared.
2477
e4335f9a
UD
2478 * tst-cancel7.c (do_test): Make sure the pid file exists before
2479 canceling the thread.
2480
0a37669a
UD
2481 * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
2482 pthread_rwlock_timedrdlock tests.
2483 * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
2484 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2485 Check for invalid tv_nsec field.
2486 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2487 Likewise.
2488
2489 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
2490 recursive mutex of overflow.
2491
2492 * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
2493
e4335f9a 2494 * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
1564916a
UD
2495 going into an endless loop.
2496 * Makefile (tests): Add tst-cancel9.
2497 * tst-cancel9.c: New file.
2498
2499 * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
2500
b270b548
UD
25012003-02-15 Ulrich Drepper <drepper@redhat.com>
2502
1c82b97f
UD
2503 * tst-mutex5.c (do_test): Add more timedlock tests.
2504
b2f05465 2505 * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
c3bb9ee1
UD
2506 * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
2507
e798b60f
UD
2508 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
2509 use INLINE_SYSCALL. Error number is returned, not -1.
2510
90491dc4
UD
2511 * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
2512 and __deallocate_stack with internal_function.
2513 * pthread_create.c: Adjust definitions appropriately.
2514 * allocatestack.c: Likewise.
2515
2516 * pthread_join.c: Add one more __builtin_expect.
2517 * pthread_timedjoin.c: Likewise.
2518
2519 * pthread_getspecific.c (__pthread_getspecific): Clear data->data
2520 not data of sequence number does not match.
2521 Add one __builtin_expect.
2522
c6247c9d
UD
2523 * Makefile (tests): Add tst-clock1.
2524 * tst-clock1.c: New file.
2525
b270b548
UD
2526 * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
2527 negative arguments.
2528 * Makefile (tests): Add tst-basic5.
2529 * tst-basic5.c: New file.
2530
700bf7af
UD
25312003-02-14 Ulrich Drepper <drepper@redhat.com>
2532
757de559
UD
2533 * Makefile (tests): Add tst-basic4.
2534 * tst-basic4.c: New file.
2535
47202270
UD
2536 * pthreadP.h: Add declaraction for __nptl_nthreads.
2537 * pthread_create.c: Define __nptl_nthreads
2538 (start_thread): Increment __nptl_nthreads at beginning. Decrement
b270b548 2539 after thread is done. If then zero, call exit(0).
47202270
UD
2540 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
2541 Add ptr_nthreads. Define HAVE_PTR_NTHREADS.
2542 * init.c (pthread_functions): Initialize ptr_nthreads.
2543 * allocatestack.c (nptl_nthreads): Remove definition and all uses.
2544 (__reclaim_stacks): Decrement __nptl_nthreads.
2545 * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
2546 Define.
2547 * Makefile (tests): Add tst-basic3.
2548 * tst-basic3.c: New file.
2549
e320ef46
UD
2550 * descr.h: Define CANCELING_BIT and CANCELING_BITMASK. Introduce
2551 after CANCELTYPE_BIT, move the other bits up. Update CANCEL_RESTMASK.
2552 * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
2553 * pthread_cancel.c (pthread_cancel): Likewise. Also set CANCELING_BIT
2554 if asynchronous canceling is enabled.
2555 * pthread_join.c (pthread_join): When recognizing circular joins,
2556 take into account the other thread might be already canceled.
2557 * Makefile (tests): Add tst-join5.
2558 * tst-join5.c: New file.
2559
700bf7af
UD
2560 * Makefile (tests): Add tst-join4.
2561 * tst-join4.c: New file.
2562
25632003-02-13 Ulrich Drepper <drepper@redhat.com>
2564
2565 * tst-cond4.c (main): Add test of pthread_attr_getpshared.
2566
dac0f772
UD
25672003-02-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
2568
2569 * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
2570 THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
2571 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
2572 warning.
2573 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
2574 to avoid warning.
2575 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
2576 error if lll_futex_wake failed.
2577
e8cda341
UD
25782003-02-13 Ulrich Drepper <drepper@redhat.com>
2579
a7720b5e
UD
2580 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
2581 handling of cancellation and failung pthread_mutex_unlock call.
2582 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2583 * Makefile (tests): Add tst-cond8 and tst-cond9.
2584 * tst-cond8.c: New file.
2585 * tst-cond9.c: New file.
2586
a1ea4c06
UD
2587 * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
2588
2589 * sysdeps/pthread/pthread.h: Add missing initializers. Protect
2590 non-standard initializers with __USE_GNU.
2591
e8cda341
UD
2592 * Makefile (tests): Add tst-cleanup3.
2593 * tst-cleanup3.c: New file.
2594
2067577c
UD
25952003-02-12 Ulrich Drepper <drepper@redhat.com>
2596
89e78a95
UD
2597 * Makefile (tests): Add tst-attr1 and tst-attr2.
2598 * tst-attr1.c: New file.
2599 * tst-attr2.c: New file.
2600
dfdd294a
UD
2601 * Makefile: Add rules to build and run tst-atfork2 test.
2602 * tst-atfork2.c: New file.
2603 * tst-atfork2mod.c: New file.
2604
2605 * sysdeps/unix/sysv/linux/unregister-atfork.c
2606 (__unregister_atfork): Free the memory allocated for the handlers
2607 after removing them from the lists.
2608
2609 * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
2610 cleanup function.
2611
2612 * tst-atfork1.c (do_test): Wait for the child we forked.
2613 Report error in child.
2614
2615 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
2616
2067577c
UD
2617 * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
2618
2a8a8a84
UD
26192003-02-10 Ulrich Drepper <drepper@redhat.com>
2620
d9dd121e
UD
2621 * Makefile (tests): Add tst-cancel8.
2622 * tst-cancel8.c: New file.
2623
2a8a8a84
UD
2624 * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
2625 clearing of control variable.
defd1870 2626 * Makefile (tests): Add tst-once3 and tst-once4.
2a8a8a84 2627 * tst-once3.c: New file.
defd1870 2628 * tst-once4.c: New file.
2a8a8a84 2629
a54e8d33
UD
26302003-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
2631
2632 * sysdeps/sh/Makefile: New file.
2633 * sysdeps/sh/bits/atomic.h: New file.
2634 * sysdeps/sh/pthread_spin_init.c: New file.
2635 * sysdeps/sh/pthread_spin_lock.c: New file.
2636 * sysdeps/sh/pthread_spin_trylock.S: New file.
2637 * sysdeps/sh/pthread_spin_unlock.S: New file.
2638 * sysdeps/sh/pthreaddef.h: New file.
2639 * sysdeps/sh/tcb-offsets.sym: New file.
2640 * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
2641 * sysdeps/sh/tls.h: New file.
2642 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
2643 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
2644 * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
2645 * sysdeps/unix/sysv/linux/sh/fork.c: New file.
2646 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
2647 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
2648 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
2649 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
2650 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
2651 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
2652 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
2653 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
2654 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
2655 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
2656 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
2657 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
2658 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
2659 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
2660 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
2661 * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
2662 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
2663 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
2664 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
2665 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
2666 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
2667 * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
2668 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
2669 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
2670 * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
2671 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
2672
696e556e
UD
26732003-02-08 Ulrich Drepper <drepper@redhat.com>
2674
2675 * tst-cond2.c: Rearrange code to not rely on behavior undefined
2676 according to POSIX.
2677
2678 * tst-basic2.c (do_test): Lock mutex before creating the thread.
2679
fef710d6
UD
26802003-02-07 Ulrich Drepper <drepper@redhat.com>
2681
c6180643
UD
2682 * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
2683 (TLS_GET_FS): New #define.
2684 (TLS_SET_FS): New #define.
2685 Correct value of __NR_set_thread_area.
2686
fef710d6
UD
2687 * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
2688
11090a99
UD
26892003-02-06 Ulrich Drepper <drepper@redhat.com>
2690
65c68990
UD
2691 * Makefile (tests): Add tst-popen1.
2692 * tst-popen1.c: New file.
2693
11090a99
UD
2694 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
2695 but inactive generalization.
2696 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2697 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
2698 Minor optimization, remove one instruction.
2699 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
2700
a88c9263
UD
27012003-02-04 Martin Schwidefsky <schwidefsky@de.ibm.com>
2702
2703 * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
2704
27052003-01-31 Martin Schwidefsky <schwidefsky@de.ibm.com>
2706
2707 * init.c (__NR_set_tid_address): Add #ifdef for s390.
2708 * sysdeps/pthread/pthread_barrier_wait.c: New file.
2709 * sysdeps/pthread/pthread_cond_broadcast.c: New file.
2710 * sysdeps/pthread/pthread_cond_signal.c: New file.
2711 * sysdeps/pthread/pthread_cond_timedwait.c: New file.
2712 * sysdeps/pthread/pthread_cond_wait.c: New file.
2713 * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
2714 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
2715 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
2716 * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
2717 * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
2718 * sysdeps/s390/Makefile: New file.
2719 * sysdeps/s390/bits/atomic.h: New file.
2720 * sysdeps/s390/pthread_spin_init.c: New file.
2721 * sysdeps/s390/pthread_spin_lock.c: New file.
2722 * sysdeps/s390/pthread_spin_trylock.c: New file.
2723 * sysdeps/s390/pthread_spin_unlock.c: New file.
2724 * sysdeps/s390/pthreaddef.h: New file.
2725 * sysdeps/s390/tcb-offsets.sym: New file.
2726 * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
2727 * sysdeps/s390/tls.h: New file.
2728 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
2729 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
2730 * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
2731 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
2732 * sysdeps/unix/sysv/linux/s390/fork.c: New file.
2733 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
2734 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
2735 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
2736 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
2737 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
2738 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
2739 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
2740 * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
2741 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
2742 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
2743 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
2744 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
2745 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
2746 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
2747 * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
2748 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
2749 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
2750 * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
2751
6f1cff95
UD
27522003-02-04 Ulrich Drepper <drepper@redhat.com>
2753
ec609a8e
UD
2754 * atomic.h: Add a couple more default implementations.
2755 (atomic_compare_and_exchange_acq): Use
d45e8740
UD
2756 __arch_compare_and_exchange_32_acq in return value definition. It
2757 always exists.
2758 (atomic_bit_set): Renamed from atomic_set_bit.
0289bef9 2759 Add missing atomic_ prefixes.
e3ec8904 2760
6f1cff95
UD
2761 * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
2762 thread library is available, use correct value to mark initialized
2763 once variable.
2764
4f088329
UD
27652003-02-03 Ulrich Drepper <drepper@redhat.com>
2766
6f1cff95
UD
2767 * allocatestack.c (allocate_stack): Use __getpagesize instead of
2768 __sysconf to determine pagesize.
2769
3e4fc359 2770 * pthread_create.c: Include <atomic.h>.
4f088329
UD
2771 * allocatestack.c (allocate_stack): Implement coloring of the
2772 allocated stack memory. Rename pagesize to pagesize_m1. It's the
2773 size minus one. Adjust users.
3e4fc359 2774 * sysdeps/i386/i686/Makefile: New file.
4f088329 2775
2f42e8be
UD
27762003-02-02 Ulrich Drepper <drepper@redhat.com>
2777
4301f7e2
UD
2778 * allocatestack.c: Improve comment throughout the file.
2779
2f42e8be 2780 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
a37818b3 2781 (__lll_lock_wait): Add branch prediction.
2f42e8be
UD
2782 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
2783 (__lll_lock_wait): Likewise.
2784 (lll_unlock_wake_cb): Removed.
2785
4a7d6545
UD
27862003-01-31 Ulrich Drepper <drepper@redhat.com>
2787
2788 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
2789 _POSIX_THREAD_PRIORITY_SCHEDULING.
2790
886d5973
UD
27912003-01-30 Jakub Jelinek <jakub@redhat.com>
2792
2793 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
2794 Fix return type of ptr___pthread_getspecific.
2795
e474ca78
UD
27962003-01-29 Ulrich Drepper <drepper@redhat.com>
2797
2798 * Makefile (tests): Add tst-umask1.
2799 (tst-umask1-ARGS): Define.
2800 * tst-umask1.c: New file.
2801
e6ebd2e4
UD
28022003-01-28 Ulrich Drepper <drepper@redhat.com>
2803
6cf26f41
UD
2804 * Makefile (libpthread-routines): Remove lowlevelrwlock. Add
2805 pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
2806 pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
2807 pthread_rwlock_unlock.
2808 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
2809 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
2810 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
2811 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
2812 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2813 New file.
2814 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
2815 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2816 New file.
2817 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
2818 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
2819 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
2820 New file.
2821 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
2822 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
2823 New file.
2824 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
2825 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
2826 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
2827 New file.
2828 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
2829 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
2830 New file.
2831 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
2832
1d087a7e
UD
2833 * Makefile (libpthread-routines): Remove lowlevelcond and
2834 lowlevelsem. Add sem_wait, sem_trywait, sem_timedwait, sem_post,
2835 pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
2836 and pthread_cond_broadcast.
4a99d160
UD
2837 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
2838 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
2839 * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
2840 * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
2841 * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
2842 * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
2843 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
2844 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
2845 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
2846 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
2847 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
2848 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
2849 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
2850 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
2851 * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
2852 * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
2853 * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
2854 * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
2855 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
2856 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
2857 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
2858 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
2859 * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
2860 * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
2861 * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
2862 * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
2863 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
2864 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
2865 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
2866 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
2867 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
1d087a7e 2868
e6ebd2e4
UD
2869 * sysdeps/unix/sysv/linux/i386/createthread.c: Define
2870 PREPARE_CREATE and TLS_VALUE with x86-specific bits. All the rest
2871 of the code is moved to ...
2872 * sysdeps/pthread/createthread.c: ...here. New file.
2873
a15698cb
UD
28742003-01-27 Ulrich Drepper <drepper@redhat.com>
2875
0566b130
UD
2876 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
2877 (__new_sem_post): Clear %eax before returning.
2878 Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
2879
e6fb8846
UD
2880 * Makefile (tests): Add tst-cleanup2.
2881 * tst-cleanup2.c: New file.
2882
a15698cb
UD
2883 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
2884 Interpret first parameter correctly.
2885
8824b0a1
UD
28862003-01-17 Ulrich Drepper <drepper@redhat.com>
2887
2888 * Makefile (headers): Add bits/semaphore.h.
2889
850dcfca
UD
28902003-01-16 Jakub Jelinek <jakub@redhat.com>
2891
2892 * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
2893 if not SHARED.
2894
574b892e
UD
28952003-01-14 Ulrich Drepper <drepper@redhat.com>
2896
a8d87c92
UD
2897 * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
2898 must be used and mapping failed.
2899 Reported by Luke Elliott <luke.elliott@activfinancial.com>.
2900
574b892e
UD
2901 * Makefile (CFLAGS-pthread_self.os): Define this, not
2902 CFLAGS-pthread_self.c.
2903
fb48047a
UD
29042003-01-13 Ulrich Drepper <drepper@redhat.com>
2905
47805511
UD
2906 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
2907 lll_unlock_wake_cb.
2908
fb48047a
UD
2909 * Makefile (libpthread-routines): Add version. Add rules to build
2910 version.os and banner.h.
2911 * version.c: New file.
2912
115bb61d
UD
29132003-01-13 Jakub Jelinek <jakub@redhat.com>
2914
2915 * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
2916 the alias unconditional.
2917 * pthread_mutex_unlock.c (__pthread_mutex_unlock_internal): Likewise.
2918
29192003-01-13 Ulrich Drepper <drepper@redhat.com>
2920
2921 * Makefile (CFLAGS-pthread_self.c): New definition.
2922
6aca81bb
UD
29232003-01-06 Jakub Jelinek <jakub@redhat.com>
2924
2925 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
2926 INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
2927 * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
2928 * init.c (__pthread_initialize_minimal_internal): Likewise.
2929
e9c7764e
UD
29302003-01-07 Jakub Jelinek <jakub@redhat.com>
2931
b5facfda
UD
2932 * pthreadP.h (__pthread_cond_timedwait): Add prototype.
2933
e9c7764e
UD
2934 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
2935 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
2936 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
2937 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
2938 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
2939 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
2940
bef1e42f
UD
29412003-01-06 Jakub Jelinek <jakub@redhat.com>
2942
2943 * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
2944 * pt-system.c (LIBC_CANCEL_HANDLED): Add.
2945 * tst-cancel-wrappers.sh: Remove all exceptions.
2946
bbd17455
UD
29472003-01-05 Ulrich Drepper <drepper@redhat.com>
2948
a73ab6df
UD
2949 * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
2950 features. Reported by Marijn Ros <marijn@mad.scientist.com>.
2951
bbd17455
UD
2952 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
2953 Use __libc_pthread_functions array if SHARED.
2954
2955 * pthreadP.h: Move pthread_cond_2_0_t definition to...
2956 * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
2957
2958 * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
2959 (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
2960 __libc_key_create, __libc_getspecific, __libc_setspecific): Use
2961 __libc_ptf_call instead of __libc_maybe_call.
2962 (PTF): New #define.
2963 (__libc_cleanup_region_start): Wrap function name with PTF call.
2964 (__libc_cleanup_region_end): Likewise.
2965 (__libc_cleanup_end): Likewise.
2966
2967 * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
2968 * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
2969 * pthread_key_create.c: Add __pthread_key_create_internal alias.
2970 * pthreadP.h: Add prototypes.
2971
2972 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
2973 __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
2974 __pthread_rwlock_unlock aliases.
2975 * pthreadP.h: Add prototypes for new aliases.
2976
2977 * pthreadP.h (struct pthead_functions): Moved to...
2978 * sysdeps/pthread/pthread-functions.h: ...here. New file.
2979 * init.c (pthread_functions): Add initializers for new elements.
2980
2981 * cleanup_defer.c: Add __pthread_cleanup_push_defer and
2982 __pthread_cleanup_pop_restore aliases.
2983 * pthreadP.h: Add prototypes.
2984
2985 * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
2986 and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
2987 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
2988 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
2989 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
2990 * pthreadP.h: Adjust prototypes and callers.
2991
d27a78be
UD
29922003-01-04 Ulrich Drepper <drepper@redhat.com>
2993
b74121ae
UD
2994 * Makefile (tests): Add tst-cancel7.
2995 (tst-cancel7-ARGS): New variable.
bbd17455 2996 * tst-cancel7.c: New file.
b74121ae 2997
29bc410c
UD
2998 * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
2999 around gcc defficiencies.
3000 * old_pthread_cond_signal.c: Likewise.
3001 * old_pthread_cond_timedwait.c: Likewise.
3002 * old_pthread_cond_wait.c: Likewise.
3003
d27a78be
UD
3004 * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
3005
733f25e6
UD
30062003-01-03 Ulrich Drepper <drepper@redhat.com>
3007
7edb2ae3
UD
3008 * Makefile (tests): Add tst-cond7.
3009 * tst-cond7.c: New file.
3010
b1151300
UD
3011 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
3012 (condvar_cleanup): Get condvar address from the right place.
3013
733f25e6
UD
3014 * atomic.h: Correct definitions of atomic_full_barrier,
3015 atomic_read_barrier, atomic_write_barrier.
3016
3017 * old_pthread_cond_broadcast.c: Make memory allocate and initialization
3018 race-free.
3019 * old_pthread_cond_signal.c: Likewise.
3020 * old_pthread_cond_timedwait.c: Likewise.
3021 * old_pthread_cond_wait.c: Likewise.
3022
686b7223
UD
30232003-01-03 Jakub Jelinek <jakub@redhat.com>
3024
3025 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
3026
0e07706e
UD
30272003-01-03 Ulrich Drepper <drepper@redhat.com>
3028
997256dd
UD
3029 * pthreadP.h (pthread_cond_2_0_t): New type.
3030 (struct pthread_functions): Use new type for 2.0 condvar callbacks.
3031 Use new type for the 2.0 condvar function prototypes.
3032 * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
3033 * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
3034 parameter.
3035 * old_pthread_cond_destroy.c: Likewise.
3036 * old_pthread_cond_broadcast.c: Likewise. Lock appropriately.
3037 * old_pthread_cond_signal.c: Likewise.
3038 * old_pthread_cond_timedwait.c: Likewise.
3039 * old_pthread_cond_wait.c: Likewise.
3040
842d2817
UD
3041 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
3042 (__pthread_cond_wait): Don't save cancellation mode and seq value
3043 in same location.
3044
0e07706e
UD
3045 * herrno.c (__h_errno_location): Don't define as weak.
3046
bf293afe
UD
30472003-01-02 Jakub Jelinek <jakub@redhat.com>
3048
3049 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
3050 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
3051 and pthread_cond_wait.
3052 * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
3053 Renamed to...
3054 (__pthread_cond_broadcast_2_0): ... this.
3055 * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
3056 Renamed to...
3057 (__pthread_cond_destroy_2_0): ... this.
3058 * old_pthread_cond_init.c (__old_pthread_cond_init):
3059 Renamed to...
3060 (__pthread_cond_init_2_0): ... this.
3061 * old_pthread_cond_signal.c (__old_pthread_cond_signal):
3062 Renamed to...
3063 (__pthread_cond_signal_2_0): ... this.
3064 * old_pthread_cond_wait.c (__old_pthread_cond_wait):
3065 Renamed to...
3066 (__pthread_cond_wait_2_0): ... this.
3067 * pthread_cond_destroy.c: Include shlib-compat.h.
3068 (pthread_cond_destroy): Change strong_alias into versioned_symbol.
3069 * pthread_cond_init.c: Include shlib-compat.h.
3070 (pthread_cond_init): Change strong_alias into versioned_symbol.
3071 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
3072 fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
3073 fields.
3074 (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
3075 __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
3076 __pthread_cond_wait_2_0): New prototypes.
3077 (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
3078 __old_pthread_cond_init, __old_pthread_cond_signal,
3079 __old_pthread_cond_wait): Removed.
3080 * init.c: Include shlib-compat.h.
3081 (pthread_functions): Guard ptr___pthread_attr_init_2_0
3082 initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
3083 Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
3084 ptr___pthread_cond_*_2_0 fields.
3085 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
3086 pthread_cond_*@GLIBC_2.0 compatibility symbols.
3087
3088 * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
3089 LIBC_SIGACTION was not yet defined.
3090 [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
3091 [!defined LIBC_SIGACTION] (__sigaction): New function and
3092 libc_hidden_weak.
3093 [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
3094 [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
3095
30962003-01-02 Jakub Jelinek <jakub@redhat.com>
3097
3098 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
3099
05df18c3
UD
31002003-01-02 Ulrich Drepper <drepper@redhat.com>
3101
3102 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
3103 New, larger type definition.
3104 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
3105 implementation.
3106 * Versions [libpthread]: Add definitions for new pthread_cond_*
3107 interfaces for version GLIBC_2.3.2.
3108 * pthread_cond_init.c: Update initialization for new type definition.
3109 * Makefile (libpthread-routines): Remove pthread_cond_wait,
3110 pthread_cond_timedwait, pthread_cond_signal, and
3111 pthread_cond_broadcast. Add old_pthread_cond_init,
3112 old_pthread_cond_destroy, old_pthread_cond_wait,
3113 old_pthread_cond_timedwait, old_pthread_cond_signal, and
3114 old_pthread_cond_broadcast.
3115 * old_pthread_cond_broadcast.c: New file.
3116 * old_pthread_cond_destroy.c: New file.
3117 * old_pthread_cond_init.c: New file.
3118 * old_pthread_cond_signal.c: New file.
3119 * old_pthread_cond_timedwait.c: New file.
3120 * old_pthread_cond_wait.c: New file.
3121 * pthreadP.h: Add prototypes for the compatibility interfaces.
3122
3123 * pthread_cond_destroy.c: Don't include <errno.h>.
3124
fd8979e4
UD
31252003-01-01 Ulrich Drepper <drepper@redhat.com>
3126
3127 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
3128 unnecessary zero offset when addressing MUTEX.
3129
6d6ee629
UD
31302002-12-31 Ulrich Drepper <drepper@redhat.com>
3131
3132 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
3133 __register_atfork.
3134 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
3135 for __register_atfork.
3136
a4baf360
UD
31372002-12-31 Jakub Jelinek <jakub@redhat.com>
3138
3139 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
3140 instead of ASSEMBLER test macro.
3141
3142 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
3143 __libc_current_sigrtmax): Add libc_hidden_def.
3144
3145 * sysdeps/pthread/list.h: Remove assert.h include.
3146
e9395a94
UD
31472002-12-31 Ulrich Drepper <drepper@redhat.com>
3148
3149 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
3150 __pthread_initialize_minimal_internal not
3151 __pthread_initialize_minimal.
3152
89d6e444
UD
31532002-12-30 Ulrich Drepper <drepper@redhat.com>
3154
416d2de6
UD
3155 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
3156 __pthread_initialize_minimal as hidden.
3157
89d6e444
UD
3158 * init.c (__pthread_initialize_minimal_internal): Don't mark as
3159 constructor.
3160
31612002-12-31 Jakub Jelinek <jakub@redhat.com>
3162
3163 * Makefile ($(inst_libdir)/libpthread.so): Depend on
3164 $(common-objpfx)format.lds, include that into the output script.
3165 Fix comment.
3166 (extra-B-pthread.so): Change linuxthreads/ into nptl/.
3167
8cac677c
UD
31682002-12-28 Andreas Jaeger <aj@suse.de>
3169
3170 * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
3171 nsec resolution changes.
3172 (xstat64_conv): Likewise.
3173 (xstat32_conv): Likewise.
3174 * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
3175 struct kernel_stat.
3176 * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
3177 structs stat and stat64.
3178 * time/time.h (__timespec_defined): Define for __USE_MISC.
89d6e444 3179 * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
8cac677c 3180
49e9f864
UD
31812002-12-30 Jakub Jelinek <jakub@redhat.com>
3182
3183 * forward.c (FORWARD2): Renamed from FORWARD3. Remove unused export
3184 argument.
3185 (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
3186 (pthread_exit): Use strong_alias to avoid warnings.
3187 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
3188 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
3189 ptr___pthread_attr_init_2_*.
3190 * init.c (pthread_functions): Adjust.
3191
bab09b26
UD
31922002-12-29 Ulrich Drepper <drepper@redhat.com>
3193
598d7a42
UD
3194 * forward.c: Make all functions available by default again. It
3195 caused too much trouble.
3196
bab09b26
UD
3197 * pt-siglongjmp.c: Removed.
3198
3b7ed871
UD
31992002-12-28 Jakub Jelinek <jakub@redhat.com>
3200
3201 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
3202 (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
3203 * sysdeps/i386/Makefile: New file.
3204 * sysdeps/i386/tcb-offsets.sym: New file.
3205 * sysdeps/pthread/tcb-offsets.h: New file.
3206 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
3207 Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
3208
3209 * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
3210 __register_atfork...
3211 (GLIBC_2.3.2): ...here.
3212
32132002-12-28 Ulrich Drepper <drepper@redhat.com>
3214
3215 * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
3216 pthread_attr_setstackaddr with __attribute_deprecated__.
3217
270d9d47
UD
32182002-12-27 Jakub Jelinek <jakub@redhat.com>
3219
3220 * pt-system.c (system): Remove cancellation handling.
3221 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
3222 cancellation routines.
3223
131fd126
UD
32242002-12-28 Ulrich Drepper <drepper@redhat.com>
3225
afb2e954
UD
3226 * descr.h: Include <dl-sysdep.h>.
3227 (struct pthread): Move header.data.list to the back of the struct.
131fd126
UD
3228 * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
3229 (MULTIPLE_THREADS_OFFSET): Adjust offset.
3230 (SYSINFO_OFFSEET): Likewise.
3231
32322002-12-27 Jakub Jelinek <jakub@redhat.com>
3233
3234 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
3235 Define.
3236 (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
3237 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
3238 DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
3239 (USE_DL_SYSINFO): Undef.
3240
32412002-12-22 Jakub Jelinek <jakub@redhat.com>
3242
3243 * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
3244 $(common-objpfx)libc.so.
3245 * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
3246 it is bigger than pipe buffer size even on arches with bigger
3247 page size.
3248 (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
3249
a218c9cf
UD
32502002-12-25 Ulrich Drepper <drepper@redhat.com>
3251
3252 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
3253 correct errno access for case that USE___THREAD is not defined.
3254
015a2dc9
UD
32552002-12-24 Ulrich Drepper <drepper@redhat.com>
3256
3257 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
3258 Patch by Marijn Ros <marijn@mad.scientist.com>.
3259
5220f9ac
RM
32602002-12-22 Roland McGrath <roland@redhat.com>
3261
3262 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
3263
1561bf63
UD
32642002-12-20 Ulrich Drepper <drepper@redhat.com>
3265
3266 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
3267
3325198e
UD
32682002-12-19 Ulrich Drepper <drepper@redhat.com>
3269
057c823f
UD
3270 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
3271 NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
3272 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
3273
097eca29
UD
3274 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
3275 of int $0x80.
3276 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
3277 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
3278 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
3279 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
3280 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
3281 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
3282 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
3283 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
3284
3285 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
3286 sysenter.
3287 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
3288
3289 * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
3290
5f5843e3
UD
3291 * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
3292 in new TCB.
3293 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
3294 that sysinfo is properly initialized.
3295 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
3296 to 1 only for ld.so.
3297
3325198e
UD
3298 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
3299 RTLD_CORRECT_DYNAMIC_WEAK.
3300
74e8f2dc
UD
33012002-12-19 Jakub Jelinek <jakub@redhat.com>
3302
3303 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
3304 Use return 0 as 6th argument to FORWARD4.
3305 * pthread_equal.c: Include pthreadP.h instead of pthread.h.
3306
df45b31e
UD
33072002-12-18 Ulrich Drepper <drepper@redhat.com>
3308
3309 * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
3310 * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
3311 Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
3312 (INIT_SYSINFO): New #define.
3313 (TLS_TP_INIT): Use INIT_SYSINFO.
3314 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
3315 At test to make sure SYSINFO_OFFSET value is correct.
3316 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
3317
3d539579
UD
33182002-12-18 Jakub Jelinek <jakub@redhat.com>
3319
3320 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
3321 * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
3322 * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
3323 [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
3324 __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
3325 __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
3326 __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
3327
d7913e0e
UD
33282002-12-18 Ulrich Drepper <drepper@redhat.com>
3329
f051627f
UD
3330 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
3331 macro instead of using int $0x80 directly.
3332
d7913e0e
UD
3333 * sysdeps/pthread/bits/stdio-lock.h: New file.
3334 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
3335 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
3336 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
3337 * Makefile (routines): Add libc-lowlevelmutex.
3338
3339 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
3340 __i686.get_pc_thunk.dx.
3341
f077a4a9
UD
33422002-12-17 Jakub Jelinek <jakub@redhat.com>
3343
3344 * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
3345 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
3346 ($(objpfx)tst-cancel-wrappers.out): New rule.
3347 * tst-cancel-wrappers.sh: New test.
3348 * tst-locale1.c: Include signal.h.
3349 (uselocale): Test static linking of __libc_current_sigrt*.
3350
33512002-12-17 Ulrich Drepper <drepper@redhat.com>
3352
3353 * Makefile (tests): Add tst-cancel6.
3354 * tst-cancel6.c: New file
3355
bd499a3b
UD
33562002-12-17 Jakub Jelinek <jakub@redhat.com>
3357
3358 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
3359 Define meaningfully for assembler as well.
3360 * pthreadP.h (struct pthread_functions): Remove
3361 ptr_pthread_attr_init field. Add ptr_pthread_attr_init_2_0
3362 and ptr_pthread_attr_init_2_1 fields.
3363 * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
3364 and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
3365 * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
3366 (FORWARD3): Define using FORWARD4.
3367 (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
3368 versions.
3369 * pt-system.c: Remove duplicate stdlib.h include.
3370
0a1063f4
UD
33712002-12-16 Ulrich Drepper <drepper@redhat.com>
3372
87d60668
UD
3373 * sem_init.c: Define sem_init@GLIBC_2.0.
3374 * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
3375 * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
3376
0a1063f4
UD
3377 * flockfile.c: Moved to...
3378 * sysdeps/pthread/flockfile.c: ...here. New file.
3379 * funlockfile.c: Moved to...
3380 * sysdeps/pthread/funlockfile.c: ...here. New file.
3381 * ftrylockfile.c: Moved to...
3382 * sysdeps/pthread/ftrylockfile.c: ...here. New file.
3383
9634cf9d
UD
33842002-12-16 Jakub Jelinek <jakub@redhat.com>
3385
3386 * libc-cancellation.c: Guard both function with
3387 #if !defined NOT_IN_libc.
3388 * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
3389 automatically provided pthread wrappers.
3390 * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
3391 CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
3392 nor in libpthread.
3393 * pt-open.c: Removed.
3394 * pt-fcntl.c: Removed.
3395 * pt-fsync.c: Removed.
3396 * pt-lseek.c: Removed.
3397 * pt-msgrcv.c: Removed.
3398 * pt-msgsnd.c: Removed.
3399 * pt-msync.c: Removed.
3400 * pt-nanosleep.c: Removed.
3401 * pt-open64.c: Removed.
3402 * pt-pause.c: Removed.
3403 * pt-pread.c: Removed.
3404 * pt-pread64.c: Removed.
3405 * pt-pwrite.c: Removed.
3406 * pt-pwrite64.c: Removed.
3407 * pt-read.c: Removed.
3408 * pt-recv.c: Removed.
3409 * pt-recvfrom.c: Removed.
3410 * pt-recvmsg.c: Removed.
3411 * pt-send.c: Removed.
3412 * pt-sendto.c: Removed.
3413 * pt-sigtimedwait.c: Removed.
3414 * pt-sigwait.c: Removed.
3415 * pt-wait.c: Removed.
3416 * pt-waitpid.c: Removed.
3417 * pt-write.c: Removed.
3418 * pt-accept.c: Removed.
3419 * pt-close.c: Removed.
3420 * pt-connect.c: Removed.
3421 * pt-lseek64.c: Removed.
3422 * pt-sendmsg.c: Removed.
3423 * pt-tcdrain.c: Removed.
3424
6ee8d334
UD
34252002-12-15 Ulrich Drepper <drepper@redhat.com>
3426
81fa9371
UD
3427 * init.c (__pthread_initialize_minimal_internal): Renamed from
3428 __pthread_initialize_minimal. Make old name an alias. This
3429 converts a normal relocation into a relative relocation.
3430
f3015aa5
UD
3431 * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
3432
4cbc1950
UD
3433 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
3434 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
3435 * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
3436 pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
3437 pt-sigwaitinfo, pt-waitid, and pt-writev.
3438 * pt-creat.c: Removed.
3439 * pt-poll.c: Removed.
3440 * pt-pselect.c: Removed.
3441 * pt-readv.c: Removed.
3442 * pt-select.c: Removed.
3443 * pt-sigpause.c: Removed.
3444 * pt-sigsuspend.c: Removed.
3445 * pt-sigwaitinfo.c: Removed.
3446 * pt-waitid.c: Removed.
3447 * pt-writev.c: Removed.
3448
8454830b
UD
3449 * init.c (pthread_functions): New variable.
3450 (__pthread_initialize_minimal): Pass pointer to pthread_functions
3451 (or NULL) to __libc_pthread_init.
3452 * forward.c: Rewrite to use __libc:pthread_functions array to get
3453 function addresses.
3454 * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
3455 prototype.
3456 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
3457 Take new parameter. Copy content of variable pointed to by it
3458 to __libc_pthread_init.
3459
3460 * pthreadP.h (struct pthread_functions): New type.
3461 (__libc_pthread_init): Declare.
3462
3463 * pthread_attr_destroy.c: Add namespace protected alias.
3464 * pthread_attr_getdetachstate.c: Likewise.
3465 * pthread_attr_getinheritsched.c: Likewise.
3466 * pthread_attr_getschedparam.c: Likewise.
3467 * pthread_attr_getschedpolicy.c: Likewise.
3468 * pthread_attr_getscope.c: Likewise.
3469 * pthread_attr_setdetachstate.c: Likewise.
3470 * pthread_attr_setinheritsched.c: Likewise.
3471 * pthread_attr_setschedparam.c: Likewise.
3472 * pthread_attr_setschedpolicy.c: Likewise.
3473 * pthread_attr_setscope.c: Likewise.
3474 * pthread_cond_broadcast.c: Likewise.
3475 * pthread_cond_destroy.c: Likewise.
3476 * pthread_cond_init.c: Likewise.
3477 * pthread_cond_signal.c: Likewise.
3478 * pthread_cond_wait.c: Likewise.
3479 * pthread_condattr_destroy.c: Likewise.
3480 * pthread_condattr_init.c: Likewise.
3481 * pthread_equal.c: Likewise.
3482 * pthread_exit.c: Likewise.
3483 * pthread_getschedparam.c: Likewise.
3484 * pthread_self.c: Likewise.
3485 * pthread_setcancelstate.c: Likewise.
3486 * pthread_setschedparam.c: Likewise.
3487 * pthread_mutex_destroy.c: Likewise.
3488 * pthread_mutex_init.c: Likewise.
3489 * pthreadP.h: Add prototypes for the aliases.
3490
0d5f4929
UD
3491 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
3492 multiple_threads member in correct TCB to 1.
3493
6ee8d334
UD
3494 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
3495 SINGLE_THREAD_P. If in libc or libpthread examine multiple_thread
3496 member of thread decriptor, otherwise return unconditionally 1.
3497
2fb6444d
UD
34982002-12-14 Ulrich Drepper <drepper@redhat.com>
3499
3500 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
3501 regular Linux version. Remove file.
3502 * sysdeps/unix/sysv/linux/connect.S: Likewise. Remove file.
3503 * sysdeps/unix/sysv/linux/llseek.c: Likewise. Remove file.
3504 * sysdeps/unix/sysv/linux/msgrcv.c: Likewise. Remove file.
3505 * sysdeps/unix/sysv/linux/msgsnd.c: Likewise. Remove file.
3506 * sysdeps/unix/sysv/linux/open64.c: Likewise. Remove file.
3507 * sysdeps/unix/sysv/linux/poll.c: Likewise. Remove file.
3508 * sysdeps/unix/sysv/linux/pread.c: Likewise. Remove file.
3509 * sysdeps/unix/sysv/linux/pread64.c: Likewise. Remove file.
3510 * sysdeps/unix/sysv/linux/pselect.c: Likewise. Remove file.
3511 * sysdeps/unix/sysv/linux/pwrite.c: Likewise. Remove file.
3512 * sysdeps/unix/sysv/linux/pwrite64.c: Likewise. Remove file.
3513 * sysdeps/unix/sysv/linux/readv.c: Likewise. Remove file.
3514 * sysdeps/unix/sysv/linux/recv.S: Likewise. Remove file.
3515 * sysdeps/unix/sysv/linux/recvfrom.S: Likewise. Remove file.
3516 * sysdeps/unix/sysv/linux/recvmsg.S: Likewise. Remove file.
3517 * sysdeps/unix/sysv/linux/send.S: Likewise. Remove file.
3518 * sysdeps/unix/sysv/linux/sendmsg.S: Likewise. Remove file.
3519 * sysdeps/unix/sysv/linux/sendto.S: Likewise. Remove file.
3520 * sysdeps/unix/sysv/linux/sigpause.c: Likewise. Remove file.
3521 * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise. Remove file.
3522 * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise. Remove file.
3523 * sysdeps/unix/sysv/linux/sigwait.c: Likewise. Remove file.
3524 * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise. Remove file.
3525 * sysdeps/unix/sysv/linux/system.c: Likewise. Remove file.
3526 * sysdeps/unix/sysv/linux/tcdrain.c: Likewise. Remove file.
3527 * sysdeps/unix/sysv/linux/wait.c: Likewise. Remove file.
3528 * sysdeps/unix/sysv/linux/waitid.c: Likewise. Remove file.
3529 * sysdeps/unix/sysv/linux/waitpid.c: Likewise. Remove file.
3530 * sysdeps/unix/sysv/linux/writev.c: Likewise. Remove file.
3531 * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise. Remove file.
3532
86b2dc40
UD
35332002-12-14 Jakub Jelinek <jakub@redhat.com>
3534
3535 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
3536 * sysdeps/unix/sysv/linux/open.c: Removed.
3537 * sysdeps/unix/sysv/linux/fsync.c: Removed.
3538 * sysdeps/unix/sysv/linux/lseek.c: Removed.
3539 * sysdeps/unix/sysv/linux/msync.c: Removed.
3540 * sysdeps/unix/sysv/linux/read.c: Removed.
3541 * sysdeps/unix/sysv/linux/close.c: Removed.
3542 * sysdeps/unix/sysv/linux/creat.c: Removed.
3543 * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
3544 * sysdeps/unix/sysv/linux/pause.c: Removed.
3545 * sysdeps/unix/sysv/linux/select.c: Removed.
3546 * sysdeps/unix/sysv/linux/write.c: Removed.
3547
9d263d72
UD
35482002-12-14 Ulrich Drepper <drepper@redhat.com>
3549
3550 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
3551 element in TCB to see whether locking is needed.
3552
3553 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
3554 MULTIPLE_THREADS_OFFSET value is correct.
3555
3556 * sysdeps/unix/sysv/linux/close.c: New file.
3557 * sysdeps/unix/sysv/linux/connect.S: New file.
3558 * sysdeps/unix/sysv/linux/creat.c: New file.
3559 * sysdeps/unix/sysv/linux/fsync.c: New file.
3560 * sysdeps/unix/sysv/linux/llseek.c: New file.
3561 * sysdeps/unix/sysv/linux/lseek.c: New file.
3562 * sysdeps/unix/sysv/linux/msgrcv.c: New file.
3563 * sysdeps/unix/sysv/linux/msgsnd.c: New file.
3564 * sysdeps/unix/sysv/linux/msync.c: New file.
3565 * sysdeps/unix/sysv/linux/nanosleep.c: New file.
3566 * sysdeps/unix/sysv/linux/open.c: New file.
3567 * sysdeps/unix/sysv/linux/open64.c: New file.
3568 * sysdeps/unix/sysv/linux/pause.c: New file.
3569 * sysdeps/unix/sysv/linux/poll.c: New file.
3570 * sysdeps/unix/sysv/linux/pread.c: New file.
3571 * sysdeps/unix/sysv/linux/pread64.c: New file.
3572 * sysdeps/unix/sysv/linux/pselect.c: New file.
3573 * sysdeps/unix/sysv/linux/pwrite.c: New file.
3574 * sysdeps/unix/sysv/linux/pwrite64.c: New file.
3575 * sysdeps/unix/sysv/linux/readv.c: New file.
3576 * sysdeps/unix/sysv/linux/recv.S: New file.
3577 * sysdeps/unix/sysv/linux/recvfrom.S: New file.
3578 * sysdeps/unix/sysv/linux/recvmsg.S: New file.
3579 * sysdeps/unix/sysv/linux/select.c: New file.
3580 * sysdeps/unix/sysv/linux/send.S: New file.
3581 * sysdeps/unix/sysv/linux/sendmsg.S: New file.
3582 * sysdeps/unix/sysv/linux/sendto.S: New file.
3583 * sysdeps/unix/sysv/linux/sigpause.c: New file.
3584 * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
3585 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
3586 * sysdeps/unix/sysv/linux/sigwait.c: New file.
3587 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
3588 * sysdeps/unix/sysv/linux/system.c: New file.
3589 * sysdeps/unix/sysv/linux/tcdrain.c: New file.
3590 * sysdeps/unix/sysv/linux/wait.c: New file.
3591 * sysdeps/unix/sysv/linux/waitid.c: New file.
3592 * sysdeps/unix/sysv/linux/waitpid.c: New file.
3593 * sysdeps/unix/sysv/linux/writev.c: New file.
3594 * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
3595
3596 * pt-readv.c: Fix comment.
3597
35982002-12-14 Jakub Jelinek <jakub@redhat.com>
3599
3600 * tst-cleanup1.c: Include stdlib.h.
3601
3602 * tst-cancel5.c: New test.
3603 * Makefile (tests): Add tst-cancel5.
3604 (tst-cancel5): Link against libc.so libpthread.so in that order.
3605
9ae0909b
UD
36062002-12-13 Ulrich Drepper <drepper@redhat.com>
3607
b7bdd9c4
UD
3608 * forward.c (test_loaded): Prevent recursive calls.
3609
9ae0909b
UD
3610 * Makefile (routines): Add libc-cancellation.
3611 * libc-cancellation.c: New file.
3612 * descr.h (struct pthread): Add multiple_threads field.
3613 * allocatestack.c (allocate_stack): Initialize multiple_header field of
3614 new thread descriptor to 1.
3615 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
3616 Initialize multiple_thread field after successful thread creation.
3617 * cancellation.c (__do_cancel): Move to pthreadP.h.
3618 (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
3619 (__pthread_disable_asynccancel): Add internal_function attribute.
3620 * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
3621 * pthread_setcancelstate.c: Likewise.
3622 * pthread_setcanceltype.c: Likewise.
3623 * pthread_exit.c: Likewise.
3624 * pthreadP.h (CANCELLATION_P): Likewise.
3625 (__do_cancel): Define as static inline.
3626 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
3627 (__libc_enable_asynccancel, __libc_disable_asynccancel): New
3628 declarations.
3629 * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
3630 fields. Define MULTIPLE_THREADS_OFFSET.
3631 * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
3632 declaration.
3633 * sysdeps/unix/sysv/linux/accept.S: New file.
3634 * sysdeps/unix/sysv/linux/read.c: New file.
3635 * sysdeps/unix/sysv/linux/write.c: New file.
3636 * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
3637 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
3638 initialization of __libc_locking_needed.
3639 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
3640 __libc_locking_needed, use multiple_threads field in TCB.
3641 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
3642
22f20674
UD
36432002-12-12 Ulrich Drepper <drepper@redhat.com>
3644
2ad2e1e7
UD
3645 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
3646 version.
3647 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
3648
22f20674
UD
3649 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
3650 access to __libc_locking_needed for PIC.
3651
aa80bf86
UD
36522002-12-12 Jakub Jelinek <jakub@redhat.com>
3653
3654 * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
3655 declare for libc.so.
3656 (__libc_lock_init, __libc_lock_init_recursive): Change into comma
3657 expression.
3658 (__libc_lock_lock): Put into statement expression.
3659 (__libc_lock_unlock): Remove trailing semicolon.
3660 * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
3661
24021373
RM
36622002-12-12 Roland McGrath <roland@redhat.com>
3663
3664 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
3665 "m" constraint to refer to __libc_locking_needed. Declare it here.
3666
14e7aece
UD
36672002-12-12 Ulrich Drepper <drepper@redhat.com>
3668
3669 * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
3670 * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
3671 Initialize __libc_locking_needed.
3672 * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
3673 instead of __register_pthread_fork_handler.
3674 * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
3675 * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
3676 fork-gen with libc_pthread_init.
3677 * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
3678 of __register_pthread_fork_handler.
3679 * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
3680 of __register_pthread_fork_handler.
3681 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
3682 __libc_locking_needed to determine whether lock prefix can be avoided.
3683 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
3684
85631c8e
UD
36852002-12-11 Ulrich Drepper <drepper@redhat.com>
3686
da63009e
UD
3687 * Makefile (tests): Add tst-cleanup1.
3688 * tst-cleanup1.c: New file.
3689 * cancellation.c (__cleanup_thread): Removed.
3690 (__do_cancel): Remove call to __cleanup_thread.
3691 * pthreadP.h: Remove __cleanup_thread prorotype.
3692
000160a2
UD
3693 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
3694 Remember function and argument even if cancellation handler
3695 function is not available.
3696 (__libc_cleanup_region_end): Execute registered function directly if
3697 pthread functions are not available.
3698 (__libc_cleanup_end): Likewise.
3699
85631c8e
UD
3700 * init.c (__pthread_initialize_minimal): Fix initialization in
3701 static lib by preventing gcc from being too clever.
3702
dce8f2b6
UD
37032002-12-10 Ulrich Drepper <drepper@redhat.com>
3704
34a075be
UD
3705 * init.c (__pthread_initialize_minimal): Remove unneccesary
3706 sigaddset call.
3707
dce8f2b6
UD
3708 * Makefile (tests): We can run tst-locale2 now.
3709
e5e45b53
UD
37102002-12-09 Ulrich Drepper <drepper@redhat.com>
3711
3712 * Versions: Remove duplicated sigwait entry.
3713
bdb04f92
UD
37142002-12-08 Ulrich Drepper <drepper@redhat.com>
3715
1e506629
UD
3716 * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
3717 inside libpthread.
3718
a3957dd5
UD
3719 * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
3720
bdb04f92
UD
3721 * pthreadP.h: Declare __pthread_enable_asynccancel and
3722 __pthread_disable_asynccancel.
3723 (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
3724 (CANCEL_RESET): Use __pthread_disable_asynccancel.
3725 * cancellation.c (__pthread_enable_asynccancel): New function.
3726 (__pthread_disable_asynccancel): New function.
3727 * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
3728 * pt-close.c: Likewise.
3729 * pt-connect.c: Likewise.
3730 * pt-creat.c: Likewise.
3731 * pt-fcntl.c: Likewise.
3732 * pt-fsync.c: Likewise.
3733 * pt-lseek.c: Likewise.
3734 * pt-lseek64.c: Likewise.
3735 * pt-msgrcv.c: Likewise.
3736 * pt-msgsnd.c: Likewise.
3737 * pt-msync.c: Likewise.
3738 * pt-nanosleep.c: Likewise.
3739 * pt-open.c: Likewise.
3740 * pt-open64.c: Likewise.
3741 * pt-pause.c: Likewise.
3742 * pt-poll.c: Likewise.
3743 * pt-pread.c: Likewise.
3744 * pt-pread64.c: Likewise.
3745 * pt-pselect.c: Likewise.
3746 * pt-pwrite.c: Likewise.
3747 * pt-pwrite64.c: Likewise.
3748 * pt-read.c: Likewise.
3749 * pt-readv.c: Likewise.
3750 * pt-recv.c: Likewise.
3751 * pt-recvfrom.c: Likewise.
3752 * pt-recvmsg.c: Likewise.
3753 * pt-select.c: Likewise.
3754 * pt-send.c: Likewise.
3755 * pt-sendmsg.c: Likewise.
3756 * pt-sendto.c: Likewise.
3757 * pt-sigpause.c: Likewise.
3758 * pt-sigsuspend.c: Likewise.
3759 * pt-sigtimedwait.c: Likewise.
3760 * pt-sigwait.c: Likewise.
3761 * pt-sigwaitinfo.c: Likewise.
3762 * pt-system.c: Likewise.
3763 * pt-tcdrain.c: Likewise.
3764 * pt-wait.c: Likewise.
3765 * pt-waitid.c: Likewise.
3766 * pt-waitpid.c: Likewise.
3767 * pt-write.c: Likewise.
3768 * pt-writev.c: Likewise.
a3957dd5
UD
3769 * pthread_join.c: Likewise.
3770 * pthread_timedjoin.c: Likewise.
bdb04f92
UD
3771
3772 * pt-sigpause.c (sigsuspend): Call __sigsuspend.
3773 (__xpg_sigpause): New function.
3774 * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
3775
6ccb3834
UD
37762002-12-07 Ulrich Drepper <drepper@redhat.com>
3777
09efc3ba
UD
3778 * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
3779
3780 * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
3781 _GI_pthread_cleanup_pop to pthreadP.h.
3782
3783 * ftrylockfile.c: Use _IO_lock_trylock instead of
3784 pthread_mutex_trylock.
3785
3786 * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
3787 (CANCEL_RESET): Likewise.
3788 (__pthread_setcanceltype_): Declare.
3789 (__pthread_mutex_lock_internal): Declare.
3790 (__pthread_mutex_unlock_internal): Declare.
3791 (__pthread_once_internal): Declare.
3792 (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
3793 (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
3794
3795 * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
3796 and pthread_mutex_unlock.
3797 * pthread_cond_wait.c: Likewise.
3798 * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
3799 * pthread_mutex_unlock.c: Likewise.
3800
3801 * pthread_setcanceltype.c: Add additional alias
3802 __pthread_setcanceltype.
3803
3804 * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
3805 * sem_open.c (sem_open): Likewise.
3806 Use __libc_open, __libc_write, and __libc_close instead of
3807 open, write, and close respectively.
3808
3809 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
3810 Rewrite as statement expression since it must return a value.
3811
3812 * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
3813 * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
3814 __pthread_kill.
3815
3816 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
3817 alias __pthread_once_internal.
3818
6ccb3834
UD
3819 * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
3820
d3c9f895
UD
38212002-12-06 Ulrich Drepper <drepper@redhat.com>
3822
4614167a
UD
3823 * Makefile (tests): Add tst-stdio1 and tst-stdio2.
3824 * tst-stdio1.c: New file.
3825 * tst-stdio2.c: New file.
3826
a4548cea
UD
3827 * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
3828
d3c9f895
UD
3829 * Makefile (tests): Comment out tst-locale2 for now.
3830 (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
3831
3832 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
3833 -D_IO_MTSAFE_IO.
3834 * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
3835 Use _IO_lock_init instead of explicit assignment.
3836
3837 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
3838 Define __libc_lock_* and __libc_lock_recursive macros with
3839 lowlevellock macros, not pthread mutexes.
3840
3841 * flockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_lock instead
3842 of pthread_mutex_lock.
3843 * funlockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_unlock
3844 instead of pthread_mutex_unlock.
3845
fde89ad0
RM
38462002-12-06 Roland McGrath <roland@redhat.com>
3847
3848 * allocatestack.c (__stack_user): Use uninitialized defn.
3849 * init.c (__pthread_initialize_minimal): Initialize it here.
3850
11767d47
RM
38512002-12-05 Roland McGrath <roland@redhat.com>
3852
fde89ad0
RM
3853 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
3854 string.
3855 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
3856
11767d47
RM
3857 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
3858 missing & here too.
3859
440d8bc2
UD
38602002-12-05 Ulrich Drepper <drepper@redhat.com>
3861
3862 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
3863 lowlevellock.
3864 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
3865 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
3866 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
3867 * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
3868 for __libc_lock_* macros.
3869 * Makefile (routines): Add libc-lowlevellock.
3870
38712002-10-09 Roland McGrath <roland@redhat.com>
3872
3873 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
3874 Under [__PIC__], call the function via the pointer fetched for
3875 comparison rather than a call by name that uses the PLT.
3876 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
3877 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
3878 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
3879 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
3880 (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
3881
d5ed0118
RM
38822002-12-04 Roland McGrath <roland@redhat.com>
3883
3884 * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
3885
3886 * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
3887 * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
3888
3889 * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
3890
eaa4099f
UD
38912002-12-04 Ulrich Drepper <drepper@redhat.com>
3892
3893 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
3894 a completely opaque, non-integer type.
3895 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3896
33b5d0cc
UD
38972002-12-05 Jakub Jelinek <jakub@redhat.com>
3898
3899 * sysdeps/i386/tls.h: Include stdlib.h.
3900 * sysdeps/x86_64/tls.h: Likewise.
3901
7a5cdb30
UD
39022002-12-04 Ulrich Drepper <drepper@redhat.com>
3903
c4a6d859
UD
3904 * Makefile (tests): Add tst-locale2.
3905 (tests-static): Likewise.
3906 * tst-locale2.c: New file.
3907
7a5cdb30
UD
3908 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
3909 volatile and add memory clobbers to lock operations.
3910
d82d5d12
UD
39112002-12-03 Ulrich Drepper <drepper@redhat.com>
3912
69cae3cf
UD
3913 * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
3914 * sysdeps/i386/i486/bits/atomic.h: New file.
3915 * sysdeps/i386/i586/bits/atomic.h: New file.
3916 * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
3917 include i486 version.
3918 * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
3919 * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
c97c64de 3920 Patch by Marijn Ros <marijn@mad.scientist.com>.
69cae3cf 3921
e4044c01
UD
3922 * allocatestack.c (get_cached_stack): Don't crash if we first
3923 found a stack with a larger size then needed.
3924 Reported by Hui Huang <hui.huang@sun.com>.
3925
d82d5d12
UD
3926 * Makefile (tests): Add tst-sysconf.
3927 * tst-sysconf.c: New file.
3928
3929 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
3930 PTHREAD_THREADS_MAX.
3931
fa9a4ff0
RM
39322002-12-02 Roland McGrath <roland@redhat.com>
3933
3934 * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
3935 Declare using hidden_proto instead of attribute_hidden, so there are
3936 non-.hidden static symbols for gdb to find.
3937 (__pthread_keys): Likewise.
3938 * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
3939 * allocatestack.c (__stack_user): Likewise.
3940 * pthread_create.c (__pthread_keys): Likewise.
3941 (__nptl_threads_events, __nptl_last_event): Make these static instead
3942 of hidden.
3943 * pthread_key_create.c (__pthread_pthread_keys_max,
3944 __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
3945
91949a33
UD
39462002-12-02 Ulrich Drepper <drepper@redhat.com>
3947
c22b52fa
UD
3948 * Makefile (tests): Add tst-locale1. If buid-static is yes link
3949 statically.
3950 * tst-locale1.c: New file.
3951
beb6aa41
UD
3952 * pthread_cond_timedwait.c: Include <stdlib.h>.
3953
91949a33
UD
3954 * Makefile (tests): Add tst-fork2 and tst-fork3.
3955 * tst-fork2.c: New file.
3956 * tst-fork3.c: New file.
3957
654dff90
UD
39582002-11-28 Ulrich Drepper <drepper@redhat.com>
3959
cb0e76b4
UD
3960 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
3961
3962 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
3963 require it to 200112L.
3964
3965 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
3966 instruction only if HAVE_CMOV is defined.
3967 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
3968
975aa229
UD
3969 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
3970
654dff90
UD
3971 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
3972
3973 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
3974
3975 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
3976
a3931336
UD
39772002-11-27 Ulrich Drepper <drepper@redhat.com>
3978
c10c099c
UD
3979 * sysdeps/x86_64/bits/atomic.h: New file.
3980
3981 * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
3982 16-bit operations.
3983
dca99d27
UD
3984 * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
3985 possible since gettid cannot fail.
3986
f78deea6
UD
3987 * sysdeps/x86_64/pthreaddef.h: New file.
3988
3989 * sysdeps/i386/pthreaddef.h (gettid): Removed.
3990
3991 * sysdeps/x86_64/pthread_spin_init.c: New file.
3992 * sysdeps/x86_64/pthread_spin_lock.c: New file.
3993 * sysdeps/x86_64/pthread_spin_trylock.c: New file.
3994 * sysdeps/x86_64/pthread_spin_unlock.c: New file.
3995
3996 * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
3997 Add missing lock prefix. Minute optimization.
3998
3999 * tst-spin2.c (main): Also check successful trylock call.
4000
4001 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
4002 syscall. Fix typo in case INTERNAL_SYSCALL is not used.
4003
4004 * sysdeps/i386/pthread_spin_destroy.c: Moved to...
4005 * sysdeps/pthread/pthread_spin_destroy.c: ...here. New file.
4006
4007 * sysdeps/i386/pthread_sigmask.c: Removed. Use the generic code.
4008 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
4009 value in case of an error. Add support for INTERNAL_SYSCALL.
b54e18eb
UD
4010
4011 * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
4012 value in case of an error.
4013
a3931336
UD
4014 * sysdeps/x86_64/tls.h: New file.
4015
76a50749
UD
40162002-11-26 Ulrich Drepper <drepper@redhat.com>
4017
117c452c
UD
4018 * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface. It now
4019 takes the array member name and the index as parameters.
4020 (THREAD_SETMEM_NC): Likewise.
4021 * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
4022 * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
4023 interfaces.
4024
4025 * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
4026 to decide which code to use.
4027 (THREAD_SETMEM_NC): Likewise.
4028
76a50749
UD
4029 * allocatestack.c (queue_stack): Don't remove stack from list here.
4030 Do it in the caller. Correct condition to prematurely terminate
4031 loop to free stacks.
4032 (__deallocate_stack): Remove stack from list here.
4033
40342002-11-26 Ulrich Drepper <drepper@redhat.com>
4035
4036 * Makefile (tests): Add tst-stack1.
4037 * tst-stack1.c: New file.
4038
4039 * allocatestack.c (allocate_stack): Initialize the TCB on a user
4040 provided stack.
4041
4042 * pthread_attr_getstack.c: Return bottom of the thread area.
4043
40442002-11-25 Ulrich Drepper <drepper@redhat.com>
4045
4046 * Makefile (libpthread-routines): Add pt-allocrtsig and
4047 pthread_kill_other_threads.
4048 * pt-allocrtsig.c: New file.
4049 * pthread_kill_other_threads.c: New file.
4050 * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
4051 all three functions.
4052 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
4053 allocrtsig.
4054 * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
4055 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
4056 and __libc_allocate_rtsig_private.
4057 * Versions (libpthread): Export pthread_kill_other_threads_np,
4058 __libc_current_sigrtmin, and __libc_current_sigrtmax.
4059
40602002-11-24 Ulrich Drepper <drepper@redhat.com>
4061
4062 * allocatestack.c (allocate_stack): stackaddr in attribute points to
4063 the end of the stack. Adjust computations.
4064 When mprotect call fails dequeue stack and free it.
4065 * pthread_attr_setstack.c: Store top of the stack in stackaddr
4066 attribute.
4067 * pthread_getattr_np.c: Likewise.
4068
4069 * descr.h (IS_DETACHED): Add some more parenthesis to prevent
4070 surprises.
4071
40722002-11-23 Ulrich Drepper <drepper@redhat.com>
4073
4074 * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
4075 attribute definitions. Patch by Luca Barbieri <ldb@ldb.ods.org>.
4076
40772002-11-22 Ulrich Drepper <drepper@redhat.com>
4078
4079 * pthread_getspecific.c: Optimize access to first 2nd-level array.
4080 * pthread_setspecific.c: Likewise.
4081
40822002-11-21 Ulrich Drepper <drepper@redhat.com>
4083
4084 * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
4085 definitions. Get them from the official place.
4086 * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
4087
4088 * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
4089 Use new CLONE_ flags in clone() calls.
4090
4091 * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
4092 * sysdeps/unix/sysv/linux/i386/fork.c: New file.
4093
4094 * Versions: Add pthread_* functions for libc.
4095 * forward.c: New file.
4096
4097 * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
4098 errno-loc.
4099 * herrno.c: New file.
4100 * res.c: New file.
4101
4102 * Makefile (libpthread-routines): Remove sem_post, sem_wait,
4103 sem_trywait, and sem_timedwait. Add herrno and res.
4104 * sem_init.c: Don't initialize lock and waiters members.
4105 * sem_open.c: Likewise.
4106 * sem_post.c: Removed.
4107 * sem_wait.c: Removed.
4108 * sem_trywait.c: Removed.
4109 * sem_timedwait.c: Removed.
4110 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
4111 Includes full implementations of sem_post, sem_wait, sem_trywait,
4112 and sem_timedwait.
4113 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
4114 for new implementation.
4115 * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
4116 and waiters fields.
4117
4118 * tst-sem3.c: Improve error message.
4119 * tst-signal3.c: Likewise.
4120
4121 * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
4122 to tell the kernel about the termination futex and to initialize tid
4123 member. Don't initialize main_thread.
4124 * descr.h (struct pthread): Remove main_thread member.
4125 * cancelllation.c (__do_cancel): Remove code handling main thread.
4126 The main thread is not special anymore.
4127
4128 * allocatestack.c (__reclaim_stacks): Mark stacks as unused. Add
4129 size of the stacks to stack_cache_actsize.
4130
4131 * pt-readv.c: Add missing "defined".
4132 * pt-sigwait.c: Likewise.
4133 * pt-writev.c: Likewise.
4134
41352002-11-09 Ulrich Drepper <drepper@redhat.com>
4136
4137 * Versions: Export __connect from libpthread.
4138 Patch by Luca Barbieri <ldb@ldb.ods.org>.
4139
4140 * Makefile (libpthread-routines): Add pt-raise.
4141 * sysdeps/unix/sysv/linux/raise.c: New file.
4142 * sysdeps/unix/sysv/linux/pt-raise.c: New file.
4143 * sysdeps/generic/pt-raise.c: New file.
4144
4145 * pthread_cond_init.c: Initialize all data elements of the condvar
4146 structure. Patch by Luca Barbieri <ldb@ldb.ods.org>.
4147
4148 * pthread_attr_init.c: Actually implement 2.0 compatibility version.
4149 * pthread_create.c: Likewise.
4150
4151 * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
4152 * tst-key1.c: New file.
4153 * tst-key2.c: New file.
4154 * tst-key3.c: New file.
4155
4156 * Versions: Export pthread_detach for version GLIBC_2.0.
4157 Reported by Saurabh Desai <sdesai@austin.ibm.com>.
4158
41592002-11-08 Ulrich Drepper <drepper@redhat.com>
4160
4161 * pthread_key_create.c: Terminate search after an unused key was found.
4162 Patch by Luca Barbieri <ldb@ldb.ods.org>.
4163
4164 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
4165 Patch by Luca Barbieri <ldb@ldb.ods.org>.
4166
41672002-10-10 Ulrich Drepper <drepper@redhat.com>
4168
4169 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
4170 dynamic lookup for errno in PIC.
4171
4172 * allocatestack.c (get_cached_stack): Rearrange code slightly to
4173 release the stack lock as soon as possible.
4174 Call _dl_allocate_tls_init for TCB from the cache to re-initialize
4175 the static TLS block.
4176 (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
4177
4178 * cancellation.c: Renamed from cancelation.c.
4179 * Makefile: Adjust accordingly.
4180 * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
4181 * cleanup_defer.c: Use CANCELLATION_P.
4182 * pthread_testcancel.c: Likewise.
4183 * descr.h: Fix spelling in comments.
4184 * init.c: Likewise.
4185 * pthread_getattr_np.c: Likewise.
4186 * pthread_getschedparam.c: Likewise.
4187 * pthread_setschedparam.c: Likewise.
4188 * Versions: Likewise.
4189
4190 * pt-pselect.c: New file.
4191 * Makefile (libpthread-routines): Add pt-pselect.
4192 * Versions: Add pselect.
4193
4194 * tst-cancel4.c: New file.
4195 * Makefile (tests): Add tst-cancel4.
4196
41972002-10-09 Ulrich Drepper <drepper@redhat.com>
4198
4199 * pthread_mutex_lock.c: Always record lock ownership.
4200 * pthread_mutex_timedlock.c: Likewise.
4201 * pthread_mutex_trylock.c: Likewise.
4202
4203 * pt-readv.c: New file.
4204 * pt-writev.c: New file.
4205 * pt-creat.c: New file.
4206 * pt-msgrcv.c: New file.
4207 * pt-msgsnd.c: New file.
4208 * pt-poll.c: New file.
4209 * pt-select.c: New file.
4210 * pt-sigpause.c: New file.
4211 * pt-sigsuspend.c: New file.
4212 * pt-sigwait.c: New file.
4213 * pt-sigwaitinfo.c: New file.
4214 * pt-waitid.c: New file.
4215 * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
4216 pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
4217 pt-sigwait, pt-sigwaitinfo, and pt-waitid.
4218 * Versions: Add all the new functions.
4219
4220 * tst-exit1.c: New file.
4221 * Makefile (tests): Add tst-exit1.
4222
4223 * sem_timedwait.c: Minor optimization for more optimal fastpath.
4224
42252002-10-08 Ulrich Drepper <drepper@redhat.com>
4226
4227 * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
4228
4229 * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
4230 call. pthread_join is an official cancellation point.
4231 * pthread_timedjoin.c: Likewise.
4232
4233 * pthread_cond_wait.c: Revert order in which internal lock are dropped
4234 and the condvar's mutex are retrieved.
4235 * pthread_cond_timedwait.c: Likewise.
4236 Reported by dice@saros.East.Sun.COM.
4237
42382002-10-07 Ulrich Drepper <drepper@redhat.com>
4239
4240 * pthreadP.h: Cut out all type definitions and move them...
4241 * sysdeps/unix/sysv/linux/internaltypes.h: ...here. New file.
4242 * pthreadP.h: Include <internaltypes.h>.
4243
4244 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
4245 performance tweaks.
4246
4247 * sem_trywait.c: Shuffle #includes around to get right order.
4248 * sem_timedwait.c: Likewise.
4249 * sem_post.c: Likewise.
4250 * sem_wait.c: Likewise.
4251
4252 * nptl 0.3 released.
4253
4254 * Makefile (tests): Add tst-signal3.
4255 * tst-signal3.c: New file.
4256
42572002-10-05 Ulrich Drepper <drepper@redhat.com>
4258
4259 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
4260 the asms modify the sem object.
4261 (__lll_sem_timedwait): Now takes struct sem* as first parameter.
4262
4263 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
4264 the actual members.
4265 * pthreadP.h (struct sem): New type. Actual semaphore type.
4266 * semaphoreP.h: Include pthreadP.h.
4267 * sem_getvalue.c: Adjust to sem_t change.
4268 * sem_init.c: Likewise.
4269 * sem_open.c: Likewise.
4270 * sem_post.c: Likewise.
4271 * sem_timedwait.c: Likewise.
4272 * sem_trywait.c: Likewise.
4273 * sem_wait.c: Likewise.
4274
42752002-10-04 Ulrich Drepper <drepper@redhat.com>
4276
4277 * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
4278 * tst-basic2.c: New file.
4279 * tst-exec1.c: New file.
4280 * tst-exec2.c: New file.
4281 * tst-exec3.c: New file.
4282
4283 * tst-fork1.c: Remove extra */.
4284
4285 * nptl 0.2 released. The API for IA-32 is complete.