]> sourceware.org Git - glibc.git/blame - nptl/ChangeLog
Update.
[glibc.git] / nptl / ChangeLog
CommitLineData
134abcb5
UD
12003-10-02 Ulrich Drepper <drepper@redhat.com>
2
3 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
4 correct offset.
5
b77ca0e8
UD
62003-10-02 Jakub Jelinek <jakub@redhat.com>
7
8 * Makefile (tests): Add tst-cancel19.
9 * tst-cancel19.c: New test.
10
4d961dc7
UD
112003-10-02 Ulrich Drepper <drepper@redhat.com>
12
13 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
14 restoring of the old cancellation type.
15
1d5b20ad 162003-09-30 Jakub Jelinek <jakub@redhat.com>
94ae6d75 17
1d5b20ad
UD
18 * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
19
4106a403
RM
202003-09-27 Wolfram Gloger <wg@malloc.de>
21
4d961dc7 22 * sysdeps/pthread/malloc-machine.h: New file
94ae6d75 23
fca9d8e4
RM
242003-09-24 Roland McGrath <roland@redhat.com>
25
26 * allocatestack.c (__make_stacks_executable): Don't ignore return
27 value from _dl_make_stack_executable.
28
c9c60884
UD
292003-09-24 Ulrich Drepper <drepper@redhat.com>
30
69c9fa04
UD
31 * allocatestack.c (__make_stacks_executable): Also change
32 permission of the currently unused stacks.
33
279f1143
UD
34 * allocatestack.c (change_stack_perm): Split out from
35 __make_stacks_executable.
36 (allocate_stack): If the required permission changed between the time
37 we started preparing the stack and queueing it, change the permission.
38 (__make_stacks_executable): Call change_stack_perm.
39
c9c60884
UD
40 * Makefile: Build tst-execstack-mod locally.
41 * tst-execstack-mod.c: New file.
42
54ee14b3
UD
432003-09-23 Jakub Jelinek <jakub@redhat.com>
44
45 * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
46
472003-09-23 Roland McGrath <roland@redhat.com>
48
49 * tst-execstack.c: New file.
50 * Makefile (tests): Add it.
51 ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
52 (LDFLAGS-tst-execstack): New variable.
53
54 * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
55 whether to use PROT_EXEC for stack mmap.
56 (__make_stacks_executable): New function.
57 * pthreadP.h: Declare it.
58 * init.c (__pthread_initialize_minimal_internal): Set
59 GL(dl_make_stack_executable_hook) to that.
60
365b1602
UD
612003-09-22 Ulrich Drepper <drepper@redhat.com>
62
63 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
64 recommendation from AMD re avoidance of lock prefix.
65
39358e8b
UD
662003-09-22 Jakub Jelinek <jakub@redhat.com>
67
68 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
69 lll_futex_timed_wait instead of lll_futex_wait.
70 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
71 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
72 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
73 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
74 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
75 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
76 * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
77 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
78 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
79 Completely revamp the locking macros. No distinction between
80 normal and mutex locking anymore.
81 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
82 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
83 __lll_lock_timedwait): Fix prototypes.
84 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
85 __lll_lock_timedwait): Likewise.
86 (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
87 macros, add __builtin_expect.
88 (lll_mutex_timedlock): Likewise. Fix return value.
89 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
90 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
91 * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
92 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
93 * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
94 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
95 * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
96 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
97
9d08fbbb
UD
982003-09-22 Ulrich Drepper <drepper@redhat.com>
99
c0df57e1
UD
100 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
101 (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
102 operation if possible.
103
9d08fbbb
UD
104 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
105 like jumping over the lock prefix.
106
71451de2
UD
1072003-09-21 Ulrich Drepper <drepper@redhat.com>
108
109 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
110 locking macros. No distinction between normal and mutex locking
111 anymore.
3a226d33 112 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
bc1989aa
UD
113 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
114 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
71451de2
UD
115 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
116 locking. Merge bits from lowlevelmutex.S we still need.
3a226d33 117 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
bc1989aa 118 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
71451de2 119 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
3a226d33 120 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
71451de2
UD
121 * Makefile (routines): Remove libc-lowlevelmutex.
122 (libpthread-rountines): Remove lowlevelmutex.
3a226d33
UD
123 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
124 for new mutex implementation.
125 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
126 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
127 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
128 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
129 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
130 Likewise.
131 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
132 Likewise.
133 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
134 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
135 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
136 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
137 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
138 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
139 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
140 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
141 Likewise.
142 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
143 Likewise.
144 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
145 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
146 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
147 Don't use requeue.
148 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
bc1989aa 149 * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
71451de2 150
8f31c0ef
UD
1512003-09-20 Ulrich Drepper <drepper@redhat.com>
152
56a4aa98
UD
153 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
154 in parameters of asm with output parameters.
155
8f31c0ef
UD
156 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
157 type of DECR parameter to int.
158 * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
159
8b8074da
UD
1602003-09-18 Jakub Jelinek <jakub@redhat.com>
161
162 * tst-attr3.c (tf, do_test): Print stack start/end/size and
163 guardsize for each thread.
164
65af7e61
UD
1652003-09-17 Jakub Jelinek <jakub@redhat.com>
166
9ba96eda
UD
167 * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
168 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
169 (pthread_attr_setaffinity_np): Handle cpuset == NULL.
170
06f6ca90
UD
171 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
172 (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
173 NULL.
174 * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
175 * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
176 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
177 (pthread_getaffinity_np): Add hidden_def.
178
179 * Makefile (tests): Add tst-attr3.
180 * tst-attr3.c: New test.
181
65af7e61
UD
182 * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
183
3402852c
UD
1842003-09-15 Jakub Jelinek <jakub@redhat.com>
185
186 * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
187 CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
188
a4db3439
UD
1892003-09-17 Jakub Jelinek <jakub@redhat.com>
190
191 * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
192 * tst-align.c: Include tst-stack-align.h.
193 (tf, do_test): Use TEST_STACK_ALIGN macro.
194
1952003-09-17 Ulrich Drepper <drepper@redhat.com>
196
197 * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
198 variable.
199
92ce4676
UD
2002003-09-16 Ulrich Drepper <drepper@redhat.com>
201
202 * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
203 stack-related values for the initial thread.
204
e07bb02a
UD
2052003-09-15 Jakub Jelinek <jakub@redhat.com>
206
207 * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
208
d087b5dc
UD
2092003-09-11 Ulrich Drepper <drepper@redhat.com>
210
211 * pthread_mutex_lock.c: Minor code rearrangements.
212
7f08f55a
RM
2132003-09-05 Roland McGrath <roland@redhat.com>
214
215 * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
216 Instead, include ../nptl_db/db_info.c to do its magic.
217 * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
218 (__pthread_pthread_key_2ndlevel_size): Likewise.
219 * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
220 * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
221 * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
222 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
223 * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
224 * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
225 * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
226 * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
227 * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
228 * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
229 * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
230 * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
231 * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
232 * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
233 * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
234 * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
235 * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
236
806e4a4a
UD
2372003-09-08 Ulrich Drepper <drepper@redhat.com>
238
239 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
240 of pthread_t to be compatible with LT.
241 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
242 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
243 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
244 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
245 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
246 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
247 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
248
17f83e56
UD
2492003-09-04 Ulrich Drepper <drepper@redhat.com>
250
251 * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
252
58e8ec84
UD
2532003-09-04 Jakub Jelinek <jakub@redhat.com>
254
255 * unwind-forcedunwind.c: Move to...
256 * sysdeps/pthread/unwind-forcedunwind.c: ...here.
257 (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
258 * sysdeps/pthread/jmpbuf-unwind.h: New file.
259 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
260 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
261 * unwind.c: Include jmpbuf-unwind.h.
262 (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
263
abf1cf21
JJ
2642003-09-02 Jakub Jelinek <jakub@redhat.com>
265
4a244f0d
UD
266 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
267 * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
268 pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
269 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
270 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
271 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
272 * sysdeps/unix/sysv/linux/sparc/Versions: New file.
273 * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
274 (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
275 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
276 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
277 function.
278 (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
279 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
280 * Makefile (tests): Add tst-stack2.
281 * tst-stack2.c: New test.
282 * tst-stack1.c: Include limits.h and sys/param.h.
283 (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
284
e29ef647
UD
285 * pthread_condattr_setpshared.c: Include errno.h.
286 (pthread_condattr_setpshared): Return EINVAL if pshared
287 is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
288
5777d565
UD
289 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
290 defined symbol for entry point to avoid cancellation.
291 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
292 Likewise.
293 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
294 Likewise.
295 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
296 Likewise.
297 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
298 Likewise.
299 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
300 Likewise.
301 * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
302 __close_nocancel, __read_nocancel, __write_nocancel,
303 __waitpid_nocancel): Add attribute_hidden. If not in libc.so,
304 libpthread.so or librt.so, define to corresponding function
305 without _nocancel suffix.
306 * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
307 * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
308 * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
309
abf1cf21
JJ
310 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
311
8348dcc8
UD
3122003-09-02 Ulrich Drepper <drepper@redhat.com>
313
314 * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
1e03e0af 315 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
8348dcc8
UD
316
317 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
318 in subsections has a symbol associated with it.
319
320 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
321 defined symbol for entry point to avoid cancellation.
322 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
323
c874a32e
UD
3242003-09-01 Jakub Jelinek <jakub@redhat.com>
325
326 * Makefile (tests): Add tst-tls5.
327 (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
328 ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
329 ($(objpfx)tst-tls5): New.
330 ($(objpfx)tst-tls6.out): Likewise.
331 (tests): Depend on $(objpfx)tst-tls6.out.
332 * tst-tls3.c: Include stdint.h and pthreaddef.h.
333 (do_test): Check pthread_self () return value alignment.
334 * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
335 (tf): Check pthread_self () return value alignment.
336 * tst-tls5.c: New test.
337 * tst-tls5.h: New.
338 * tst-tls5mod.c: New.
339 * tst-tls5moda.c: New.
340 * tst-tls5modb.c: New.
341 * tst-tls5modc.c: New.
342 * tst-tls5modd.c: New.
343 * tst-tls5mode.c: New.
344 * tst-tls5modf.c: New.
345 * tst-tls6.sh: New test.
346
c503d3dc
UD
347 * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
348 ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
349 * init.c (pthread_functions): Initialize them.
350 * forward.c (pthread_cond_timedwait@GLIBC_2.0,
351 pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
352 * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
353 pthread_cond_timedwait@@GLIBC_2.3.2.
354
48614753
JJ
3552003-09-01 Jakub Jelinek <jakub@redhat.com>
356
56a1b877
JJ
357 * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
358 * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
359 * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
360 * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
361 * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
362 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
363
364 * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
365
48614753
JJ
366 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
367 _POSIX_THREAD_PRIORITY_SCHEDULING.
368 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
369
28c97261
UD
3702003-08-31 Ulrich Drepper <drepper@redhat.com>
371
eef80cf8
UD
372 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
373 nested function, use static inline function from libio.h.
374 Code by Richard Henderson.
375
28c97261
UD
376 * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
377 weak.
378
cd2fbe58
UD
3792003-08-30 Jakub Jelinek <jakub@redhat.com>
380
381 * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
382 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
383 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
384 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
385 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
386 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
387 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
388 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
389 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
390 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
391 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
392 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
393 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
394 * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
395 * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
396 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
397 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
398 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
399 * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
400 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
401 * sysdeps/sparc/sparc32/pthreaddef.h: New file.
402 * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
403 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
404 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
405 * sysdeps/sparc/sparc64/pthreaddef.h: New file.
406 * sysdeps/sparc/tls.h: New file.
407 * sysdeps/sparc/tcb-offsets.sym: New file.
408 * sysdeps/sparc/Makefile: New file.
409 * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
410 * init.c [__sparc__] (__NR_set_tid_address): Define.
411
feda52c0
UD
4122003-08-29 Jakub Jelinek <jakub@redhat.com>
413
414 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
415 _IO_release_lock): Define.
416
7c868816
JJ
4172003-08-29 Jakub Jelinek <jakuB@redhat.com>
418
0261d33f 419 * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
7c868816
JJ
420 sigemptyset before sigaddset. Reported by jreiser@BitWagon.com.
421
68b9e1ae
UD
4222003-08-27 Ulrich Drepper <drepper@redhat.com>
423
424 * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
425 (__pthread_cleanup_class): Add missing return types of member
426 functions.
427
13b3edfc
UD
4282003-08-26 Steven Munroe <sjmunroe@us.ibm.com>
429
430 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
431 (lll_mutex_unlock_force): Add memory barrier between store and futex
432 syscall.
433
bb606fbe
UD
4342003-08-25 Ulrich Drepper <drepper@redhat.com>
435
436 * tst-cancel4.c (do_test): Also unlink tempfname and remove
437 tempmsg in first loop.
438
ee4e5a3d
UD
4392003-08-18 Ulrich Drepper <drepper@redhat.com>
440
441 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
442 _POSIX_THREAD_PRIORITY_SCHEDULING.
443 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
444
334fcf2a
UD
4452003-08-07 Jakub Jelinek <jakub@redhat.com>
446
447 * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
448 (__rtld_lock_default_lock_recursive,
449 __rtld_lock_default_unlock_recursive): Define.
450 [_LIBC && SHARED] (__rtld_lock_lock_recursive,
451 __rtld_lock_unlock_recursive): Define using
452 GL(_dl_rtld_*lock_recursive).
453 * init.c (__pthread_initialize_minimal_internal): Initialize
454 _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
455 Lock GL(_dl_load_lock) the same number of times as
456 GL(_dl_load_lock) using non-mt implementation was nested.
457
458 * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
459 * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
460
a30fb2df
UD
4612003-08-06 Jakub Jelinek <jakub@redhat.com>
462
463 * tst-cancel17.c (do_test): Make len2 maximum of page size and
464 PIPE_BUF.
465
ce0d30a0
JJ
4662003-08-07 Jakub Jelinek <jakub@redhat.com>
467
468 * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
469
9c988b83
UD
4702003-08-03 Jakub Jelinek <jakub@redhat.com>
471
472 * sysdeps/pthread/createthread.c (do_clone): Move error handling
473 to first syscall error check. Move syscall error check for tkill
474 into __ASSUME_CLONE_STOPPED #ifdef.
475
5c5252bd
UD
4762003-08-02 Ulrich Drepper <drepper@redhat.com>
477
f1205aa7
UD
478 * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
479 is not defined, do explicit synchronization.
480 (create_thread): Do not lock pd->lock here. If __ASSUME_CLONE_STOPPED
481 is not defined also unlock pd->lock for non-debugging case in case
482 it is necessary.
483 * pthread_create.c (start_thread): Always get and release pd->lock
484 if __ASSUME_CLONE_STOPPED is not defined.
485 (start_thread_debug): Removed. Adjust users.
486 * allocatestack.c (allocate_stack): Always initialize lock if
487 __ASSUME_CLONE_STOPPED is not defined.
488 * Makefile (tests): Add tst-sched1.
489 * tst-sched1.c: New file.
490
5c5252bd
UD
491 * sysdeps/pthread/createthread.c (do_clone): Only use
492 sched_setschduler and pass correct parameters.
493
973d66e4
UD
4942003-07-31 Jakub Jelinek <jakub@redhat.com>
495
496 * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
497 pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
498 PTHREAD_STACK_MIN in comments.
499
d347a4ab
UD
5002003-07-31 Jakub Jelinek <jakub@redhat.com>
501
502 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
503 Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
504 argument.
505 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
506 * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
507 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
508 (__pthread_cleanup_upto): Fix prototype.
509 (_longjmp_unwind): Adjust caller.
510 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
511 Change second argument to const struct pointer.
512 * tst-sem8.c (main): Remove unused s2 and s3 variables.
513 * tst-sem9.c (main): Likewise.
514 * unwind.c: Include string.h for strlen prototype.
515
1b26e9a5
UD
5162003-07-31 Ulrich Drepper <drepper@redhat.com>
517
518 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
519 (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
520 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
521 Define HAVE_CMOV.
522 Patch by Nicholas Miell <nmiell@attbi.com>.
523
adc12574
UD
5242003-07-30 Jakub Jelinek <jakub@redhat.com>
525
526 * init.c (__pthread_initialize_minimal_internal): Initialize
527 GL(dl_init_static_tls).
528 * pthreadP.h (__pthread_init_static_tls): New prototype.
529 * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
530 New functions.
531 * Makefile (tests): Add tst-tls4.
532 (modules-names): Add tst-tls4moda and tst-tls4modb.
533 ($(objpfx)tst-tls4): Link against libdl and libpthread.
534 ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
535 tst-tls4modb.so.
536 * tst-tls4.c: New file.
537 * tst-tls4moda.c: New file.
538 * tst-tls4modb.c: New file.
539
a7f6c66e
RM
5402003-06-19 Daniel Jacobowitz <drow@mvista.com>
541
542 * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
543 before __timer_dealloc.
544 * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
545 Don't call list_unlink.
546
172ce013
RM
5472003-07-29 Roland McGrath <roland@redhat.com>
548
549 * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
550
7b787f85
UD
5512003-07-25 Jakub Jelinek <jakub@redhat.com>
552
553 * tst-cancel17.c (do_test): Check if aio_cancel failed.
554 Don't reuse struct aiocb A if it failed.
555 Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
556 not just one byte, as that does not block.
557
0e9d6240
UD
5582003-07-22 Jakub Jelinek <jakub@redhat.com>
559
9d79e037
UD
560 * sysdeps/pthread/unwind-resume.c: New file.
561 * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
562 unwind-resume in csu subdir.
563 (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
564 exceptions.
565 (librt-sysdep_routines, librt-shared-only-routines): Add
566 rt-unwind-resume.
567 * sysdeps/pthread/rt-unwind-resume.c: New file.
568 * unwind-forcedunwind.c: New file.
569 * Makefile (libpthread-routines): Add unwind-forcedunwind.
570 (libpthread-shared-only-routines): Likewise.
571 (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
572 * pthreadP.h (pthread_cancel_init): New prototype.
573 * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
574
575 * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
576 attr argument const struct pthread_attr *.
577
0e9d6240
UD
578 * res.c (__res_state): Return __resp.
579 * descr.h: Include resolv.h.
580 (struct pthread): Add res field.
581 * pthread_create.c: Include resolv.h.
582 (start_thread): Initialize __resp.
583 * Makefile (tests): Add tst-_res1.
584 (module-names): Add tst-_res1mod1, tst-_res1mod2.
585 ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
586 ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
587 libpthread.
588 * tst-_res1.c: New file.
589 * tst-_res1mod1.c: New file.
590 * tst-_res1mod2.c: New file.
591
1a379ea0
UD
5922003-07-21 Ulrich Drepper <drepper@redhat.com>
593
7e939b21
UD
594 * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
595
1a379ea0
UD
596 * Makefile: Define various *-no-z-defs variables for test DSOs
597 which has undefined symbols.
598
ca86a763
UD
5992003-07-21 Steven Munroe <sjmunroe@us.ibm.com>
600
601 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
602 Retry if the stwcx fails to store once_control.
603
80f536db
UD
6042003-07-20 Ulrich Drepper <drepper@redhat.com>
605
606 * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
607 pthread_attr_setaffinity.
608 * Versions [libpthread] (GLIBC_2.3.3): Likewise.
609 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
610 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
611 * pthread_attr_destroy.c: Free cpuset element if allocated.
612 * pthread_create.c: Pass iattr as additional parameter to
613 create_thread.
614 * sysdeps/pthread/createthread.c: If attribute is provided and
615 a new thread is created with affinity set or scheduling parameters,
616 start thread with CLONE_STOPPED.
617 * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
618 pthread_attr_setaffinity.
619 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
620 cpuset element.
621
73299943
UD
6222003-07-15 Ulrich Drepper <drepper@redhat.com>
623
624 * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
625
da35d15e
UD
6262003-07-14 Ulrich Drepper <drepper@redhat.com>
627
628 * sysdeps/pthread/configure.in: Require CFI directives also for
629 ppc and s390.
630
75540d8a
UD
6312003-07-15 Jakub Jelinek <jakub@redhat.com>
632
633 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
634 Add cfi directives.
635
4a17085f
UD
6362003-07-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
637
638 * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
639 CLEANUP_JMP_BUF.
640 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
641 registers as variables. Call __pthread_mutex_unlock_usercnt.
642 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
643 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
644 not self pointer in __writer. Compare with TID to determine
645 deadlocks.
646 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
647 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
648 Likewise.
649 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
650 Likewise.
651 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
652 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
653 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
654 macros also when compiling librt.
655
6080ecdf
UD
6562003-07-11 Jakub Jelinek <jakub@redhat.com>
657
658 * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
659 -fasynchronous-unwind-tables.
660 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
661 (PSEUDO): Add cfi directives.
662 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
663 Likewise.
664 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
665 Likewise.
666
da0c02ee
UD
6672003-07-08 Jakub Jelinek <jakub@redhat.com>
668
669 * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
670 __pthread_unregister_cancel): Add prototypes and hidden_proto.
671 * unwind.c (__pthread_unwind_next): Add hidden_def.
672 * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
673 Likewise.
674 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
675 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
676 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
677 Likewise.
678 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
679 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
680 Likewise.
681 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
682 HIDDEN_JUMPTARGET to call __pthread_register_cancel,
683 __pthread_unregister_cancel and __pthread_unwind_next.
684
57a5ea02
UD
6852003-07-04 Jakub Jelinek <jakub@redhat.com>
686
687 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
688 different symbol for the cancellation syscall wrapper and
689 non-cancellation syscall wrapper.
690 (PSEUDO_END): Define.
691
d810b358
UD
6922003-07-05 Richard Henderson <rth@redhat.com>
693
694 * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
695 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
696 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
697 return actual return value from the syscall, not 0.
698
db54f488
UD
6992003-07-07 Ulrich Drepper <drepper@redhat.com>
700
701 * descr.h (struct pthread): Add pid field.
702 * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
703 (__reclaim_stacks): Likewise.
704 * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
705 also check for PID of the signal source.
706 (__pthread_initialize_minimal_internal): Also initialize pid field
707 of initial thread's descriptor.
708 * pthread_cancel.c: Use tgkill instead of tkill if possible.
709 * sysdeps/unix/sysv/linux/fork.c: Likewise.
710 * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
711 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
712 * sysdeps/unix/sysv/linux/raise.c: Likewise.
713
5e497a41
UD
7142003-07-05 Ulrich Drepper <drepper@redhat.com>
715
716 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
717 Fix use of parameter.
718 (__libc_cleanup_pop): Likewise.
719
86a0c4fa
UD
7202003-07-04 Ulrich Drepper <drepper@redhat.com>
721
722 * init.c (sigcancel_handler): Change parameters to match handler
723 for SA_SIGACTION. Check signal number and code to recognize
724 invalid invocations.
725
bdbecaa3
RM
7262003-07-03 Roland McGrath <roland@redhat.com>
727
728 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
729 Apply sizeof (struct pthread) bias to r13 value.
730
56421b23
UD
7312003-07-03 Ulrich Drepper <drepper@redhat.com>
732
fbd90f6c
UD
733 * sysdeps/pthread/configure.in: Require CFI directives.
734
56421b23
UD
735 * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
736 definition.
737 * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
738 libpthread compilation.
739 * unwind.c (__pthread_unwind): Add hidden_def.
740 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
741
ca2b4cd7
UD
7422003-07-01 Ulrich Drepper <drepper@redhat.com>
743
744 * libc-cancellation.c (__libc_cleanup_routine): Define.
745 * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
746 (__pthread_cleanup_pop): Define.
747
f036e569
UD
7482003-07-01 Richard Henderson <rth@redhat.com>
749
750 * sysdeps/alpha/elf/pt-initfini.c: New file.
751 * sysdeps/alpha/pthread_spin_lock.S: New file.
752 * sysdeps/alpha/pthread_spin_trylock.S: New file.
753 * sysdeps/alpha/pthreaddef.h: New file.
754 * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
755 * sysdeps/alpha/tls.h: New file.
756 * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
757 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
758 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
759 * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
760 * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
761 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
762 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
763 * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
764 * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
765 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
766
3b985826
UD
7672003-07-01 Ulrich Drepper <drepper@redhat.com>
768
769 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
770 cleanup support and unwind info.
771
3a4d1e1e
UD
7722003-06-30 Ulrich Drepper <drepper@redhat.com>
773
774 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
775 Use correct cleanup handler registration. Add unwind info.
96c814d3
UD
776 * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
777 * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
3a4d1e1e
UD
778 * tst-once3.c: Add cleanup handler and check it is called.
779 * tst-once4.c: Likewise.
780 * tst-oncex3.c: New file.
781 * tst-oncex4.c: New file.
782 * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
783
e479cc8e
UD
7842003-06-29 Ulrich Drepper <drepper@redhat.com>
785
786 * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
787
7d7ff54c
UD
7882003-06-27 Ulrich Drepper <drepper@redhat.com>
789
483e95d0
UD
790 * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
791 (tf_msgsnd): Likewise.
792
7d7ff54c
UD
793 * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
794 premature returns a bit more.
795
7539c7ec
UD
7962003-06-26 Ulrich Drepper <drepper@redhat.com>
797
798 * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
799 definition to the front.
800
801 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
802 the cleanup functions to make the names unique. Fix dwarf opcode
803 un unwind table.
804 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
805 functions to make the names unique. Fix CFA offset for two blocks.
806
0af6a1d9
UD
8072003-06-25 Ulrich Drepper <drepper@redhat.com>
808
809 * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
810 missing closing braces.
811 Patch by Christophe Saout <christophe@saout.de>.
812
eef4a9f3
RM
8132003-06-24 Roland McGrath <roland@redhat.com>
814
815 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
816
4165d44d
UD
8172003-06-24 Ulrich Drepper <drepper@redhat.com>
818
7f8f7b9d
UD
819 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
820 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
821
4165d44d
UD
822 * pthreadP.h: Declare __find_thread_by_id.
823 * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
824 * pthread_clock_gettime.c: Allow using other thread's clock.
825 * pthread_clock_settime.c: Likewise.
826 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
827 * Makefile: Add rules to build and run tst-clock2.
828 * tst-clock2.c: New file.
829
67b78ef9
UD
8302003-06-23 Ulrich Drepper <drepper@redhat.com>
831
832 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
833 to use exception-based cleanup handler.
834 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
835
836 * tst-cond8.c (ch): Announce that we are done.
837
838 * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
839
840 * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
841 Also test aio_suspend with timeout value.
842
61623643
UD
8432003-06-22 Ulrich Drepper <drepper@redhat.com>
844
3a4f2043
UD
845 * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
846 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
847 attribute_hidden.
848
61623643
UD
849 * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
850 (__pthread_mutex_lock_internal): Likewise.
851 (__pthread_mutex_unlock_internal): Likewise.
852 (__pthread_mutex_unlock_usercnt): Declare.
853 * pthread_mutex_destroy.c: Always fail if used in any way.
854 * pthread_mutex_init.c: Update comment.
855 * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
856 * pthread_mutex_timedlock.c: Adjust __nusers.
857 * pthread_mutex_trylock.c: Adjust __nusers.
858 * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
859 and public interfaces are wrapper with pass additional parameter.
860 __pthread_mutex_unlock_usercnt does not adjust __nusers if second
861 parameter zero.
862 * tst-mutex8.c: New file.
863 * Makefile (tests): Add tst-mutex8.
864 * sysdeps/pthread/pthread_cond_timedwait.c: Call
865 __pthread_mutex_unlock_usercnt.
866 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
867 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
868 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
869 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
870 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
871 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
872 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
873 Add __nusers.
874 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
875 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
876 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
877 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
878 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
879
880 * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
881 * pthread_mutex_timedlock.c: Likewise.
882 * pthread_mutex_trylock.c: Adjust __nusers.
883 * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
884 * tst-mutex9.c: New file.
885 * Makefile (tests): Add tst-mutex9.
886 * sysdeps/i386/tls.h: Remove THREAD_ID definition.
887 * sysdeps/ia64/tls.h: Likewise.
888 * sysdeps/powerpc/tls.h: Likewise.
889 * sysdeps/s390/tls.h: Likewise.
890 * sysdeps/sh/tls.h: Likewise.
891 * sysdeps/x86_64/tls.h: Likewise.
892 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
893 Change type of __owner.
894 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
895 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
896 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
897 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
898 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
899
9bdabb94
UD
9002003-06-19 Jakub Jelinek <jakub@redhat.com>
901
902 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
903 * sysdeps/unix/sysv/linux/sem_post.c: ...here.
904
905 * sysdeps/unix/sysv/linux/sem_post.c: Move to...
906 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here. Pass nr + 1
907 instead of nr to lll_futex_wake. Only set errno and return -1
908 if err < 0.
909
910 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
911 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
912 return actual return value from the syscall, not 0.
913
f6c93bd9
UD
9142003-06-18 Ulrich Drepper <drepper@redhat.com>
915
ca343e73
UD
916 * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
917 find a random value.
918 (tf_msgrcv): Likewise. Also don't report msgrcv returns if
919 errno==EIDRM.
920
50441a98
UD
921 * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
922 compat_timer_settime.
923 * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
924 compat_timer_gettime.
925 * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
9bdabb94 926 compat_timer_getoverrun.
50441a98
UD
927 * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
928 compat_timer_delete.
929
f6c93bd9
UD
930 * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
931 error-checking mutex detect busy mutexes.
932
047aec8f
UD
9332003-06-17 Ulrich Drepper <drepper@redhat.com>
934
1d53508d
UD
935 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
936 Add ax to clobber list.
937 (lll_mutex_cond_lock): Likewise.
938 (lll_mutex_unlock): Likewise.
939 (lll_lock): Likewise.
940 (lll_unlock): Likewise.
941
f23b30e2
UD
942 * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
943 * tst-cancel18.c: New file.
944 * tst-cancelx18.c: New file.
945
946 * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
947 and tcdrain.
948
949 * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
950 * tst-cancel17.c: New file.
951 * tst-cancelx17.c: New file.
952
953 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
954 * sysdeps/unix/sysv/linux/sigwait.c: New file.
955 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
956
047aec8f
UD
957 * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
958
bbde8527
UD
9592003-06-16 Jakub Jelinek <jakub@redhat.com>
960
961 * sysdeps/pthread/createthread.c (create_thread): Set
962 header.multiple_threads unconditionally.
963 * allocatestack.c (allocate_stack): Likewise.
964 * descr.h (struct pthread): Add header.multiple_threads
965 unconditionally.
966 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
967 Define for librt. #error if neither libpthread, libc nor librt.
968 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
969 Likewise.
970 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
971 CDISABLE): Likewise.
972 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
973 CDISABLE): Likewise.
974 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
975 CDISABLE): Likewise.
976 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
977 CDISABLE): Likewise. Access header.multiple_threads outside of
978 libc and libpthread.
979 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
980 Likewise.
981 * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
982 * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
983
26676450
UD
9842003-06-17 Ulrich Drepper <drepper@redhat.com>
985
986 * tst-cancel4.c: Add tests for the socket and signal functions, pause.
987 Also test early cancellation before the thread reaches the cancellation
988 point.
989
990 * Makefile: Compile forward.c with exceptions.
991
992 * sysdeps/unix/sysv/linux/sleep.c: New file.
993
301a6724
UD
9942003-06-16 Ulrich Drepper <drepper@redhat.com>
995
0e0deb03
UD
996 * Makefile: Add CFLAGS definition to compile function wrappers
997 duplicated from libc with exceptions.
998 * tst-cancel4.c: Also check cancellation handlers.
999
301a6724
UD
1000 * Makefile: Add rules to build and run tst-cancel16 and
1001 tst-cancelx16. Add missing CFLAGS definitions.
1002 * tst-cancel16.c: New file.
1003 * tst-cancelx16.c: New file.
1004
7a114794
UD
10052003-06-15 Ulrich Drepper <drepper@redhat.com>
1006
452aea84
UD
1007 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
1008 (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
1009 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
1010 (DL_SYSINFO_IMPLEMENTATION): Likewise.
1011
7a114794
UD
1012 * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
1013 (LIBC_CANCEL_RESET): Likewise.
1014 Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
1015 * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
1016 librt-cancellation.
1017 (CFLAGS-libcrt-cancellation.c): Define.
1018 * sysdeps/pthread/librt-cancellation.c: New file.
1019 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
1020 macros also when compiling librt.
1021 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1022 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
1023 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
1024 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
1025 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
1026 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
1027 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
1028
1029 * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
1030 compat_timer_create.
1031
8ba1d429
UD
10322003-06-14 Ulrich Drepper <drepper@redhat.com>
1033
cc8fb6f3
UD
1034 * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
1035
8ba1d429
UD
1036 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
1037 __register_atfork.
1038 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
1039 Add libc_hidden_def.
1040
d4f100e2
RM
10412003-06-13 Roland McGrath <roland@redhat.com>
1042
1043 * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
1044 constant from <sys/reg.h> to ps_get_thread_area, not register contents.
1045
dd9423a6
UD
10462003-06-11 Ulrich Drepper <drepper@redhat.com>
1047
1048 * allocatestack.c (queue_stack): Always inline.
1049 * ptreadhP.h (__do_cancel): Likewise.
1050
ed24330d
JJ
10512003-06-10 Jakub Jelinek <jakub@redhat.com>
1052
1053 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
1054 a typo.
1055
06120d79
UD
10562003-06-10 Ulrich Drepper <drepper@redhat.com>
1057
1058 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
1059 (__pthread_cond_signal): Remove incorrect second addition for
1060 cond_lock!=0.
1061
b1720346
UD
10622003-06-09 Ulrich Drepper <drepper@redhat.com>
1063
5b318f85
UD
1064 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
1065 (__pthread_cond_signal): Use correct futex pointer in
1066 __lll_mutex_lock_wait call.
1067
b1720346
UD
1068 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
1069 (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
1070
3e36c37d
UD
10712003-06-08 Ulrich Drepper <drepper@redhat.com>
1072
ecf7955d
UD
1073 * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
1074 cancelable.
ed24330d 1075 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
ecf7955d
UD
1076 Likewise.
1077
3e36c37d
UD
1078 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
1079 hand-written CFI generation code. Since ENTRY/END also initiated
1080 CFI frames this caused two CFI sets to be generated.
1081
7726edc2
UD
10822003-06-07 Ulrich Drepper <drepper@redhat.com>
1083
1084 * cleanup_routine.c: New file.
1085 * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
1086 * sysdeps/pthread/pthread.h: Add support for fully exception-based
1087 cleanup handling.
1088 * Makefile (libpthread-routines): Add cleanup_routine.
1089 Add more CFLAGS variables to compile with exceptions. Add comments
1090 why which file needs unwind tables.
1091 (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
1092 tests.
1093 * tst-cancelx1.c: New file.
1094 * tst-cancelx2.c: New file.
1095 * tst-cancelx3.c: New file.
1096 * tst-cancelx4.c: New file.
1097 * tst-cancelx5.c: New file.
1098 * tst-cancelx6.c: New file.
1099 * tst-cancelx7.c: New file.
1100 * tst-cancelx8.c: New file.
1101 * tst-cancelx9.c: New file.
1102 * tst-cancelx10.c: New file.
1103 * tst-cancelx11.c: New file.
1104 * tst-cancelx12.c: New file.
1105 * tst-cancelx13.c: New file.
1106 * tst-cancelx14.c: New file.
1107 * tst-cancelx15.c: New file.
1108 * tst-cleanupx0.c: New file.
1109 * tst-cleanupx0.expect: New file.
1110 * tst-cleanupx1.c: New file.
1111 * tst-cleanupx2.c: New file.
1112 * tst-cleanupx3.c: New file.
1113
1114 * tst-cleanup0.c: Make standard compliant.
1115 * tst-cleanup1.c: Likewise.
1116
1117 * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
1118 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
1119 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1120 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1121 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1122 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1123 * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
1124 CLEANUP_JMP_BUF.
1125 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
1126 * tst-cancel12.c: New file.
1127 * tst-cancel13.c: New file.
1128 * tst-cancel14.c: New file.
1129 * tst-cancel15.c: New file.
1130 * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
1131 and tst-cancel15.
1132
1133 * tst-cancel1.c: Add some comments.
1134
1135 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
1136 timeout correctly.
1137
7a8a8e21
UD
11382003-06-06 Ulrich Drepper <drepper@redhat.com>
1139
1140 * Makefile (CFLAGS-pthread_cancel.c): Define.
1141
4ad0bbf4
UD
11422003-06-05 Ulrich Drepper <drepper@redhat.com>
1143
1144 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
1145 Change type of __writer element to int.
1146 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
1147 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1148 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1149 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1150 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1151 * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
1152 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
1153 * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
1154 Compare with TID to determine deadlocks.
1155 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
1156 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
1157 * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
1158 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
1159 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1160 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1161 Likewise.
1162 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1163 Likewise.
1164 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1165 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
1166 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1167 Likewise.
1168 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1169 Likewise.
1170 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1171 * Makefile (tests): Add tst-rwlock12.
1172 * tst-rwlock12.c: New file.
1173
332faa96
JJ
11742003-06-05 Jakub Jelinek <jakub@redhat.com>
1175
1176 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
1177 __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
1178 Remove bogus hidden_proto.
1179 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
1180 Likewise.
1181 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
1182 lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
1183 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
1184 ___lll_mutex_timedlock): Likewise.
1185
29d9e2fd
UD
11862003-06-04 Ulrich Drepper <drepper@redhat.com>
1187
1188 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
1189 (__pthread_cond_signal): Add some code to eventually handle
1190 cond_lock!=0.
1191
6f1acb30
UD
11922003-06-01 Ulrich Drepper <drepper@redhat.com>
1193
1194 * Makefile (tests): Add tst-exec4.
1195 (tst-exec4-ARGS): Define.
1196 * tst-exec4.c: New file.
1197
49b65043
UD
11982003-05-31 Ulrich Drepper <drepper@redhat.com>
1199
31195be2
UD
1200 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
1201 Also fail if tv_nsec < 0.
1202 (__lll_timedwait_tid): Likewise.
1203 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
1204 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
1205 Likewise.
1206 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
1207 Likewise.
1208 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
1209 Likewise.
1210 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
1211 Likewise.
80b54217
UD
1212 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
1213 Likewise.
1214 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
1215 Likewise.
31195be2 1216
dcfc8224
UD
1217 * Makefile (tests): Add tst-sem8 and tst-sem9.
1218 * tst-sem8.c: New file.
1219 * tst-sem9.c: New file.
1220 * sem_open.c: Fix creation of in_use record if the file exists but
1221 no internal record.
1222
49b65043
UD
1223 * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
1224 definitions.
1225
1226 * sysdeps/pthread/timer_create.c (timer_create): In case
1227 evp==NULL, assign timer ID to sival_ptr.
1228
1229 * descr.h (struct pthread_unwind_buf): Change type of prev element to
1230 struct pthread_unwind_buf *.
1231 (struct pthread): Likewise for cleanup_jmp_buf element.
1232
1233 * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
1234 * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
1235 * unwind.c (__pthread_unwind_next): Likewise.
1236
50794a45
UD
12372003-05-30 Ulrich Drepper <drepper@redhat.com>
1238
5d4f57bd
UD
1239 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
1240 (lll_futex_timed_wait): Use int for futex value parameter.
1241 (lll_futex_wake): Likewise.
1242 (lll_futex_requeue): Likewise.
1243
1244 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
1245 Replace one memory operation with one register operation.
1246
1247 * tst-join4.c (do_test): Fix error message.
1248
7ab7ea33
UD
1249 * tst-rwlock6.c (do_test): Use correct format specifier.
1250
1251 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
1252 (__lll_mutex_lock_wait): Replace one memory operation with one
1253 register operation.
1254 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
1255 (__lll_mutex_lock_wait): Likewise.
1256
50794a45
UD
1257 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
1258 (__lll_mutex_cond_lock): Add one to value parameter of
1259 __lll_lock_wait to reflect reality in the futex syscall.
1260 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1261 (lll_mutex_cond_lock): Likewise.
1262
5a70784e
JJ
12632003-05-30 Jakub Jelinek <jakub@redhat.com>
1264
1265 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
1266 New function.
1267 (lll_mutex_cond_lock): Define.
1268
e7c5ac68
UD
12692003-05-29 Ulrich Drepper <drepper@redhat.com>
1270
586d1748
UD
1271 * Makefile (tests): Add tst-signal6.
1272 * tst-signal6.c: New file.
1273
b8ba4a27
UD
1274 * sysdeps/unix/sysv/linux/s390/lowlevellock.h
1275 (__lll_mutex_unlock_force): New function
1276 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
1277
65d46efe
UD
1278 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
1279 (__lll_mutex_unlock_force): New function.
1280 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
1281
1282 * tst-rwlock7.c (do_test): Use correct format specifier.
1283
e7c5ac68
UD
1284 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
1285 Find break parameter in correct asm argument.
1286
284bdc42
UD
12872003-05-27 Jakub Jelinek <jakub@redhat.com>
1288
1289 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
1290 Remove out4.
1291 (lll_futex_requeue): Fix __o3 constraint, return negative errno if
1292 error occured.
1293 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
1294 Add __mutex.
1295 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
1296 lll_futex_requeue, lll_mutex_unlock_force): Define.
1297
e7c5ac68
UD
12982003-05-30 Jakub Jelinek <jakub@redhat.com>
1299
1300 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
1301 (pthread_cond_t): Add __mutex.
1302 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
1303 lll_futex_requeue, lll_mutex_unlock_force): Define.
1304
ea2630c6
UD
13052003-05-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1306
1307 * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
1308 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
1309 Add __mutex field.
1310 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
1311 Define.
1312 (lll_futex_wait, lll_futex_wake): Define.
1313 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
1314 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
1315 FUTEX_REQUEUE instead of FUTEX_WAIT.
1316 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
1317 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
1318 mutex which was used in condvar structure. Call
1319 __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
1320 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
1321
1322 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
1323 include tcb-offsets.h. Read wakeup value in locked region.
1324 Use the value of gbr register as THREAD_ID.
1325 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1326 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
1327 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
1328
1329 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
1330 macros.
1331
5a77f150
UD
13322003-05-28 Ulrich Drepper <drepper@redhat.com>
1333
1334 * sysdeps/pthread/pthread_cond_broadcast.c
1335 (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
1336
7661d9f7
UD
13372003-05-26 Ulrich Drepper <drepper@redhat.com>
1338
1339 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
1340 typo in register name.
1341 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
1342 correctly. Actually use requeue. Little optimization.
1343 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
1344 mutex address early. Handle cancellation state as 32-bit value.
1345 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1346 Remove unnecessary label.
1347
69431c9a
UD
13482003-05-25 Ulrich Drepper <drepper@redhat.com>
1349
1350 * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
1351 instead of FUTEX_WAIT.
1352 * sysdeps/pthread/pthread_cond_signal.c: Likewise.
1353 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
1354 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
1355 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
1356 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
1357 * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
1358 used in condvar structure. Call __pthread_mutex_cond_lock instead
1359 of __pthread_mutex_lock_internal.
1360 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1361 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1362 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
1363 (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
1364 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1365 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1366 * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
1367 Add pthread_mutex_cond_lock.
1368 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
1369 * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
1370 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
1371 lll_mutex_cond_lock.
1372 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1373 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
248a3490 1374 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
69431c9a 1375 Add __mutex field.
248a3490 1376 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
69431c9a
UD
1377 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1378
1379 * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
1380 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
1381
1382 * pthreadP.h: Declare __pthread_mutex_cond_lock.
1383 * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
1384 Use it instead of lll_mutex_lock. If __pthread_mutex_lock is a
1385 macro don't define aliases.
1386
1387 * cancellation.c: Remove __pthread_enable_asynccancel_2.
1388 * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
1389 * sysdeps/pthread/pthread_cond_timedwait.c: Use
1390 __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
1391 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1392 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1393 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
1394 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1395 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1396
fddfebbd
UD
13972003-05-17 Ulrich Drepper <drepper@redhat.com>
1398
1399 * sem_open.c: Fix one endless loop. Implement correct semantics
1400 wrt opening the same semaphore more then once.
1401 * sem_close.c: Adjust for sem_open change.
1402 * semaphoreP.h: Include <semaphore.h>. Define struct inuse_sem.
1403 Declare __sem_mappings, __sem_mappings_lock, __sem_search.
1404 * Makefile (tests): Add tst-sem7.
1405 * tst-sem7.c: New file.
1406
1eefffb0
RM
14072003-05-16 Roland McGrath <roland@redhat.com>
1408
1409 * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
1410 uninitialized variable braino.
1411
6e66dc78
UD
14122003-05-16 Ulrich Drepper <drepper@redhat.com>
1413
23ae6451
UD
1414 * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
1415 test for syscall availability.
1416
1417 * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
1418 __no_posix_timers to -1 if the syscalls don't exist.
1419
7ac5b8e2
UD
1420 * pthread_join.c (pthread_join): Set tid field of the joined
1421 thread to -1. This isn't necessary but helps to recognize some
1422 error conditions with almost no cost.
1423
1424 * allocatestack.c (FREE_P): Also negative values indicate an
1425 unused stack.
1426
6e66dc78
UD
1427 * unwind.c: Include <unistd.h>.
1428
855dba3c
UD
14292003-05-14 Ulrich Drepper <drepper@redhat.com>
1430
1431 * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
1432
81f3ac4c
UD
14332003-05-14 Jakub Jelinek <jakub@redhat.com>
1434
1435 * Makefile (crti-objs, crtn-objs): New variables.
1436 (omit-deps, extra-objs): Add crtn.
1437 ($(objpfx)libpthread.so): Depend on both crti and crtn
1438 and links to them in multidir.
1439 ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
1440
7158eae4
UD
14412003-05-12 Steven Munroe <sjmunroe@us.ibm.com>
1442
1443 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1444 (lll_mutex_unlock): Use atomic_exchange_rel.
1445
edf205d5
UD
14462003-05-11 Ulrich Drepper <drepper@redhat.com>
1447
1448 * cond-perf.c (cons): Add missing locking around setting of alldone.
1449
a3f979a7
UD
14502003-05-10 Ulrich Drepper <drepper@redhat.com>
1451
1452 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
1453 related macros.
1454 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
1455
880867a4
UD
14562003-05-09 Ulrich Drepper <drepper@redhat.com>
1457
949ec764
UD
1458 * tst-sem6.c: New file.
1459 * Makefile (tests): Add tst-sem6.
1460
1461 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
1462 Use atomic_exchange_rel instead of atomic_exchange.
1463 * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
1464 Likewise.
1465
1466 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
1467 code for lll_futex_wait and lll_futex_wake in static apps. Use
1468 vsyscall is possible.
1469
1470 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
1471 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
1472 * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
1473 pthread_setaffinity_np.
1474 * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
1475 and pthread_setaffinity_np.
1476 * Makefile (libpthread-routines): Add pthread_getaffinity and
1477 pthread_setaffinity.
1478
880867a4
UD
1479 * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
1480 use it in case mmap to allocate the stack fails.
1481 * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
1482 ARCH_MAP_FLAGS here.
1483 * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
1484 ARCH_RETRY_MMAP.
1485
92d83c72
UD
14862003-05-08 Ulrich Drepper <drepper@redhat.com>
1487
1488 * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
1489 handler implementation. It is now lockless in fork().
1490 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
1491 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
1492 * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>. Don't
1493 declare the __fork_*_lists.
1494 (struct fork_handler): Include pointers to all three functions.
1495 Add next, refcntr and need_signal elements.
1496 (__fork_handlers): New declaration.
1497 (__register_atfork_malloc): Remove declaration.
1498 (HAVE_register_atfork_malloc): Remove definition.
1499 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
1500 __pthread_child_handler variable.
1501 (__libc_pthread_init): Use __register_atfork instead of explicitly
1502 adding to the list.
1503 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
1504 and lll_futex_wake.
1505 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1506
1507 * unwind.c (unwind_cleanup): Print error message and then abort. This
1508 function must never be reached.
1509
1510 * cond-perf.c: New file.
1511
be4d8038
UD
15122003-05-05 Ulrich Drepper <drepper@redhat.com>
1513
1514 * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
1515
c6696b79
RM
15162003-05-04 Roland McGrath <roland@redhat.com>
1517
1518 * Makefile ($(objpfx)../libc.so): New target.
1519
7da168bf
UD
15202003-05-02 Ulrich Drepper <drepper@redhat.com>
1521
1522 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
1523 (pthread_condattr_t): Size is only an int, don't use long for
1524 alignment.
1525 (pthread_mutexattr_t): Likewise.
7da168bf
UD
1526 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
1527 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1528 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1529
9a7178d6
UD
15302003-05-01 Ulrich Drepper <drepper@redhat.com>
1531
1532 * sysdeps/i386/tls.h: Define THREAD_ID.
1533 * sysdeps/ia64/tls.h: Likewise.
1534 * sysdeps/powerpc/tls.h: Likewise.
1535 * sysdeps/s390/tls.h: Likewise.
1536 * sysdeps/sh/tls.h: Likewise.
1537 * sysdeps/x86_64/tls.h: Likewise.
1538 * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
1539 record ownership.
1540 * pthread_mutex_timedlock.c: Likewise.
1541 * pthread_mutex_trylock.c: Likewise.
1542 * pthread_mutex_unlock.c: Likewise.
1543 * pthread_rwlock_trywrlock.c: Likewise.
1544 * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
1545 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
1546 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
1547 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
1548
1549 * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
1550 flag.
1551
a234e27d
UD
15522003-04-29 Jakub Jelinek <jakub@redhat.com>
1553
1554 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
1555 (__SIZEOF_PTHREAD_COND_T): Define to 48.
1556 (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
1557 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
1558 Make __align long long instead of long.
1559 (pthread_rwlock_t): Formatting.
1560 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
1561 (pthread_rwlock_t): Formatting.
1562 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
1563 (pthread_cond_t): Make __align long long instead of long.
1564 (pthread_rwlock_t): Move __flags field to the same position as in
1565 linuxthreads.
1566
f025c136
UD
15672003-04-30 Ulrich Drepper <drepper@redhat.com>
1568
1569 * tst-rwlock6.c (do_test): Use correct printf format specifiers.
1570 * tst-rwlock7.c (do_test): Likewise.
1571
7531ab9e
RM
15722003-04-26 Roland McGrath <roland@redhat.com>
1573
1574 * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
1575
299601a1
UD
15762003-04-22 Jakub Jelinek <jakub@redhat.com>
1577
299601a1
UD
1578 * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
1579 sizeof (struct pthread).
1580 (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
468777e1 1581 1 struct pthread.
299601a1
UD
1582 * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
1583 to 0.
1584 (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
1585 struct pthread.
1586 (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
1587 to 32-bit bytes.
1588 (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
1589 tcbp.
1590 (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
1591 unneccessarily.
1592 (NO_TLS_OFFSET): Define.
299601a1
UD
1593 * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
1594 add TLS_TCB_SIZE unnecessarily.
299601a1 1595
950094f8
RM
15962003-04-22 Roland McGrath <roland@redhat.com>
1597
1598 * Makeconfig (shared-thread-library): Reverse link order to work
1599 around linker bug.
1600
dc2f6455
UD
16012003-04-22 Ulrich Drepper <drepper@redhat.com>
1602
1603 * semaphore.h: Fix typo in comment.
1604
e7608d77
UD
16052003-04-21 Ulrich Drepper <drepper@redhat.com>
1606
6a87ee19
UD
1607 * sysdeps/pthread/sigfillset.c: New file.
1608
e7608d77
UD
1609 * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
1610 * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
1611 * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
1612 * sysdeps/pthread/sigaction.c: Likewise.
1613 * sysdeps/pthread/sigprocmask.c: New file.
1614 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
1615 __SIGRTMIN+1.
1616 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
1617 Block SIGTIMER. Also handle SI_TKILL events and terminate thread
1618 in this case.
1619
0b3df49e
UD
16202003-04-19 Ulrich Drepper <drepper@redhat.com>
1621
58a7a325
UD
1622 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
1623 (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
1624
0b3df49e
UD
1625 * sysdeps/unix/sysv/linux/unregister-atfork.c
1626 (__unregister_atfork): Don't free memory not allocated dynamically.
1627
1628 * semaphore.h: Remove __THROW marker from cancellation points.
1629 * nptl/sysdeps/pthread/pthread.h: Likewise.
1630
7d74651e
UD
16312003-04-18 Ulrich Drepper <drepper@redhat.com>
1632
76a67697
UD
1633 * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
1634 pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
7d74651e
UD
1635 __THROW.
1636
dd9d6538
JJ
16372003-04-16 Jakub Jelinek <jakub@redhat.com>
1638
1639 * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
1640
4ab6f47c
RM
16412003-04-15 Roland McGrath <roland@redhat.com>
1642
1643 * forward.c (__pthread_unwind): Tweak to avoid warning.
1644
162434a6
UD
16452003-04-15 Ulrich Drepper <drepper@redhat.com>
1646
1647 * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
1648
35909161
UD
16492003-04-14 Ulrich Drepper <drepper@redhat.com>
1650
18ddd3aa 1651 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
35909161
UD
1652 overflow CFA advance instructions.
1653 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1654
18a8e730
UD
16552003-04-14 Jakub Jelinek <jakub@redhat.com>
1656
bd4f43b4
UD
1657 * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
1658 * sysdeps/i386/pthread_spin_lock.c: Likewise.
1659 * sysdeps/x86_64/tls.h: Likewise. Define LOCK_PREFIX if not already
1660 defined.
1661
18a8e730
UD
1662 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
1663 DW_CFA_advance_loc2 for .Laddl-.Lsubl.
1664 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
1665 DW_CFA_advance_loc for .Laddl-.Lsubl.
1666
08c765fa
UD
16672003-04-13 Ulrich Drepper <drepper@redhat.com>
1668
18a8e730
UD
1669 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
1670 position-independent unwind data for static libraries.
1671 Add missing unwind info. Add comments.
1672
ad2be852
UD
1673 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
1674 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1675 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
08c765fa
UD
1676 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1677
177d1ad3
UD
16782003-04-12 Ulrich Drepper <drepper@redhat.com>
1679
08c765fa
UD
1680 * Makefile: Make sure all cancellation points are compiled with
1681 exception and asynchronous unwind tables.
1682
177d1ad3
UD
1683 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
1684 which mishandles loading of global object addresses in PIC.
1685 (THREAD_SETMEM_NC): Likewise.
1686
09d65ff3
UD
16872003-04-11 Ulrich Drepper <drepper@redhat.com>
1688
1689 * pthread.h: Define new data structure for cleanup buffer. Declare
1690 new cleanup handler interfaces.
1691 * descr.h: Include <unwind.h> if necessary. Define pthread_unwind_buf.
1692 (struct pthread): Add cleanup_jmp_buf pointer. Define
1693 HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
1694 * pthreadP.h: Declare __pthread_unwind. Define __do_cancel to use
1695 it. Declare old cleanup handler installation functions.
1696 * cleanup.c: Rewrite. Install handler for unwind-based cleanup
1697 handling.
1698 * cleanup_defer.c: Likewise.
1699 * cleanup_compat.c: New file. Old cleanup code.
1700 * cleanup_def_compat.c: New file. Old cleanup code.
1701 * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
1702 if own thread descriptor.
1703 * unwind.c: New file.
1704 * forward.c: Add __pthread_unwind.
1705 * init.c (pthread_functions): Add __pthread_unwind.
1706 * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
1707 Add ptr___pthread_unwind.
1708 * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
1709 and unwind function.
1710 * Makefile (libpthread-routines): Add cleanup_compat,
1711 cleanup_def_compat, and unwind. Define CFLAGS to enable unwind
1712 table generation if necessary.
1713 * version.c: Record whether unwind support is compiled in.
1714 * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
1715 * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
1716 handler interfaces.
1717 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
1718 complication to generate unwind information for syscall wrappers.
68107ec0 1719 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
09d65ff3
UD
1720 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
1721 __cleanup_fct_attribute.
1722
1723 * Makefile: Add rules to build and run tst-cleanup0.
1724 * tst-cleanup0.c: New file.
1725 * tst-cleanup0.expect: New file.
1726
1727 * pthread_create.c (deallocate_tsd): Don't take parameter. Adjust
1728 caller. Optimize to avoid often unecessary local variable.
1729
0dc44b51
RM
17302003-04-11 Roland McGrath <roland@redhat.com>
1731
1732 * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
1733 sets variable `multidir'; include that.
1734 (generated): Add it.
1735 ($(objpfx)$(multidir)/crti.o): New target.
1736 [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
1737
84a80719
UD
17382003-04-11 Ulrich Drepper <drepper@redhat.com>
1739
1740 * tst-attr2.c (do_test): Add cast to avoid warning.
1741 * tst-mutex4.c (do_test): Likewise.
1742
88ff4759
UD
17432003-04-10 Ulrich Drepper <drepper@redhat.com>
1744
1745 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
1746 in child.
1747
b2041097
UD
17482003-04-09 Ulrich Drepper <drepper@redhat.com>
1749
1750 * Makefile (tests): Add tst-detach1.
1751 * tst-detach1.c: New file.
1752
f9657e88
UD
17532003-04-08 Ulrich Drepper <drepper@redhat.com>
1754
9afe4964
UD
1755 * sysdeps/pthread/pthread.h: Remove duplicate
1756 pthread_cleanup_{push,pop} definitions.
1757
f9657e88
UD
1758 * tst-barrier2.c: Eliminate warnings.
1759 * tst-cancel4.c: Likewise.
1760 * tst-cond4.c: Likewise.
1761 * tst-cond6.c: Likewise.
1762 * tst-detach1.c: Likewise.
1763 * tst-rwlock4.c: Likewise.
1764 * tst-rwlock6.c: Likewise.
1765 * tst-rwlock7.c: Likewise.
1766 * tst-sem3.c: Likewise.
1767 * tst-spin2.c: Likewise.
1768 * tst-umask1.c: Likewise.
1769
69b35e86
UD
17702003-04-07 Ulrich Drepper <drepper@redhat.com>
1771
1772 * pthread_detach.c (pthread_detach): Fix test for invalid TID.
1773
c70ad7d7
UD
17742003-04-06 Ulrich Drepper <drepper@redhat.com>
1775
1776 * descr.h (struct pthread): Move cancelhandling member to the front.
1777
54e0138f
UD
17782003-04-05 Ulrich Drepper <drepper@redhat.com>
1779
1780 * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
1781 malloc_parent, and malloc_child statically.
1782 (__register_atfork_malloc): New function.
1783 (free_mem): Don't free any of the malloc_* variables on the list.
1784 * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
1785 Define HAVE_register_atfork_malloc.
1786
b22d701b
UD
17872003-04-04 Ulrich Drepper <drepper@redhat.com>
1788
1789 * sysdeps/pthread/createthread.c (create_thread): Add some more
1790 comments explaining when to set multiple_threads and when not.
1791
1792 * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
1793 THREAD_ATOMIC_BIT_SET if not already defined.
1794 * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
1795 THREAD_ATOMIC_BIT_SET:
1796 * sysdeps/x86_64/tls.h: Likewise.
1797 * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
1798 THREAD_ATOMIC_CMPXCHG_VAL.
1799 (_pthread_cleanup_pop_restore): Likewise.
1800 * cancellation.c (__pthread_enable_asynccancel): Likewise.
1801 (__pthread_enable_asynccancel_2): Likewise.
1802 (__pthread_disable_asynccancel): Likewise.
1803 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
1804 (__libc_disable_asynccancel): Likewise.
1805 * init.c (sigcancel_handler): Likewise.
1806 * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
1807 * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
1808
86246935
UD
18092003-04-03 Ulrich Drepper <drepper@redhat.com>
1810
1811 * init.c (sigcancel_handler): Don't set EXITING_BIT here.
1812 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
1813 * pthreadP.h (__do_cancel): Set EXITING_BIT here.
1814 * Makefile (tests): Add tst-cancel11.
1815 * tst-cancel11.c: New file.
1816
6b4686a5
UD
18172003-04-01 Ulrich Drepper <drepper@redhat.com>
1818
1819 * pthread_create.c (deallocate_tsd): Clear/free memory after the last
1820 round, not the first. Use specific_used flag instead of local
1821 found_nonzero variable. Use THREAD_[SG]ETMEM where possible.
1822 (__free_tcb): Don't call deallocate_tsd here.
1823 (start_thread): Call deallocate_tsd here.
1824 * pthread_setspecific.c: Set specific_used flag really only when
1825 needed.
0d73a73b 1826 * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
6b4686a5 1827 * tst-tsd3.c: New file.
0d73a73b 1828 * tst-tsd4.c: New file.
6b4686a5 1829
42b2395d
UD
18302003-03-31 Ulrich Drepper <drepper@redhat.com>
1831
211d90c5
UD
1832 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
1833 Use atomic_exchange_and_add instead of __lll_add.
1834 (__lll_mutex_timedlock): Likewise.
1835 Patch by Ian Wienand.
1836
18372003-03-24 Steven Munroe <sjmunroe@us.ibm.com>
1838
1839 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
1840 (SINGLE_THREAD_P): Fix typo.
1841 * tst-cancel-wrappers.sh: Handle '.'ed symbols.
1842
18432003-03-31 Ulrich Drepper <drepper@redhat.com>
1844
1845 * Makefile (tests): Add tst-align.
1846 * tst-align.c: New file.
1847 * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
211d90c5 1848
42b2395d
UD
1849 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
1850 function correctly.
1851
211d90c5
UD
1852 * tst-tsd2.c: Add casts to avoid warnings.
1853
163b180f
UD
18542003-03-30 Ulrich Drepper <drepper@redhat.com>
1855
1856 * descr.h (struct pthread): Move most often used elements to the front.
1857
ea473bad
UD
18582003-03-29 Ulrich Drepper <drepper@redhat.com>
1859
1860 * Makefile (libpthread-routines): Add pthread_atfork.
1861 (libpthread-static-only-routines): Add pthread_atfork.
1862
dd731d53
UD
18632003-03-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1864
1865 * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
1866 of TLS_DTV_AT_TP.
1867 (INSTALL_DTV): Add parens.
1868 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
1869 Use passed descr instead of THREAD_SELF.
1870 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
1871 (__lll_mutex_timedlock_wait): Correct expected value after
1872 spurious wakeup.
1873 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
1874 Release lock before waking up the waiters.
1875 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
1876 criteria. Reorderstruct passed to cleanup handler. Fix
1877 handling of cancellation and failung pthread_mutex_unlock call.
1878 Use __pthread_enable_asynccancel_2 instead of
1879 __pthread_enable_asynccancel.
1880 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
1881 Return result of lock re-get if it fails.
1882 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
1883 for __pthread_cleanup_push.
1884 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
1885 completely broken rwlock implementation.
1886 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1887 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
1888 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
1889 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
1890 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1891 * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value. Use
1892 versioned_symbol macro.
1893 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
1894 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
1895
c75d02f0
UD
18962003-03-27 Ulrich Drepper <drepper@redhat.com>
1897
5f5004df
UD
1898 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
1899 __timer_helper_thread. Declare __start_helper_thread, __helper_once,
1900 and __helper_tid.
1901 (struct timer): Remove th and bar field.
1902 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
1903 debugging code. Create only one helper thread.
1904 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
1905 helper thread.
1906 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
1907 Renamed. Define statically. Use thread info from siginfo.
1908 (__helper_once): New variable.
1909 (__helper_tid): New variable.
1910 (__reset_helper_control): New function.
1911 (__start_helper_thread): New function.
1912
18d009ca
UD
1913 * pthread_create.c (start_thread): Don't use setjmp inside
1914 __builtin_expect to work around gcc bug.
1915
c75d02f0
UD
1916 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
1917 timer_delete syscall fails, but not with ENOSYS, set
1918 __no_posix_timers.
1919
1920 * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
1921 (timer_settime): Fix typo.
28cf3058
UD
1922 * sysdeps/unix/sysv/linux/timer_getoverr.c
1923 [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
c75d02f0 1924
049ac259
JJ
19252003-03-27 Jakub Jelinek <jakub@redhat.com>
1926
1927 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
1928 offset of cleanupbuf.__prev.
1929
f93d39dd
JJ
19302003-03-26 Jakub Jelinek <jakub@redhat.com>
1931
1932 * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
1933 of included file.
1934
f064e4c5
UD
19352003-03-26 Ulrich Drepper <drepper@redhat.com>
1936
1937 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
1938 NULL provide default definition to syscall.
1939
83e886a3
RM
19402003-03-25 Roland McGrath <roland@redhat.com>
1941
1942 * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
1943 (timer_id2ptr): Fix typo.
1944
09402f5b
UD
19452003-03-25 Ulrich Drepper <drepper@redhat.com>
1946
1947 * pthreadP.h: Define SIGCANCEL and SIGTIMER.
1948 * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
1949 * sysdeps/ia64/pthreaddef.h: Likewise.
1950 * sysdeps/powerpc/pthreaddef.h: Likewise.
1951 * sysdeps/s390/pthreaddef.h: Likewise.
1952 * sysdeps/sh/pthreaddef.h: Likewise.
1953 * sysdeps/x86_64/pthreaddef.h: Likewise.
1954 * init.c (__pthread_initialize_minimal): Block SIGTIMER.
1955 * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
1956 being changed.
1957 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
1958 SIGTIMER is not unblocked.
1959 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
1960 RT signal taken.
1961 * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
1962 be send.
1963 * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
1964 pass pointer through as ID.
1965 * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
1966 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
1967 * sysdeps/unix/sysv/linux/timer_create.c: New file.
1968 * sysdeps/unix/sysv/linux/timer_delete.c: New file.
1969 * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
1970 * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
1971 * sysdeps/unix/sysv/linux/timer_routines.c: New file.
1972 * sysdeps/unix/sysv/linux/timer_settime.c: New file.
1973 * sysdeps/unix/sysv/linux/ia64/Versions: New file.
1974 * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
1975 * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
1976 * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
1977 * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
1978 * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
1979 * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
1980 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
1981 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
1982 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
1983 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
1984 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
1985 * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
1986 * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
1987 * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
1988 * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
1989 * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
1990 * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
1991 * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
1992 * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
1993 * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
1994 * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
1995 * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
1996 * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
1997 * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
1998
1999 * pthreadP.h: Remove FRAME_LEFT definition.
2000 * cleanup.c (_pthread_cleanup_push): Don't check for reference to
2001 already left frame. Programs which have this problem are not POSIX
2002 compliant.
2003 * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
2004
5e826ab5
UD
20052003-03-24 Ulrich Drepper <drepper@redhat.com>
2006
2007 * sysdeps/pthread/tst-timer.c: Check return values of the
2008 functions we test.
2009
b910f788
RM
20102003-03-23 Roland McGrath <roland@redhat.com>
2011
3045a1fe
RM
2012 * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
2013 * tst-tls3mod.c: Likewise.
2014 * tst-tls1.c: Likewise.
2015 * tst-tls2.c: Likewise.
2016
85047fe3
RM
2017 * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
2018 undefined behavior.
2019
b910f788
RM
2020 * tst-join5.c (tf1, tf2): Add a cast.
2021
2022 * Makeconfig (includes): Append -I$(..)nptl to this variable.
2023
2024 * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
2025 Don't test anything.
2026 * tst-cond4.c: Likewise.
2027 * tst-cond6.c: Likewise.
2028 * tst-flock2.c: Likewise.
2029 * tst-mutex4.c: Likewise.
2030 * tst-rwlock4.c: Likewise.
2031 * tst-signal1.c: Likewise.
2032 * tst-spin2.c: Likewise.
2033 * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
2034
2035 * tst-mutex4.c: Use test-skeleton.c.
2036 * tst-spin2.c: Likewise.
2037 * tst-sysconf.c: Likewise.
2038 * tst-barrier2.c: Likewise.
2039 * tst-cond4.c: Likewise.
2040 * tst-cond6.c: Likewise.
2041 * tst-rwlock4.c: Likewise.
2042 * tst-unload.c: Likewise.
2043 * tst-flock2.c (do_test): Use return instead of exit.
2044
4baa087a
RM
20452003-03-22 Jakub Jelinek <jakub@redhat.com>
2046
2047 * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
2048
5a3ab2fc
UD
20492003-03-21 Ulrich Drepper <drepper@redhat.com>
2050
9f07eae2
UD
2051 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
2052 (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
2053 instead of __lll_compare_and_swap.
2054 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
2055 Likewise.
2056 Removed definition if __lll_compare_and_swap.
2057
5a3ab2fc
UD
2058 * cancellation.c: Adjust for new form of compare&exchange macros.
2059 * cleanup_defer.c: Likewise.
2060 * init.c: Likewise.
2061 * libc-cancellation.c: Likewise.
2062 * old_pthread_cond_broadcast.c: Likewise.
2063 * old_pthread_cond_signal.c: Likewise.
2064 * old_pthread_cond_timedwait.c: Likewise.
2065 * old_pthread_cond_wait.c: Likewise.
2066 * pthread_cancel.c: Likewise.
2067 * pthread_create.c: Likewise.
2068 * pthread_detach.c: Likewise.
2069 * pthread_join.c: Likewise.
2070 * pthread_key_delete.c: Likewise.
2071 * pthread_setcancelstate.c: Likewise.
2072 * pthread_setcanceltype.c: Likewise.
2073 * pthread_timedjoin.c: Likewise.
2074 * pthread_tryjoin.c: Likewise.
2075 * sysdeps/pthread/createthread.c: Likewise.
2076
b1aea098
UD
20772003-03-20 Ulrich Drepper <drepper@redhat.com>
2078
2079 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
4baa087a 2080 Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
b1aea098
UD
2081 definitions. Replace uses with calls to atomic_* functions.
2082 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2083 * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
2084 __lll_test_and_set calls with atomic_exchange_and_add and
2085 atomic_exchange calls respectively.
2086 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
2087 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
2088 * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
2089 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
2090 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
2091 * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
2092 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
2093
2094 * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
2095 returns the old value.
2096
100a7100
RM
20972003-03-20 Martin Schwidefsky <sky@mschwid3.boeblingen.de.ibm.com>
2098
2099 * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
2100 int for variable OLDVAL and correct inline assembler contraint.
2101 * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
2102 type int for variable OLD.
2103
2104 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
2105 only for s390-32.
2106 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
2107 (SINGLE_THREAD_P): Use global variable __local_multiple_threads
2108 instead of multiple_threads field in the TCB.
2109
95767b36
UD
21102003-03-19 Ulrich Drepper <drepper@redhat.com>
2111
4009bf40
UD
2112 * sysdeps/i386/i686/bits/atomic.h: Removed.
2113 * sysdeps/i386/i586/bits/atomic.h: Removed.
2114 * sysdeps/i386/i486/bits/atomic.h: Removed. Moved to glibc.
2115 * sysdeps/x86_64/bits/atomic.h: Removed. Moved to glibc.
2116 * sysdeps/s390/bits/atomic.h: Removed. Moved to glibc.
2117 * sysdeps/sh/bits/atomic.h: Removed. Moved to glibc.
2118 * sysdeps/ia64/bits/atomic.h: Removed. Moved to glibc.
2119 * sysdeps/powerpc/bits/atomic.h: Removed. Moved to glibc.
2120 * atomic.h: Removed. Moved to glibc.
2121
560a784f
UD
2122 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
2123 support for clock selection.
2124
95767b36
UD
2125 * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
2126 signalling waiters.
2127
043ad426
RM
21282003-03-18 Roland McGrath <roland@redhat.com>
2129
94659495
RM
2130 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
2131 Add __lll_rel_instr first. Add memory clobber.
2132 (lll_mutex_unlock): Use __lll_test_and_set.
2133 From Paul Mackerras <paulus@samba.org>.
2134
2135 * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
2136 unconditionally.
2137 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
2138 (SINGLE_THREAD_P): Add `header.' prefix.
2139 From Paul Mackerras <paulus@samba.org>.
2140
043ad426
RM
2141 * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
2142 pthread_timedjoin_np to ...
2143 (libpthread: GLIBC_2.3.3): ... here.
2144 (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
2145
2146 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
2147 Avoid shadowing VAL variable.
2148
2149 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
2150 New macro.
2151
86a9ee5e
UD
21522003-03-18 Ulrich Drepper <drepper@redhat.com>
2153
ac9e0aa1
UD
2154 * Makefile (tests): Add tst-cond11.
2155 * tst-cond11.c: New file.
2156
a14b373c
UD
2157 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
2158 struct passed to cleanup handler to eliminate one more
2159 instruction.
2160 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2161
24a49f38
UD
2162 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
2163 (pthrad_cond_t): Replace __unused field with __clock.
2164
2165 * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
2166 waken all waiters in cleanup handler.
2167 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2168 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2169
86a9ee5e
UD
2170 * pthread_condattr_getclock.c: New file.
2171 * pthread_condattr_setclock.c: New file.
2172 * sysdeps/pthread/pthread.h: Declare these new functions.
2173 * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
2174 * Makefile (libpthread-routines): Add the new functions.
2175 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
2176 Renamed field to value. Document use of the bits.
2177 * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
2178 change.
2179 * pthread_condattr_setpshared.c: Likewise.
d5cb8389 2180 * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
86a9ee5e
UD
2181 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
2182 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
2183 Add __clock field.
2184 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2185 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2186 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2187 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
2188 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
2189 Implement clock selection.
2190 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
2191 * pthread-errnos.sym: Add ENOSYS.
2192 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2193 _POSIX_CLOCK_SELECTION.
2194 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2195
2196 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
2197 invalid .size directive.
2198
98054a05
RM
21992003-03-17 Roland McGrath <roland@redhat.com>
2200
2201 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
2202 Formatting tweaks.
2203
001bea71
UD
22042003-03-17 Ulrich Drepper <drepper@redhat.com>
2205
4773086e
UD
2206 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
2207 Use __lll_add instead of spelling it out. Use protected symbol names.
2208 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
2209 Use __lll_add.
2210 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
2211 Renamed from lll_compare_and_swap. Use new name where necessary.
2212 (__lll_add): Defined.
2213 (__lll_dec_if_positive): Defined.
2214 (__lll_test_and_set): Defined.
2215 * sysdeps/ia64/pthread_spin_init.c: Removed.
2216 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
2217 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
2218 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
2219 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
2220 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
2221 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
2222 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
001bea71
UD
2223 * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
2224 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
2225 __sync_lock_release_si.
2226 Patch by Jakub Jelinek.
2227
2228 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
2229 Fix timeout handling.
2230 (__lll_timedwait_tid): Likewise.
2231 (lll_unlock_wake_cb): Wake up other waiters if necessary.
2232 Patch by Jakub Jelinek.
2233
2234 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
2235
de4471dd
RM
22362003-03-17 Roland McGrath <roland@redhat.com>
2237
2238 PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
2239 * sysdeps/pthread/pthread_spin_init.c: New file.
2240 * sysdeps/pthread/pthread_spin_unlock.c: New file.
2241 * sysdeps/powerpc/Makefile: New file.
2242 * sysdeps/powerpc/pthread_spin_lock.c: New file.
2243 * sysdeps/powerpc/pthread_spin_trylock.c: New file.
2244 * sysdeps/powerpc/pthreaddef.h: New file.
2245 * sysdeps/powerpc/tcb-offsets.sym: New file.
2246 * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
2247 * sysdeps/powerpc/tls.h: New file.
2248 * sysdeps/powerpc/bits/atomic.h: New file.
2249 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
2250 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
2251 * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
98054a05 2252
de4471dd
RM
2253 * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
2254 * sysdeps/unix/sysv/linux/sem_post.c: New file.
2255 * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
2256 * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
2257 * sysdeps/unix/sysv/linux/sem_wait.c: New file.
2258 * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
2259 * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
2260 * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
2261 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
2262 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
2263 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
2264 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
2265 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
2266 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
2267 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
2268
2269 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
2270 not gettimeofday.
2271 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
2272 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
2273 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
2274 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
2275 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
2276
5778033f
UD
22772003-03-17 Ulrich Drepper <drepper@redhat.com>
2278
2279 * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
2280 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
2281 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2282 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2283 Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
2284
796038f8
RM
22852003-03-16 Roland McGrath <roland@redhat.com>
2286
2287 * tst-fork4.c: Include <string.h>.
2288 * tst-signal2.c: Likewise.
2289 * tst-mutex5.c (do_test): exit -> return.
2290 * tst-mutex2.c: Include <stdlib.h>.
2291
51d0678c
UD
22922003-03-16 Ulrich Drepper <drepper@redhat.com>
2293
5778033f
UD
2294 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
2295 (__lll_mutex_timedlock_wait): Correct expected value after
2296 spurious wakeup. Otherwise we would never wait again.
2297
b6e2f87a
UD
2298 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
2299 zone versus inline asm stupidity. Use correct instructions.
2300
51d0678c
UD
2301 * tst-rwlock6.c: Add some more status output.
2302
8112cc70
RM
23032003-03-15 Roland McGrath <roland@redhat.com>
2304
2305 * sysdeps/pthread/configure.in: New file.
2306 * sysdeps/pthread/configure: New file (generated).
2307
49773c19
UD
23082003-03-15 Ulrich Drepper <drepper@redhat.com>
2309
2310 * allocatestack.c (allocate_stack): Store the exact stack size of
2311 user allocated stacks.
2312
eec0ca9f
JJ
23132003-03-15 Jakub Jelinek <jakub@redhat.com>
2314
2315 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
2316 (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
2317 * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
2318 * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
2319 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
2320 Use `header.' prefix.
2321 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
2322
a87731e2
UD
23232003-03-15 Ulrich Drepper <drepper@redhat.com>
2324
2325 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
2326 __builtin_frame_address, use stack pointer.
2327
2328 * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
2329 instead of __builtin_frame_pointer.
2330
e22a221d
UD
23312003-03-14 Ulrich Drepper <drepper@redhat.com>
2332
92ed3daf
UD
2333 * tst-basic1.c (do_test): Add cast to avoid warning.
2334 * tst-basic2.c (do_test): Likewise.
2335
9b89567d
UD
2336 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
2337 amount of stack correction.
2338
e22a221d
UD
2339 * tst-fork4.c: Use test-skeleton.c.
2340
2e49caba
RM
23412003-03-14 Roland McGrath <roland@redhat.com>
2342
2343 * init.c: Fix typo "#eli" for "#else".
2344
415ef7d8
RM
23452003-03-14 Steven Munroe <sjmunroe@us.ibm.com>
2346
2347 * allocatestack.c (__stack_user): Use hidden_data_def.
2348 * pthread_create.c (__pthread_keys): Likewise.
2349
2350 * init.c [__powerpc__] (__NR_set_tid_address): Define it.
2351
52287505
RM
23522003-03-14 Roland McGrath <roland@redhat.com>
2353
415ef7d8
RM
2354 * tst-fork4.c: New file.
2355 * Makefile (tests): Add it.
2356
52287505
RM
2357 * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
2358 we always define the padding space.
2359 [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
2360 stopped supporting its own extensions fully.
2361 [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
2362 struct also called `header', so `header.multiple_threads' is the field
2363 name to use on all machines.
2364 * allocatestack.c (allocate_stack): Use `header.' prefix.
2365 * sysdeps/pthread/createthread.c (create_thread): Likewise.
2366 * pthread_create.c (__pthread_create_2_1): Likewise.
2367 * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
2368 (THREAD_SELF): Likewise.
2369 * sysdeps/x86_64/tls.h: Likewise.
2370 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
2371 (SINGLE_THREAD_P): Likewise.
2372 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
2373 (SINGLE_THREAD_P): Likewise.
2374 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
2375 (SINGLE_THREAD_P): Likewise.
2376
2377 * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
2378 value directly.
2379
c44bf9aa
UD
23802003-03-14 Ulrich Drepper <drepper@redhat.com>
2381
e22a221d
UD
2382 * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
2383 * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
2384
0eb18281
UD
2385 * pthread_create.c (start_thread): setjmp is expected to return 0.
2386
c44bf9aa
UD
2387 * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
2388 (THREAD_GETMEM_NC): Likewise.
2389
564cd8b6
UD
23902003-03-13 Ulrich Drepper <drepper@redhat.com>
2391
2392 * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
2393 and the size of the stack which must be allocated is a multiple,
2394 allocate one more page.
2395 * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
2396 MULTI_PAGE_ALIASING.
2397
6461e577
RM
23982003-03-13 Roland McGrath <roland@redhat.com>
2399
2400 * pthread_create.c (start_thread): Set EXITING_BIT after the
2401 event-reporting (and destructors), not before.
2402
b5ec5617
UD
24032003-03-13 Jakub Jelinek <jakub@redhat.com>
2404
6461e577
RM
2405 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
2406 lll_futex_wake): Declare register variables as long int instead of
2407 unsigned long int. Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
2408 Make syscall arguments clobbered by the syscall.
2409 (lll_futex_wait): Define using lll_futex_timed_wait.
2410
2411 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
2412 to void *.
2413
2414 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
2415 PPID if [! NDEBUG].
2416
2417 * allocatestack.c (nptl_ncreated): Only declare if
2418 COLORING_INCREMENT != 0.
2419
2420 * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
2421 (__libc_enable_asynccancel_2): Remove prototype.
2422
b5ec5617
UD
2423 * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
2424 ctid to match kernel.
2425
d0369fb8
UD
24262003-03-12 Ulrich Drepper <drepper@redhat.com>
2427
7588880f
UD
2428 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
2429 libc_multiple_threads.
2430 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
2431 __libc_multiple_threads to...
2432 * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here. New file.
2433
2434 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
2435 versioning.
2436 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
2437 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
2438
2439 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
2440 (__pthread_once_internal): Define.
2441
2442 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
2443 macros instead of .symver directly.
2444 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
2445 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2446
d0369fb8
UD
2447 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
2448 * sysdeps/x86_64/tcb-offsets.sym: New file.
2449 * sysdeps/x86_64/Makefile: New file.
2450
2451 * sysdeps/i386/tcb-offsets.sym: Add SELF.
2452 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
2453 to access own pthread_t in TCB.
2454 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2455 Likewise.
2456 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2457 Likewise.
2458 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2459
0bb2ac85
RM
24602003-03-12 Roland McGrath <roland@redhat.com>
2461
2462 * pthread-errnos.sym: New file.
2463 * Makefile (gen-as-const-headers): New variable, list that file.
2464 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
2465 header <pthread-errnos.h> instead of defining errno values here.
2466 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
2467 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2468 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
2469 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2470 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2471 Likewise.
2472 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2473 Likewise.
2474 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2475 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2476 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
2477 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2478 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
2479 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
2480 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
2481 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
2482 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2483 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
2484 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
2485 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
2486 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
2487 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
2488 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
2489 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
2490 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
2491 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
2492 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2493 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
2494 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
2495 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
2496 * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
2497 * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
2498 * sysdeps/sh/pthread_spin_trylock.S: Likewise.
2499 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
2500 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
2501
2502 * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
2503 CLONE_CHILD_SETTID worked.
2504
35e148cb
UD
25052003-03-12 Ulrich Drepper <drepper@redhat.com>
2506
d0369fb8
UD
2507 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
2508 file.
2509 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
2510 file.
2511
2512 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
2513 (pthread_cond_t): Add padding.
2514
da49194d
UD
2515 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
2516 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
2517 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
2518
35e148cb
UD
2519 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
2520 (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
2521 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
2522 (__pthread_rwlock_timedrdlock): Likewise.
2523 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
2524 (__pthread_rwlock_wrlock): Likewise.
2525 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
2526 (__pthread_rwlock_rdlock): Likewise.
2527
2528 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
2529
2530 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
2531 result of lock re-get if it fails.
2532
3e976b96
UD
25332003-03-11 Ulrich Drepper <drepper@redhat.com>
2534
5a03acfe
UD
2535 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
2536 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2537 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
2538 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
2539 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2540 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
2541 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
2542 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
2543 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
2544 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
2545
2546 * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
2547 THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
2548
2549 * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
2550 Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
2551 * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
2552 (create_thread): Likewise.
2553 Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
2554 * init.c (__pthread_initialize_minimal_internal): Initialize
2555 __libc_multiple_threads_ptr if necessary.
2556 * pthreadP.h: Adjust prototype for __libc_pthread_init. Declare
2557 __pthread_multiple_threads and __libc_multiple_threads_ptr.
2558 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
2559 __libc_multiple_threads.
2560 (__libc_pthread_init): Return pointer to __libc_pthread_init if
2561 necessary.
2562
2563 * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
2564 (THREAD_SETMEM_NC): Likewise.
2565
2566 * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
2567 * sysdeps/x86_64/pthread_spin_trylock.S: New file.
2568 * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
2569 * sysdeps/x86_64/pthread_spin_unlock.S: New file.
2570
2571 * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
2572 Eliminate one entire instruction.
2573
32a589b1
UD
2574 * cancellation.c (__pthread_enable_asynccancel_2): New function.
2575 * pthreadP.h: Declare __pthread_enable_asynccancel_2.
2576 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2577 (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
2578 instead of __pthread_enable_asynccancel.
2579 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
2580 (__pthread_cond_wait): Likewise.
2581 * sysdeps/pthread/pthread_cond_timedwait.c
2582 (__pthread_cond_timedwait): Likewise.
2583 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
2584
3e976b96
UD
2585 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
2586 (__condvar_cleanup): Wake up all waiters in case we got signaled
2587 after being woken up but before disabling asynchronous
2588 cancellation.
2589 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
2590 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2591 (__condvar_cleanup): Likewise.
2592
2593 * init.c (__NR_set_tid_address): If already defined, don't redefine.
2594 Make it an error if architecture has no #if case. Add x86-64.
2595
2596 * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
2597 pt-initfini.s generation.
2598
2599 * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
2600 (TLS_INIT_TP): Fix typo.
2601
6c477888
UD
26022003-03-11 Jakub Jelinek <jakub@redhat.com>
2603
2604 * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
2605 3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
2606
2607 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
2608 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
2609 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
2610 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
2611 * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
2612 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
2613 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
2614 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
2615
ea694823
UD
26162003-03-11 Ulrich Drepper <drepper@redhat.com>
2617
6c477888
UD
2618 * sysdeps/pthread/pthread_cond_timedwait.c
2619 (__pthread_cond_timedwait): Return the result of the final
2620 locking. If it succeeds, the regular function return value.
2621
2622 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
2623 Return result of the final locking.
2624 * version.c (__nptl_main): Work around problems with the strange
2625 INTERNAL_SYSCALL macro on ppc32.
2626 * init.c (__pthread_initialize_minimal_internal): Unblock
2627 SIGCANCEL in case the parent blocked it.
2628 Reported by Paul Mackerras <paulus@samba.org>.
2629
ea694823
UD
2630 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
2631 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
2632 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
2633
b33e6163
RM
26342003-03-11 Jakub Jelinek <jakub@redhat.com>
2635
2636 * sysdeps/pthread/pthread_cond_timedwait.c
2637 (__pthread_cond_timedwait): Unlock and fail if
2638 __pthread_mutex_unlock_internal failed.
2639
2640 * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
2641 (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
2642 Use ARCH_CLONE.
2643 * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
2644 [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
2645 STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
2646 ALLOCATE_STACK): New macros.
2647 (TLS_TPADJ): New macro.
2648 (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
2649 (allocate_stack): Handle TLS_DTV_AT_TP and
2650 NEED_SEPARATE_REGISTER_STACK. Use TLS_TPADJ.
2651 * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
2652 Don't set PD->self.
2653 * init.c [__ia64__] (__NR_set_tid_address): Define.
2654
2655 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
2656 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
2657 * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
2658 * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
2659 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
2660 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
2661 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
2662 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
2663 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
2664 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
2665 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
2666 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
2667 * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
2668 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
2669 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
2670 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
2671 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
2672 * sysdeps/ia64/bits/atomic.h: New file.
2673 * sysdeps/ia64/Makefile: New file.
2674 * sysdeps/ia64/pthread_spin_init.c: New file.
2675 * sysdeps/ia64/pthread_spin_lock.c: New file.
2676 * sysdeps/ia64/pthread_spin_trylock.c: New file.
2677 * sysdeps/ia64/pthread_spin_unlock.c: New file.
2678 * sysdeps/ia64/pthreaddef.h: New file.
2679 * sysdeps/ia64/tcb-offsets.sym: New file.
2680 * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
2681 * sysdeps/ia64/tls.h: New file.
2682
2683 * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
2684 to syscall instead of no arguments.
2685
2b30b2e5
UD
26862003-03-10 Ulrich Drepper <drepper@redhat.com>
2687
db5f2fc9
UD
2688 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
2689 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
2690 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
2691 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
2692
2693 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
2694 unused code.
2695
6a4263e3
UD
2696 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
2697
3de7c2a9
UD
2698 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
2699 lowlevelbarrier.sym.
2700 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
2701 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
2702 Include lowlevelbarrier.h and don't define offsets locally.
6a4263e3 2703 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
3de7c2a9 2704
2a544d82
UD
2705 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2706 (__lll_mutex_lock_wait): Reverse order of first two parameters.
2707 (__lll_mutex_timedlock_wait): Likewise.
2708 (lll_mutex_lock): Adjust asm for that.
2709 (lll_mutex_timedlock): Likewise. Mark cx, cc, r10 as clobbered.
2710 (lll_lock): Adjust asm for operand order change.
2711 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
2712 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
2713
ec06436c
UD
2714 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
2715 Reverse order of parameters.
2716 (__lll_timedwait_tid): Remove regparms attribute.
2717 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
2718 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
2719
3273832c
UD
2720 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
2721 (__lll_timedwait_tid): Remove one unnecessary instruction.
2722
51f32ab8
UD
2723 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
2724 __lll_mutex_timedlock_wait only for NOT_IN_libc.
2725 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
2726 lowlevelmutex.S.
2727
2728 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
2729 lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
2730 for NOT_IN_libc.
2731 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
2732 lowlevellock.S.
2733
fad48d9e
UD
2734 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
2735 LOCK is already defined. Don't define __lll_mutex_timedlock_wait
2736 for libc.so.
2737 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
2738 define LOCK here (if UP is not defined). The actual code is in
2739 lowlevelmutex.S.
2740
9356d063
UD
2741 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
2742 LOCK is already defined. Don't define lll_unlock_wake_cb and
2743 __lll_timedwait_tid for libc.so.
2744 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
2745 define LOCK here (if UP is not defined). The actual code is in
2746 lowlevellock.S.
2747
ebf0cbc5 2748 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
106f6f9d
UD
2749 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
2750 * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
2751 instead of lowlevelsem.h.
2752 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
2753 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
2754 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
0be8ee21 2755
c915e5ad
UD
2756 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
2757 lowlevelrwlock.sym.
2758 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
2759 * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
146fa1ee 2760 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
c915e5ad 2761
4c3c2e8a
UD
2762 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
2763 register loading.
2764 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
2765 last changed. D'oh.
2766
2b30b2e5
UD
2767 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
2768
2769 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
2770 of __libc_locking_needed.
2771 (lll_trylock): Initialize %eax to zero.
2772
2b30b2e5
UD
2773 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
2774 pthread_cond_t definition.
2775
e48f9638
RM
27762003-03-10 Roland McGrath <roland@redhat.com>
2777
2778 * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
2779 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
2780 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
2781 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
2782 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
2783
2784 * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
2785 Instead of setting PD->multiple_threads, set globals
2786 __pthread_multiple_threads and __libc_multiple_threads.
2787 * sysdeps/pthread/createthread.c (create_thread): Likewise.
2788 * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
2789 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
2790
2791 * descr.h (struct pthread): Conditionalize first member on
2792 [!TLS_DTV_AT_TP]. Replace the `header' member with an anonymous union
2793 containing an anonymous tcbhead_t. Move `list' member out.
2794 [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
2795 * allocatestack.c: Remove use of `header.data.' prefix.
2796 * pthread_create.c: Likewise.
2797 * init.c (__pthread_initialize_minimal_internal): Likewise.
2798 * sysdeps/pthread/createthread.c (create_thread): Likewise.
2799 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
2800 (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
2801 * sysdeps/x86_64/tls.h: Likewise.
2802 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
2803 (SINGLE_THREAD_P): Likewise.
2804 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
2805 (SINGLE_THREAD_P): Likewise.
2806 * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
2807 * sysdeps/s390/tls.h (tcbhead_t): Likewise.
2808
c37cae9e
UD
28092003-03-09 Ulrich Drepper <drepper@redhat.com>
2810
d38c777e
RM
2811 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
2812
7b44a5e0 2813 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
2b30b2e5 2814 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
7b44a5e0 2815
c2e5e085
UD
2816 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
2817 leftovers from the ia32 code.
2818
2819 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
2820 memory load.
2821 (clear_once_control): Don't load %esi.
2822
2823 * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
2824 handling.
2825
2826 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
2827
cd4b2a55
UD
2828 * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
2829 * sysdeps/unix/sysv/linux/createthread.c: ...here.
2830
c37cae9e
UD
2831 * Makefile (tests): Add tst-cond10.
2832 * tst-cond10.c: New file.
2833
d130a341
UD
28342003-03-08 Ulrich Drepper <drepper@redhat.com>
2835
ccf1d573
UD
2836 * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
2837 * tst-signal3.c (do_test): Likewise.
2838 * tst-sem5.c (do_test): Likewise.
2839 * tst-kill6.c (do_test): Likewise.
2840 * tst-tls3.c (do_test): Likewise. Include <errno.h>.
2841
2842 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
2843 of inc/dec.
2844 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
2845 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
2846 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2847 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
2848 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2849 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2850 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2851 Likewise.
2852 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2853 Likewise.
2854 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2855 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2856 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2857 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
2858 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
2859 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
2860 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
2861 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2862
d130a341
UD
2863 * allocatestack.c (allocate_stack): If mprotect() fails free the
2864 TLS memory.
2865
bc6389ad
UD
28662003-03-07 Ulrich Drepper <drepper@redhat.com>
2867
41d4d223
UD
2868 * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
2869
2870 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
2871 lll_wake_tid. This was used only to work around kernel limits in
2872 the early days.
2873 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2874 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
2875 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
2876 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
2877
bc6389ad
UD
2878 * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
2879 (__pthread_initialize_minimal_internal): Change initialization of
2880 __static_tls_align_m1 appropriately.
2881 * pthreadP.h (__static_tls_align_m1): Renamed from
2882 __static_tls_align.
2883 * allocatestack.c (allocate_stack): Use __static_tls_align_m1
2884 instead of __static_tls_align-1.
2885
cc775edf
UD
28862003-03-04 Ulrich Drepper <drepper@redhat.com>
2887
0de28d5c 2888 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
6245b6ae 2889
518b5308
UD
2890 * pthread_create.c: Define __pthread_keys using nocommon
2891 attribute, not by placing it explicitly in bss.
2892 Remove DEFINE_DEALLOC definition. Not needed anymore.
2893
2894 * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
2895 Use it in mmap call to allocate stacks.
2896
2897 * sysdeps/pthread/createthread.c (create_thread): Fix comment.
2898
cc775edf
UD
2899 * pthread_create.c (start_thread): Use THREAD_SETMEM to store
2900 result of the thread function.
2901
4f6f0a8f
UD
29022003-03-03 Ulrich Drepper <drepper@redhat.com>
2903
f04a2721
UD
2904 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed. The generic
2905 version is just fine.
2906
4f6f0a8f
UD
2907 * sysdeps/unix/sysv/linux/libc_pthread_init.c
2908 (__pthread_child_handler): Renamed from pthread_child_handler,
2909 exported, and marked hidden. Change all users.
2910 * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
2911 free __pthread_child_handler from child list.
2912
7ce5c164
UD
29132003-03-03 Martin Schwidefsky <schwidefsky@de.ibm.com>
2914
2915 * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
2916
2917 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
2918 Fix handling of cancellation and failing pthread_mutex_unlock call.
2919 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
2920 (__pthread_cond_wait): Likewise.
2921
2922 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
2923 (pthread_rwlock_timedrdlock): Fix clobber of result variable by
2924 lll_futex_timed_wait call.
2925 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2926 (pthread_rwlock_timedwrlock): Likewise.
2927
2928 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
2929 Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
2930 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
2931
2932 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
2933 check of lll_futex_wake return value.
2934
ea6a015b
RM
29352003-03-03 Roland McGrath <roland@redhat.com>
2936
2937 * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
2938
2939 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
2940 Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
2941 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
2942
4adacf57
UD
29432003-03-02 Ulrich Drepper <drepper@redhat.com>
2944
1be3d664
UD
2945 * sysdeps/pthread/timer_create.c (timer_create): Return correct
2946 error for CPU clocks.
2947
885bafa1
UD
2948 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2949 _POSIX_MONOTONIC_CLOCK.
2950 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2951
4adacf57
UD
2952 * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
2953 recent kernels.
2954
86bfff4d
UD
29552003-03-01 Ulrich Drepper <drepper@redhat.com>
2956
2957 * descr.h (struct pthread): Move cleanup field to the front.
2958
d1149385
RM
29592003-03-01 Roland McGrath <roland@redhat.com>
2960
2961 * sem_open.c (sem_open): Braino fix.
2962
bd8bb78b
UD
29632003-03-01 Ulrich Drepper <drepper@redhat.com>
2964
748bec08
UD
2965 * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
2966 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
2967 __pthread_cleanup_pop functionality.
2968 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2969
bd8bb78b
UD
2970 * descr.h (struct pthread): Move tid field to the front now that
2971 it is often used.
2972
2973 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
2974 (__lll_mutex_timedlock_wait): Remove.
2975 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
2976 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
2977 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
2978 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
2979 (lll_unlock_wake_cb): Don't save and restore %esi.
2980 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
2981 %esi.
2982 (__lll_timedwait_tid): Add alignment.
2983 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
2984 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
2985 %esi.
2986 (__lll_timedwait_tid): Removed.
2987 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
2988 (__pthread_cond_broadcast): Don't save, load, and restore %esi.
2989 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
2990 (pthread_barrier_wait): Don't save, load, and restore %esi for
2991 last thread.
2992 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
2993 (__pthread_cond_signal): Don't save, load, and restore %esi.
2994 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
2995 (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
2996 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
2997 Don't save, load, and restore %esi.
2998
d2637c70
UD
29992003-02-27 Ulrich Drepper <drepper@redhat.com>
3000
567fb22a
UD
3001 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
3002 Release lock before waking up the waiters.
3003
427f5fa1
UD
3004 * tst-exit1.c (do_test): Don't start more than one thread in parallel.
3005
a2d83cfb
UD
3006 * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
3007 (reader_thread): Likewise.
3008
d2637c70
UD
3009 * sysdeps/pthread/pthread_rwlock_unlock.c
3010 (__pthread_rwlock_unlock): Release internal lock early. Don't try
3011 to wake up readers if there are none.
3012
3013 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
3014 Release internal lock before wake threads.
3015
b1531183
UD
30162003-02-26 Ulrich Drepper <drepper@redhat.com>
3017
dbf6131c
UD
3018 * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
3019 * tst-rwlock8.c: Initialize lock with INIT. Allow INIT to be
3020 predefined.
3021 * tst-rwlock9.c: Likewise.
3022 * tst-rwlock10.c: New file.
3023 * tst-rwlock11.c: New file.
3024
695799fe
UD
3025 * Makefile (tests): Add tst-dlsym1.
3026 * tst-dlsym1.c: New file.
3027
b1531183
UD
3028 * init.c (__pthread_initialize_minimal_internal): Set
3029 GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
3030 * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
3031
3724f268
UD
30322003-02-24 Ulrich Drepper <drepper@redhat.com>
3033
3857ca78
UD
3034 * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
3035
80d80779
UD
3036 * tst-cond2.c: Fix sychronization with child.
3037
86371308
UD
3038 * tst-rwlock8.c (reader_thread): Remove unused variable.
3039
ffeb4481
UD
3040 * Makefile: Add rules to build and run tst-tls3.
3041 * tst-tls3.c: New file.
3042 * tst-tls3mod.c: New file.
3043
3724f268
UD
3044 * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
3045 * tst-rwlock8.c: New file.
3046 * tst-rwlock9.c: New file.
3047 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
3048 complete broken rwlock implementation.
3049 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3050 Likewise.
3051 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3052 Likewise.
3053 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
3054 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
18a53579
UD
3055 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
3056 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
3057 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
3058 * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
3059 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
3724f268 3060
8915cc40
RM
30612003-02-23 Roland McGrath <roland@redhat.com>
3062
3063 * Makefile (nptl-version): Change regexp so case sensitivity is ok.
3064
fd1a0d0c
UD
30652003-02-23 Ulrich Drepper <drepper@redhat.com>
3066
ecf28959
UD
3067 * Makefile (tests): Add tst-context1.
3068 * tst-context1.c: New file.
3069
5e47b76b
UD
3070 * Makefile (tests): Add tst-tls1 and tst-tls2.
3071 * tst-tls1.c: New file.
3072 * tst-tls2.c: New file.
3073
5a6bbb41
UD
3074 * libc-cancellation.c (__libc_enable_asynccancel): Correct test
3075 for failed cmpxchg.
3076
fd1a0d0c
UD
3077 * pthread_create.c (start_thread): Set EXITING_BIT early.
3078
3079 * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
3080 (THREAD_GETMEM_NC): Likewise.
3081
757f9fcb
UD
30822003-02-22 Ulrich Drepper <drepper@redhat.com>
3083
b1b8e747
UD
3084 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
3085 off 3 more bytes by using offset-less instructions when possible.
3086
c780aa21 3087 * Makefile: Add dependency for $(objpfx)version.d.
757f9fcb
UD
3088
3089 * eintr.c (eintr_source): Add unnecessary return but the compiler
3090 insists.
3091
3092 * tst-kill3.c: Include <unistd.h>.
3093
5148559c
RM
30942003-02-21 Roland McGrath <roland@redhat.com>
3095
3096 * pthread_create.c (start_thread): Call __libc_thread_freeres.
3097
ab2d98e3
UD
30982003-02-21 Ulrich Drepper <drepper@redhat.com>
3099
71028edd
UD
3100 * Makefile (tests): Add tst-eintr1.
3101 (distribute): Add eintr.c.
3102 * tst-eintr1.c: New file.
3103 * eintr.c: New file.
3104
e814f748
UD
3105 * pthread_cancel.c (pthread_cancel): Use tkill directly.
3106
3107 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
3108 Disallow sending SIGCANCEL.
3109
ab2d98e3 3110 * Makefile (tests): Remove tst-basic7. Add tst-kill1, tst-kill2,
9c03686d 3111 tst-kill3, tst-kill4, tst-kill5, tst-kill6.
e814f748
UD
3112 * tst-kill1.c: New file.
3113 * tst-kill2.c: New file.
3114 * tst-kill3.c: New file.
3115 * tst-kill5.c: New file.
9c03686d 3116 * tst-kill6.c: New file.
e814f748
UD
3117 * tst-basic7.c: Renamed to...
3118 * tst-kill4.c: ...this.
ab2d98e3 3119
59fed0e2
RM
31202003-02-21 Roland McGrath <roland@redhat.com>
3121
3122 * Makefile (install-lib-ldscripts): New variable.
3123
49dc759f
UD
31242003-02-21 Ulrich Drepper <drepper@redhat.com>
3125
8c2e9a29
UD
3126 * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
3127 * pthread_cancel.c: Use INVALID_TD_P.
3128 * pthread_detach.c: Likewise.
3129 * pthread_getschedparam.c: Likewise.
3130 * pthread_setschedparam.c: Likewise.
3131 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
3132 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
3133 * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
3134 * pthread_timedjoin.c: Likewise.
3135
3136 * tst-basic7.c: Include <signal.h>.
3137
49dc759f
UD
3138 * pthread_join.c (pthread_join): Limited checking for invalid
3139 descriptors.
3140 * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
3141
df5803bf
UD
31422003-02-20 Ulrich Drepper <drepper@redhat.com>
3143
c5acd3d7
UD
3144 * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
3145 beginning of the loop. Clear the entire first block of TSD.
df5803bf
UD
3146 * Makefile (tests): Add tst-key4.
3147 * tst-key4.c: New file.
3148
729924a0
UD
31492003-02-18 Ulrich Drepper <drepper@redhat.com>
3150
2f7dc594
UD
3151 * Makefile (tests): Add tst-basic7.
3152 * tst-basic7.c: New file.
3153
ba25bb0f
UD
3154 * pthread_create.c (deallocate_tsd): Mark as internal_function.
3155 Add some more __builtin_expect.
3156
12fd3c5f 3157 * pthreadP.h: Define dummy version of DEBUGGING_P.
729924a0 3158
5430d926
UD
31592003-02-17 Ulrich Drepper <drepper@redhat.com>
3160
b0db7fbe
UD
3161 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
3162 _POSIX_THREAD_PRIORITY_SCHEDULING.
3163 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
3164 _XOPEN_REALTIME_THREADS.
3165 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
3166
3167 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
3168 kernel returns EINVAL for PID <= 0, work around it.
3169
ecfda9bd
UD
3170 * Makefile (tests): Add tst-signal5.
3171 * tst-signal5.c: New file.
3172
7d78ab99
UD
3173 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
3174 and LOGIN_NAME_MAX.
3175
371a2972
UD
3176 * tst-cancel1.c (tf): Block all signals.
3177
5430d926
UD
3178 * Makefile (tests): Add tst-basic6.
3179 * tst-basic6.c: New file.
3180
3181 * tst-basic1.c: Add test for process ID.
3182
3183 * Makefile (tests): Add tst-cancel10.
3184 * tst-cancel10.c: New file.
3185
3186 * Makefile (tests): Add tst-signal4.
3187 * tst-signal4.c: New file.
3188
3189 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
3190 __sigismember instead of sigismember. Add __builtin_expect.
3191
1564916a
UD
31922003-02-16 Ulrich Drepper <drepper@redhat.com>
3193
179ff175
UD
3194 * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
3195 pthread_setcancelstate, and pthread_rwlock_setpshared.
3196
e4335f9a
UD
3197 * tst-cancel7.c (do_test): Make sure the pid file exists before
3198 canceling the thread.
3199
0a37669a
UD
3200 * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
3201 pthread_rwlock_timedrdlock tests.
3202 * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
3203 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3204 Check for invalid tv_nsec field.
3205 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3206 Likewise.
3207
3208 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
3209 recursive mutex of overflow.
3210
3211 * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
3212
e4335f9a 3213 * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
1564916a
UD
3214 going into an endless loop.
3215 * Makefile (tests): Add tst-cancel9.
3216 * tst-cancel9.c: New file.
3217
3218 * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
3219
b270b548
UD
32202003-02-15 Ulrich Drepper <drepper@redhat.com>
3221
1c82b97f
UD
3222 * tst-mutex5.c (do_test): Add more timedlock tests.
3223
b2f05465 3224 * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
c3bb9ee1
UD
3225 * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
3226
e798b60f
UD
3227 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
3228 use INLINE_SYSCALL. Error number is returned, not -1.
3229
90491dc4
UD
3230 * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
3231 and __deallocate_stack with internal_function.
3232 * pthread_create.c: Adjust definitions appropriately.
3233 * allocatestack.c: Likewise.
3234
3235 * pthread_join.c: Add one more __builtin_expect.
3236 * pthread_timedjoin.c: Likewise.
3237
3238 * pthread_getspecific.c (__pthread_getspecific): Clear data->data
3239 not data of sequence number does not match.
3240 Add one __builtin_expect.
3241
c6247c9d
UD
3242 * Makefile (tests): Add tst-clock1.
3243 * tst-clock1.c: New file.
3244
b270b548
UD
3245 * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
3246 negative arguments.
3247 * Makefile (tests): Add tst-basic5.
3248 * tst-basic5.c: New file.
3249
700bf7af
UD
32502003-02-14 Ulrich Drepper <drepper@redhat.com>
3251
757de559
UD
3252 * Makefile (tests): Add tst-basic4.
3253 * tst-basic4.c: New file.
3254
47202270
UD
3255 * pthreadP.h: Add declaraction for __nptl_nthreads.
3256 * pthread_create.c: Define __nptl_nthreads
3257 (start_thread): Increment __nptl_nthreads at beginning. Decrement
b270b548 3258 after thread is done. If then zero, call exit(0).
47202270
UD
3259 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3260 Add ptr_nthreads. Define HAVE_PTR_NTHREADS.
3261 * init.c (pthread_functions): Initialize ptr_nthreads.
3262 * allocatestack.c (nptl_nthreads): Remove definition and all uses.
3263 (__reclaim_stacks): Decrement __nptl_nthreads.
3264 * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
3265 Define.
3266 * Makefile (tests): Add tst-basic3.
3267 * tst-basic3.c: New file.
3268
e320ef46
UD
3269 * descr.h: Define CANCELING_BIT and CANCELING_BITMASK. Introduce
3270 after CANCELTYPE_BIT, move the other bits up. Update CANCEL_RESTMASK.
3271 * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
3272 * pthread_cancel.c (pthread_cancel): Likewise. Also set CANCELING_BIT
3273 if asynchronous canceling is enabled.
3274 * pthread_join.c (pthread_join): When recognizing circular joins,
3275 take into account the other thread might be already canceled.
3276 * Makefile (tests): Add tst-join5.
3277 * tst-join5.c: New file.
3278
700bf7af
UD
3279 * Makefile (tests): Add tst-join4.
3280 * tst-join4.c: New file.
3281
32822003-02-13 Ulrich Drepper <drepper@redhat.com>
3283
3284 * tst-cond4.c (main): Add test of pthread_attr_getpshared.
3285
dac0f772
UD
32862003-02-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
3287
3288 * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
3289 THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
3290 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
3291 warning.
3292 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
3293 to avoid warning.
3294 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
3295 error if lll_futex_wake failed.
3296
e8cda341
UD
32972003-02-13 Ulrich Drepper <drepper@redhat.com>
3298
a7720b5e
UD
3299 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
3300 handling of cancellation and failung pthread_mutex_unlock call.
3301 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3302 * Makefile (tests): Add tst-cond8 and tst-cond9.
3303 * tst-cond8.c: New file.
3304 * tst-cond9.c: New file.
3305
a1ea4c06
UD
3306 * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
3307
3308 * sysdeps/pthread/pthread.h: Add missing initializers. Protect
3309 non-standard initializers with __USE_GNU.
3310
e8cda341
UD
3311 * Makefile (tests): Add tst-cleanup3.
3312 * tst-cleanup3.c: New file.
3313
2067577c
UD
33142003-02-12 Ulrich Drepper <drepper@redhat.com>
3315
89e78a95
UD
3316 * Makefile (tests): Add tst-attr1 and tst-attr2.
3317 * tst-attr1.c: New file.
3318 * tst-attr2.c: New file.
3319
dfdd294a
UD
3320 * Makefile: Add rules to build and run tst-atfork2 test.
3321 * tst-atfork2.c: New file.
3322 * tst-atfork2mod.c: New file.
3323
3324 * sysdeps/unix/sysv/linux/unregister-atfork.c
3325 (__unregister_atfork): Free the memory allocated for the handlers
3326 after removing them from the lists.
3327
3328 * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
3329 cleanup function.
3330
3331 * tst-atfork1.c (do_test): Wait for the child we forked.
3332 Report error in child.
3333
3334 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
3335
2067577c
UD
3336 * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
3337
2a8a8a84
UD
33382003-02-10 Ulrich Drepper <drepper@redhat.com>
3339
d9dd121e
UD
3340 * Makefile (tests): Add tst-cancel8.
3341 * tst-cancel8.c: New file.
3342
2a8a8a84
UD
3343 * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
3344 clearing of control variable.
defd1870 3345 * Makefile (tests): Add tst-once3 and tst-once4.
2a8a8a84 3346 * tst-once3.c: New file.
defd1870 3347 * tst-once4.c: New file.
2a8a8a84 3348
a54e8d33
UD
33492003-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
3350
3351 * sysdeps/sh/Makefile: New file.
3352 * sysdeps/sh/bits/atomic.h: New file.
3353 * sysdeps/sh/pthread_spin_init.c: New file.
3354 * sysdeps/sh/pthread_spin_lock.c: New file.
3355 * sysdeps/sh/pthread_spin_trylock.S: New file.
3356 * sysdeps/sh/pthread_spin_unlock.S: New file.
3357 * sysdeps/sh/pthreaddef.h: New file.
3358 * sysdeps/sh/tcb-offsets.sym: New file.
3359 * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
3360 * sysdeps/sh/tls.h: New file.
3361 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
3362 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
3363 * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
3364 * sysdeps/unix/sysv/linux/sh/fork.c: New file.
3365 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
3366 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
3367 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
3368 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
3369 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
3370 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
3371 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
3372 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
3373 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
3374 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
3375 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
3376 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
3377 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
3378 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
3379 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
3380 * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
3381 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
3382 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
3383 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
3384 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
3385 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
3386 * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
3387 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
3388 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
3389 * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
3390 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
3391
696e556e
UD
33922003-02-08 Ulrich Drepper <drepper@redhat.com>
3393
3394 * tst-cond2.c: Rearrange code to not rely on behavior undefined
3395 according to POSIX.
3396
3397 * tst-basic2.c (do_test): Lock mutex before creating the thread.
3398
fef710d6
UD
33992003-02-07 Ulrich Drepper <drepper@redhat.com>
3400
c6180643
UD
3401 * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
3402 (TLS_GET_FS): New #define.
3403 (TLS_SET_FS): New #define.
3404 Correct value of __NR_set_thread_area.
3405
fef710d6
UD
3406 * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
3407
11090a99
UD
34082003-02-06 Ulrich Drepper <drepper@redhat.com>
3409
65c68990
UD
3410 * Makefile (tests): Add tst-popen1.
3411 * tst-popen1.c: New file.
3412
11090a99
UD
3413 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
3414 but inactive generalization.
3415 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3416 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
3417 Minor optimization, remove one instruction.
3418 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
3419
a88c9263
UD
34202003-02-04 Martin Schwidefsky <schwidefsky@de.ibm.com>
3421
3422 * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
3423
34242003-01-31 Martin Schwidefsky <schwidefsky@de.ibm.com>
3425
3426 * init.c (__NR_set_tid_address): Add #ifdef for s390.
3427 * sysdeps/pthread/pthread_barrier_wait.c: New file.
3428 * sysdeps/pthread/pthread_cond_broadcast.c: New file.
3429 * sysdeps/pthread/pthread_cond_signal.c: New file.
3430 * sysdeps/pthread/pthread_cond_timedwait.c: New file.
3431 * sysdeps/pthread/pthread_cond_wait.c: New file.
3432 * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
3433 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
3434 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
3435 * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
3436 * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
3437 * sysdeps/s390/Makefile: New file.
3438 * sysdeps/s390/bits/atomic.h: New file.
3439 * sysdeps/s390/pthread_spin_init.c: New file.
3440 * sysdeps/s390/pthread_spin_lock.c: New file.
3441 * sysdeps/s390/pthread_spin_trylock.c: New file.
3442 * sysdeps/s390/pthread_spin_unlock.c: New file.
3443 * sysdeps/s390/pthreaddef.h: New file.
3444 * sysdeps/s390/tcb-offsets.sym: New file.
3445 * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
3446 * sysdeps/s390/tls.h: New file.
3447 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
3448 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
3449 * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
3450 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
3451 * sysdeps/unix/sysv/linux/s390/fork.c: New file.
3452 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
3453 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
3454 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
3455 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
3456 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
3457 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
3458 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
3459 * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
3460 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
3461 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
3462 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
3463 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
3464 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
3465 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
3466 * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
3467 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
3468 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
3469 * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
3470
6f1cff95
UD
34712003-02-04 Ulrich Drepper <drepper@redhat.com>
3472
ec609a8e
UD
3473 * atomic.h: Add a couple more default implementations.
3474 (atomic_compare_and_exchange_acq): Use
d45e8740
UD
3475 __arch_compare_and_exchange_32_acq in return value definition. It
3476 always exists.
3477 (atomic_bit_set): Renamed from atomic_set_bit.
0289bef9 3478 Add missing atomic_ prefixes.
e3ec8904 3479
6f1cff95
UD
3480 * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
3481 thread library is available, use correct value to mark initialized
3482 once variable.
3483
4f088329
UD
34842003-02-03 Ulrich Drepper <drepper@redhat.com>
3485
6f1cff95
UD
3486 * allocatestack.c (allocate_stack): Use __getpagesize instead of
3487 __sysconf to determine pagesize.
3488
3e4fc359 3489 * pthread_create.c: Include <atomic.h>.
4f088329
UD
3490 * allocatestack.c (allocate_stack): Implement coloring of the
3491 allocated stack memory. Rename pagesize to pagesize_m1. It's the
3492 size minus one. Adjust users.
3e4fc359 3493 * sysdeps/i386/i686/Makefile: New file.
4f088329 3494
2f42e8be
UD
34952003-02-02 Ulrich Drepper <drepper@redhat.com>
3496
4301f7e2
UD
3497 * allocatestack.c: Improve comment throughout the file.
3498
2f42e8be 3499 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
a37818b3 3500 (__lll_lock_wait): Add branch prediction.
2f42e8be
UD
3501 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
3502 (__lll_lock_wait): Likewise.
3503 (lll_unlock_wake_cb): Removed.
3504
4a7d6545
UD
35052003-01-31 Ulrich Drepper <drepper@redhat.com>
3506
3507 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
3508 _POSIX_THREAD_PRIORITY_SCHEDULING.
3509
886d5973
UD
35102003-01-30 Jakub Jelinek <jakub@redhat.com>
3511
3512 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3513 Fix return type of ptr___pthread_getspecific.
3514
e474ca78
UD
35152003-01-29 Ulrich Drepper <drepper@redhat.com>
3516
3517 * Makefile (tests): Add tst-umask1.
3518 (tst-umask1-ARGS): Define.
3519 * tst-umask1.c: New file.
3520
e6ebd2e4
UD
35212003-01-28 Ulrich Drepper <drepper@redhat.com>
3522
6cf26f41
UD
3523 * Makefile (libpthread-routines): Remove lowlevelrwlock. Add
3524 pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
3525 pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
3526 pthread_rwlock_unlock.
3527 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
3528 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
3529 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
3530 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
3531 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3532 New file.
3533 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
3534 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3535 New file.
3536 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
3537 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
3538 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
3539 New file.
3540 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
3541 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
3542 New file.
3543 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
3544 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
3545 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
3546 New file.
3547 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
3548 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
3549 New file.
3550 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
3551
1d087a7e
UD
3552 * Makefile (libpthread-routines): Remove lowlevelcond and
3553 lowlevelsem. Add sem_wait, sem_trywait, sem_timedwait, sem_post,
3554 pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
3555 and pthread_cond_broadcast.
4a99d160
UD
3556 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
3557 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
3558 * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
3559 * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
3560 * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
3561 * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
3562 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
3563 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
3564 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
3565 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
3566 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
3567 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
3568 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
3569 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
3570 * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
3571 * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
3572 * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
3573 * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
3574 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
3575 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
3576 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
3577 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
3578 * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
3579 * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
3580 * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
3581 * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
3582 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
3583 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
3584 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
3585 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
3586 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
1d087a7e 3587
e6ebd2e4
UD
3588 * sysdeps/unix/sysv/linux/i386/createthread.c: Define
3589 PREPARE_CREATE and TLS_VALUE with x86-specific bits. All the rest
3590 of the code is moved to ...
3591 * sysdeps/pthread/createthread.c: ...here. New file.
3592
a15698cb
UD
35932003-01-27 Ulrich Drepper <drepper@redhat.com>
3594
0566b130
UD
3595 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
3596 (__new_sem_post): Clear %eax before returning.
3597 Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
3598
e6fb8846
UD
3599 * Makefile (tests): Add tst-cleanup2.
3600 * tst-cleanup2.c: New file.
3601
a15698cb
UD
3602 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
3603 Interpret first parameter correctly.
3604
8824b0a1
UD
36052003-01-17 Ulrich Drepper <drepper@redhat.com>
3606
3607 * Makefile (headers): Add bits/semaphore.h.
3608
850dcfca
UD
36092003-01-16 Jakub Jelinek <jakub@redhat.com>
3610
3611 * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
3612 if not SHARED.
3613
574b892e
UD
36142003-01-14 Ulrich Drepper <drepper@redhat.com>
3615
a8d87c92
UD
3616 * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
3617 must be used and mapping failed.
3618 Reported by Luke Elliott <luke.elliott@activfinancial.com>.
3619
574b892e
UD
3620 * Makefile (CFLAGS-pthread_self.os): Define this, not
3621 CFLAGS-pthread_self.c.
3622
fb48047a
UD
36232003-01-13 Ulrich Drepper <drepper@redhat.com>
3624
47805511
UD
3625 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
3626 lll_unlock_wake_cb.
3627
fb48047a
UD
3628 * Makefile (libpthread-routines): Add version. Add rules to build
3629 version.os and banner.h.
3630 * version.c: New file.
3631
115bb61d
UD
36322003-01-13 Jakub Jelinek <jakub@redhat.com>
3633
3634 * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
3635 the alias unconditional.
3636 * pthread_mutex_unlock.c (__pthread_mutex_unlock_internal): Likewise.
3637
36382003-01-13 Ulrich Drepper <drepper@redhat.com>
3639
3640 * Makefile (CFLAGS-pthread_self.c): New definition.
3641
6aca81bb
UD
36422003-01-06 Jakub Jelinek <jakub@redhat.com>
3643
3644 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
3645 INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
3646 * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
3647 * init.c (__pthread_initialize_minimal_internal): Likewise.
3648
e9c7764e
UD
36492003-01-07 Jakub Jelinek <jakub@redhat.com>
3650
b5facfda
UD
3651 * pthreadP.h (__pthread_cond_timedwait): Add prototype.
3652
e9c7764e
UD
3653 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
3654 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
3655 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
3656 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
3657 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
3658 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
3659
bef1e42f
UD
36602003-01-06 Jakub Jelinek <jakub@redhat.com>
3661
3662 * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
3663 * pt-system.c (LIBC_CANCEL_HANDLED): Add.
3664 * tst-cancel-wrappers.sh: Remove all exceptions.
3665
bbd17455
UD
36662003-01-05 Ulrich Drepper <drepper@redhat.com>
3667
a73ab6df
UD
3668 * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
3669 features. Reported by Marijn Ros <marijn@mad.scientist.com>.
3670
bbd17455
UD
3671 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
3672 Use __libc_pthread_functions array if SHARED.
3673
3674 * pthreadP.h: Move pthread_cond_2_0_t definition to...
3675 * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
3676
3677 * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
3678 (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
3679 __libc_key_create, __libc_getspecific, __libc_setspecific): Use
3680 __libc_ptf_call instead of __libc_maybe_call.
3681 (PTF): New #define.
3682 (__libc_cleanup_region_start): Wrap function name with PTF call.
3683 (__libc_cleanup_region_end): Likewise.
3684 (__libc_cleanup_end): Likewise.
3685
3686 * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
3687 * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
3688 * pthread_key_create.c: Add __pthread_key_create_internal alias.
3689 * pthreadP.h: Add prototypes.
3690
3691 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
3692 __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
3693 __pthread_rwlock_unlock aliases.
3694 * pthreadP.h: Add prototypes for new aliases.
3695
3696 * pthreadP.h (struct pthead_functions): Moved to...
3697 * sysdeps/pthread/pthread-functions.h: ...here. New file.
3698 * init.c (pthread_functions): Add initializers for new elements.
3699
3700 * cleanup_defer.c: Add __pthread_cleanup_push_defer and
3701 __pthread_cleanup_pop_restore aliases.
3702 * pthreadP.h: Add prototypes.
3703
3704 * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
3705 and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
3706 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
3707 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
3708 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
3709 * pthreadP.h: Adjust prototypes and callers.
3710
d27a78be
UD
37112003-01-04 Ulrich Drepper <drepper@redhat.com>
3712
b74121ae
UD
3713 * Makefile (tests): Add tst-cancel7.
3714 (tst-cancel7-ARGS): New variable.
bbd17455 3715 * tst-cancel7.c: New file.
b74121ae 3716
29bc410c
UD
3717 * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
3718 around gcc defficiencies.
3719 * old_pthread_cond_signal.c: Likewise.
3720 * old_pthread_cond_timedwait.c: Likewise.
3721 * old_pthread_cond_wait.c: Likewise.
3722
d27a78be
UD
3723 * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
3724
733f25e6
UD
37252003-01-03 Ulrich Drepper <drepper@redhat.com>
3726
7edb2ae3
UD
3727 * Makefile (tests): Add tst-cond7.
3728 * tst-cond7.c: New file.
3729
b1151300
UD
3730 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
3731 (condvar_cleanup): Get condvar address from the right place.
3732
733f25e6
UD
3733 * atomic.h: Correct definitions of atomic_full_barrier,
3734 atomic_read_barrier, atomic_write_barrier.
3735
3736 * old_pthread_cond_broadcast.c: Make memory allocate and initialization
3737 race-free.
3738 * old_pthread_cond_signal.c: Likewise.
3739 * old_pthread_cond_timedwait.c: Likewise.
3740 * old_pthread_cond_wait.c: Likewise.
3741
686b7223
UD
37422003-01-03 Jakub Jelinek <jakub@redhat.com>
3743
3744 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
3745
0e07706e
UD
37462003-01-03 Ulrich Drepper <drepper@redhat.com>
3747
997256dd
UD
3748 * pthreadP.h (pthread_cond_2_0_t): New type.
3749 (struct pthread_functions): Use new type for 2.0 condvar callbacks.
3750 Use new type for the 2.0 condvar function prototypes.
3751 * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
3752 * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
3753 parameter.
3754 * old_pthread_cond_destroy.c: Likewise.
3755 * old_pthread_cond_broadcast.c: Likewise. Lock appropriately.
3756 * old_pthread_cond_signal.c: Likewise.
3757 * old_pthread_cond_timedwait.c: Likewise.
3758 * old_pthread_cond_wait.c: Likewise.
3759
842d2817
UD
3760 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
3761 (__pthread_cond_wait): Don't save cancellation mode and seq value
3762 in same location.
3763
0e07706e
UD
3764 * herrno.c (__h_errno_location): Don't define as weak.
3765
bf293afe
UD
37662003-01-02 Jakub Jelinek <jakub@redhat.com>
3767
3768 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
3769 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
3770 and pthread_cond_wait.
3771 * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
3772 Renamed to...
3773 (__pthread_cond_broadcast_2_0): ... this.
3774 * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
3775 Renamed to...
3776 (__pthread_cond_destroy_2_0): ... this.
3777 * old_pthread_cond_init.c (__old_pthread_cond_init):
3778 Renamed to...
3779 (__pthread_cond_init_2_0): ... this.
3780 * old_pthread_cond_signal.c (__old_pthread_cond_signal):
3781 Renamed to...
3782 (__pthread_cond_signal_2_0): ... this.
3783 * old_pthread_cond_wait.c (__old_pthread_cond_wait):
3784 Renamed to...
3785 (__pthread_cond_wait_2_0): ... this.
3786 * pthread_cond_destroy.c: Include shlib-compat.h.
3787 (pthread_cond_destroy): Change strong_alias into versioned_symbol.
3788 * pthread_cond_init.c: Include shlib-compat.h.
3789 (pthread_cond_init): Change strong_alias into versioned_symbol.
3790 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
3791 fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
3792 fields.
3793 (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
3794 __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
3795 __pthread_cond_wait_2_0): New prototypes.
3796 (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
3797 __old_pthread_cond_init, __old_pthread_cond_signal,
3798 __old_pthread_cond_wait): Removed.
3799 * init.c: Include shlib-compat.h.
3800 (pthread_functions): Guard ptr___pthread_attr_init_2_0
3801 initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
3802 Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
3803 ptr___pthread_cond_*_2_0 fields.
3804 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
3805 pthread_cond_*@GLIBC_2.0 compatibility symbols.
3806
3807 * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
3808 LIBC_SIGACTION was not yet defined.
3809 [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
3810 [!defined LIBC_SIGACTION] (__sigaction): New function and
3811 libc_hidden_weak.
3812 [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
3813 [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
3814
38152003-01-02 Jakub Jelinek <jakub@redhat.com>
3816
3817 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
3818
05df18c3
UD
38192003-01-02 Ulrich Drepper <drepper@redhat.com>
3820
3821 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
3822 New, larger type definition.
3823 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
3824 implementation.
3825 * Versions [libpthread]: Add definitions for new pthread_cond_*
3826 interfaces for version GLIBC_2.3.2.
3827 * pthread_cond_init.c: Update initialization for new type definition.
3828 * Makefile (libpthread-routines): Remove pthread_cond_wait,
3829 pthread_cond_timedwait, pthread_cond_signal, and
3830 pthread_cond_broadcast. Add old_pthread_cond_init,
3831 old_pthread_cond_destroy, old_pthread_cond_wait,
3832 old_pthread_cond_timedwait, old_pthread_cond_signal, and
3833 old_pthread_cond_broadcast.
3834 * old_pthread_cond_broadcast.c: New file.
3835 * old_pthread_cond_destroy.c: New file.
3836 * old_pthread_cond_init.c: New file.
3837 * old_pthread_cond_signal.c: New file.
3838 * old_pthread_cond_timedwait.c: New file.
3839 * old_pthread_cond_wait.c: New file.
3840 * pthreadP.h: Add prototypes for the compatibility interfaces.
3841
3842 * pthread_cond_destroy.c: Don't include <errno.h>.
3843
fd8979e4
UD
38442003-01-01 Ulrich Drepper <drepper@redhat.com>
3845
3846 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
3847 unnecessary zero offset when addressing MUTEX.
3848
6d6ee629
UD
38492002-12-31 Ulrich Drepper <drepper@redhat.com>
3850
3851 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
3852 __register_atfork.
3853 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
3854 for __register_atfork.
3855
a4baf360
UD
38562002-12-31 Jakub Jelinek <jakub@redhat.com>
3857
3858 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
3859 instead of ASSEMBLER test macro.
3860
3861 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
3862 __libc_current_sigrtmax): Add libc_hidden_def.
3863
3864 * sysdeps/pthread/list.h: Remove assert.h include.
3865
e9395a94
UD
38662002-12-31 Ulrich Drepper <drepper@redhat.com>
3867
3868 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
3869 __pthread_initialize_minimal_internal not
3870 __pthread_initialize_minimal.
3871
89d6e444
UD
38722002-12-30 Ulrich Drepper <drepper@redhat.com>
3873
416d2de6
UD
3874 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
3875 __pthread_initialize_minimal as hidden.
3876
89d6e444
UD
3877 * init.c (__pthread_initialize_minimal_internal): Don't mark as
3878 constructor.
3879
38802002-12-31 Jakub Jelinek <jakub@redhat.com>
3881
3882 * Makefile ($(inst_libdir)/libpthread.so): Depend on
3883 $(common-objpfx)format.lds, include that into the output script.
3884 Fix comment.
3885 (extra-B-pthread.so): Change linuxthreads/ into nptl/.
3886
8cac677c
UD
38872002-12-28 Andreas Jaeger <aj@suse.de>
3888
3889 * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
3890 nsec resolution changes.
3891 (xstat64_conv): Likewise.
3892 (xstat32_conv): Likewise.
3893 * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
3894 struct kernel_stat.
3895 * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
3896 structs stat and stat64.
3897 * time/time.h (__timespec_defined): Define for __USE_MISC.
89d6e444 3898 * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
8cac677c 3899
49e9f864
UD
39002002-12-30 Jakub Jelinek <jakub@redhat.com>
3901
3902 * forward.c (FORWARD2): Renamed from FORWARD3. Remove unused export
3903 argument.
3904 (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
3905 (pthread_exit): Use strong_alias to avoid warnings.
3906 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
3907 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
3908 ptr___pthread_attr_init_2_*.
3909 * init.c (pthread_functions): Adjust.
3910
bab09b26
UD
39112002-12-29 Ulrich Drepper <drepper@redhat.com>
3912
598d7a42
UD
3913 * forward.c: Make all functions available by default again. It
3914 caused too much trouble.
3915
bab09b26
UD
3916 * pt-siglongjmp.c: Removed.
3917
3b7ed871
UD
39182002-12-28 Jakub Jelinek <jakub@redhat.com>
3919
3920 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
3921 (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
3922 * sysdeps/i386/Makefile: New file.
3923 * sysdeps/i386/tcb-offsets.sym: New file.
3924 * sysdeps/pthread/tcb-offsets.h: New file.
3925 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
3926 Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
3927
3928 * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
3929 __register_atfork...
3930 (GLIBC_2.3.2): ...here.
3931
39322002-12-28 Ulrich Drepper <drepper@redhat.com>
3933
3934 * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
3935 pthread_attr_setstackaddr with __attribute_deprecated__.
3936
270d9d47
UD
39372002-12-27 Jakub Jelinek <jakub@redhat.com>
3938
3939 * pt-system.c (system): Remove cancellation handling.
3940 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
3941 cancellation routines.
3942
131fd126
UD
39432002-12-28 Ulrich Drepper <drepper@redhat.com>
3944
afb2e954
UD
3945 * descr.h: Include <dl-sysdep.h>.
3946 (struct pthread): Move header.data.list to the back of the struct.
131fd126
UD
3947 * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
3948 (MULTIPLE_THREADS_OFFSET): Adjust offset.
3949 (SYSINFO_OFFSEET): Likewise.
3950
39512002-12-27 Jakub Jelinek <jakub@redhat.com>
3952
3953 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
3954 Define.
3955 (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
3956 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
3957 DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
3958 (USE_DL_SYSINFO): Undef.
3959
39602002-12-22 Jakub Jelinek <jakub@redhat.com>
3961
3962 * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
3963 $(common-objpfx)libc.so.
3964 * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
3965 it is bigger than pipe buffer size even on arches with bigger
3966 page size.
3967 (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
3968
a218c9cf
UD
39692002-12-25 Ulrich Drepper <drepper@redhat.com>
3970
3971 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
3972 correct errno access for case that USE___THREAD is not defined.
3973
015a2dc9
UD
39742002-12-24 Ulrich Drepper <drepper@redhat.com>
3975
3976 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
3977 Patch by Marijn Ros <marijn@mad.scientist.com>.
3978
5220f9ac
RM
39792002-12-22 Roland McGrath <roland@redhat.com>
3980
3981 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
3982
1561bf63
UD
39832002-12-20 Ulrich Drepper <drepper@redhat.com>
3984
3985 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
3986
3325198e
UD
39872002-12-19 Ulrich Drepper <drepper@redhat.com>
3988
057c823f
UD
3989 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
3990 NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
3991 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
3992
097eca29
UD
3993 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
3994 of int $0x80.
3995 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
3996 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
3997 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
3998 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
3999 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
4000 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
4001 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
4002 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
4003
4004 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
4005 sysenter.
4006 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
4007
4008 * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
4009
5f5843e3
UD
4010 * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
4011 in new TCB.
4012 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
4013 that sysinfo is properly initialized.
4014 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
4015 to 1 only for ld.so.
4016
3325198e
UD
4017 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
4018 RTLD_CORRECT_DYNAMIC_WEAK.
4019
74e8f2dc
UD
40202002-12-19 Jakub Jelinek <jakub@redhat.com>
4021
4022 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
4023 Use return 0 as 6th argument to FORWARD4.
4024 * pthread_equal.c: Include pthreadP.h instead of pthread.h.
4025
df45b31e
UD
40262002-12-18 Ulrich Drepper <drepper@redhat.com>
4027
4028 * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
4029 * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
4030 Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
4031 (INIT_SYSINFO): New #define.
4032 (TLS_TP_INIT): Use INIT_SYSINFO.
4033 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
4034 At test to make sure SYSINFO_OFFSET value is correct.
4035 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
4036
3d539579
UD
40372002-12-18 Jakub Jelinek <jakub@redhat.com>
4038
4039 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
4040 * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
4041 * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
4042 [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
4043 __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
4044 __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
4045 __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
4046
d7913e0e
UD
40472002-12-18 Ulrich Drepper <drepper@redhat.com>
4048
f051627f
UD
4049 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
4050 macro instead of using int $0x80 directly.
4051
d7913e0e
UD
4052 * sysdeps/pthread/bits/stdio-lock.h: New file.
4053 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
4054 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
4055 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
4056 * Makefile (routines): Add libc-lowlevelmutex.
4057
4058 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
4059 __i686.get_pc_thunk.dx.
4060
f077a4a9
UD
40612002-12-17 Jakub Jelinek <jakub@redhat.com>
4062
4063 * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
4064 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
4065 ($(objpfx)tst-cancel-wrappers.out): New rule.
4066 * tst-cancel-wrappers.sh: New test.
4067 * tst-locale1.c: Include signal.h.
4068 (uselocale): Test static linking of __libc_current_sigrt*.
4069
40702002-12-17 Ulrich Drepper <drepper@redhat.com>
4071
4072 * Makefile (tests): Add tst-cancel6.
4073 * tst-cancel6.c: New file
4074
bd499a3b
UD
40752002-12-17 Jakub Jelinek <jakub@redhat.com>
4076
4077 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
4078 Define meaningfully for assembler as well.
4079 * pthreadP.h (struct pthread_functions): Remove
4080 ptr_pthread_attr_init field. Add ptr_pthread_attr_init_2_0
4081 and ptr_pthread_attr_init_2_1 fields.
4082 * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
4083 and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
4084 * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
4085 (FORWARD3): Define using FORWARD4.
4086 (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
4087 versions.
4088 * pt-system.c: Remove duplicate stdlib.h include.
4089
0a1063f4
UD
40902002-12-16 Ulrich Drepper <drepper@redhat.com>
4091
87d60668
UD
4092 * sem_init.c: Define sem_init@GLIBC_2.0.
4093 * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
4094 * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
4095
0a1063f4
UD
4096 * flockfile.c: Moved to...
4097 * sysdeps/pthread/flockfile.c: ...here. New file.
4098 * funlockfile.c: Moved to...
4099 * sysdeps/pthread/funlockfile.c: ...here. New file.
4100 * ftrylockfile.c: Moved to...
4101 * sysdeps/pthread/ftrylockfile.c: ...here. New file.
4102
9634cf9d
UD
41032002-12-16 Jakub Jelinek <jakub@redhat.com>
4104
4105 * libc-cancellation.c: Guard both function with
4106 #if !defined NOT_IN_libc.
4107 * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
4108 automatically provided pthread wrappers.
4109 * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
4110 CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
4111 nor in libpthread.
4112 * pt-open.c: Removed.
4113 * pt-fcntl.c: Removed.
4114 * pt-fsync.c: Removed.
4115 * pt-lseek.c: Removed.
4116 * pt-msgrcv.c: Removed.
4117 * pt-msgsnd.c: Removed.
4118 * pt-msync.c: Removed.
4119 * pt-nanosleep.c: Removed.
4120 * pt-open64.c: Removed.
4121 * pt-pause.c: Removed.
4122 * pt-pread.c: Removed.
4123 * pt-pread64.c: Removed.
4124 * pt-pwrite.c: Removed.
4125 * pt-pwrite64.c: Removed.
4126 * pt-read.c: Removed.
4127 * pt-recv.c: Removed.
4128 * pt-recvfrom.c: Removed.
4129 * pt-recvmsg.c: Removed.
4130 * pt-send.c: Removed.
4131 * pt-sendto.c: Removed.
4132 * pt-sigtimedwait.c: Removed.
4133 * pt-sigwait.c: Removed.
4134 * pt-wait.c: Removed.
4135 * pt-waitpid.c: Removed.
4136 * pt-write.c: Removed.
4137 * pt-accept.c: Removed.
4138 * pt-close.c: Removed.
4139 * pt-connect.c: Removed.
4140 * pt-lseek64.c: Removed.
4141 * pt-sendmsg.c: Removed.
4142 * pt-tcdrain.c: Removed.
4143
6ee8d334
UD
41442002-12-15 Ulrich Drepper <drepper@redhat.com>
4145
81fa9371
UD
4146 * init.c (__pthread_initialize_minimal_internal): Renamed from
4147 __pthread_initialize_minimal. Make old name an alias. This
4148 converts a normal relocation into a relative relocation.
4149
f3015aa5
UD
4150 * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
4151
4cbc1950
UD
4152 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
4153 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
4154 * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
4155 pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
4156 pt-sigwaitinfo, pt-waitid, and pt-writev.
4157 * pt-creat.c: Removed.
4158 * pt-poll.c: Removed.
4159 * pt-pselect.c: Removed.
4160 * pt-readv.c: Removed.
4161 * pt-select.c: Removed.
4162 * pt-sigpause.c: Removed.
4163 * pt-sigsuspend.c: Removed.
4164 * pt-sigwaitinfo.c: Removed.
4165 * pt-waitid.c: Removed.
4166 * pt-writev.c: Removed.
4167
8454830b
UD
4168 * init.c (pthread_functions): New variable.
4169 (__pthread_initialize_minimal): Pass pointer to pthread_functions
4170 (or NULL) to __libc_pthread_init.
4171 * forward.c: Rewrite to use __libc:pthread_functions array to get
4172 function addresses.
4173 * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
4174 prototype.
4175 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
4176 Take new parameter. Copy content of variable pointed to by it
4177 to __libc_pthread_init.
4178
4179 * pthreadP.h (struct pthread_functions): New type.
4180 (__libc_pthread_init): Declare.
4181
4182 * pthread_attr_destroy.c: Add namespace protected alias.
4183 * pthread_attr_getdetachstate.c: Likewise.
4184 * pthread_attr_getinheritsched.c: Likewise.
4185 * pthread_attr_getschedparam.c: Likewise.
4186 * pthread_attr_getschedpolicy.c: Likewise.
4187 * pthread_attr_getscope.c: Likewise.
4188 * pthread_attr_setdetachstate.c: Likewise.
4189 * pthread_attr_setinheritsched.c: Likewise.
4190 * pthread_attr_setschedparam.c: Likewise.
4191 * pthread_attr_setschedpolicy.c: Likewise.
4192 * pthread_attr_setscope.c: Likewise.
4193 * pthread_cond_broadcast.c: Likewise.
4194 * pthread_cond_destroy.c: Likewise.
4195 * pthread_cond_init.c: Likewise.
4196 * pthread_cond_signal.c: Likewise.
4197 * pthread_cond_wait.c: Likewise.
4198 * pthread_condattr_destroy.c: Likewise.
4199 * pthread_condattr_init.c: Likewise.
4200 * pthread_equal.c: Likewise.
4201 * pthread_exit.c: Likewise.
4202 * pthread_getschedparam.c: Likewise.
4203 * pthread_self.c: Likewise.
4204 * pthread_setcancelstate.c: Likewise.
4205 * pthread_setschedparam.c: Likewise.
4206 * pthread_mutex_destroy.c: Likewise.
4207 * pthread_mutex_init.c: Likewise.
4208 * pthreadP.h: Add prototypes for the aliases.
4209
0d5f4929
UD
4210 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
4211 multiple_threads member in correct TCB to 1.
4212
6ee8d334
UD
4213 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
4214 SINGLE_THREAD_P. If in libc or libpthread examine multiple_thread
4215 member of thread decriptor, otherwise return unconditionally 1.
4216
2fb6444d
UD
42172002-12-14 Ulrich Drepper <drepper@redhat.com>
4218
4219 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
4220 regular Linux version. Remove file.
4221 * sysdeps/unix/sysv/linux/connect.S: Likewise. Remove file.
4222 * sysdeps/unix/sysv/linux/llseek.c: Likewise. Remove file.
4223 * sysdeps/unix/sysv/linux/msgrcv.c: Likewise. Remove file.
4224 * sysdeps/unix/sysv/linux/msgsnd.c: Likewise. Remove file.
4225 * sysdeps/unix/sysv/linux/open64.c: Likewise. Remove file.
4226 * sysdeps/unix/sysv/linux/poll.c: Likewise. Remove file.
4227 * sysdeps/unix/sysv/linux/pread.c: Likewise. Remove file.
4228 * sysdeps/unix/sysv/linux/pread64.c: Likewise. Remove file.
4229 * sysdeps/unix/sysv/linux/pselect.c: Likewise. Remove file.
4230 * sysdeps/unix/sysv/linux/pwrite.c: Likewise. Remove file.
4231 * sysdeps/unix/sysv/linux/pwrite64.c: Likewise. Remove file.
4232 * sysdeps/unix/sysv/linux/readv.c: Likewise. Remove file.
4233 * sysdeps/unix/sysv/linux/recv.S: Likewise. Remove file.
4234 * sysdeps/unix/sysv/linux/recvfrom.S: Likewise. Remove file.
4235 * sysdeps/unix/sysv/linux/recvmsg.S: Likewise. Remove file.
4236 * sysdeps/unix/sysv/linux/send.S: Likewise. Remove file.
4237 * sysdeps/unix/sysv/linux/sendmsg.S: Likewise. Remove file.
4238 * sysdeps/unix/sysv/linux/sendto.S: Likewise. Remove file.
4239 * sysdeps/unix/sysv/linux/sigpause.c: Likewise. Remove file.
4240 * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise. Remove file.
4241 * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise. Remove file.
4242 * sysdeps/unix/sysv/linux/sigwait.c: Likewise. Remove file.
4243 * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise. Remove file.
4244 * sysdeps/unix/sysv/linux/system.c: Likewise. Remove file.
4245 * sysdeps/unix/sysv/linux/tcdrain.c: Likewise. Remove file.
4246 * sysdeps/unix/sysv/linux/wait.c: Likewise. Remove file.
4247 * sysdeps/unix/sysv/linux/waitid.c: Likewise. Remove file.
4248 * sysdeps/unix/sysv/linux/waitpid.c: Likewise. Remove file.
4249 * sysdeps/unix/sysv/linux/writev.c: Likewise. Remove file.
4250 * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise. Remove file.
4251
86b2dc40
UD
42522002-12-14 Jakub Jelinek <jakub@redhat.com>
4253
4254 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
4255 * sysdeps/unix/sysv/linux/open.c: Removed.
4256 * sysdeps/unix/sysv/linux/fsync.c: Removed.
4257 * sysdeps/unix/sysv/linux/lseek.c: Removed.
4258 * sysdeps/unix/sysv/linux/msync.c: Removed.
4259 * sysdeps/unix/sysv/linux/read.c: Removed.
4260 * sysdeps/unix/sysv/linux/close.c: Removed.
4261 * sysdeps/unix/sysv/linux/creat.c: Removed.
4262 * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
4263 * sysdeps/unix/sysv/linux/pause.c: Removed.
4264 * sysdeps/unix/sysv/linux/select.c: Removed.
4265 * sysdeps/unix/sysv/linux/write.c: Removed.
4266
9d263d72
UD
42672002-12-14 Ulrich Drepper <drepper@redhat.com>
4268
4269 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
4270 element in TCB to see whether locking is needed.
4271
4272 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
4273 MULTIPLE_THREADS_OFFSET value is correct.
4274
4275 * sysdeps/unix/sysv/linux/close.c: New file.
4276 * sysdeps/unix/sysv/linux/connect.S: New file.
4277 * sysdeps/unix/sysv/linux/creat.c: New file.
4278 * sysdeps/unix/sysv/linux/fsync.c: New file.
4279 * sysdeps/unix/sysv/linux/llseek.c: New file.
4280 * sysdeps/unix/sysv/linux/lseek.c: New file.
4281 * sysdeps/unix/sysv/linux/msgrcv.c: New file.
4282 * sysdeps/unix/sysv/linux/msgsnd.c: New file.
4283 * sysdeps/unix/sysv/linux/msync.c: New file.
4284 * sysdeps/unix/sysv/linux/nanosleep.c: New file.
4285 * sysdeps/unix/sysv/linux/open.c: New file.
4286 * sysdeps/unix/sysv/linux/open64.c: New file.
4287 * sysdeps/unix/sysv/linux/pause.c: New file.
4288 * sysdeps/unix/sysv/linux/poll.c: New file.
4289 * sysdeps/unix/sysv/linux/pread.c: New file.
4290 * sysdeps/unix/sysv/linux/pread64.c: New file.
4291 * sysdeps/unix/sysv/linux/pselect.c: New file.
4292 * sysdeps/unix/sysv/linux/pwrite.c: New file.
4293 * sysdeps/unix/sysv/linux/pwrite64.c: New file.
4294 * sysdeps/unix/sysv/linux/readv.c: New file.
4295 * sysdeps/unix/sysv/linux/recv.S: New file.
4296 * sysdeps/unix/sysv/linux/recvfrom.S: New file.
4297 * sysdeps/unix/sysv/linux/recvmsg.S: New file.
4298 * sysdeps/unix/sysv/linux/select.c: New file.
4299 * sysdeps/unix/sysv/linux/send.S: New file.
4300 * sysdeps/unix/sysv/linux/sendmsg.S: New file.
4301 * sysdeps/unix/sysv/linux/sendto.S: New file.
4302 * sysdeps/unix/sysv/linux/sigpause.c: New file.
4303 * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
4304 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
4305 * sysdeps/unix/sysv/linux/sigwait.c: New file.
4306 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
4307 * sysdeps/unix/sysv/linux/system.c: New file.
4308 * sysdeps/unix/sysv/linux/tcdrain.c: New file.
4309 * sysdeps/unix/sysv/linux/wait.c: New file.
4310 * sysdeps/unix/sysv/linux/waitid.c: New file.
4311 * sysdeps/unix/sysv/linux/waitpid.c: New file.
4312 * sysdeps/unix/sysv/linux/writev.c: New file.
4313 * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
4314
4315 * pt-readv.c: Fix comment.
4316
43172002-12-14 Jakub Jelinek <jakub@redhat.com>
4318
4319 * tst-cleanup1.c: Include stdlib.h.
4320
4321 * tst-cancel5.c: New test.
4322 * Makefile (tests): Add tst-cancel5.
4323 (tst-cancel5): Link against libc.so libpthread.so in that order.
4324
9ae0909b
UD
43252002-12-13 Ulrich Drepper <drepper@redhat.com>
4326
b7bdd9c4
UD
4327 * forward.c (test_loaded): Prevent recursive calls.
4328
9ae0909b
UD
4329 * Makefile (routines): Add libc-cancellation.
4330 * libc-cancellation.c: New file.
4331 * descr.h (struct pthread): Add multiple_threads field.
4332 * allocatestack.c (allocate_stack): Initialize multiple_header field of
4333 new thread descriptor to 1.
4334 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
4335 Initialize multiple_thread field after successful thread creation.
4336 * cancellation.c (__do_cancel): Move to pthreadP.h.
4337 (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
4338 (__pthread_disable_asynccancel): Add internal_function attribute.
4339 * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
4340 * pthread_setcancelstate.c: Likewise.
4341 * pthread_setcanceltype.c: Likewise.
4342 * pthread_exit.c: Likewise.
4343 * pthreadP.h (CANCELLATION_P): Likewise.
4344 (__do_cancel): Define as static inline.
4345 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
4346 (__libc_enable_asynccancel, __libc_disable_asynccancel): New
4347 declarations.
4348 * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
4349 fields. Define MULTIPLE_THREADS_OFFSET.
4350 * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
4351 declaration.
4352 * sysdeps/unix/sysv/linux/accept.S: New file.
4353 * sysdeps/unix/sysv/linux/read.c: New file.
4354 * sysdeps/unix/sysv/linux/write.c: New file.
4355 * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
4356 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
4357 initialization of __libc_locking_needed.
4358 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
4359 __libc_locking_needed, use multiple_threads field in TCB.
4360 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
4361
22f20674
UD
43622002-12-12 Ulrich Drepper <drepper@redhat.com>
4363
2ad2e1e7
UD
4364 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
4365 version.
4366 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
4367
22f20674
UD
4368 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
4369 access to __libc_locking_needed for PIC.
4370
aa80bf86
UD
43712002-12-12 Jakub Jelinek <jakub@redhat.com>
4372
4373 * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
4374 declare for libc.so.
4375 (__libc_lock_init, __libc_lock_init_recursive): Change into comma
4376 expression.
4377 (__libc_lock_lock): Put into statement expression.
4378 (__libc_lock_unlock): Remove trailing semicolon.
4379 * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
4380
24021373
RM
43812002-12-12 Roland McGrath <roland@redhat.com>
4382
4383 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
4384 "m" constraint to refer to __libc_locking_needed. Declare it here.
4385
14e7aece
UD
43862002-12-12 Ulrich Drepper <drepper@redhat.com>
4387
4388 * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
4389 * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
4390 Initialize __libc_locking_needed.
4391 * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
4392 instead of __register_pthread_fork_handler.
4393 * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
4394 * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
4395 fork-gen with libc_pthread_init.
4396 * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
4397 of __register_pthread_fork_handler.
4398 * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
4399 of __register_pthread_fork_handler.
4400 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
4401 __libc_locking_needed to determine whether lock prefix can be avoided.
4402 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
4403
85631c8e
UD
44042002-12-11 Ulrich Drepper <drepper@redhat.com>
4405
da63009e
UD
4406 * Makefile (tests): Add tst-cleanup1.
4407 * tst-cleanup1.c: New file.
4408 * cancellation.c (__cleanup_thread): Removed.
4409 (__do_cancel): Remove call to __cleanup_thread.
4410 * pthreadP.h: Remove __cleanup_thread prorotype.
4411
000160a2
UD
4412 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
4413 Remember function and argument even if cancellation handler
4414 function is not available.
4415 (__libc_cleanup_region_end): Execute registered function directly if
4416 pthread functions are not available.
4417 (__libc_cleanup_end): Likewise.
4418
85631c8e
UD
4419 * init.c (__pthread_initialize_minimal): Fix initialization in
4420 static lib by preventing gcc from being too clever.
4421
dce8f2b6
UD
44222002-12-10 Ulrich Drepper <drepper@redhat.com>
4423
34a075be
UD
4424 * init.c (__pthread_initialize_minimal): Remove unneccesary
4425 sigaddset call.
4426
dce8f2b6
UD
4427 * Makefile (tests): We can run tst-locale2 now.
4428
e5e45b53
UD
44292002-12-09 Ulrich Drepper <drepper@redhat.com>
4430
4431 * Versions: Remove duplicated sigwait entry.
4432
bdb04f92
UD
44332002-12-08 Ulrich Drepper <drepper@redhat.com>
4434
1e506629
UD
4435 * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
4436 inside libpthread.
4437
a3957dd5
UD
4438 * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
4439
bdb04f92
UD
4440 * pthreadP.h: Declare __pthread_enable_asynccancel and
4441 __pthread_disable_asynccancel.
4442 (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
4443 (CANCEL_RESET): Use __pthread_disable_asynccancel.
4444 * cancellation.c (__pthread_enable_asynccancel): New function.
4445 (__pthread_disable_asynccancel): New function.
4446 * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
4447 * pt-close.c: Likewise.
4448 * pt-connect.c: Likewise.
4449 * pt-creat.c: Likewise.
4450 * pt-fcntl.c: Likewise.
4451 * pt-fsync.c: Likewise.
4452 * pt-lseek.c: Likewise.
4453 * pt-lseek64.c: Likewise.
4454 * pt-msgrcv.c: Likewise.
4455 * pt-msgsnd.c: Likewise.
4456 * pt-msync.c: Likewise.
4457 * pt-nanosleep.c: Likewise.
4458 * pt-open.c: Likewise.
4459 * pt-open64.c: Likewise.
4460 * pt-pause.c: Likewise.
4461 * pt-poll.c: Likewise.
4462 * pt-pread.c: Likewise.
4463 * pt-pread64.c: Likewise.
4464 * pt-pselect.c: Likewise.
4465 * pt-pwrite.c: Likewise.
4466 * pt-pwrite64.c: Likewise.
4467 * pt-read.c: Likewise.
4468 * pt-readv.c: Likewise.
4469 * pt-recv.c: Likewise.
4470 * pt-recvfrom.c: Likewise.
4471 * pt-recvmsg.c: Likewise.
4472 * pt-select.c: Likewise.
4473 * pt-send.c: Likewise.
4474 * pt-sendmsg.c: Likewise.
4475 * pt-sendto.c: Likewise.
4476 * pt-sigpause.c: Likewise.
4477 * pt-sigsuspend.c: Likewise.
4478 * pt-sigtimedwait.c: Likewise.
4479 * pt-sigwait.c: Likewise.
4480 * pt-sigwaitinfo.c: Likewise.
4481 * pt-system.c: Likewise.
4482 * pt-tcdrain.c: Likewise.
4483 * pt-wait.c: Likewise.
4484 * pt-waitid.c: Likewise.
4485 * pt-waitpid.c: Likewise.
4486 * pt-write.c: Likewise.
4487 * pt-writev.c: Likewise.
a3957dd5
UD
4488 * pthread_join.c: Likewise.
4489 * pthread_timedjoin.c: Likewise.
bdb04f92
UD
4490
4491 * pt-sigpause.c (sigsuspend): Call __sigsuspend.
4492 (__xpg_sigpause): New function.
4493 * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
4494
6ccb3834
UD
44952002-12-07 Ulrich Drepper <drepper@redhat.com>
4496
09efc3ba
UD
4497 * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
4498
4499 * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
4500 _GI_pthread_cleanup_pop to pthreadP.h.
4501
4502 * ftrylockfile.c: Use _IO_lock_trylock instead of
4503 pthread_mutex_trylock.
4504
4505 * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
4506 (CANCEL_RESET): Likewise.
4507 (__pthread_setcanceltype_): Declare.
4508 (__pthread_mutex_lock_internal): Declare.
4509 (__pthread_mutex_unlock_internal): Declare.
4510 (__pthread_once_internal): Declare.
4511 (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
4512 (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
4513
4514 * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
4515 and pthread_mutex_unlock.
4516 * pthread_cond_wait.c: Likewise.
4517 * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
4518 * pthread_mutex_unlock.c: Likewise.
4519
4520 * pthread_setcanceltype.c: Add additional alias
4521 __pthread_setcanceltype.
4522
4523 * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
4524 * sem_open.c (sem_open): Likewise.
4525 Use __libc_open, __libc_write, and __libc_close instead of
4526 open, write, and close respectively.
4527
4528 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
4529 Rewrite as statement expression since it must return a value.
4530
4531 * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
4532 * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
4533 __pthread_kill.
4534
4535 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
4536 alias __pthread_once_internal.
4537
6ccb3834
UD
4538 * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
4539
d3c9f895
UD
45402002-12-06 Ulrich Drepper <drepper@redhat.com>
4541
4614167a
UD
4542 * Makefile (tests): Add tst-stdio1 and tst-stdio2.
4543 * tst-stdio1.c: New file.
4544 * tst-stdio2.c: New file.
4545
a4548cea
UD
4546 * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
4547
d3c9f895
UD
4548 * Makefile (tests): Comment out tst-locale2 for now.
4549 (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
4550
4551 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
4552 -D_IO_MTSAFE_IO.
4553 * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
4554 Use _IO_lock_init instead of explicit assignment.
4555
4556 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
4557 Define __libc_lock_* and __libc_lock_recursive macros with
4558 lowlevellock macros, not pthread mutexes.
4559
4560 * flockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_lock instead
4561 of pthread_mutex_lock.
4562 * funlockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_unlock
4563 instead of pthread_mutex_unlock.
4564
fde89ad0
RM
45652002-12-06 Roland McGrath <roland@redhat.com>
4566
4567 * allocatestack.c (__stack_user): Use uninitialized defn.
4568 * init.c (__pthread_initialize_minimal): Initialize it here.
4569
11767d47
RM
45702002-12-05 Roland McGrath <roland@redhat.com>
4571
fde89ad0
RM
4572 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
4573 string.
4574 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
4575
11767d47
RM
4576 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
4577 missing & here too.
4578
440d8bc2
UD
45792002-12-05 Ulrich Drepper <drepper@redhat.com>
4580
4581 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
4582 lowlevellock.
4583 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
4584 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
4585 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
4586 * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
4587 for __libc_lock_* macros.
4588 * Makefile (routines): Add libc-lowlevellock.
4589
45902002-10-09 Roland McGrath <roland@redhat.com>
4591
4592 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
4593 Under [__PIC__], call the function via the pointer fetched for
4594 comparison rather than a call by name that uses the PLT.
4595 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
4596 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
4597 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
4598 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
4599 (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
4600
d5ed0118
RM
46012002-12-04 Roland McGrath <roland@redhat.com>
4602
4603 * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
4604
4605 * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
4606 * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
4607
4608 * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
4609
eaa4099f
UD
46102002-12-04 Ulrich Drepper <drepper@redhat.com>
4611
4612 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
4613 a completely opaque, non-integer type.
4614 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4615
33b5d0cc
UD
46162002-12-05 Jakub Jelinek <jakub@redhat.com>
4617
4618 * sysdeps/i386/tls.h: Include stdlib.h.
4619 * sysdeps/x86_64/tls.h: Likewise.
4620
7a5cdb30
UD
46212002-12-04 Ulrich Drepper <drepper@redhat.com>
4622
c4a6d859
UD
4623 * Makefile (tests): Add tst-locale2.
4624 (tests-static): Likewise.
4625 * tst-locale2.c: New file.
4626
7a5cdb30
UD
4627 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
4628 volatile and add memory clobbers to lock operations.
4629
d82d5d12
UD
46302002-12-03 Ulrich Drepper <drepper@redhat.com>
4631
69cae3cf
UD
4632 * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
4633 * sysdeps/i386/i486/bits/atomic.h: New file.
4634 * sysdeps/i386/i586/bits/atomic.h: New file.
4635 * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
4636 include i486 version.
4637 * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
4638 * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
c97c64de 4639 Patch by Marijn Ros <marijn@mad.scientist.com>.
69cae3cf 4640
e4044c01
UD
4641 * allocatestack.c (get_cached_stack): Don't crash if we first
4642 found a stack with a larger size then needed.
4643 Reported by Hui Huang <hui.huang@sun.com>.
4644
d82d5d12
UD
4645 * Makefile (tests): Add tst-sysconf.
4646 * tst-sysconf.c: New file.
4647
4648 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
4649 PTHREAD_THREADS_MAX.
4650
fa9a4ff0
RM
46512002-12-02 Roland McGrath <roland@redhat.com>
4652
4653 * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
4654 Declare using hidden_proto instead of attribute_hidden, so there are
4655 non-.hidden static symbols for gdb to find.
4656 (__pthread_keys): Likewise.
4657 * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
4658 * allocatestack.c (__stack_user): Likewise.
4659 * pthread_create.c (__pthread_keys): Likewise.
4660 (__nptl_threads_events, __nptl_last_event): Make these static instead
4661 of hidden.
4662 * pthread_key_create.c (__pthread_pthread_keys_max,
4663 __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
4664
91949a33
UD
46652002-12-02 Ulrich Drepper <drepper@redhat.com>
4666
c22b52fa
UD
4667 * Makefile (tests): Add tst-locale1. If buid-static is yes link
4668 statically.
4669 * tst-locale1.c: New file.
4670
beb6aa41
UD
4671 * pthread_cond_timedwait.c: Include <stdlib.h>.
4672
91949a33
UD
4673 * Makefile (tests): Add tst-fork2 and tst-fork3.
4674 * tst-fork2.c: New file.
4675 * tst-fork3.c: New file.
4676
654dff90
UD
46772002-11-28 Ulrich Drepper <drepper@redhat.com>
4678
cb0e76b4
UD
4679 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
4680
4681 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
4682 require it to 200112L.
4683
4684 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
4685 instruction only if HAVE_CMOV is defined.
4686 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
4687
975aa229
UD
4688 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
4689
654dff90
UD
4690 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
4691
4692 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
4693
4694 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
4695
a3931336
UD
46962002-11-27 Ulrich Drepper <drepper@redhat.com>
4697
c10c099c
UD
4698 * sysdeps/x86_64/bits/atomic.h: New file.
4699
4700 * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
4701 16-bit operations.
4702
dca99d27
UD
4703 * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
4704 possible since gettid cannot fail.
4705
f78deea6
UD
4706 * sysdeps/x86_64/pthreaddef.h: New file.
4707
4708 * sysdeps/i386/pthreaddef.h (gettid): Removed.
4709
4710 * sysdeps/x86_64/pthread_spin_init.c: New file.
4711 * sysdeps/x86_64/pthread_spin_lock.c: New file.
4712 * sysdeps/x86_64/pthread_spin_trylock.c: New file.
4713 * sysdeps/x86_64/pthread_spin_unlock.c: New file.
4714
4715 * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
4716 Add missing lock prefix. Minute optimization.
4717
4718 * tst-spin2.c (main): Also check successful trylock call.
4719
4720 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
4721 syscall. Fix typo in case INTERNAL_SYSCALL is not used.
4722
4723 * sysdeps/i386/pthread_spin_destroy.c: Moved to...
4724 * sysdeps/pthread/pthread_spin_destroy.c: ...here. New file.
4725
4726 * sysdeps/i386/pthread_sigmask.c: Removed. Use the generic code.
4727 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
4728 value in case of an error. Add support for INTERNAL_SYSCALL.
b54e18eb
UD
4729
4730 * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
4731 value in case of an error.
4732
a3931336
UD
4733 * sysdeps/x86_64/tls.h: New file.
4734
76a50749
UD
47352002-11-26 Ulrich Drepper <drepper@redhat.com>
4736
117c452c
UD
4737 * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface. It now
4738 takes the array member name and the index as parameters.
4739 (THREAD_SETMEM_NC): Likewise.
4740 * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
4741 * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
4742 interfaces.
4743
4744 * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
4745 to decide which code to use.
4746 (THREAD_SETMEM_NC): Likewise.
4747
76a50749
UD
4748 * allocatestack.c (queue_stack): Don't remove stack from list here.
4749 Do it in the caller. Correct condition to prematurely terminate
4750 loop to free stacks.
4751 (__deallocate_stack): Remove stack from list here.
4752
47532002-11-26 Ulrich Drepper <drepper@redhat.com>
4754
4755 * Makefile (tests): Add tst-stack1.
4756 * tst-stack1.c: New file.
4757
4758 * allocatestack.c (allocate_stack): Initialize the TCB on a user
4759 provided stack.
4760
4761 * pthread_attr_getstack.c: Return bottom of the thread area.
4762
47632002-11-25 Ulrich Drepper <drepper@redhat.com>
4764
4765 * Makefile (libpthread-routines): Add pt-allocrtsig and
4766 pthread_kill_other_threads.
4767 * pt-allocrtsig.c: New file.
4768 * pthread_kill_other_threads.c: New file.
4769 * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
4770 all three functions.
4771 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
4772 allocrtsig.
4773 * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
4774 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
4775 and __libc_allocate_rtsig_private.
4776 * Versions (libpthread): Export pthread_kill_other_threads_np,
4777 __libc_current_sigrtmin, and __libc_current_sigrtmax.
4778
47792002-11-24 Ulrich Drepper <drepper@redhat.com>
4780
4781 * allocatestack.c (allocate_stack): stackaddr in attribute points to
4782 the end of the stack. Adjust computations.
4783 When mprotect call fails dequeue stack and free it.
4784 * pthread_attr_setstack.c: Store top of the stack in stackaddr
4785 attribute.
4786 * pthread_getattr_np.c: Likewise.
4787
4788 * descr.h (IS_DETACHED): Add some more parenthesis to prevent
4789 surprises.
4790
47912002-11-23 Ulrich Drepper <drepper@redhat.com>
4792
4793 * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
4794 attribute definitions. Patch by Luca Barbieri <ldb@ldb.ods.org>.
4795
47962002-11-22 Ulrich Drepper <drepper@redhat.com>
4797
4798 * pthread_getspecific.c: Optimize access to first 2nd-level array.
4799 * pthread_setspecific.c: Likewise.
4800
48012002-11-21 Ulrich Drepper <drepper@redhat.com>
4802
4803 * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
4804 definitions. Get them from the official place.
4805 * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
4806
4807 * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
4808 Use new CLONE_ flags in clone() calls.
4809
4810 * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
4811 * sysdeps/unix/sysv/linux/i386/fork.c: New file.
4812
4813 * Versions: Add pthread_* functions for libc.
4814 * forward.c: New file.
4815
4816 * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
4817 errno-loc.
4818 * herrno.c: New file.
4819 * res.c: New file.
4820
4821 * Makefile (libpthread-routines): Remove sem_post, sem_wait,
4822 sem_trywait, and sem_timedwait. Add herrno and res.
4823 * sem_init.c: Don't initialize lock and waiters members.
4824 * sem_open.c: Likewise.
4825 * sem_post.c: Removed.
4826 * sem_wait.c: Removed.
4827 * sem_trywait.c: Removed.
4828 * sem_timedwait.c: Removed.
4829 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
4830 Includes full implementations of sem_post, sem_wait, sem_trywait,
4831 and sem_timedwait.
4832 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
4833 for new implementation.
4834 * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
4835 and waiters fields.
4836
4837 * tst-sem3.c: Improve error message.
4838 * tst-signal3.c: Likewise.
4839
4840 * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
4841 to tell the kernel about the termination futex and to initialize tid
4842 member. Don't initialize main_thread.
4843 * descr.h (struct pthread): Remove main_thread member.
4844 * cancelllation.c (__do_cancel): Remove code handling main thread.
4845 The main thread is not special anymore.
4846
4847 * allocatestack.c (__reclaim_stacks): Mark stacks as unused. Add
4848 size of the stacks to stack_cache_actsize.
4849
4850 * pt-readv.c: Add missing "defined".
4851 * pt-sigwait.c: Likewise.
4852 * pt-writev.c: Likewise.
4853
48542002-11-09 Ulrich Drepper <drepper@redhat.com>
4855
4856 * Versions: Export __connect from libpthread.
4857 Patch by Luca Barbieri <ldb@ldb.ods.org>.
4858
4859 * Makefile (libpthread-routines): Add pt-raise.
4860 * sysdeps/unix/sysv/linux/raise.c: New file.
4861 * sysdeps/unix/sysv/linux/pt-raise.c: New file.
4862 * sysdeps/generic/pt-raise.c: New file.
4863
4864 * pthread_cond_init.c: Initialize all data elements of the condvar
4865 structure. Patch by Luca Barbieri <ldb@ldb.ods.org>.
4866
4867 * pthread_attr_init.c: Actually implement 2.0 compatibility version.
4868 * pthread_create.c: Likewise.
4869
4870 * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
4871 * tst-key1.c: New file.
4872 * tst-key2.c: New file.
4873 * tst-key3.c: New file.
4874
4875 * Versions: Export pthread_detach for version GLIBC_2.0.
4876 Reported by Saurabh Desai <sdesai@austin.ibm.com>.
4877
48782002-11-08 Ulrich Drepper <drepper@redhat.com>
4879
4880 * pthread_key_create.c: Terminate search after an unused key was found.
4881 Patch by Luca Barbieri <ldb@ldb.ods.org>.
4882
4883 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
4884 Patch by Luca Barbieri <ldb@ldb.ods.org>.
4885
48862002-10-10 Ulrich Drepper <drepper@redhat.com>
4887
4888 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
4889 dynamic lookup for errno in PIC.
4890
4891 * allocatestack.c (get_cached_stack): Rearrange code slightly to
4892 release the stack lock as soon as possible.
4893 Call _dl_allocate_tls_init for TCB from the cache to re-initialize
4894 the static TLS block.
4895 (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
4896
4897 * cancellation.c: Renamed from cancelation.c.
4898 * Makefile: Adjust accordingly.
4899 * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
4900 * cleanup_defer.c: Use CANCELLATION_P.
4901 * pthread_testcancel.c: Likewise.
4902 * descr.h: Fix spelling in comments.
4903 * init.c: Likewise.
4904 * pthread_getattr_np.c: Likewise.
4905 * pthread_getschedparam.c: Likewise.
4906 * pthread_setschedparam.c: Likewise.
4907 * Versions: Likewise.
4908
4909 * pt-pselect.c: New file.
4910 * Makefile (libpthread-routines): Add pt-pselect.
4911 * Versions: Add pselect.
4912
4913 * tst-cancel4.c: New file.
4914 * Makefile (tests): Add tst-cancel4.
4915
49162002-10-09 Ulrich Drepper <drepper@redhat.com>
4917
4918 * pthread_mutex_lock.c: Always record lock ownership.
4919 * pthread_mutex_timedlock.c: Likewise.
4920 * pthread_mutex_trylock.c: Likewise.
4921
4922 * pt-readv.c: New file.
4923 * pt-writev.c: New file.
4924 * pt-creat.c: New file.
4925 * pt-msgrcv.c: New file.
4926 * pt-msgsnd.c: New file.
4927 * pt-poll.c: New file.
4928 * pt-select.c: New file.
4929 * pt-sigpause.c: New file.
4930 * pt-sigsuspend.c: New file.
4931 * pt-sigwait.c: New file.
4932 * pt-sigwaitinfo.c: New file.
4933 * pt-waitid.c: New file.
4934 * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
4935 pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
4936 pt-sigwait, pt-sigwaitinfo, and pt-waitid.
4937 * Versions: Add all the new functions.
4938
4939 * tst-exit1.c: New file.
4940 * Makefile (tests): Add tst-exit1.
4941
4942 * sem_timedwait.c: Minor optimization for more optimal fastpath.
4943
49442002-10-08 Ulrich Drepper <drepper@redhat.com>
4945
4946 * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
4947
4948 * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
4949 call. pthread_join is an official cancellation point.
4950 * pthread_timedjoin.c: Likewise.
4951
4952 * pthread_cond_wait.c: Revert order in which internal lock are dropped
4953 and the condvar's mutex are retrieved.
4954 * pthread_cond_timedwait.c: Likewise.
4955 Reported by dice@saros.East.Sun.COM.
4956
49572002-10-07 Ulrich Drepper <drepper@redhat.com>
4958
4959 * pthreadP.h: Cut out all type definitions and move them...
4960 * sysdeps/unix/sysv/linux/internaltypes.h: ...here. New file.
4961 * pthreadP.h: Include <internaltypes.h>.
4962
4963 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
4964 performance tweaks.
4965
4966 * sem_trywait.c: Shuffle #includes around to get right order.
4967 * sem_timedwait.c: Likewise.
4968 * sem_post.c: Likewise.
4969 * sem_wait.c: Likewise.
4970
4971 * nptl 0.3 released.
4972
4973 * Makefile (tests): Add tst-signal3.
4974 * tst-signal3.c: New file.
4975
49762002-10-05 Ulrich Drepper <drepper@redhat.com>
4977
4978 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
4979 the asms modify the sem object.
4980 (__lll_sem_timedwait): Now takes struct sem* as first parameter.
4981
4982 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
4983 the actual members.
4984 * pthreadP.h (struct sem): New type. Actual semaphore type.
4985 * semaphoreP.h: Include pthreadP.h.
4986 * sem_getvalue.c: Adjust to sem_t change.
4987 * sem_init.c: Likewise.
4988 * sem_open.c: Likewise.
4989 * sem_post.c: Likewise.
4990 * sem_timedwait.c: Likewise.
4991 * sem_trywait.c: Likewise.
4992 * sem_wait.c: Likewise.
4993
49942002-10-04 Ulrich Drepper <drepper@redhat.com>
4995
4996 * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
4997 * tst-basic2.c: New file.
4998 * tst-exec1.c: New file.
4999 * tst-exec2.c: New file.
5000 * tst-exec3.c: New file.
5001
5002 * tst-fork1.c: Remove extra */.
5003
5004 * nptl 0.2 released. The API for IA-32 is complete.
This page took 0.633485 seconds and 5 git commands to generate.