]> git.ipfire.org Git - thirdparty/glibc.git/blame - nptl/ChangeLog
Require Linux kernel headers from "make headers_install", >= 2.6.19.1.
[thirdparty/glibc.git] / nptl / ChangeLog
CommitLineData
4efeffc1
UD
12012-02-26 Ulrich Drepper <drepper@gmail.com>
2
d94a4670
UD
3 * sysdeps/pthread/pthread.h: Define __need_clockid_t for __USE_XOPEN2K.
4
4efeffc1
UD
5 * sysdeps/pthread/pthread.h: Define __need_timespec before including
6 <time.h>.
7 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Name pthread_attr_t
8 union.
9 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
10 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
11 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
12 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
13 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
14
0e7dfaef
JM
152012-02-21 Joseph Myers <joseph@codesourcery.com>
16
17 [BZ #13695]
18 * Makefile (generated): Remove crti.S, crtn.S, defs.h and
19 pt-initfini.s.
20 [crti.S not in sysdirs] (omit-deps): Do not append.
21 [crti.S not in sysdirs] (CFLAGS-pt-initfini.s): Remove variable.
22 [crti.S not in sysdirs] (pt-initfini.c): Remove vpath directive.
23 [crti.S not in sysdirs] ($(objpfx)crti.S): Remove rule.
24 [crti.S not in sysdirs] ($(objpfx)crtn.S): Likewise.
25 [crti.S not in sysdirs] ($(objpfx)defs.h): Likewise.
26 [crti.S not in sysdirs] ($(objpfx)crti.o): Likewise.
27 [crti.S not in sysdirs] ($(objpfx)crtn.o): Likewise.
28 [crti.S in sysdirs] (extra-objs): Append unconditionally.
29 [crti.S in sysdirs] ($(objpfx)crti.o): Define rule
30 unconditionally.
31 * sysdeps/pthread/pt-initfini.c: Remove file.
32
e3b69ca7
RH
332012-02-16 Richard Henderson <rth@twiddle.net>
34
35 * nptl/sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: Remove file.
36 * nptl/sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: Remove file.
37
df83af67
KK
382012-02-15 Kaz Kojima <kkojima@rr.iij4u.or.jp>
39
40 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Remove file.
41
f63f3380
DM
422012-02-16 David S. Miller <davem@davemloft.net>
43
44 * sysdeps/sparc/Makefile: Add -fPIC when building pt-crti.S and crtn.S
45
d463ab10
MP
462012-02-15 Marek Polacek <polacek@redhat.com>
47
48 * sysdeps/unix/sysv/linux/x86_64/Makefile: Remove file.
49
59ba27a6
PE
502012-02-09 Paul Eggert <eggert@cs.ucla.edu>
51
52 Replace FSF snail mail address with URLs, as per GNU coding standards.
53
28328403
AS
542012-02-08 Andreas Schwab <schwab@linux-m68k.org>
55
56 * Makefile (extra-objs) [crti.S in sysdirs]: Add pt-crti.o.
57
3add8e13
JM
582012-02-08 Joseph Myers <joseph@codesourcery.com>
59
60 Support crti.S and crtn.S provided directly by architectures.
61 * Makefile [crti.S in sysdirs] (omit-deps): Do not append.
62 [crti.S in sysdirs] (CFLAGS-pt-initfini.s): Do not define variable.
63 [crti.S in sysdirs] ($(objpfx)pt-initfini.s): Disable rule.
64 [crti.S in sysdirs] ($(objpfx)crti.S): Likewise.
65 [crti.S in sysdirs] ($(objpfx)crtn.S): Likewise.
66 [crti.S in sysdirs] ($(objpfx)defs.h): Likewise.
67 [crti.S in sysdirs] ($(objpfx)crti.o): Likewise.
68 [crti.S in sysdirs] ($(objpfx)crtn.o): Likewise.
69 [crti.S in sysdirs] (pt-initfini.c): Remove vpath directive.
70 [crti.S in sysdirs] ($(objpfx)crti.o): New rule.
71 * pt-crti.S: New file.
72 * sysdeps/unix/sysv/linux/i386/Makefile: Remove file.
73
9a1d9254
JM
742012-02-03 Joseph Myers <joseph@codesourcery.com>
75
76 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
77 macros for PIC register setup.
78 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
79 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
80 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
81 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
82 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
83
5452bffe
UD
842012-01-11 Marek Polacek <polacek@redhat.com>
85
86 * forward.c (FORWARD_NORETURN): Define macro.
87 (__pthread_unwind): Use FORWARD_NORETURN macro to avoid warning.
88 (__pthread_exit): Likewise.
89
356fa562
UD
902012-01-10 Ulrich Drepper <drepper@gmail.com>
91
8898f020
UD
92 * sysdeps/pthread/pthread.h: Add const attribute to pthread_equal.
93
356fa562
UD
94 * pthreadP.h: Add noreturn to __pthread_exit.
95 * sysdeps/pthread/pthread-functions.h: Likewise for ptr___pthread_exit.
96
f5420cf0
AZ
972011-12-30 Adhemerval Zanella <azanella@linux.vnet.ibm.com>
98
99 * sysdeps/unix/sysv/linux/aio_misc.h (__aio_create_helper_thread):
100 Call pthread_attr_setstacksize() with result of
101 __pthread_get_minstack() to account for application TLS usage.
102
c473bd1c
MP
1032012-01-08 Marek Polacek <polacek@redhat.com>
104
105 * sysdeps/unix/sysv/linux/mq_notify.c: Include <nptl/pthreadP.h>.
106
120ced3f
UD
1072012-01-07 Ulrich Drepper <drepper@gmail.com>
108
a784e502
UD
109 [BZ #13553]
110 * pthreadP.h: Use const instead of __const.
111 * semaphore.h: Likewise.
112 * sysdeps/pthread/bits/libc-lock.h: Likewise.
113 * sysdeps/pthread/bits/sigthread.h: Likewise.
114 * sysdeps/pthread/pthread.h: Likewise.
115
0269750c
UD
116 * Makefile: Remove elf=yes test, only ELF is supported.
117
ecb6fb48
UD
118 * shlib-versions: Remove entries for ports architectures.
119
120ced3f
UD
120 In case anyone cares, the IA-64 architecture could move to ports.
121 * sysdeps/ia64/*: Removed.
122 * sysdeps/unix/sysv/linux/ia64/*: Removed.
123
2c1094bd
UD
1242011-12-22 Ulrich Drepper <drepper@gmail.com>
125
ee9e0640
UD
126 * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread): Use
127 __pthread_get_minstack.
128 * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Likewise.
129
2c1094bd
UD
130 [BZ #13088]
131 * sysdeps/unix/sysv/linux/timer_routines.c: Get minimum stack size
132 through __pthread_get_minstack.
133 * nptl-init.c (__pthread_initialize_minimal_internal): Get page size
134 directly from _rtld_global_ro.
135 (__pthread_get_minstack): New function.
136 * pthreadP.h: Declare __pthread_get_minstack.
137 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_get_minstack.
138
60e8585f
UD
1392011-12-21 Ulrich Drepper <drepper@gmail.com>
140
141 [BZ #13515]
142 * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
143 Correct reading name from file.
144
caafb2b0
CD
1452011-12-14 Carlos O'Donell <carlos@systemhalted.org>
146
147 * allocatestack.c (allocate_stack): Return errno on failure.
148
e988dba9
JL
1492011-12-14 Jeff Law <law@redhat.com>
150
151 [BZ #5245]
152 * pthread_create.c (__pthread_create_2_1): Translate ENOMEM to EAGAIN.
153
ade60c89
UD
1542011-11-28 Andreas Schwab <schwab@redhat.com>
155
156 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Handle
157 EAGAIN from FUTEX_WAIT_REQUEUE_PI.
158 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
159
312be3f9
UD
1602011-11-15 Ulrich Drepper <drepper@gmail.com>
161
162 * pthread_getattr_np.c (pthread_getattr_np): Set FD_CLOEXEC for
163 /proc/self/maps.
164
c2b18f7a
UD
1652011-10-29 Ulrich Drepper <drepper@gmail.com>
166
167 [BZ #13358]
168 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
169 (__pthread_cond_timedwait): Initialize %r15 correctly also for code
170 path for kernels with FUTEX_CLOCK_REALTIME.
171 Debugged by H.J. Lu <hjl.tools@gmail.com>.
172
3871f58f
AS
1732011-10-27 Andreas Schwab <schwab@redhat.com>
174
175 [BZ #13344]
176 * sysdeps/pthread/pthread.h: Use __THREADNL instead of __THREAD
177 for memory synchronization functions.
178 * semaphore.h: Likewise.
179
485683c3
UD
1802011-10-24 Ulrich Drepper <drepper@gmail.com>
181
182 * tst-cancel7.c: Avoid warning.
183 * tst-mutex6.c: Likewise.
184 * tst-mutex9.c: Likewise.
185 * tst-mutexpi6.c: Likewise.
186
10d005f7
UD
1872011-10-23 Ulrich Drepper <drepper@gmail.com>
188
189 * sysdeps/i386/tls.h: Remove #include <list.h>.
190
fd5bdc09
UD
1912011-10-15 Ulrich Drepper <drepper@gmail.com>
192
10d005f7 193 * pthread_create.c (start_thread): Call __ctype_init.
fd5bdc09 194
7a775e6b
AS
1952011-09-15 Andreas Schwab <schwab@redhat.com>
196
197 * sysdeps/pthread/list.h: Define only list_t if __need_list_t is
198 defined.
199 (list_add): Add atomic_write_barrier.
200 * descr.h: Define __need_list_t before including <list.h>.
201 * nptl-init.c: Include <list.h>
202 * allocatestack.c: Likewise.
203
83cd1420
UD
2042011-09-11 Ulrich Drepper <drepper@gmail.com>
205
206 * sysdeps/i386/tls.h: Remove HAVE_TLS_SUPPORT test.
207 * sysdeps/ia64/tls.h: Likewise.
208 * sysdeps/powerpc/tls.h: Likewise.
209 * sysdeps/s390/tls.h: Likewise.
210 * sysdeps/sh/tls.h: Likewise.
211 * sysdeps/sparc/tls.h: Likewise.
212 * sysdeps/x86_64/tls.h: Likewise.
213
3ce1f295
UD
2142011-09-10 Ulrich Drepper <drepper@gmail.com>
215
02d46fc4
UD
216 * sysdeps/pthread/malloc-machine.h: Define MUTEX_INITIALIZER.
217
d063d164
UD
218 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Don't handle
219 !USE___THREAD.
220 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
221 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
222 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
223 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
224 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
225 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
226 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
227 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
228 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
229 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
230 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
231 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
232
3ce1f295
UD
233 * tst-tls1.c: Support for __thread is now mandatory.
234 * tst-tls2.c: Likewise.
235 * tst-tls3.c: Likewise.
236 * tst-tls3mod.c: Likewise.
237 * tst-tls4.c: Likewise.
238 * tst-tls4moda.c: Likewise.
239 * tst-tls4modb.c: Likewise.
240 * tst-tls5.h: Likewise.
241
1e4bd093
L
2422011-09-08 Ulrich Drepper <drepper@gmail.com>
243
244 [BZ #12403]
245 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
246 (pthread_rwlock_timedwrlock): Use correct macro in test.
247 Patch by H.J. Lu <hongjiu.lu@intel.com>.
248
a0e1f41b
UD
2492011-09-06 Ulrich Drepper <drepper@gmail.com>
250
251 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait): Don't
252 use gettimeofday vsyscall, just call gettimeofday.
9e5c9dcd
UD
253 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
254 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
255 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
256 Likewise.
257 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
258 Likewise.
259 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
260 Simplify __vdso_clock_gettime use.
a0e1f41b 261
39c4451c
DM
2622011-09-05 David S. Miller <davem@davemloft.net>
263
264 * sysdeps/unix/sysv/linux/sem_timedwait.c (do_futex_timed_wait):
265 New function.
266 (sem_timedwait): Call it to force an exception region around
267 the async cancel enable and the futex operation.
268 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: Likewise.
269 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: Likewise.
270 * sysdeps/unix/sysv/linux/sem_wait.c (do_futex_wait): New function.
271 (__new_sem_wait): Call it to force an exception region around
272 the async cancel enable and the futex operation.
273 * sysdeps/unix/sysv/linux/sparc/sem_wait.c: Likewise.
274 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: Likewise.
275
523df511
AS
2762011-08-31 Andreas Schwab <schwab@redhat.com>
277
278 * allocatestack.c (setxid_mark_thread): Ensure that the exiting
279 thread is woken up.
280
e315850c
DM
2812011-08-20 David S. Miller <davem@davemloft.net>
282
283 * Makefile (tst-cleanup0.out): Fix typo in output redirection.
284
5744c68d
RM
2852011-08-14 Roland McGrath <roland@hack.frob.com>
286
287 * sysdeps/i386/pthreaddef.h (TCB_ALIGNMENT): Set to 64, optimal on Atom.
288 * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Likewise.
289
a724d1b9
AS
2902011-08-08 Andreas Schwab <schwab@redhat.com>
291
292 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Maintain aligned
293 stack.
294 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
295 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
296
7a03a9c8
UD
2972011-07-22 Ulrich Drepper <drepper@gmail.com>
298
299 * sysdeps/pthread/unwind-forcedunwind.c (_Unwind_Resume): Add read
300 barrier.
301 (__gcc_personality_v0): Likewise.
302 (_Unwind_ForcedUnwind): Likewise.
303 (_Unwind_GetCFA): Likewise.
304
4b3d3e28
RM
3052011-07-14 Roland McGrath <roland@hack.frob.com>
306
307 * allocatestack.c (__reclaim_stacks): Use uintptr_t cast rather than
308 UINTMAX_C.
309
6f8326ca
UD
3102011-06-30 Ulrich Drepper <drepper@gmail.com>
311
312 * nptl-init.c (__nptl_set_robust): New function.
313 (pthread_functions): Add reference.
314 * npthreadP.h: Declare __nptl_set_robust.
315 * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
316 ptr_set_robust member.
317 * sysdeps/unix/sysv/linux/fork.c: Call set_robust_list syscall in
318 child if threads are used.
319
c71ca1f8
AJ
3202011-06-14 Andreas Jaeger <aj@suse.de>
321
322 * pthread_rwlock_init.c: Include <string.h> for memset declaration.
323
5bdcc103
UD
3242011-05-11 Ulrich Drepper <drepper@gmail.com>
325
326 [BZ #386]
327 * allocatestack.c (allocate_stack): Convert ENOMEM error to EAGAIN.
328
e6c61494
UD
3292011-04-10 Ulrich Drepper <drepper@gmail.com>
330
331 [BZ #12650]
332 * allocatestack.c (get_cached_stack): Deallocate DTV entries before
333 clearing memory.
334 Patch partly by Robert Rex <robert.rex@exasol.com>.
335
c5be0f71
RM
3362011-01-19 Roland McGrath <roland@redhat.com>
337
338 * pthread_cond_wait.c (__pthread_cond_wait): Fix comment typo.
339 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
340 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Likewise.
341 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
342 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock): Likewise.
343 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock): Likewise.
344
1f20b93a
AS
3452011-01-16 Andreas Schwab <schwab@linux-m68k.org>
346
347 * Makefile (test-extras): Add tst-cleanup4aux.
348
70181fdd
UD
3492011-01-14 Ulrich Drepper <drepper@gmail.com>
350
351 [BZ #10563]
352 * sysdeps/pthread/setxid.h (__SETXID_1): Add cast to assignment.
353 (__SETXID_2): Likewise.
354 (__SETXID_3): Likewise.
355
451f001b
UD
3562011-01-13 Ulrich Drepper <drepper@gmail.com>
357
358 [BZ #10484]
359 * Versions [libc] (GLIBC_PRIVATE): Export __libc_alloca_cutoff.
a85b5cb4 360 * alloca_cutoff.c: Add libc_hidden_def.
451f001b 361
f9068148
L
3622010-10-13 H.J. Lu <hongjiu.lu@intel.com>
363
364 [BZ #12113]
365 * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Changed to 32.
366 * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Defined with alignment
367 of "struct pthread".
368
c3758fee
AS
3692010-09-21 Andreas Schwab <schwab@redhat.com>
370
371 * sysdeps/pthread/pthread.h (pthread_cleanup_push)
372 [!__EXCEPTIONS]: Mangle local variable not_first_call.
373 (pthread_cleanup_push_defer_np): Likewise.
374
4ac42e19
UD
3752010-09-03 Ulrich Drepper <drepper@redhat.com>
376
377 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Expect blocks are
378 small.
379
022f6b89
DG
3802010-08-10 Dinakar Guniguntala <dino@in.ibm.com>
381 Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
382
383 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: If
384 FUTEX_WAKE_OP fails make sure to call FUTEX_WAKE instead.
385
f8392f40
L
3862010-08-12 H.J. Lu <hongjiu.lu@intel.com>
387
93f17abf 388 * sysdeps/unix/sysv/linux/i386/Makefile: New file.
f8392f40 389
bebff237
AM
3902010-05-01 Alan Modra <amodra@gmail.com>
391
392 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
393 (PSEUDO): Use correct cr save. Don't use wrong parm save area
394 to save temps. Correct cfi for possible later frame manipulation.
395 (DOCARGS_1, UNDOCARGS_1): Use the correct parm save area.
396 (DOCARGS_2, UNDOCARGS_2, DOCARGS_3, UNDOCARGS_3): Likewise.
397 (DOCARGS_4, UNDOCARGS_4, DOCARGS_5, UNDOCARGS_5): Likewise.
398 (DOCARGS_6, UNDOCARGS_6): Likewise.
399 (CENABLE, CDISABLE): Add nops for non-shared calls.
400
e8ee8bdf
AS
4012010-07-06 Andreas Schwab <schwab@redhat.com>
402
403 * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
404 Fix type mismatch.
405
03e87550
UD
4062010-07-03 Ulrich Drepper <drepper@redhat.com>
407
408 * tst-abstime.c (do_test): Some more cleanups
409
145569dc
UD
4102010-07-02 Ulrich Drepper <drepper@redhat.com>
411
412 * tst-abstime.c: Correct testing and add test for sem_timedwait.
413
2983d85e
AS
4142010-07-01 Andreas Schwab <schwab@redhat.com>
415 Ulrich Drepper <drepper@redhat.com>
416
417 * Makefile (tests): Add tst-abstime.
418 * tst-abstime.c: New file.
419 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
420 (__lll_timedlock_wait): Check for timestamp before the Epoch.
421 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
422 (__lll_timedlock_wait): Likewise.
423 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
424 (__lll_robust_timedlock_wait): Likewise.
425 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
426 (__pthread_cond_timedwait): Likewise.
427 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
428 (pthread_rwlock_timedrdlock): Likewise.
429 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
430 (pthread_rwlock_timedwrlock): Likewise.
431 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
432 Likewise.
433
72b6e8c8
UD
4342010-07-01 Ulrich Drepper <drepper@redhat.com>
435
436 * Makefile (tst-_res1): Add tst-_res1mod1 to dependency list.
437
4bc93b30
TY
4382010-06-01 Takashi Yoshii <takashi.yoshii.zj@renesas.com>
439
440 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Fix incorrect
441 location of ifndef __ASSUME_FUTEX_CLOCK_REALTIME.
442
86a4c67f
UD
4432010-04-09 Ulrich Drepper <drepper@redhat.com>
444
445 [BZ #11390]
446 * sysdeps/unix/sysv/linux/pthread_getname.c: New file.
447 * sysdeps/unix/sysv/linux/pthread_setname.c: New file.
448 * nptl/sysdeps/pthread/pthread.h: Declare pthread_getname and
449 pthread_setname.
450 * Makefile (libpthread-routines): Add pthread_getname and
451 pthread_setname.
452 * Versions: Export pthread_getname and pthread_setname for GLIBC_2.12.
453
f571a994
RM
4542010-04-05 Thomas Schwinge <thomas@schwinge.name>
455
456 * sysdeps/pthread/unwind-resume.c: Moved to main tree sysdeps/gnu/.
457 * sysdeps/pthread/rt-unwind-resume.c: Likewise.
458 * sysdeps/pthread/Makefile: Remove csu section and rt section's
459 unwind-resume bits, now in main tree sysdeps/gnu/Makefile instead.
460
7749bf5f
LM
4612010-03-23 Luis Machado <luisgpm@br.ibm.com>
462
463 * pthread_cond_timedwait.c: Add check for
464 HAVE_CLOCK_GETTIME_VSYSCALL to use VDSO whenever possible.
465 (pthread_cond_timedwait): Use INTERNAL_VSYSCALL instead of
466 INTERNAL_SYSCALL.
467
1d78f299
UD
4682010-03-09 Ulrich Drepper <drepper@redhat.com>
469
470 * pthread_create.c (__pthread_create_2_1): If priorities are incorrect
471 and the call fails wake eventually waiting setxid threads. Don't free
472 stack here if we try starting a thread.
473 * sysdeps/pthread/createthread.c (do_clone): Only wake setxid waiter
474 if the clone call failed.
475
058e9ba9
AS
4762010-03-08 Andreas Schwab <schwab@redhat.com>
477
478 * pthread_create.c (__pthread_create_2_1): Don't set setxid_futex.
479 * allocatestack.c (get_cached_stack): Set setxid_futex.
480 (allocate_stack): Likewise.
481
66f1b8ee
UD
4822010-03-05 Andreas Schwab <schwab@redhat.com>
483 Ulrich Drepper <drepper@redhat.com>
484
485 * allocatestack.c (setxid_mark_thread): Delay handling of thread if
486 it is creating a thread or it is just being created.
487 * pthread_create.c (start_thread): Wake setxid thread if it is
488 waiting.
489 (__pthread_create_2_1): Initialize setxid_futex.
490 * sysdeps/pthread/createthread.c (do_clone): Wake setxid thread if it
491 is waiting.
492
893549c5
MS
4932010-01-15 Ulrich Drepper <drepper@redhat.com>
494
495 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
496 Fix unwind info.
497 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
498
4992010-01-15 Michal Schmidt <mschmidt@redhat.com>
500
501 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
502 Fix pthread_cond_timedwait with requeue-PI.
503 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
504 Fix pthread_cond_wait with requeue-PI.
505
402cd987
UD
5062010-01-14 Ulrich Drepper <drepper@redhat.com>
507
78ee2185
UD
508 * Versions: Add pthread_mutex_consistent, pthread_mutexattr_getrobust,
509 and pthread_mutexattr_setrobust for GLIBC_2.12.
402cd987 510 * pthread_mutex_consistent.c: Define alias pthread_mutex_consistent.
78ee2185
UD
511 * pthread_mutexattr_getrobust.c: Define alias
512 pthread_mutexattr_getrobust.
513 * pthread_mutexattr_setrobust.c: Define alias
514 pthread_mutexattr_setrobust.
402cd987 515
d3c7e686
UD
5162010-01-12 Ulrich Drepper <drepper@redhat.com>
517
518 * sysdeps/pthread/pthread.h: Cleanup. Fix up for XPG7.
519
f095bb72
UD
5202010-01-08 Ulrich Drepper <drepper@redhat.com>
521
522 * sysdeps/pthread/pthread.h: Fix pthread_mutex_consistent declaration.
523
d34bd80f
TS
5242009-12-18 Thomas Schwinge <thomas@codesourcery.com>
525
526 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c (_init): Don't
527 call __gmon_start__.
528 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c (_init): Likewise.
529
f01c2359
UD
5302009-12-17 Ulrich Drepper <drepper@redhat.com>
531
532 * pthread_rwlock_init.c (__pthread_rwlock_init): Simplify code by
533 using memset.
534
75956694
DG
5352009-12-01 Dinakar Guniguntala <dino@in.ibm.com>
536
537 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.h: Define
538 FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
539 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: If mutex
540 is a non robust PI mutex, then use FUTEX_CMP_REQUEUE_PI.
541 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
542 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: If mutex
543 is a non robust PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
544 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
545
9554ebf2
UD
5462009-12-12 Ulrich Drepper <drepper@redhat.com>
547
548 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
549 Don't update nwaiters after invalid timeout is recognized.
550
ebb92a49
TS
5512009-11-27 Thomas Schwinge <thomas@codesourcery.com>
552
553 * sysdeps/unix/sysv/linux/sh/pt-initfini.c (_init): Don't call
554 __gmon_start__.
555
b55ec98c
AS
5562009-11-27 Andreas Schwab <schwab@redhat.com>
557
558 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Reload
559 THREAD_SELF->cancelhandling after returning from futex call.
560
80b3a4ea
UD
5612009-11-24 Ulrich Drepper <drepper@redhat.com>
562
563 * tst-sem13.c: New file.
564 * Makefile (tests): Add tst-sem13.
565
57a299fe
RM
5662009-11-22 Roland McGrath <roland@redhat.com>
567
568 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: # include "i686/dl-sysdep.h"
569 instead of recapitulating its contents.
570
dfedb126
UD
5712009-11-18 Ulrich Drepper <drepper@redhat.com>
572
573 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Minor
574 optimizations and cleanups.
575
dd7106b3
DG
5762009-11-18 Dinakar Guniguntala <dino@in.ibm.com>
577
578 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
579 Remove redundant code. Fix cfi offsets.
580 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
581 Fix cfi offsets.
582
f8c10bb4
UD
5832009-11-17 Ulrich Drepper <drepper@redhat.com>
584
62616842
UD
585 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Minimally
586 reduce size of unwind info.
587
f8c10bb4
UD
588 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Convert to use
589 cfi directives.
590 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
591 Based on a patch by Dinakar Guniguntala <dino@in.ibm.com>.
592
13f6812f
AS
5932009-11-03 Andreas Schwab <schwab@linux-m68k.org>
594
595 [BZ #4457]
596 * sysdeps/pthread/unwind-resume.c: Include <libgcc_s.h> and use
597 LIBGCC_S_SO.
598 * sysdeps/pthread/unwind-forcedunwind.c: Likewise.
599
25db0f6c
DJ
6002009-10-30 Ulrich Drepper <drepper@redhat.com>
601
9c04f7c1
UD
602 * tst-sem11.c (main): Rewrite to avoid aliasing problems.
603
25db0f6c
DJ
604 [BZ #3270]
605 * allocatestack.c (__nptl_setxid): Perform the operation in multiple
606 steps to avoid races with creation and terminations.
607 * nptl-init.c (sighandler_setxid): Adjust.
608 Patch by Daniel Jacobowitz.
609
3d60eb17
AS
6102009-09-07 Andreas Schwab <schwab@redhat.com>
611
612 * sysdeps/pthread/bits/libc-lock.h (BP_SYM): Remove space before paren.
613
38eb6136
SP
6142009-09-02 Suzuki K P <suzuki@in.ibm.com>
615 Joseph Myers <joseph@codesourcery.com>
616
617 [BZ #7094]
618 * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
619 Initialize the sigev_notify field for newly created timer to make sure
01034d75 620 the timer gets deleted from the active timer's list upon timer_delete.
38eb6136 621
7812c65b
AS
6222009-08-27 Andrew Stubbs <ams@codesourcery.com>
623
624 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
625 Correct a logic error.
626
84088310
UD
6272009-08-25 Ulrich Drepper <drepper@redhat.com>
628
629 * sysdeps/x86_64/tls.h (RTLD_ENABLE_FOREIGN_CALL): Store old value
630 of the field in local variables.
631 (RTLD_FINALIZE_FOREIGN_CALL): Restore rtld_must_xmm_save from local
632 variable and don't unconditionally clear it.
633
b42a214c
UD
6342009-08-24 Ulrich Drepper <drepper@redhat.com>
635
636 * pthread_create.c (start_thread): Hint to the kernel that memory for
637 the stack can be reused. We do not mark all the memory. The part
638 still in use and some reserve are kept.
639
2d094b73
UD
6402009-08-23 Ulrich Drepper <drepper@redhat.com>
641
642 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Clean up namespace.
643
ae0d5450
UD
6442009-08-11 Ulrich Drepper <drepper@redhat.com>
645
646 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Add CFI
647 directives.
648
1bc2b97e
UD
6492009-08-10 Ulrich Drepper <drepper@redhat.com>
650
651 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Add CFI
652 directives.
653 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
654
ec492239
AS
6552009-08-10 Andreas Schwab <schwab@redhat.com>
656
657 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
658 (__pthread_cond_signal): Don't clobber register used for syscall
659 number.
660
49eea97b
UD
6612009-08-08 Ulrich Drepper <drepper@redhat.com>
662
efa0569d
UD
663 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
664 Optimize code path used when FUTEX_CLOCK_REALTIME is supported.
665
49eea97b
UD
666 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
667 (__pthread_cond_wait): Optimize by avoiding use of callee-safe
668 register.
669
9083bcc5
UD
6702009-08-07 Ulrich Drepper <drepper@redhat.com>
671
672 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Little optimizations
673 enabled by the special *_asynccancel functions.
674 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
675 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
676
677 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Include lowlevellock.h.
678
421665c4
UD
6792009-08-04 Ulrich Drepper <drepper@redhat.com>
680
681 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: New file.
682 * sysdeps/unix/sysv/linux/x86_64/libc-cancellation.S: New file.
683 * sysdeps/unix/sysv/linux/x86_64/librt-cancellation.S: New file.
684 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Optimize
685 since we can assume the special __*_{en,dis}able_asynccancel
686 functions.
687 (PUSHARGS_*, POPARGS_*, SAVESTK_*, RESTSTK_*): Removed.
688 * sysdeps/x86_64/tcb-offsets.sym: Add cancellation-related bits
689 and PTHREAD_CANCELED.
690
bd03a1af
UD
6912009-07-31 Ulrich Drepper <drepper@redhat.com>
692
693 * descr.h: Better definition of *_BITMASK macros for cancellation.
694
b48a267b
UD
6952009-07-29 Ulrich Drepper <drepper@redhat.com>
696
586fa886
UD
697 * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Define explicitly to 32.
698
b48a267b 699 * sysdeps/x86_64/tls.h (tcbhead_t): Add room for SSE registers the
586fa886
UD
700 dynamic linker might have to save.
701 Define RTLD_CHECK_FOREIGN_CALL, RTLD_ENABLE_FOREIGN_CALL,
702 RTLD_PREPARE_FOREIGN_CALL, and RTLD_FINALIZE_FOREIGN_CALL. Pretty
703 printing.
704
b48a267b
UD
705 * sysdeps/x86_64/tcb-offsets.sym: Add RTLD_SAVESPACE_SSE.
706
b0948ffd
UD
7072009-07-28 Ulrich Drepper <drepper@redhat.com>
708
709 * pthread_mutex_lock.c [NO_INCR] (__pthread_mutex_cond_lock_adjust):
710 New function.
711 * pthreadP.h: Declare __pthread_mutex_cond_lock_adjust.
712 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add ROBUST_BIT.
713 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Don't use
714 requeue_pi for robust mutexes.
715 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
716 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
717 Don't only skip __pthread_mutex_cond_lock. Call instead
718 __pthread_mutex_cond_lock_adjust.
719 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
720
721 * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Minor
722 optimization of PI mutex handling.
723
e73e694e
UD
7242009-07-27 Ulrich Drepper <drepper@redhat.com>
725
726 [BZ #10418]
727 * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Use _rel
728 instead of of _acq variants of cmpxchg.
729
f1adf1f4
UD
7302009-07-23 Ulrich Drepper <drepper@redhat.com>
731
01b597da
UD
732 * sysdeps/x86_64/configure.in: New file.
733
f1adf1f4
UD
734 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix error
735 path when not using absolute timeout futex.
736
c3db953c
UD
7372009-07-20 Ulrich Drepper <drepper@redhat.com>
738
739 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Minor
740 optimizations of last changes.
741 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
742
515a8908
UD
7432009-07-19 Ulrich Drepper <drepper@redhat.com>
744
42e69bcf
UD
745 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
746 FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
747 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: If mutex
748 is a PI mutex, then use FUTEX_CMP_REQUEUE_PI.
749 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
750 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: If mutex
751 is a PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
752 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
753
515a8908
UD
754 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
755 (__pthread_cond_timedwait): Make more robust.
756
30b1954a
UD
7572009-07-18 Ulrich Drepper <drepper@redhat.com>
758
e2dca2fe
UD
759 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
760 (__lll_robust_timedlock_wait): If possible use FUTEX_WAIT_BITSET to
761 directly use absolute timeout.
762
3d77b268
UD
763 * tst-sem5.c (do_test): Add test for premature timeout.
764 * Makefile: Linu tst-sem5 with librt.
765
d979611e
UD
766 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
767 (pthread_rwlock_timedwrlock): If possible use FUTEX_WAIT_BITSET to
768 directly use absolute timeout.
32c6c342
UD
769 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
770 (pthread_rwlock_timedrdlock): Likewise.
d979611e 771
f8b6cd21
UD
772 * tst-cond11.c (run_test): Add test to check that the timeout is
773 long enough.
774
e88726b4
UD
775 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
776 (__pthread_cond_timedwait): If possible use FUTEX_WAIT_BITSET to
777 directly use absolute timeout.
778
30b1954a
UD
779 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
780 (__pthread_cond_wait): Convert to using exception handler instead of
781 registered unwind buffer.
92618c95
UD
782 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
783 (__pthread_cond_timedwait): Likewise.
30b1954a 784
d52c96e7
UD
7852009-07-17 Ulrich Drepper <drepper@redhat.com>
786
f351f2b7
UD
787 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
788 If possible use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME to directly
789 use absolute timeout.
790
0adae468
UD
791 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Optimize
792 handling of uncontested semaphore.
793
d52c96e7
UD
794 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
795 (__condvar_cleanup): Rewrite to use cfi directives instead of
796 hand-coded unwind tables.
63601ccd
UD
797 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S (__pthread_once):
798 Likewise.
c3c2f3cf 799 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
aee2665a
UD
800 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
801 Likewise.
d52c96e7 802
bfdb73e1
UD
8032009-06-12 Ulrich Drepper <drepper@redhat.com>
804
805 * Makefile (libpthread-routines): Add pthread_sigqueue.
806 * Versions: Add pthread_sigqueue for GLIBC_2.11.
807 * sysdeps/pthread/bits/sigthread.h: Declare pthread_sigqueue.
808 * sysdeps/unix/sysv/linux/pthread_sigqueue.c: New file.
809
1828530f
BK
8102009-06-11 Ulrich Drepper <drepper@redhat.com>
811
812 [BZ #10262]
813 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
814 (LOAD_FUTEX_WAIT_ABS): Fix futex parameter in case private futexes
815 cannot be assumed.
816 Patch by Bryan Kadzban <bz-glibc@kdzbn.homelinux.net>.
817
a5b8b56d
UD
8182009-05-16 Ulrich Drepper <drepper@redhat.com>
819
e20c4ef0
UD
820 * libc-cancellation.c: Move __libc_cleanup_routine to...
821 * libc-cleanup.c: ...here. New file.
822 * Makefile (routines): Add libc-cleanup.
823
cba0ca79
UD
824 * cancellation.c (__pthread_disable_asynccancel): Remove unnecessary
825 test.
826 * libc-cancellation.c: Use <nptl/cancellation.c: to define the code.
827 * sysdeps/pthread/librt-cancellation.c: Likewise.
828
a5b8b56d
UD
829 [BZ #9924]
830 * nptl-init.c: Renamed from init.c.
831 * Makefile: Change all occurences of init.c to nptl-init.c.
832
1a7f254b
UD
8332009-05-15 Ulrich Drepper <drepper@redhat.com>
834
9437b427
UD
835 * cancellation.c (__pthread_disable_asynccancel): Correct the bits
836 to test when deciding on the delay.
837 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
838 * pthread_cancel.c: Close race between deciding on sending a signal
839 and setting the CANCELING_BIT bit.
840
1a7f254b
UD
841 * cancellation.c (__pthread_disable_asynccancel): Don't return if
842 thread is canceled.
843 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
844
d5c157a9
UD
8452009-04-27 Ulrich Drepper <drepper@redhat.com>
846
847 * cancellation.c (__pthread_disable_asynccancel): Use THREAD_ATOMIC_AND
848 is available.
849 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
850 * sysdeps/x86_64/tls.h: Define THREAD_ATOMIC_AND.
851 * sysdeps/i386/tls.h: Likewise.
852 (tcbhead_t): Add __private_tm member.
853
f521be31
UD
8542009-04-26 Ulrich Drepper <drepper@redhat.com>
855
5efe8650
UD
856 * sem_open.c (sem_open): Rewrite initialization of initsem to
857 avoid warnings.
858
f521be31
UD
859 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
860 Avoid warning by using may_alias attribute on ptrhack.
861
d301a6e1
UD
8622009-04-22 Ulrich Drepper <drepper@redhat.com>
863
5497de87 864 [BZ #10090]
d301a6e1
UD
865 * pthread_attr_setschedparam.c (__pthread_attr_setschedparam):
866 Check policy and priority for validity.
867 Patch mostly by Zhang Xiliang <zhangxiliang@cn.fujitsu.com>.
868
71a5bd3e
UD
8692009-03-15 Ulrich Drepper <drepper@redhat.com>
870
871 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
872 (__pthread_cond_timedwait): Change to use cfi directives instead of
873 hand-coded unwind sections.
874
30991b8b
UD
8752009-03-10 Ulrich Drepper <drepper@redhat.com>
876
877 * init.c (nptl_freeres): Compile only for SHARED.
878
9920a6b8
JJ
8792009-03-09 Jakub Jelinek <jakub@redhat.com>
880
881 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Define
882 FUTEX_WAIT_BITSET, FUTEX_WAKE_BITSET, FUTEX_CLOCK_REALTIME and
883 FUTEX_BITSET_MATCH_ANY.
884
e965d514
RM
8852009-02-27 Roland McGrath <roland@redhat.com>
886
887 * init.c (__nptl_initial_report_events): Mark __attribute_used__.
888 * pthread_create.c (__nptl_threads_events, __nptl_last_event): Likewise.
889
6cbe890a
UD
8902009-02-26 Ulrich Drepper <drepper@redhat.com>
891
892 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
893 _POSIX_THREAD_ROBUST_PRIO_INHERIT and
894 _POSIX_THREAD_ROBUST_PRIO_PROTECT. Reset value of macros from
895 200112L to 200809L.
896
77db439e
UD
8972009-02-25 Ulrich Drepper <drepper@redhat.com>
898
899 * sysdeps/pthread/pthread.h: The robust mutex functions are in
900 POSIX 2008.
901
5be0a688
UD
9022009-02-24 Ulrich Drepper <drepper@redhat.com>
903
904 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_BITS_POSIX_OPT_H):
905 Unify name of include protector macro.
906
4c869eb6
UD
9072009-02-14 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
908
909 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
910 LOAD_FUTEX_WAIT_ABS even if (FUTEX_WAIT == 0).
911
cca50323
UD
9122009-01-29 Ulrich Drepper <drepper@redhat.com>
913
7f901dd7
UD
914 * sysdeps/pthread/unwind-forcedunwind.c: Encrypt all function
915 pointer variables.
916
cca50323
UD
917 * allocatestack.c (__free_stacks): Renamed from free_stacks.
918 (__free_stack_cache): Removed. Change callers to call __free_stacks.
919 * init.c (nptl_freeres): New function.
920 (pthread_functions): Initialize ptr_freeres to nptl_freeres.
921 * pthreadP.h: Don't declare __free_stack_cache. Declare __free_stacks.
922 * sysdeps/pthread/unwind-forcedunwind.c (libgcc_s_handle): New
923 variable.
924 (pthread_cancel_init): Depend in libgcc_s_handle for decision to
925 load DSO. Assign last.
926 (__unwind_freeres): New function.
927
928 * allocatestack.c (__reclaim_stacks): Reset in_flight_stack later
929 for better debugging. No need to use stack_list_add here.
930
a7bd183f
UD
9312009-01-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
932
933 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
934 (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
935 instead of computing relative timeout.
936 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
937 FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
938
563ee1cb
UD
9392009-01-25 Ulrich Drepper <drepper@redhat.com>
940
941 * pthread_mutex_lock.c (__pthread_mutex_lock): Remove unused label out.
942
f25c7b08
UD
9432009-01-08 Ulrich Drepper <drepper@redhat.com>
944
945 * sysdeps/pthread/list.h (list_add): Initialize new element first.
946 (list_add_tail): Removed.
947
40de0fe3
JJ
9482009-01-07 Ulrich Drepper <drepper@redhat.com>
949
950 * (in_flight_stack): New variable.
951 (stack_list_del): New function. Use instead of list_del.
952 (stack_list_add): New function. Use instead of list_add when adding to
953 stack_cache and stack_used lists.
954 (__reclaim_stacks): Complete operations on stack_cache and stack_used lists
955 when the fork call interrupted another thread.
956
3c612057
UD
9572009-01-04 Ulrich Drepper <drepper@redhat.com>
958
959 * init.c (__pthread_initialize_minimal_internal): Optimize test
960 FUTEX_CLOCK_REALTIME a bit.
961
19834b42
UD
9622009-01-03 Ulrich Drepper <drepper@redhat.com>
963
964 * init.c (__pthread_initialize_minimal_internal): Cheat a bit by
965 only passing five parameters to FUTEX_WAIT_BITSET call.
966
967 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
a9fa090b 968 (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
19834b42
UD
969 instead of computing relative timeout.
970
7dd650d7
UD
9712009-01-02 Ulrich Drepper <drepper@redhat.com>
972
cbd8aeb8
UD
973 * init.c (__pthread_initialize_minimal_internal): Check for
974 FUTEX_CLOCK_REALTIME flag.
975 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
a9fa090b 976 Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME instead of computing
cbd8aeb8
UD
977 relative timeout.
978
7dd650d7
UD
979 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
980 FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
981 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
982 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
983 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
984 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
985
217d45cd
UD
9862008-12-09 Ulrich Drepper <drepper@redhat.com>
987
988 * sysdeps/pthread/pthread.h (pthread_cleanup_pop): Use { } as empty
989 loop body instead of ; to avoid gcc warnings.
990 (pthread_cleanup_pop_restore_np): Likewise.
991 Patch by Caolán McNamara <caolanm@redhat.com>.
992
6de79a49
UD
9932008-12-09 Jakub Jelinek <jakub@redhat.com>
994
995 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle only the
996 fast path here, for robust/PI/PP mutexes call
997 __pthread_mutex_lock_full. Don't use switch, instead use a series
998 of ifs according to their probability.
999 (__pthread_mutex_lock_full): New function.
1000 * pthread_mutex_unlock.c: Include assert.h.
1001 (__pthread_mutex_unlock_usercnt): Handle only the
1002 fast path here, for robust/PI/PP mutexes call
1003 __pthread_mutex_unlock_full. Don't use switch, instead use a series
1004 of ifs according to their probability.
1005 (__pthread_mutex_unlock_full): New function.
1006 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c
1007 (__pthread_mutex_lock_full): Define.
1008
71bb2639
UD
10092008-12-08 Ulrich Drepper <drepper@redhat.com>
1010
1011 * sysdeps/x86_64/tls.h (tcbhead_t): Add fields reserved for TM
1012 implementation. Add necessary padding and.
1013 * descr.h (struct pthread): Increase padding for tcbhead_t to 24
1014 words.
1015
247626f3
UD
10162008-12-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1017
1018 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define FUTEX_WAIT_BITSET
1019 and FUTEX_WAKE_BITSET.
1020
da5ac135
UD
10212008-12-02 Ulrich Drepper <drepper@redhat.com>
1022
1023 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_WAIT_BITSET
1024 and FUTEX_WAKE_BITSET.
1025 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1026 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1027 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1028 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1029
c0439b95
RM
10302008-11-25 Roland McGrath <roland@redhat.com>
1031
1032 * sysdeps/alpha, sysdeps/unix/sysv/linux/alpha:
1033 Subdirectories moved to ports repository as
1034 sysdeps/.../nptl subdirectories.
1035
0e54a725
UD
10362008-11-12 Jakub Jelinek <jakub@redhat.com>
1037
1038 [BZ #7008]
1039 * pthread_condattr_setclock.c (pthread_condattr_setclock): Fix masking
1040 of old value.
1041 * pthread_cond_init.c (__pthread_cond_init): Fix
1042 cond->__data.__nwaiters initialization.
1043 * Makefile (tests): Add tst-cond23.
1044 * tst-cond23.c: New test.
1045
4b23f9bd
JJ
10462008-11-07 Jakub Jelinek <jakub@redhat.com>
1047
1048 * sysdeps/pthread/malloc-machine.h (MALLOC): Adjust __libc_tsd_define
1049 arguments.
1050 (tsd_setspecific, tsd_getspecific): Adjust __libc_tsd_{set,get}
1051 arguments.
1052
efac1fce
UD
10532008-11-01 Ulrich Drepper <drepper@redhat.com>
1054
1055 [BZ #6955]
1056 * pthread_mutex_lock.c: Add support for private PI mutexes.
1057 * pthread_mutex_timedlock.c: Likewise.
1058 * pthread_mutex_trylock.c: Likewise.
1059 * pthread_mutex_unlock.c: Likewise.
1060 Patch mostly by Ben Jackson <ben@ben.com>.
1061
bf837fa3
UD
10622008-10-31 Ulrich Drepper <drepper@redhat.com>
1063
1064 [BZ #6843]
1065 * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread):
1066 Increase stack size for helper thread.
1067
208bc836
UD
10682008-10-06 Martin Schwidefsky <schwidefsky@de.ibm.com>
1069
1070 * sysdeps/s390/tls.h (THREAD_SET_STACK_GUARD): Add empty inline
1071 assembly with a clobber list for access registers a0 and a1.
1072
17f8b4a9
UD
10732008-09-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
1074
1075 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Add memory barrier
1076 to force runp->refcntr to be read from memory.
1077
2458c748
AJ
10782008-09-08 Richard Guenther <rguenther@suse.de>
1079
1080 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_lock,
1081 lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
1082 lll_timedlock, lll_robust_timedlock, lll_unlock,
1083 lll_robust_unlock): Promote private to int.
1084
965805e8
UD
10852008-08-15 Ulrich Drepper <drepper@redhat.com>
1086
1087 * sysdeps/x86_64/pthreaddef.h: Remove ARCH_MAP_FLAGS and
1088 ARCH_RETRY_MMAP definitions.
1089 * allocatestack.c: Remove definition of ARCH_MAP_FLAGS.
1090 Define MAP_STACK when not defined.
1091 (allocate_stack): Use MAP_STACK instead of ARCH_MAP_FLAGS. Remove
1092 handling of ARCH_RETRY_MMAP.
1093
bd7f4857
UD
10942008-07-30 Ulrich Drepper <drepper@redhat.com>
1095
1096 * tst-align2.c (f): Print message that f is reached.
1097
619cc2f6
UD
10982008-04-28 Hiroki Kaminaga <kaminaga@sm.sony.co.jp>
1099
1100 [BZ #6740]
1101 * sysdeps/powerpc/tcb-offsets.sym (PRIVATE_FUTEX_OFFSET): Guard symbol
1102 definition with #ifndef __ASSUME_PRIVATE_FUTEX.
1103
8ccf22f9
UD
11042008-07-25 Ulrich Drepper <drepper@redhat.com>
1105
1106 * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Use
1107 SOCK_CLOEXEC if possible.
1108
11092008-05-29 Ulrich Drepper <drepper@redhat.com>
1110
1111 * Makefile (tests): Add tst-rwlock2a.
1112 * tst-rwlock2.c: Use TYPE macro to decide what rwlock type to use.
1113 * tst-rwlock2a.c: New file.
1114
5a337776
UD
11152008-06-12 Ulrich Drepper <drepper@redhat.com>
1116
1117 * sysdeps/pthread/pthread.h: Remove inadvertant checkin.
1118
e4d6e7f5
UD
11192008-05-17 Samuel Thibault <samuel.thibault@ens-lyon.org>
1120
1121 * sysdeps/pthread/pthread.h: Fix typo in comment.
1122
d6296e88
UD
11232008-05-28 Ulrich Drepper <drepper@redhat.com>
1124
1125 * sysdeps/pthread/createthread.c (do_clone): Pass accurate length
1126 of CPU set to the kernel.
1127
62605cbf
UD
11282008-05-23 Paul Pluzhnikov <ppluzhnikov@google.com>
1129
1130 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Add
1131 cfi directives.
1132 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
1133 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
1134 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1135 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1136 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1137 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1138
11392008-05-22 Paul Pluzhnikov <ppluzhnikov@google.com>
1140
1141 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: Add
1142 cfi directives.
1143 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1144 Likewise.
1145 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1146 Likewise.
1147 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1148 Likewise.
1149
4b2c85c0
UD
11502008-05-26 Ulrich Drepper <drepper@redhat.com>
1151
1152 * tst-typesizes.c: Explicitly check __SIZEOF_PTHREAD_* constants.
1153
b72f5692 11542008-05-20 Jakub Jelinek <jakub@redhat.com>
4b2c85c0
UD
1155
1156 David S. Miller <davem@davemloft.net>
3b15b590 1157
b72f5692 1158 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
3b15b590 1159
cdffaaa6
UD
11602008-05-10 Ulrich Drepper <drepper@redhat.com>
1161
1162 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Access
1163 __pshared correctly.
1164 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1165 Likewise.
1166 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1167 Likewise.
1168 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
1169 Likewise.
1170 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
1171 Likewise.
1172 Reported by Clemens Kolbitsch <clemens.kol@gmx.at>.
1173
2313c48f
JJ
11742008-04-14 David S. Miller <davem@davemloft.net>
1175
1176 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
1177 (__old_sem_wait): Fix argument to lll_futex_wait().
1178
2f611ada
UD
11792007-11-26 Daniel Jacobowitz <dan@codesourcery.com>
1180
1181 * pthread_create.c: Require pthread_mutex_trylock and
1182 pthread_key_delete for libgcc.
1183
d24be489
JJ
11842008-04-08 Jakub Jelinek <jakub@redhat.com>
1185
1186 [BZ #6020]
1187 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
1188 (lll_futex_wake_unlock): Add private argument to the pre-v9 macro.
1189 Patch by Sunil Amitkumar Janki <devel.sjanki@gmail.com>.
1190
f96853be
UD
11912008-03-27 Ulrich Drepper <drepper@redhat.com>
1192
8ccf22f9 1193 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine ARG_MAX if
f96853be
UD
1194 <linux/limits.h> has defined it.
1195 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
1196 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
1197 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
1198 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
1199
354b7527
JJ
12002008-03-18 Jakub Jelinek <jakub@redhat.com>
1201
1202 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Use __ASSEMBLER__ instead
1203 of ASSEMBLER.
1204 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
1205 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Likewise.
1206
702ae329
UD
12072008-03-14 Ulrich Drepper <drepper@redhat.com>
1208
1209 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
1210 HAVE_DL_DISCOVER_OSVERSION.
1211 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
1212 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Likewise.
1213
443db178
UD
12142008-03-07 Ulrich Drepper <drepper@redhat.com>
1215
1216 [BZ #5778]
1217 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Change
1218 _POSIX_CHOWN_RESTRICTED value to zero.
1219
67fbfa5c
RM
12202008-01-31 Roland McGrath <roland@redhat.com>
1221
1222 * Makefile (omit-deps): Variable removed.
1223
dd3113da
UD
12242008-01-30 Ulrich Drepper <drepper@redhat.com>
1225
1226 * sysdeps/unix/sysv/linux/x86_64/sem_post.S (sem_post): Avoid
1227 unnecessary addr32 prefix.
1228
16cd816f
RM
12292008-01-29 Roland McGrath <roland@redhat.com>
1230
1231 * Makeconfig (ptw-CPPFLAGS, sysd-rules-patterns): New variables.
1232
b4b166af
UD
12332008-01-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1234
1235 * sysdeps/unix/sysv/linux/sh/sem_post.S: Don't overflow value field.
1236
12372008-01-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1238
1239 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XADD): Use
1240 a scratch register.
1241 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
1242 (__lll_lock_wait_private): Fix typo.
1243 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
1244 (pthread_barrier_wait): Likewise. Adjust XADD use.
1245 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
1246 Adjust XADD use.
1247 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
1248 (pthread_rwlock_timedrdlock): Return correct return value.
1249 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
16cd816f 1250 (pthread_rwlock_timedwrlock): Likewise.
b4b166af 1251
eaf95a26
UD
12522008-01-15 Ulrich Drepper <drepper@redhat.com>
1253
1254 * tst-eintr2.c (do_test): make sure that if mutex_lock in main
1255 thread returns the program exits with an error code.
1256
ab355d9a
UD
12572008-01-10 Ulrich Drepper <drepper@redhat.com>
1258
1259 * pthread-errnos.sym: Add EOVERFLOW.
1260 * sysdeps/unix/sysv/linux/structsem.sym: Add SEM_VALUE_MAX.
1261 * sysdeps/unix/sysv/linux/sem_post.c: Don't overflow value field.
1262 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1263 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1264
b8cca206
UD
12652007-12-14 Ulrich Drepper <drepper@redhat.com>
1266
1267 * sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
1268 parameter. Passed it as permission to mmap.
1269 * allocatestack.c (allocate_stack): Pass prot as second parameter
1270 to ARCH_RETRY_MMAP.
1271
189dce4f
UD
12722007-12-12 Ulrich Drepper <drepper@redhat.com>
1273
3eb0e1c6
UD
1274 * tst-basic7.c: Allocate memory for the stack.
1275
189dce4f
UD
1276 [BZ #5465]
1277 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
1278 (__pthread_cond_timedwait): Don't use VDSO.
58d11795 1279 Patch by Michal Januszewski.
189dce4f 1280
26e21e75
UD
12812007-12-07 Ulrich Drepper <drepper@redhat.com>
1282
1283 [BZ #5455]
1284 * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
1285 Allow label before pthread_cleanup_pop.
1286 (pthread_cleanup_pop_restore_np): Likewise.
1287
191ec77f
UD
12882007-12-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1289
1290 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
1291 Store 2 before returning ETIMEDOUT.
1292
c012be6f
UD
12932007-11-23 Ulrich Drepper <drepper@redhat.com>
1294
1295 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
1296 Store 2 before returning ETIMEDOUT.
1297 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
1298 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
1299 (__lll_lock_wait_private): Optimize.
1300 (__lll_lock_wait): Likewise.
1301
77f1e09a
UD
13022007-11-20 Jakub Jelinek <jakub@redhat.com>
1303
1304 * sysdeps/pthread/pthread.h (pthread_cleanup_push,
1305 pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
1306 g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
1307
0f7e0ee5
UD
13082007-11-08 Ulrich Drepper <drepper@redhat.com>
1309
cbed6a60
UD
1310 [BZ #5240]
1311 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
1312 If we time out, try one last time to lock the futex to avoid
1313 losing a wakeup signal.
1314 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1315 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1316
0f7e0ee5
UD
1317 [BZ #5245]
1318 * sysdeps/pthread/createthread.c (do_clone): Translate clone error
1319 if necessary.
1320
f6ed654c
UD
13212007-11-07 Ulrich Drepper <drepper@redhat.com>
1322
1323 [BZ #5245]
1324 * allocatestack.c (allocate_stack): Change ENOMEM error in case
1325 mmap failed to EAGAIN.
1326 * Makefile (tests): Add tst-basic7.
1327 * tst-basic7.c: New file.
1328
b92e3780
UD
13292007-11-05 Ulrich Drepper <drepper@redhat.com>
1330
1331 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
1332 Use __linkin_atfork.
1333
94a749f6
UD
13342007-11-03 Mike Frysinger <vapier@gentoo.org>
1335
1336 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
1337 missing line continuations.
1338 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
1339 LOAD_FUTEX_WAKE): Likewise. Also add missing 3rd parameter.
1340
f160a450
UD
13412007-10-28 Ulrich Drepper <drepper@redhat.com>
1342
1343 [BZ #5220]
1344 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
1345 __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
1346 (struct timer): Add next element.
1347 * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
1348 enqueue timer structure into __active_timer_sigev_thread list.
1349 * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
1350 remove timer struct from __active_timer_sigev_thread.
1351 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
1352 Before using timer structure make sure it is still on the
1353 __active_timer_sigev_thread list. Keep lock until done.
1354 Define __active_timer_sigev_thread and
1355 __active_timer_sigev_thread_lock.
1356
94833f11
UD
13572007-10-27 Ulrich Drepper <drepper@redhat.com>
1358
1359 * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
1360 Redefine thread_atfork for use of ATFORK_MEM.
1361 * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
1362 * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
1363 function.
1364 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
1365 Use atomic operation when removing first element of list.
1366
96c06e08
JJ
13672007-10-17 Jakub Jelinek <jakub@redhat.com>
1368
1369 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
1370 routine instead of an alias to __new_sem_post.
1371
e807818b
JJ
13722007-10-15 Jakub Jelinek <jakub@redhat.com>
1373
1374 * init.c (__pthread_initialize_minimal): Initialize word to appease
1375 valgrind.
1376
59d430c6
UD
13772007-10-10 Jakub Jelinek <jakub@redhat.com>
1378
1379 * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
1380 libc.so just clear NAME.
1381 (__libc_rwlock_fini): Nop inside of libc.so.
1382 * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
1383 all zeros.
1384
221d9d8e
UD
13852007-09-02 Ulrich Drepper <drepper@redhat.com>
1386
1387 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1388 (__pthread_cond_wait): Fix unlocking of internal lock after mutex
1389 unlocking failed.
1390 Patch by Luca Barbieri <luca.barbieri@gmail.com>.
1391
2a01ce56
UD
13922007-08-21 Ulrich Drepper <drepper@redhat.com>
1393
1394 [BZ #4938]
1395 * allocatestack.c (__reclaim_stacks): Clear the TSD in the
1396 reclaimed stack if necessary.
1397 * Makefile (tests): Add tst-tsd6.
1398 * tst-tsd6.c: New file.
1399
c273641b
JJ
14002007-08-21 Jakub Jelinek <jakub@redhat.com>
1401
1402 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
1403 Add private argument.
1404
fb84593c
UD
14052007-08-20 Ulrich Drepper <drepper@redhat.com>
1406
1407 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1408 (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
1409
3e8d1eab
JJ
14102007-08-16 Jakub Jelinek <jakub@redhat.com>
1411
1412 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
1413 (__lll_robust_timedlock): Pass private as last argument to
1414 __lll_robust_timedlock_wait.
1415 (__lll_unlock): Fix a pasto.
1416
e4720b0e
JJ
14172007-08-15 Jakub Jelinek <jakub@redhat.com>
1418
1419 * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
1420 sparc_old_sem): New structs.
1421 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
1422 (__sem_wait_cleanup): New function.
1423 (__new_sem_wait): Use sparc_new_sem structure. Bump and afterwards
1424 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
1425 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
1426 lll_futex_wait.
1427 (__old_sem_wait): New function.
1428 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
1429 nptl/sysdeps/unix/sysv/linux/sparc version.
1430 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
1431 Likewise.
1432 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
1433 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
1434 (__new_sem_trywait): Use sparc_old_sem structure.
1435 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
1436 (sem_timedwait): Use sparc_new_sem structure. Bump and afterwards
1437 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
1438 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
1439 lll_futex_timed_wait.
1440 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
1441 Use sparc_new_sem structure. Only wake if nwaiters > 0. Pass
1442 isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
1443 lll_futex_wake.
1444 (__old_sem_post): New function.
1445 * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
1446 * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
1447 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
1448 * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
1449 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
1450 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
1451
d13f4a43
UD
14522007-08-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1453
1454 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
1455 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
1456 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1457 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
1458 * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
1459 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
1460 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1461 Use FUTEX_WAKE_OP.
1462 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
1463 kernel-features.h and tcb-offsets.h.
1464 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
1465 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
1466 process private.
1467 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
1468 tcb-offsets.h.
1469 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
1470 to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
1471 process private.
1472 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
1473 __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
1474 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
1475 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
1476 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
1477 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
1478 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1479
702a9414
JJ
14802007-08-14 Jakub Jelinek <jakub@redhat.com>
1481
467d1345
JJ
1482 * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
1483 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
1484 (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
1485 lll_futex_timed_wait.
1486
702a9414
JJ
1487 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
1488 __lll_robust_unlock): Rewrite as macros instead of inline functions.
1489 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
1490 __lll_robust_unlock, __lll_wait_tid): Likewise.
1491
22502ea2
UD
14922007-08-13 Jakub Jelinek <jakub@redhat.com>
1493
1494 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
1495 Fix a pasto.
1496 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
1497 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
1498 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1499 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
1500 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
1501 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
1502 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1503 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
1504 kernel-features.h.
1505 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
1506 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
1507 process private. Switch DW_CFA_advance_loc1 and some
1508 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
1509 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
1510 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
1511 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
1512 process private. Switch DW_CFA_advance_loc{1,2} and some
1513 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
1514 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
1515 #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
1516 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1517 Likewise.
1518 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1519 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1520 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1521 Likewise.
1522 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
1523 (__pthread_cond_broadcast): Compare %r8 instead of
1524 dep_mutex-cond_*(%rdi) with $-1.
1525 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
1526 (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
1527 of oring.
1528
4baf59ad
UD
15292007-08-13 Ulrich Drepper <drepper@redhat.com>
1530
1531 * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
1532
9c6f6953
UD
15332007-08-13 Jakub Jelinek <jakub@redhat.com>
1534
1535 * allocatestack.c: Include kernel-features.h.
1536 * pthread_create.c: Likewise.
1537 * pthread_mutex_init.c: Likewise.
1538 * init.c: Likewise.
1539 * pthread_cond_timedwait.c: Likewise.
1540 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
1541 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1542 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1543 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1544 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1545 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1546 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1547 Likewise.
1548 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1549 Likewise.
1550 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1551 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1552 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1553 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
1554
974a1f0f
UD
15552007-08-12 Jakub Jelinek <jakub@redhat.com>
1556
1557 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
1558 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
1559 byte elements. One of them is the new __shared element.
1560 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
1561 adjust names of other padding elements.
1562 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
1563 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
1564 byte elements. One of them is the new __shared element.
1565 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
1566 adjust names of other padding elements.
1567 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
1568 Renamed __pad1 element to __shared, adjust names of other padding
1569 elements.
1570 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
1571 (pthread_rwlock_t): Likewise.
1572 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
1573 typo.
1574
15752007-08-09 Anton Blanchard <anton@samba.org>
1576
1577 * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
1578
f47e2626
UD
15792007-08-12 Ulrich Drepper <drepper@redhat.com>
1580
1581 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
1582 <kernel-features.h>.
1583 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1584
5bd8a249
UD
15852007-08-11 Ulrich Drepper <drepper@redhat.com>
1586
1587 * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
1588 * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
1589 dealing with robust mutexes.
1590 * pthread_mutex_timedlock.c: Likewise.
1591 * pthread_mutex_trylock.c: Likewise.
1592 * pthread_mutex_unlock.c: Likewise.
1593 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
1594
15952007-08-06 Jakub Jelinek <jakub@redhat.com>
1596
1597 * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
1598 (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
1599 (PTHREAD_MUTEX_PSHARED): Define.
1600 * pthread_mutex_init.c (__pthread_mutex_init): Set
1601 PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
1602 mutexes.
1603 * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
1604 instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
1605 as second argument to lll_lock.
1606 (LLL_MUTEX_TRYLOCK): Take mutex as argument
1607 instead of its __data.__lock field.
1608 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
1609 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
1610 to lll_robust_lock.
1611 (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
1612 LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
1613 instead of mutex->__data.__kind directly, pass
1614 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
1615 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
1616 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
1617 directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
1618 (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
1619 to lll_timedlock, lll_robust_timedlock, lll_unlock and
1620 lll_futex_timed_wait. Use PTHREAD_MUTEX_TYPE (mutex) instead
1621 of mutex->__data.__kind directly.
1622 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
1623 PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
1624 lll_robust_timedlock, lll_unlock and lll_futex_timed_wait. Use
1625 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
1626 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
1627 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
1628 and lll_futex_wake.
1629 * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
1630 PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
1631 Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
1632 directly.
1633 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
1634 Take mutex as argument instead of its __data.__lock field, pass
1635 PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
1636 (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
1637 __data.__lock field.
1638 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
1639 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
1640 to lll_robust_cond_lock.
1641 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
1642 variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
1643 lll_futex_wake. Don't use lll_futex_requeue if dependent mutex
1644 has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
1645 * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
1646 variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
1647 lll_futex_wait.
1648 * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
1649 variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
1650 lll_futex_wake.
1651 * pthread_cond_timedwait.c (__pthread_cond_wait): Add
1652 pshared variable, pass it to lll_lock, lll_unlock,
1653 lll_futex_timedwait and lll_futex_wake.
1654 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
1655 pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
1656 and lll_futex_wake.
1657 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
1658 lll_futex_wake_unlock): Add private argument, use __lll_private_flag
1659 macro.
1660 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
1661 lll_futex_wake_unlock): Likewise.
1662 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
1663 Likewise.
1664 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
1665 lll_futex_wake_unlock): Likewise.
1666 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
1667 Likewise.
1668 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
1669 lll_futex_wake_unlock): Likewise.
1670 (lll_futex_wake): Fix a typo.
1671 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
1672 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
1673 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
1674 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1675 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
1676 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
1677 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
1678 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1679 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1680 (__pthread_cond_timedwait): Likewise.
1681 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
1682 (__condvar_cleanup, __pthread_cond_wait): Likewise.
1683
0470fa46
JJ
16842007-08-05 Jakub Jelinek <jakub@redhat.com>
1685
1686 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
1687 Don't use CGOTSETUP and CGOTRESTORE macros.
1688 (CGOTSETUP, CGOTRESTORE): Remove.
1689 <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
1690 @local symbol.
1691
64f6281c
UD
16922007-08-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1693
1694 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
1695 definitions for private futexes.
1696 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
1697 kernel-features.h and lowlevellock.h. Use private futexes if
1698 they are available.
1699 (__lll_lock_wait_private, __lll_unlock_wake_private): New.
1700 (__lll_mutex_lock_wait): Rename to
1701 (__lll_lock_wait): ... this. Don't compile in for libc.so.
1702 (__lll_mutex_timedlock_wait): Rename to ...
1703 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday.
1704 Don't compile in for libc.so.
1705 (__lll_mutex_unlock_wake): Rename to ...
1706 (__lll_unlock_wake): ... this. Don't compile in for libc.so.
1707 (__lll_timedwait_tid): Use __NR_gettimeofday.
1708 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
1709 the header from assembler. Renamed all lll_mutex_* resp.
1710 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
1711 Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
1712 (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
1713 Define.
1714 (__lll_lock_wait_private): Add prototype.
1715 (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
1716 __lll_robust_timedlock_wait, __lll_unlock_wake_private,
1717 __lll_unlock_wake): Likewise.
1718 (lll_lock): Add private argument. Call __lll_lock_wait_private
1719 if private is constant LLL_PRIVATE.
1720 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
1721 lll_timedlock, lll_robust_timedlock): Add private argument.
1722 (lll_unlock): Add private argument. Call __lll_unlock_wake_private
1723 if private is constant LLL_PRIVATE.
1724 (lll_robust_unlock, lll_robust_dead): Add private argument.
1725 (lll_lock_t): Remove.
1726 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
1727 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
1728 lll_cond_wake, lll_cond_broadcast): Remove.
1729 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
1730 kernel-features.h and lowlevellock.h.
1731 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
1732 (LOAD_FUTEX_WAIT): Define.
1733 (__lll_robust_mutex_lock_wait): Rename to ...
1734 (__lll_robust_lock_wait): ... this. Add private argument.
1735 Use LOAD_FUTEX_WAIT macro.
1736 (__lll_robust_mutex_timedlock_wait): Rename to ...
1737 (__lll_robust_timedlock_wait): ... this. Add private argument.
1738 Use __NR_gettimeofday. Use LOAD_FUTEX_WAIT macro.
1739 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
1740 lowlevellock.h.
1741 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
1742 (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
1743 __lll_mutex_{lock,unlock}_*.
1744 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
1745 lowlevellock.h and pthread-errnos.h.
1746 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
1747 FUTEX_CMP_REQUEUE, EINVAL): Remove.
1748 (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
1749 __lll_mutex_{lock,unlock}_*.
1750 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
1751 lowlevellock.h and pthread-errnos.h.
1752 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
1753 (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
1754 __lll_mutex_{lock,unlock}_*.
1755 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
1756 lowlevellock.h.
1757 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
1758 (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
1759 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
1760 (__condvar_tw_cleanup): Likewise.
1761 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
1762 lowlevellock.h.
1763 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
1764 (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
1765 __lll_mutex_{lock,unlock}_*.
1766 ( __condvar_w_cleanup): Likewise.
1767 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
1768 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1769 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
1770 lowlevellock.h.
1771 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1772 (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
1773 __lll_mutex_{lock,unlock}_*.
1774 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
1775 lowlevellock.h.
1776 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
1777 FUTEX_PRIVATE_FLAG): Remove.
1778 (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
1779 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
1780 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
1781 lowlevellock.h.
1782 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
1783 FUTEX_PRIVATE_FLAG): Remove.
1784 (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
1785 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
1786 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
1787 lowlevellock.h.
1788 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1789 (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
1790 __lll_mutex_{lock,unlock}_*.
1791 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
1792 lowlevellock.h.
1793 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1794 (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
1795 __lll_mutex_{lock,unlock}_*.
1796 * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
1797 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1798 (__new_sem_post): Use standard initial exec code sequences.
1799 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
1800 lowlevellock.h.
1801 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
1802 FUTEX_PRIVATE_FLAG): Remove.
1803 (sem_timedwait): Use __NR_gettimeofday. Use standard initial
1804 exec code sequences.
1805 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
1806 (__new_sem_trywait): Use standard initial exec code sequences.
1807 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
1808 (__new_sem_wait): Use standard initial exec code sequences.
1809
e51deae7
UD
18102007-07-31 Anton Blanchard <anton@samba.org>
1811
1812 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
1813 Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
1814 atomic_full_barrier.
1815
18162007-07-31 Jakub Jelinek <jakub@redhat.com>
1817
1818 * allocatestack.c (stack_cache_lock): Change type to int.
1819 (get_cached_stack, allocate_stack, __deallocate_stack,
1820 __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
1821 __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
1822 as second argument to lll_lock and lll_unlock macros on
1823 stack_cache_lock.
1824 * pthread_create.c (__find_in_stack_list): Likewise.
1825 (start_thread): Similarly with pd->lock. Use lll_robust_dead
1826 macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
1827 as second argument.
1828 * descr.h (struct pthread): Change lock and setxid_futex field
1829 type to int.
1830 * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
1831 LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
1832 * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
1833 * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
1834 Likewise.
1835 * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
1836 * pthread_cond_init.c (__pthread_cond_init): Likewise.
1837 * pthreadP.h (__attr_list_lock): Change type to int.
1838 * pthread_attr_init.c (__attr_list_lock): Likewise.
1839 * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
1840 ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
1841 lll_{,un}lock.
1842 * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
1843 also for lll_futex_{wake,wait}.
1844 * pthread_barrier_init.c (pthread_barrier_init): Make iattr
1845 a pointer to const.
1846 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
1847 LLL_SHARED as second argument to lll_{,un}lock.
1848 * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
1849 * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
1850 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
1851 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
1852 Likewise.
1853 * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
1854 as second argument to lll_{,un}lock macros on pd->lock.
1855 * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
1856 * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
1857 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
1858 * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
1859 Likewise.
1860 * sysdeps/pthread/createthread.c (do_clone, create_thread):
1861 Likewise.
1862 * pthread_once.c (once_lock): Change type to int.
1863 (__pthread_once): Pass LLL_PRIVATE as second argument to
1864 lll_{,un}lock macros on once_lock.
1865 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
1866 lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
1867 rwlock->__data.__shared as second argument to them and similarly
1868 for lll_futex_w*.
1869 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
1870 Likewise.
1871 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
1872 Likewise.
1873 * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
1874 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
1875 * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
1876 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1877 * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
1878 to lll_{,un}lock macros on __sem_mappings_lock.
1879 * sem_open.c (check_add_mapping): Likewise.
1880 (__sem_mappings_lock): Change type to int.
1881 * semaphoreP.h (__sem_mappings_lock): Likewise.
1882 * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
1883 LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
1884 instead of lll_*mutex_*, pass LLL_SHARED as last
1885 argument.
1886 (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
1887 pass LLL_SHARED as last argument.
1888 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
1889 LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
1890 lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
1891 pass LLL_SHARED as last argument.
1892 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
1893 lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
1894 LLL_SHARED as last argument.
1895 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
1896 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
1897 Similarly.
1898 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
1899 __libc_lock_lock_recursive, __libc_lock_unlock,
1900 __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
1901 argument to lll_{,un}lock.
1902 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
1903 _IO_lock_unlock): Likewise.
1904 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
1905 compound literal.
1906 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
1907 Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
1908 __fork_lock.
1909 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
1910 free_mem): Likewise.
1911 (__fork_lock): Change type to int.
1912 * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
1913 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
1914 isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
1915 lll_futex_wake.
1916 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
1917 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
1918 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
1919 New function.
1920 (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
1921 pass it through to lll_futex_*wait, only compile in when
1922 IS_IN_libpthread.
1923 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
1924 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
1925 argument and pass it through to lll_futex_*wait.
1926 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
1927 lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
1928 lll_robust_*. Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
1929 inline functions to __lll_* resp. __lll_robust_*.
1930 (LLL_MUTEX_LOCK_INITIALIZER): Remove.
1931 (lll_mutex_dead): Add private argument.
1932 (__lll_lock_wait_private): New prototype.
1933 (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
1934 __lll_robust_lock_timedwait): Add private argument to prototypes.
1935 (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
1936 call __lll_lock_wait_private, otherwise pass private to
1937 __lll_lock_wait.
1938 (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
1939 __lll_robust_timedlock): Add private argument, pass it to
1940 __lll_*wait functions.
1941 (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
1942 call __lll_unlock_wake_private, otherwise pass private to
1943 __lll_unlock_wake.
1944 (__lll_robust_unlock): Add private argument, pass it to
1945 __lll_robust_unlock_wake.
1946 (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
1947 lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
1948 argument, pass it through to __lll_* inline function.
1949 (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
1950 (lll_lock_t): Remove.
1951 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
1952 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
1953 lll_cond_wake, lll_cond_broadcast): Remove.
1954 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1955 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1956 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1957 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1958 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
1959 the header from assembler. Renamed all lll_mutex_* resp.
1960 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
1961 (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
1962 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1963 (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
1964 LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
1965 (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
1966 __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
1967 Remove prototype.
1968 (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
1969 (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
1970 rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
1971 (lll_trylock): Likewise, use __lll_trylock_asm, pass
1972 MULTIPLE_THREADS_OFFSET as another asm operand.
1973 (lll_lock): Add private argument, use __lll_lock_asm_start, pass
1974 MULTIPLE_THREADS_OFFSET as last asm operand, call
1975 __lll_lock_wait_private if private is constant LLL_PRIVATE,
1976 otherwise pass private as another argument to __lll_lock_wait.
1977 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
1978 lll_timedlock, lll_robust_timedlock): Add private argument, pass
1979 private as another argument to __lll_*lock_wait call.
1980 (lll_unlock): Add private argument, use __lll_unlock_asm, pass
1981 MULTIPLE_THREADS_OFFSET as another asm operand, call
1982 __lll_unlock_wake_private if private is constant LLL_PRIVATE,
1983 otherwise pass private as another argument to __lll_unlock_wake.
1984 (lll_robust_unlock): Add private argument, pass private as another
1985 argument to __lll_unlock_wake.
1986 (lll_robust_dead): Add private argument, use __lll_private_flag
1987 macro.
1988 (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
1989 LLL_MUTEX_LOCK_INITIALIZER.
1990 (lll_lock_t): Remove.
1991 (LLL_LOCK_INITIALIZER_WAITERS): Define.
1992 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
1993 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
1994 lll_cond_wake, lll_cond_broadcast): Remove.
1995 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1996 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
1997 2007-05-2{3,9} changes.
1998 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
1999 kernel-features.h and lowlevellock.h.
2000 (LOAD_PRIVATE_FUTEX_WAIT): Define.
2001 (LOAD_FUTEX_WAIT): Rewritten.
2002 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
2003 define.
2004 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
2005 (__lll_mutex_lock_wait): Rename to ...
2006 (__lll_lock_wait): ... this. Take futex addr from %edx instead of
2007 %ecx, %ecx is now private argument. Don't compile in for libc.so.
2008 (__lll_mutex_timedlock_wait): Rename to ...
2009 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday. %esi
2010 contains private argument. Don't compile in for libc.so.
2011 (__lll_mutex_unlock_wake): Rename to ...
2012 (__lll_unlock_wake): ... this. %ecx contains private argument.
2013 Don't compile in for libc.so.
2014 (__lll_timedwait_tid): Use __NR_gettimeofday.
2015 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
2016 kernel-features.h and lowlevellock.h.
2017 (LOAD_FUTEX_WAIT): Define.
2018 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
2019 define.
2020 (__lll_robust_mutex_lock_wait): Rename to ...
2021 (__lll_robust_lock_wait): ... this. Futex addr is now in %edx
2022 argument, %ecx argument contains private. Use LOAD_FUTEX_WAIT
2023 macro.
2024 (__lll_robust_mutex_timedlock_wait): Rename to ...
2025 (__lll_robust_timedlock_wait): ... this. Use __NR_gettimeofday.
2026 %esi argument contains private, use LOAD_FUTEX_WAIT macro.
2027 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
2028 lowlevellock.h.
2029 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2030 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
2031 PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
2032 __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
2033 to __lll_lock_wait in %edx.
2034 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
2035 Include lowlevellock.h and pthread-errnos.h.
2036 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
2037 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
2038 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
2039 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
2040 pass LLL_SHARED in %ecx to both __lll_lock_wait and
2041 __lll_unlock_wake.
2042 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
2043 Include lowlevellock.h and pthread-errnos.h.
2044 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
2045 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
2046 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
2047 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
2048 pass LLL_SHARED in %ecx to both __lll_lock_wait and
2049 __lll_unlock_wake.
2050 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
2051 Include lowlevellock.h.
2052 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
2053 Don't define.
2054 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
2055 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
2056 pass LLL_SHARED in %ecx to both __lll_lock_wait and
2057 __lll_unlock_wake. Use __NR_gettimeofday.
2058 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
2059 Include lowlevellock.h.
2060 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2061 (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
2062 to __lll_*, pass cond_lock address in %edx rather than %ecx to
2063 __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
2064 and __lll_unlock_wake.
2065 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
2066 Include lowlevellock.h.
2067 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2068 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
2069 MUTEX(%ebx) address in %edx rather than %ecx to
2070 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
2071 and __lll_unlock_wake. Move return value from %ecx to %edx
2072 register.
2073 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2074 Include lowlevellock.h.
2075 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
2076 Don't define.
2077 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
2078 MUTEX(%ebp) address in %edx rather than %ecx to
2079 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
2080 and __lll_unlock_wake. Move return value from %ecx to %edx
2081 register. Use __NR_gettimeofday.
2082 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2083 Include lowlevellock.h.
2084 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
2085 Don't define.
2086 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
2087 MUTEX(%ebp) address in %edx rather than %ecx to
2088 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
2089 and __lll_unlock_wake. Move return value from %ecx to %edx
2090 register. Use __NR_gettimeofday.
2091 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
2092 Include lowlevellock.h.
2093 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2094 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
2095 MUTEX(%edi) address in %edx rather than %ecx to
2096 __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
2097 and __lll_unlock_wake.
2098 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
2099 Include lowlevellock.h.
2100 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2101 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
2102 MUTEX(%ebx) address in %edx rather than %ecx to
2103 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
2104 and __lll_unlock_wake. Move return value from %ecx to %edx
2105 register.
2106 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
2107 lowlevellock.h.
2108 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
2109 define.
2110 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
2111 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
2112 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
2113 lowlevellock.h.
2114 (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
2115 (sem_timedwait): Use __NR_gettimeofday.
2116 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
2117 lowlevellock.h.
2118 (LOCK): Don't define.
2119 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
2120 lowlevellock.h.
2121 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
2122 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
2123 are waiters.
2124 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
2125 2007-05-2{3,9} changes.
2126 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
2127 kernel-features.h and lowlevellock.h.
2128 (LOAD_PRIVATE_FUTEX_WAIT): Define.
2129 (LOAD_FUTEX_WAIT): Rewritten.
2130 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
2131 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
2132 (__lll_mutex_lock_wait): Rename to ...
2133 (__lll_lock_wait): ... this. %esi is now private argument.
2134 Don't compile in for libc.so.
2135 (__lll_mutex_timedlock_wait): Rename to ...
2136 (__lll_timedlock_wait): ... this. %esi contains private argument.
2137 Don't compile in for libc.so.
2138 (__lll_mutex_unlock_wake): Rename to ...
2139 (__lll_unlock_wake): ... this. %esi contains private argument.
2140 Don't compile in for libc.so.
2141 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
2142 kernel-features.h and lowlevellock.h.
2143 (LOAD_FUTEX_WAIT): Define.
2144 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
2145 (__lll_robust_mutex_lock_wait): Rename to ...
2146 (__lll_robust_lock_wait): ... this. %esi argument contains private.
2147 Use LOAD_FUTEX_WAIT macro.
2148 (__lll_robust_mutex_timedlock_wait): Rename to ...
2149 (__lll_robust_timedlock_wait): ... this. %esi argument contains
2150 private, use LOAD_FUTEX_WAIT macro.
2151 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
2152 lowlevellock.h.
2153 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2154 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
2155 PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
2156 __lll_lock_wait and __lll_unlock_wake.
2157 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
2158 Include lowlevellock.h and pthread-errnos.h.
2159 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
2160 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
2161 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
2162 pass LLL_SHARED in %esi to both __lll_lock_wait and
2163 __lll_unlock_wake.
2164 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
2165 Include lowlevellock.h and pthread-errnos.h.
2166 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
2167 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
2168 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
2169 pass LLL_SHARED in %esi to both __lll_lock_wait and
2170 __lll_unlock_wake.
2171 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
2172 Include lowlevellock.h.
2173 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2174 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
2175 pass LLL_SHARED in %esi to both __lll_lock_wait and
2176 __lll_unlock_wake.
2177 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
2178 Include lowlevellock.h.
2179 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2180 (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
2181 to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
2182 and __lll_unlock_wake.
2183 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
2184 Include lowlevellock.h.
2185 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2186 Don't define.
2187 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
2188 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
2189 and __lll_unlock_wake.
2190 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
2191 Include lowlevellock.h.
2192 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2193 Don't define.
2194 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
2195 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
2196 and __lll_unlock_wake.
2197 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2198 Include lowlevellock.h.
2199 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2200 Don't define.
2201 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
2202 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
2203 and __lll_unlock_wake.
2204 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
2205 Include lowlevellock.h.
2206 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2207 Don't define.
2208 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
2209 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
2210 and __lll_unlock_wake.
2211 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
2212 Include lowlevellock.h.
2213 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2214 Don't define.
2215 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
2216 pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
2217 and __lll_unlock_wake.
2218 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
2219 lowlevellock.h.
2220 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
2221 define.
2222 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
2223 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
2224 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
2225 lowlevellock.h.
2226 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
2227 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
2228 lowlevellock.h.
2229 (LOCK): Don't define.
2230 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
2231 lowlevellock.h.
2232 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
2233 * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
2234 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
2235 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
2236 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
2237 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
2238 (__lll_lock_wait_private): New function.
2239 (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
2240 it to lll_futex_*wait. Don't compile in for libc.so.
2241 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
2242 Remove.
2243 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
2244 (struct sparc_pthread_barrier): Remove.
2245 (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
2246 struct sparc_pthread_barrier. Pass
2247 ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
2248 and lll_futex_wait macros.
2249 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
2250 Remove.
2251 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
2252 Include sparc pthread_barrier_wait.c instead of generic one.
2253
6f59d56e
UD
22542007-07-30 Jakub Jelinek <jakub@redhat.com>
2255
1475e201
UD
2256 * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
2257
6f59d56e
UD
2258 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
2259 (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
2260 %ecx.
2261 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
2262 (pthread_rwlock_timedwrlock): Likewise.
2263 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
2264 (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
2265
558f0300
JJ
22662007-07-31 Jakub Jelinek <jakub@redhat.com>
2267
2268 * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
2269
cedb4109
UD
22702007-07-26 Jakub Jelinek <jakub@redhat.com>
2271
2272 * tst-locale2.c (useless): Add return statement.
2273
085a4412
UD
22742007-07-24 Jakub Jelinek <jakub@redhat.com>
2275
2276 * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
2277 lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
2278 * pthread_create.c (start_thread): Likewise.
2279 * init.c (sighandler_setxid): Likewise.
2280 * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2281 * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2282 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2283 * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2284 * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2285 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2286 * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2287 * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2288 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
2289 Likewise.
2290 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
2291 Likewise.
2292 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
2293 Likewise.
2294 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
2295 __rtld_notify): Likewise.
2296 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
2297 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
2298 __pthread_once): Likewise.
2299 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
2300 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
2301 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
2302 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
2303 (lll_futex_wait): Add private argument, define as wrapper around
2304 lll_futex_timed_wait.
2305 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
2306 use __lll_private_flag macro.
2307 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
2308 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
2309 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
2310 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
2311 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
2312 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
2313 (lll_futex_wait): Add private argument, define as wrapper around
2314 lll_futex_timed_wait.
2315 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
2316 use __lll_private_flag macro.
2317 (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
2318 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
2319 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
2320 Define.
2321 (lll_futex_timed_wait, lll_futex_wake): Use it.
2322 (lll_private_futex_wait, lll_private_futex_timed_wait,
2323 lll_private_futex_wake): Removed.
2324 * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
2325 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
2326 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
2327 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
2328 (lll_futex_wait): Add private argument, define as wrapper around
2329 lll_futex_timed_wait.
2330 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
2331 use __lll_private_flag macro.
2332 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
2333 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
2334 to lll_futex_*.
2335 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
2336 (lll_private_futex_wait, lll_private_futex_timed_wait,
2337 lll_private_futex_wake): Removed.
2338 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
2339 Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
2340 (lll_private_futex_wait, lll_private_futex_timed_wait,
2341 lll_private_futex_wake): Removed.
2342 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
2343 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
2344 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
2345 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
2346 (lll_futex_wait): Add private argument, define as wrapper around
2347 lll_futex_timed_wait.
2348 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
2349 use __lll_private_flag macro.
2350 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
2351 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
2352 to lll_futex_*.
2353 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
2354 Define.
2355 (lll_futex_timed_wait, lll_futex_wake): Use it.
2356 (lll_private_futex_wait, lll_private_futex_timed_wait,
2357 lll_private_futex_wake): Removed.
2358
ef0af159
JJ
23592007-07-27 Jakub Jelinek <jakub@redhat.com>
2360
2361 * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
2362 of the structure for sparc32.
2363
23642007-07-26 Aurelien Jarno <aurelien@aurel32.net>
2365
2366 * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
2367
eb4f5909
UD
23682007-07-23 Ulrich Drepper <drepper@redhat.com>
2369
2370 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
2371 code used when private futexes are assumed.
2372 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2373 Likewise.
2374
b5f13526
UD
23752007-07-23 Jakub Jelinek <jakub@redhat.com>
2376
2377 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
2378 (__lll_private_flag): Define.
2379 (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
2380 (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
2381 __lll_private_flag.
2382 (lll_private_futex_wait, lll_private_futex_timedwait,
2383 lll_private_futex_wake): Define as wrapper around non-_private
2384 macros.
2385 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2386 (__lll_private_flag): Define.
2387 (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
2388 (lll_private_futex_wait, lll_private_futex_timedwait,
2389 lll_private_futex_wake): Define as wrapper around non-_private
2390 macros.
2391
eb7721f2
UD
23922007-07-10 Steven Munroe <sjmunroe@us.ibm.com>
2393
2394 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
2395 parameter to lll_futex_wait call.
2396 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
2397
2398 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
2399 Replace lll_futex_wait with lll_private_futex_wait.
2400 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
2401 Add LLL_SHARED parameter to lll_futex_wake().
2402
2403 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
2404 LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
2405 lll_private_futex_wake.
2406 (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
2407 bit from private parm before syscall.
2408 (lll_futex_timed_wait): Likewise.
2409 (lll_futex_wake): Likewise.
2410 (lll_futex_wake_unlock): Likewise.
2411 (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
2412 (lll_robust_mutex_unlock): Likewise.
2413 (lll_mutex_unlock_force): Likewise.
2414 (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
2415
defc45f2
UD
24162007-07-23 Ulrich Drepper <drepper@redhat.com>
2417
2418 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
2419 compilation when unconditionally using private futexes.
2420 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
2421 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2422 Likewise.
2423 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
2424 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
2425
087722b8
UD
24262007-07-17 Jakub Jelinek <jakub@redhat.com>
2427
2428 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
2429 Define.
2430
765c6b0c
UD
24312007-07-06 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2432
2433 * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
2434 kernel-features.h.
2435
7d9d8bd1
RM
24362007-05-16 Roland McGrath <roland@redhat.com>
2437
2438 * init.c (__nptl_initial_report_events): New variable.
2439 (__pthread_initialize_minimal_internal): Initialize pd->report_events
2440 to that.
2441
a4915df2
UD
24422007-06-22 Jakub Jelinek <jakub@redhat.com>
2443
2444 * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
2445 cpusetsize if pthread_getaffinity_np failed with ENOSYS.
2446
e4eb675d
UD
24472007-06-19 Ulrich Drepper <drepper@redhat.com>
2448
2449 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
2450 implementation.
2451
ae1ad3ae
UD
24522007-06-18 Ulrich Drepper <drepper@redhat.com>
2453
2454 * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
2455 * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
2456 * pthread_mutex_timedlock.c: Likewise.
2457 * pthread_mutex_trylock.c: Likewise.
2458 * pthread_mutex_unlock.c: Likewise.
2459
89074592
UD
24602007-06-17 Andreas Schwab <schwab@suse.de>
2461
2462 * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
2463 sections.
2464
d4201cc4
UD
24652007-06-17 Ulrich Drepper <drepper@redhat.com>
2466
2467 * allocatestack.c (allocate_stack): Make code compile if
2468 __ASSUME_PRIVATE_FUTEX is set.
2469
339dbf0e
UD
24702007-06-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2471
2472 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
2473 (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
2474 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
2475 (__pthread_rwlock_wrlock): Likewise.
2476 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
2477 (pthread_rwlock_timedrdlock): Likewise.
2478 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
2479 (pthread_rwlock_timedwrlock): Likewise.
2480 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
2481 (__pthread_rwlock_unlock): Likewise.
2482
24832007-06-10 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2484
2485 * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
2486 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
2487 Split __flags into __flags, __shared, __pad1 and __pad2.
2488 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
b42a214c 2489 futexes if they are available.
339dbf0e 2490 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
b42a214c 2491 in libc-lowlevellock.S allow using private futexes.
339dbf0e
UD
2492 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
2493 FUTEX_PRIVATE_FLAG. Add additional parameter to lll_futex_wait,
2494 lll_futex_timed_wait and lll_futex_wake. Change lll_futex_wait
2495 to call lll_futex_timed_wait. Add lll_private_futex_wait,
2496 lll_private_futex_timed_wait and lll_private_futex_wake.
2497 (lll_robust_mutex_unlock): Fix typo.
2498 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
b42a214c 2499 field in futex command setup.
339dbf0e
UD
2500 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
2501 COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
2502 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
2503 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
b42a214c 2504 if they are available. Remove clear_once_control.
339dbf0e
UD
2505 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
2506 futexes if they are available.
2507 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
2508 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
2509 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
2510 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
2511 * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
2512 Wake only when there are waiters.
2513 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
2514 support. Indicate that there are waiters. Remove unnecessary
b42a214c 2515 extra cancellation test.
339dbf0e
UD
2516 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise. Removed
2517 left-over duplication of __sem_wait_cleanup.
2518
26f56c1c
UD
25192007-06-07 Ulrich Drepper <drepper@redhat.com>
2520
2521 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
2522 parameter to lll_futex_wait, lll_futex_timed_wait, and
2523 lll_futex_wake. Change lll_futex_wait to call lll_futex_timed_wait.
2524 Add lll_private_futex_wait, lll_private_futex_timed_wait, and
2525 lll_private_futex_wake.
2526 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
2527 * allocatestack.c: Adjust use of lll_futex_* macros.
2528 * init.c: Likewise.
2529 * lowlevellock.h: Likewise.
2530 * pthread_barrier_wait.c: Likewise.
2531 * pthread_cond_broadcast.c: Likewise.
2532 * pthread_cond_destroy.c: Likewise.
2533 * pthread_cond_signal.c: Likewise.
2534 * pthread_cond_timedwait.c: Likewise.
2535 * pthread_cond_wait.c: Likewise.
2536 * pthread_create.c: Likewise.
2537 * pthread_mutex_lock.c: Likewise.
2538 * pthread_mutex_setprioceiling.c: Likewise.
2539 * pthread_mutex_timedlock.c: Likewise.
2540 * pthread_mutex_unlock.c: Likewise.
2541 * pthread_rwlock_timedrdlock.c: Likewise.
2542 * pthread_rwlock_timedwrlock.c: Likewise.
2543 * pthread_rwlock_unlock.c: Likewise.
2544 * sysdeps/alpha/tls.h: Likewise.
2545 * sysdeps/i386/tls.h: Likewise.
2546 * sysdeps/ia64/tls.h: Likewise.
2547 * sysdeps/powerpc/tls.h: Likewise.
2548 * sysdeps/pthread/aio_misc.h: Likewise.
2549 * sysdeps/pthread/gai_misc.h: Likewise.
2550 * sysdeps/s390/tls.h: Likewise.
2551 * sysdeps/sh/tls.h: Likewise.
2552 * sysdeps/sparc/tls.h: Likewise.
2553 * sysdeps/unix/sysv/linux/fork.c: Likewise.
2554 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
2555 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
2556 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
2557 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
2558 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
2559 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
2560 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
2561 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
2562 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
2563 Likewise.
2564 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
2565 * sysdeps/x86_64/tls.h: Likewise.
2566
ee5d5755
UD
25672007-05-29 Ulrich Drepper <drepper@redhat.com>
2568
b03b0c29
UD
2569 * pthread_getattr_np.c: No need to install a cancellation handler,
2570 this is no cancellation point.
2571 * pthread_getschedparam.c: Likewise.
2572 * pthread_setschedparam.c: Likewise.
2573 * pthread_setschedprio.c: Likewise.
2574 * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
2575 lll_unlock_wake_cb.
2576 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
2577 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
2578 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2579 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2580 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2581 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2582 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
2583 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
2584 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2585 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
2586 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
2587 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
fc3f0ccb 2588
0154658d
UD
2589 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
2590 whether there are more than one thread makes no sense here since
2591 we only call the slow path if the locks are taken.
2592 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
2593
ee5d5755
UD
2594 * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
2595 COND_NWAITERS_SHIFT.
2596 * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
2597 COND_CLOCK_BITS.
2598 * pthread_cond_init.c: Likewise.
2599 * pthread_cond_timedwait.c: Likewise.
2600 * pthread_cond_wait.c: Likewise.
2601 * pthread_condattr_getclock.c: Likewise.
2602 * pthread_condattr_setclock.c: Likewise.
2603 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
2604 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2605 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2606 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2607 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2608
991fa82b
UD
26092007-05-28 Jakub Jelinek <jakub@redhat.com>
2610
40f57573
UD
2611 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
2612 unistd.h.
2613
991fa82b
UD
2614 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
2615 insn suffix.
2616 (THREAD_GSCOPE_GET_FLAG): Remove.
2617 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
2618 * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
2619 changes.
2620 * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
2621 (THREAD_GSCOPE_GET_FLAG): Remove.
2622 (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
2623 instead of THREAD_GSCOPE_GET_FLAG.
2624 (THREAD_GSCOPE_SET_FLAG): Likewise. Add atomic_write_barrier after
2625 it.
2626 * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2627 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2628 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2629 THREAD_GSCOPE_WAIT): Define.
2630 * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2631 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2632 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2633 THREAD_GSCOPE_WAIT): Define.
2634 * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2635 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2636 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2637 THREAD_GSCOPE_WAIT): Define.
2638 * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2639 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2640 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2641 THREAD_GSCOPE_WAIT): Define.
2642
26432007-05-24 Richard Henderson <rth@redhat.com>
2644
2645 * descr.h (struct pthread): Add header.gscope_flag.
2646 * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2647 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2648 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2649 THREAD_GSCOPE_WAIT): Define.
2650
e59660bc
UD
26512007-05-27 Ulrich Drepper <drepper@redhat.com>
2652
2653 * init.c: Make it compile with older kernel headers.
2654
2655 * tst-initializers1.c: Show through exit code which test failed.
2656
2657 * pthread_rwlock_init.c: Also initialize __shared field.
2658 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
2659 element in rwlock structure into four byte elements. One of them is
2660 the new __shared element.
2661 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
2662 Likewise.
cd0dbd89 2663 [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
e59660bc
UD
2664 __shared, adjust names of other padding elements.
2665 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2666 * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
2667 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
2668 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
2669 FUTEX_PRIVATE_FLAG.
2670 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
2671 futex to use private operations if possible.
2672 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
2673 Likewise.
2674 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2675 Likewise.
2676 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
2677 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
50f1dec5
UD
2678 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2679 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2680 Likewise.
2681 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2682 Likewise.
2683 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2684 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
e59660bc 2685
d8ff3792
UD
26862007-05-26 Ulrich Drepper <drepper@redhat.com>
2687
546346b6
UD
2688 * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
2689 * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
2690 * pthread_rwlock_timedrdlock.c: Likewise.
2691 * pthread_rwlock_tryrdlock.c: Likewise.
2692
a2dd3360
UD
2693 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
2694 optimization.
2695
6df7ffad
UD
2696 * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
2697 * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
2698 duplication of __sem_wait_cleanup.
2699
2700 * allocatestack.c: Revert last change.
2701 * init.c: Likewise.
2702 * sysdeps/i386/tls.h: Likewise.
2703 * sysdeps/x86_64/tls.h: Likewise.
2704 * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
2705 header structure.
2706 * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
2707
d8ff3792
UD
2708 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
2709 Add private field.
2710 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
2711 * pthread_barrier_init.c: Set private flag if pshared and private
2712 futexes are supported.
2713 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
2714 private field in futex command setup.
2715 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
2716
3d2dd6ca
UD
27172007-05-25 Ulrich Drepper <drepper@redhat.com>
2718
42e6c665
UD
2719 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
2720 support.
2721 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2722 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2723 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
2724 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
2725 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
2726
3d2dd6ca
UD
2727 * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
2728 * sem_init.c (__new_sem_init): Rewrite to initialize all three
2729 fields in the structure.
2730 (__old_sem_init): New function.
2731 * sem_open.c: Initialize all fields of the structure.
2732 * sem_getvalue.c: Adjust for renamed element.
2733 * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
2734 (gen-as-const-headers): Add structsem.sym.
2735 * sysdeps/unix/sysv/linux/structsem.sym: New file.
2736 * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
2737 struct new_sem. Add struct old_sem.
2738 * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
2739 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
2740 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
2741 * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
2742 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2743 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
2744 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
2745 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2746 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
2747 * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
2748 * tst-sem10.c: New file.
2749 * tst-sem11.c: New file.
2750 * tst-sem12.c: New file.
2751 * tst-typesizes.c: Test struct new_sem and struct old_sem instead
2752 of struct sem.
2753
20a4d722
JJ
27542007-05-25 Ulrich Drepper <drepper@redhat.com>
2755 Jakub Jelinek <jakub@redhat.com>
2756
2757 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
2758 Move __pthread_enable_asynccancel right before futex syscall.
2759 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
2760 Likewise.
2761
27622007-05-24 Jakub Jelinek <jakub@redhat.com>
86acd596
UD
2763
2764 * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
2765 THREAD_COPY_PRIVATE_FUTEX): Define.
2766 * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
2767 THREAD_COPY_PRIVATE_FUTEX): Define.
2768 * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
2769 * init.c (__pthread_initialize_minimal_internal): Use
2770 THREAD_SET_PRIVATE_FUTEX.
0a54ab53
UD
2771
2772 * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
2773 (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
2774 THREAD_GSCOPE_FLAG_WAIT): Define.
2775 (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
2776 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
2777 * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
2778 PTR_DEMANGLE.
2779 (THREAD_GSCOPE_GET_FLAG): Define.
2780 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
2781 * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
2782 instead of ->header.gscope_flag directly.
2783
5a8075b1
UD
27842007-05-23 Ulrich Drepper <drepper@redhat.com>
2785
2786 * init.c (__pthread_initialize_minimal_internal): Check whether
2787 private futexes are available.
2788 * allocatestack.c (allocate_stack): Copy private_futex field from
2789 current thread into the new stack.
2790 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
2791 futexes if they are available.
2792 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
2793 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
2794 in libc-lowlevellock.S allow using private futexes.
2795 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2796 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
2797 FUTEX_PRIVATE_FLAG.
2798 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
2799 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
2800 if they are available.
2801 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
2802 * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
2803 * sysdeps/i386/tcb-offsets.sym: Likewise.
2804 * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
2805 * sysdeps/i386/tls.h (tcbhead_t): Likewise.
2806
6d59823c
UD
28072007-05-21 Ulrich Drepper <drepper@redhat.com>
2808
2809 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
2810 Remove ptr_wait_lookup_done again.
2811 * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
2812 (__pthread_initialize_minimal_internal): Initialize
2813 _dl_wait_lookup_done pointer in _rtld_global directly.
2814 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
2815 Remove code to code _dl_wait_lookup_done.
2816 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
2817 encrypted for now.
2818
2c9718f3
JJ
28192007-05-21 Jakub Jelinek <jakub@redhat.com>
2820
2821 * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
2822 pthread_mutex_init failed with ENOTSUP.
2823
df94b641
UD
28242007-05-19 Ulrich Drepper <drepper@redhat.com>
2825
2826 * allocatestack.c (__wait_lookup_done): New function.
2827 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
2828 Add ptr_wait_lookup_done.
2829 * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
2830 * pthreadP.h: Declare __wait_lookup_done.
2831 * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
2832 Define macros to implement reference handling of global scope.
2833 * sysdeps/x86_64/tls.h: Likewise.
2834 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
2835 Initialize GL(dl_wait_lookup_done).
2836
bec51a30
UD
28372007-05-17 Ulrich Drepper <drepper@redhat.com>
2838
113ad5fc
UD
2839 [BZ #4512]
2840 * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
2841 is detected.
2842 * pthread_mutex_timedlock.c: Likewise.
2843 * pthread_mutex_trylock.c: Likewise.
2844 Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
2845
2846 * Makefile (tests): Add tst-robust9 and tst-robustpi9.
2847 * tst-robust9.c: New file.
2848 * tst-robustpi9.c: New file.
2849
bec51a30
UD
2850 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
2851 unnecessary extra cancellation test.
2852
83d87915
UD
28532007-05-14 Ulrich Drepper <drepper@redhat.com>
2854
83d87915
UD
2855 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
2856 extra cancellation test.
2857 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
2858
3771196d
UD
28592007-05-10 Ulrich Drepper <drepper@redhat.com>
2860
341c566f
UD
2861 * descr.h (struct pthread): Rearrange members to fill hole in
2862 64-bit layout.
2863
3771196d
UD
2864 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2865 (__pthread_setaffinity_new): If syscall was successful and
2866 RESET_VGETCPU_CACHE is defined, use it before returning.
2867 * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
2868
7d29b542
JJ
28692007-05-10 Jakub Jelinek <jakub@redhat.com>
2870
2871 [BZ #4455]
2872 * tst-align2.c: Include stackinfo.h.
2873 * tst-getpid1.c: Likewise.
2874
16105fe0
UD
28752007-05-02 Carlos O'Donell <carlos@systemhalted.org>
2876
29c113f0
UD
2877 [BZ #4455]
2878 * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
2879 * tst-getpid1.c (do_test): Likewise.
2880
16105fe0
UD
2881 [BZ #4456]
2882 * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
2883 (allocate_stack): Likewise.
2884
6780bc44
UD
28852007-05-07 Ulrich Drepper <drepper@redhat.com>
2886
2887 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
2888 (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
2889 (__lll_robust_timedlock_wait): Likewise.
2890 Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
2891
aa75f64c
UD
28922007-05-06 Mike Frysinger <vapier@gentoo.org>
2893
15eca720 2894 [BZ #4465]
aa75f64c
UD
2895 * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
2896 * tst-cancel4.c (tf_fdatasync): New test.
2897
f672076e
UD
28982007-04-27 Ulrich Drepper <drepper@redhat.com>
2899
1bb5f5a1
UD
2900 [BZ #4392]
2901 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
2902 check mutexes like normal mutexes.
2903
f672076e
UD
2904 [BZ #4306]
2905 * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
2906 Initialize the whole sigevent structure to appease valgrind.
2907
bce20b9a
UD
29082007-04-25 Ulrich Drepper <drepper@redhat.com>
2909
2910 * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
2911 * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
2912
0c786eac
UD
29132007-04-06 Ulrich Drepper <drepper@redhat.com>
2914
2915 * tst-locale1.c: Avoid warnings.
2916 * tst-locale2.c: Likewise.
2917
e1f0c5bc
UD
29182007-03-19 Steven Munroe <sjmunroe@us.ibm.com>
2919
2920 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
2921 (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
2922
965cba04
UD
29232007-03-16 Jakub Jelinek <jakub@redhat.com>
2924
2925 * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
2926 __extern_always_inline where appropriate.
2927 * sysdeps/pthread/pthread.h: Likewise.
2928
a5ea509b
RH
29292007-03-13 Richard Henderson <rth@redhat.com>
2930
2931 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
2932 separate cfi regions for the two subsections.
2933
00a1430e
UD
29342007-02-25 Ulrich Drepper <drepper@redhat.com>
2935
2936 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
2937 new thread, don't just decrement it.
2938 Patch by Suzuki K P <suzuki@in.ibm.com>.
2939
63a2f305
UD
29402007-02-21 Ulrich Drepper <drepper@redhat.com>
2941
2942 * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
2943 PTHFCT_CALL definition.
2944
2484468b
UD
29452007-02-18 Ulrich Drepper <drepper@redhat.com>
2946
2947 * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
2948 available, don't use it.
2949
5ed61e0f
UD
29502007-02-09 Jakub Jelinek <jakub@redhat.com>
2951
2952 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2953 (__lll_mutex_timedlock_wait): Use correct pointer when we don't
2954 call into the kernel to delay.
2955
10ccaa5c
UD
29562007-01-18 Ulrich Drepper <drepper@redhat.com>
2957
f8a17855
UD
2958 * tst-initializers1.c: We want to test the initializers as seen
2959 outside of libc, so undefined _LIBC.
2960
10ccaa5c
UD
2961 * pthread_join.c (cleanup): Avoid warning.
2962
ea1533e0
UD
29632007-01-17 Ulrich Drepper <drepper@redhat.com>
2964
1476bce6
UD
2965 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2966 (__lll_timedwait_tid): Add unwind info.
2967
ea1533e0
UD
2968 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
2969 function table, mangle the pointers.
2970 * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
2971 * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
2972 * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
2973 demangle pointers before use.
2974 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
2975 demangle pointer.
2976 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
2977 * sysdeps/pthread/setxid.h: Likewise.
2978
8980796b
UD
29792007-01-12 Ulrich Drepper <drepper@redhat.com>
2980
2981 * tst-rwlock7.c: Show some more information in case of correct
2982 behavior.
2983
a1d87b5d
UD
29842007-01-11 Ulrich Drepper <drepper@redhat.com>
2985
2986 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2987 (lll_futex_timed_wait): Undo part of last change, don't negate
2988 return value.
2989
11bf311e 29902007-01-10 Ulrich Drepper <drepper@redhat.com>
66193697 2991
11bf311e
UD
2992 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups. Define
2993 FUTEX_CMP_REQUEUE and lll_futex_requeue.
66193697 2994
11bf311e 29952006-12-28 David S. Miller <davem@davemloft.net>
14a31e35 2996
11bf311e 2997 * shlib-versions: Fix sparc64 linux target specification.
a744da90 2998
11bf311e 29992007-01-10 Jakub Jelinek <jakub@redhat.com>
a744da90 3000
11bf311e
UD
3001 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
3002 Adjust include path for pthread_barrier_wait.c move.
fc242bef 3003
11bf311e 30042006-12-21 Jakub Jelinek <jakub@redhat.com>
fc242bef 3005
11bf311e
UD
3006 * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
3007 tid isn't reread from pd->tid in between ESRCH test and the syscall.
a822d9f4 3008
11bf311e
UD
30092006-12-06 Jakub Jelinek <jakub@redhat.com>
3010
3011 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
3012 6 argument cancellable syscalls.
3013 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
3014 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
3015 6 argument cancellable syscalls.
3016 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
a822d9f4 3017
66f17705
UD
30182006-12-09 Ulrich Drepper <drepper@redhat.com>
3019
3020 * sysdeps/unix/sysv/linux/rtld-lowlevel.h
3021 (__rtld_mrlock_initialize): Add missing closing parenthesis.
3022
11bf311e
UD
30232006-10-30 Jakub Jelinek <jakub@redhat.com>
3024
3025 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
3026 __sync_lock_release instead of __sync_lock_release_si.
3027
536e40e2
UD
30282006-10-29 Jakub Jelinek <jakub@redhat.com>
3029
3030 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
3031 Define.
3032 (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
3033 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
3034 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
3035 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
3036 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
3037 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
3038 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
3039 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3040 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
3041 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
3042 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
3043
11bf311e
UD
30442006-10-27 Ulrich Drepper <drepper@redhat.com>
3045
3046 * sysdeps/pthread/pthread_barrier_wait.c: Move to...
3047 * pthread_barrier_wait.c: ...here.
3048 * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
3049 * pthread_cond_broadcast.c: ...here.
3050 * sysdeps/pthread/pthread_cond_signal.c: Move to...
3051 * pthread_cond_signal.c: ...here.
3052 * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
3053 * pthread_cond_timedwait.c: ...here.
3054 * sysdeps/pthread/pthread_cond_wait.c: Move to...
3055 * pthread_cond_wait.c: ...here.
3056 * sysdeps/pthread/pthread_once.c: Move to...
3057 * pthread_once.c: ...here.
3058 * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
3059 * pthread_rwlock_rdlock.c: ...here.
3060 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
3061 * pthread_rwlock_timedrdlock.c: ...here.
3062 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
3063 * pthread_rwlock_timedwrlock.c: ...here.
3064 * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
3065 * pthread_rwlock_unlock.c: ...here.
3066 * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
3067 * pthread_rwlock_wrlock.c: ...here.
3068 * sysdeps/pthread/pthread_spin_destroy.c: Move to...
3069 * pthread_spin_destroy.c: ...here.
3070 * sysdeps/pthread/pthread_spin_init.c: Move to...
3071 * pthread_spin_init.c: ...here.
3072 * sysdeps/pthread/pthread_spin_unlock.c: Move to...
3073 * pthread_spin_unlock.c: ...here.
3074 * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
3075 * pthread_getcpuclockid.c: ...here.
3076
3077 * init.c: USE_TLS support is now always enabled.
3078 * tst-tls5.h: Likewise.
3079 * sysdeps/alpha/tls.h: Likewise.
3080 * sysdeps/i386/tls.h: Likewise.
3081 * sysdeps/ia64/tls.h: Likewise.
3082 * sysdeps/powerpc/tls.h: Likewise.
3083 * sysdeps/s390/tls.h: Likewise.
3084 * sysdeps/sh/tls.h: Likewise.
3085 * sysdeps/sparc/tls.h: Likewise.
3086 * sysdeps/x86_64/tls.h: Likewise.
3087
006a8f6f 30882006-10-27 Jakub Jelinek <jakub@redhat.com>
c0a777e8
UD
3089
3090 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
3091 __rtld_mrlock_change): Update oldval if atomic compare and exchange
3092 failed.
3093
3094 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
3095 Define to THREAD_SELF->header.multiple_threads.
3096 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
3097 Likewise.
3098 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
3099 Likewise.
3100 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
3101 (SINGLE_THREAD_P): Likewise.
3102 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
3103 (SINGLE_THREAD_P): Likewise.
3104 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3105 (SINGLE_THREAD_P): Likewise.
3106 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
3107 (SINGLE_THREAD_P): Likewise.
3108 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
3109 Likewise.
3110 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
3111 (SINGLE_THREAD_P): Likewise.
3112 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
3113 (SINGLE_THREAD_P): Likewise.
3114 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
3115 Likewise.
3116
11bf311e 31172006-10-26 Jakub Jelinek <jakub@redhat.com>
32c075e1 3118
11bf311e
UD
3119 * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
3120 by default rather than 2_3_3.
32c075e1 3121
11bf311e 31222006-10-17 Jakub Jelinek <jakub@redhat.com>
32c075e1 3123
11bf311e
UD
3124 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
3125 __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
3126 atomic_* instead of catomic_* macros.
3127
31282006-10-12 Ulrich Drepper <drepper@redhat.com>
3129
3130 [BZ #3285]
3131 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
3132 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
3133 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
3134 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
3135 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
3136 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
3137 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
3138 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
3139 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
3140 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
3141 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
3142 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
3143 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
3144
31452006-10-11 Ulrich Drepper <drepper@redhat.com>
3146
3147 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
3148 cancelable syscalls with six parameters.
3149
3150 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
3151 operations instead of atomic_*.
32c075e1 3152
11bf311e 31532006-10-09 Ulrich Drepper <drepper@redhat.com>
32c075e1 3154
11bf311e 3155 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
32c075e1 3156
11bf311e 31572006-10-07 Ulrich Drepper <drepper@redhat.com>
32c075e1 3158
11bf311e
UD
3159 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
3160 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
3161 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
3162 New file.
3163 * pthread_attr_setstack.c: Allow overwriting the version number of the
3164 new symbol.
3165 * pthread_attr_setstacksize.c: Likewise.
3166 (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
3167 it.
3168 * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
3169 pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
fa279678 3170
457b559e
UD
31712006-09-24 Ulrich Drepper <drepper@redhat.com>
3172
3173 [BZ #3251]
3174 * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
3175 Patch by Petr Baudis.
3176
0466106e
UD
31772006-09-18 Jakub Jelinek <jakub@redhat.com>
3178
3179 * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
3180
3181 * tst-cancel2.c (tf): Loop as long as something was written.
3182
bd6d3b7d
UD
31832006-09-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3184
3185 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
3186 mutexes wake all mutexes.
3187 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
3188 WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
3189 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
3190
30aa5785
UD
31912006-09-12 Ulrich Drepper <drepper@redhat.com>
3192
3193 * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
3194 to guarantee the thread is always canceled.
3195
2b6a801e
UD
31962006-09-08 Jakub Jelinek <jakub@redhat.com>
3197
3198 * tst-cond22.c: Include pthread.h instead of pthreadP.h.
3199 Include stdlib.h.
3200 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
3201 increase FUTEX if increasing WAKEUP_SEQ. Fix comment typo.
3202 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3203 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3204 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
bd6d3b7d 3205
346e6ad4
UD
32062006-09-08 Ulrich Drepper <drepper@redhat.com>
3207
3208 [BZ #3123]
3209 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
3210 increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
2b6a801e
UD
3211 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3212 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3213 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
346e6ad4
UD
3214 * Makefile (tests): Add tst-cond22.
3215 * tst-cond22.c: New file.
3216
b051fc44
UD
32172006-09-05 Ulrich Drepper <drepper@redhat.com>
3218
3219 [BZ #3124]
3220 * descr.h (struct pthread): Add parent_cancelhandling.
3221 * sysdeps/pthread/createthread.c (create_thread): Pass parent
3222 cancelhandling value to child.
3223 * pthread_create.c (start_thread): If parent thread was canceled
3224 reset the SIGCANCEL mask.
3225 * Makefile (tests): Add tst-cancel25.
3226 * tst-cancel25.c: New file.
3227
d052233c 32282006-09-05 Jakub Jelinek <jakub@redhat.com>
b42a214c 3229 Ulrich Drepper <drepper@redhat.com>
d052233c
UD
3230
3231 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
3232 counterp if it is already zero.
3233 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
3234
cd248c3f 32352006-03-04 Jakub Jelinek <jakub@redhat.com>
b42a214c 3236 Roland McGrath <roland@redhat.com>
cd248c3f
UD
3237
3238 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
3239 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
3240 LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
3241 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
3242 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
3243 lll_robust_mutex_timedlock, lll_mutex_unlock,
3244 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
3245 Add _L_*_ symbols around the subsection.
3246 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
3247 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
3248
32492006-03-03 Jakub Jelinek <jakub@redhat.com>
b42a214c 3250 Roland McGrath <roland@redhat.com>
cd248c3f
UD
3251
3252 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3253 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
3254 LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
3255 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
3256 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
3257 lll_robust_mutex_timedlock, lll_mutex_unlock,
3258 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
3259 Add _L_*_ symbols around the subsection.
3260 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
3261 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
3262
b80770b2
UD
32632006-08-31 Ulrich Drepper <drepper@redhat.com>
3264
3265 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
3266 change because it can disturb too much existing code. If real hard
3267 reader preference is needed we'll introduce another type.
3268 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
3269 (pthread_rwlock_timedwrlock): Likewise.
3270 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
3271 Likewise.
3272
bee2df0b
UD
32732006-08-30 Ulrich Drepper <drepper@redhat.com>
3274
3275 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
3276 reader preference.
3277 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
3278 (pthread_rwlock_timedwrlock): Likewise.
3279 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
3280 Likewise.
3281
d678ebc1
UD
32822006-08-25 Jakub Jelinek <jakub@redhat.com>
3283
3284 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
3285 Only define ifdef SHARED.
3286
ba408f84
UD
32872006-08-23 Ulrich Drepper <drepper@redhat.com>
3288
3289 * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
3290 (free_stacks): ...here.
3291 (__free_stack_cache): New function.
3292 * pthreadP.h: Declare __free_stack_cache.
3293 * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
3294 ptr_freeres.
3295 * init.c (pthread_functions): Initialize ptr_freeres.
3296 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
3297 New freeres function.
3298
376e973a
UD
32992006-07-30 Joseph S. Myers <joseph@codesourcery.com>
3300
3301 [BZ #3018]
3302 * Makefile (extra-objs): Add modules to extra-test-objs instead.
3303
2b34af01
UD
33042006-08-20 Ulrich Drepper <drepper@redhat.com>
3305
3306 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
3307 _XOPEN_REALTIME_THREADS.
3308
89c85f87
UD
33092006-08-15 Jakub Jelinek <jakub@redhat.com>
3310
3311 * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
3312 HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
3313 HAVE_CLOCK_GETTIME_VSYSCALL.
3314 (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
3315
f17efcb4
UD
33162006-08-14 Jakub Jelinek <jakub@redhat.com>
3317
3318 * sysdeps/unix/sysv/linux/bits/posix_opt.h
3319 (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
3320 * descr.h (struct priority_protection_data): New type.
3321 (struct pthread): Add tpp field.
3322 * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
3323 PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
3324 PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
3325 * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
3326 TPP mutexes.
3327 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
3328 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
3329 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
3330 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
3331 * tpp.c: New file.
3332 * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
3333 boosted by TPP.
3334 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
3335 * pthread_mutexattr_getprioceiling.c
3336 (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
3337 in the SCHED_FIFO priority range.
3338 * pthread_mutexattr_setprioceiling.c
3339 (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
3340 * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
3341 if mutex is not TPP. Ceiling is now in __data.__lock.
3342 * pthread_mutex_setprioceiling.c: Include stdbool.h.
3343 (pthread_mutex_setprioceiling): Fix prioceiling validation. Ceiling
3344 is now in __data.__lock. Add locking.
3345 * pthread_create.c (__free_tcb): Free pd->tpp structure.
3346 * Makefile (libpthread-routines): Add tpp.
3347 (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
3348 * tst-tpp.h: New file.
3349 * tst-mutexpp1.c: New file.
3350 * tst-mutexpp6.c: New file.
3351 * tst-mutexpp10.c: New file.
3352 * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
3353 * tst-mutex6.c (TEST_FUNCTION): Likewise.
3354
22bb134c
UD
33552006-08-12 Ulrich Drepper <drepper@redhat.com>
3356
3357 [BZ #2843]
3358 * pthread_join.c (pthread_join): Account for self being canceled
3359 when checking for deadlocks.
3360 * tst-join5.c: Cleanups. Allow to be used in tst-join6.
3361 (tf1): Don't print anything after pthread_join returns, this would be
3362 another cancellation point.
3363 (tf2): Likewise.
3364 * tst-join6.c: New file.
3365 * Makefile (tests): Add tst-join6.
3366
f1762c0c
UD
33672006-08-03 Ulrich Drepper <drepper@redhat.com>
3368
9c06eb66
UD
3369 [BZ #2892]
3370 * pthread_setspecific.c (__pthread_setspecific): Check
3371 out-of-range index before checking for unused key.
3372
f1762c0c
UD
3373 * sysdeps/pthread/gai_misc.h: New file.
3374
7bb1b2c9
UD
33752006-08-01 Ulrich Drepper <drepper@redhat.com>
3376
3377 * sysdeps/unix/sysv/linux/i386/smp.h: New file. Old Linux-specific
3378 file. Don't use sysctl.
3379 * sysdeps/unix/sysv/linux/smp.h: Always assume SMP. Archs can
3380 overwrite the file if this is likely not true.
3381
b06e7e9a
UD
33822006-07-31 Daniel Jacobowitz <dan@codesourcery.com>
3383
3384 * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
3385 * Makefile (tests): Add tst-getpid3.
3386 * tst-getpid3.c: New file.
3387
b894c2ea
RM
33882006-07-30 Roland McGrath <roland@redhat.com>
3389
3390 * Makefile (libpthread-routines): Add ptw-sigsuspend.
3391
3392 * sysdeps/unix/sysv/linux/i386/not-cancel.h
3393 (pause_not_cancel): New macro.
3394 (nanosleep_not_cancel): New macro.
3395 (sigsuspend_not_cancel): New macro.
3396 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
3397 nanosleep_not_cancel macro from <not-cancel.h>.
3398 * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
3399 macro from <not-cancel.h>.
3400
df47504c
UD
34012006-07-28 Ulrich Drepper <drepper@redhat.com>
3402 Jakub Jelinek <jakub@redhat.com>
3403
3404 * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
3405 notification of PI mutex. Add ENQUEUE_MUTEX_PI.
3406 * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
3407 * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
3408 * pthread_mutex_init.c: Add support for priority inheritance mutex.
3409 * pthread_mutex_lock.c: Likewise.
3410 * pthread_mutex_timedlock.c: Likewise.
3411 * pthread_mutex_trylock.c: Likewise.
3412 * pthread_mutex_unlock.c: Likewise.
3413 * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
3414 all mutexes.
3415 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
3416 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
3417 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
3418 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
3419 pthread-pi-defines.sym.
3420 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
3421 FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
3422 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
d5ba53f9
UD
3423 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
3424 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3425 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3426 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3427 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
3428 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
df47504c
UD
3429 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
3430 _POSIX_THREAD_PRIO_INHERIT to 200112L.
3431 * tst-mutex1.c: Adjust to allow use in PI mutex test.
3432 * tst-mutex2.c: Likewise.
3433 * tst-mutex3.c: Likewise.
3434 * tst-mutex4.c: Likewise.
3435 * tst-mutex5.c: Likewise.
3436 * tst-mutex6.c: Likewise.
3437 * tst-mutex7.c: Likewise.
3438 * tst-mutex7a.c: Likewise.
3439 * tst-mutex8.c: Likewise.
3440 * tst-mutex9.c: Likewise.
3441 * tst-robust1.c: Likewise.
3442 * tst-robust7.c: Likewise.
3443 * tst-robust8.c: Likewise.
3444 * tst-mutexpi1.c: New file.
3445 * tst-mutexpi2.c: New file.
3446 * tst-mutexpi3.c: New file.
3447 * tst-mutexpi4.c: New file.
3448 * tst-mutexpi5.c: New file.
3449 * tst-mutexpi6.c: New file.
3450 * tst-mutexpi7.c: New file.
3451 * tst-mutexpi7a.c: New file.
3452 * tst-mutexpi8.c: New file.
3453 * tst-mutexpi9.c: New file.
3454 * tst-robust1.c: New file.
3455 * tst-robust2.c: New file.
3456 * tst-robust3.c: New file.
3457 * tst-robust4.c: New file.
3458 * tst-robust5.c: New file.
3459 * tst-robust6.c: New file.
3460 * tst-robust7.c: New file.
3461 * tst-robust8.c: New file.
3462 * Makefile (tests): Add the new tests.
3463
3464 * pthread_create.c (start_thread): Add some casts to avoid warnings.
3465 * pthread_mutex_destroy.c: Remove unneeded label.
3466
f3be81a9
UD
34672006-07-01 Ulrich Drepper <drepper@redhat.com>
3468
3469 * pthread_mutex_init.c (__pthread_mutex_init): Move some
3470 computations to compile time.
3471
c26ca5e1
UD
34722006-06-04 Ulrich Drepper <drepper@redhat.com>
3473
3474 * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
3475
6f8a7dff
UD
34762006-05-15 Ulrich Drepper <drepper@redhat.com>
3477
c26ca5e1 3478 * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
6f8a7dff 3479
3d237e42
UD
34802006-05-11 Ulrich Drepper <drepper@redhat.com>
3481
04974d63
UD
3482 * pthread_key_create.c (__pthread_key_create): Do away with
3483 __pthread_keys_lock.
3484
3485 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
3486 (__kernel_cpumask_size): Mark as hidden.
3487 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
3488
3d237e42
UD
3489 * sem_open.c (__sem_mappings_lock): Mark as hidden.
3490 * semaphoreP.h (__sem_mappings_lock): Likewise.
3491
790fc6e4
UD
34922006-05-10 Ulrich Drepper <drepper@redhat.com>
3493
3494 * pthread_atfork.c: Mark __dso_handle as hidden.
3495
be434a72
UD
34962006-05-09 Ulrich Drepper <drepper@redhat.com>
3497
3498 [BZ #2644]
3499 * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
3500 the reload problem. Change the one path in pthread_cancel_init
3501 which causes the problem. Force gcc to reload. Simplify callers.
3502 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
3503 (_Unwind_GetBSP): Undo last patch.
3504
3142b1ac
UD
35052006-05-07 Ulrich Drepper <drepper@redhat.com>
3506
bf3635d3
UD
3507 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
3508 function pointer is reloaded after pthread_cancel_init calls.
3142b1ac
UD
3509
3510 [BZ #2644]
3511 * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
3512 pointers are reloaded after pthread_cancel_init calls.
3513
27488789
UD
35142006-05-01 Ulrich Drepper <drepper@redhat.com>
3515
3516 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
3517 __always_inline.
3518
a6375d11
UD
35192006-04-27 Ulrich Drepper <drepper@redhat.com>
3520
3521 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
3522 Allocate new object which is passed to timer_sigev_thread so that
3523 the timer can be deleted before the new thread is scheduled.
3524
16a1d952
RM
35252006-04-26 Roland McGrath <roland@redhat.com>
3526
3527 * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
3528
7960f2a7
UD
35292006-04-08 Ulrich Drepper <drepper@redhat.com>
3530
ab9a9ff8
UD
3531 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
3532 suffix for conditional jumps.
3533 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
3534 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
3535 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
3536 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
3537 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
3538 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
3539
7960f2a7
UD
3540 * init.c (sigcancel_handler): Compare with correct PID even if the
3541 thread is in the middle of a fork call.
3542 (sighandler_setxid): Likewise.
3543 Reported by Suzuki K P <suzuki@in.ibm.com> .
3544
2035d91c
UD
35452006-04-07 Jakub Jelinek <jakub@redhat.com>
3546
3547 * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
3548
0292b0dd
UD
35492006-04-06 Ulrich Drepper <drepper@redhat.com>
3550
3551 * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
3552 fails [Coverity CID 105].
3553
6738b3c0
UD
35542006-04-05 Ulrich Drepper <drepper@redhat.com>
3555
3556 * sysdeps/pthread/pthread.h: Add nonnull attributes.
3557
359157a5
RM
35582006-04-03 Steven Munroe <sjmunroe@us.ibm.com>
3559
3560 [BZ #2505]
3561 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
3562 Define __lll_rel_instr using lwsync.
3563
cd277b2d
UD
35642006-03-27 Ulrich Drepper <drepper@redhat.com>
3565
3566 * allocatestack.c (allocate_stack): Always initialize robust_head.
3567 * descr.h: Define struct robust_list_head.
3568 (struct pthread): Use robust_list_head in robust mutex list definition.
3569 Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
3570 * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
3571 (__pthread_initialize_minimal_internal): Register robust_list with
3572 the kernel.
3573 * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
3574 Declare __set_robust_list_avail.
3575 * pthread_create.c (start_thread): Register robust_list of new thread.
3576 [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
3577 waiters.
3578 * pthread_mutex_destroy.c: For robust mutexes don't look at the
3579 number of users, it's unreliable.
3580 * pthread_mutex_init.c: Allow use of pshared robust mutexes if
3581 set_robust_list syscall is available.
3582 * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
3583 * pthread_mutex_lock.c: Simplify robust mutex code a bit.
3584 Set robust_head.list_op_pending before trying to lock a robust mutex.
3585 * pthread_mutex_timedlock.c: Likewise.
3586 * pthread_mutex_trylock.c: Likewise.
3587 * pthread_mutex_unlock.c: Likewise for unlocking.
3588 * Makefile (tests): Add tst-robust8.
3589 * tst-robust8.c: New file.
3590
facac085
UD
35912006-03-08 Andreas Schwab <schwab@suse.de>
3592
3593 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
3594 (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
3595
7ccbe1a1
RM
35962006-03-05 Roland McGrath <roland@redhat.com>
3597
3598 * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
3599 and $config_os doesn't match *linux*.
3600
043cee37
RM
36012006-03-05 David S. Miller <davem@sunset.davemloft.net>
3602
3603 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
3604 Use __syscall_error.
3605 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
3606 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
3607 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
3608 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
3609 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
3610 * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
3611
88bce79e
UD
36122006-03-02 Ulrich Drepper <drepper@redhat.com>
3613
3614 * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
3615
672ec465
UD
36162006-03-01 Ulrich Drepper <drepper@redhat.com>
3617
3618 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
3619 (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
3620 mutex.
3621 (__lll_robust_timedlock_wait): Likewise.
3622 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
3623 (__lll_robust_lock_wait): Likewise.
3624 (__lll_robust_timedlock_wait): Likewise.
3625 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
3626 (__lll_robust_lock_wait): Likewise.
3627 (__lll_robust_timedlock_wait): Likewise.
3628
c4a4875d
RM
36292006-03-01 Jakub Jelinek <jakub@redhat.com>
3630
3631 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
3632 lll_robust_mutex_trylock, lll_robust_mutex_lock,
3633 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
3634 lll_robust_mutex_unlock): Define.
3635 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
3636
3192fd8e
RM
36372006-02-28 H.J. Lu <hongjiu.lu@intel.com>
3638
3639 * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
3640 instead of <clone.S>.
3641
14d44b19
RM
36422006-02-27 Jakub Jelinek <jakub@redhat.com>
3643
3644 * Makefile (libpthread-routines): Add
3645 pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
3646 and pthread_mutex_[sg]etprioceiling.
3647 * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
3648 pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
3649 pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
3650 pthread_mutex_setprioceiling.
3651 * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
3652 PTHREAD_PRIO_PROTECT): New enum values.
3653 (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
3654 pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
3655 pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
3656 prototypes.
3657 * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
3658 PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
3659 (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
3660 Define.
3661 (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
3662 PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
3663 PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
3664 (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
3665 and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
3666 * pthread_mutex_init.c (__pthread_mutex_init): For the time being
3667 return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
3668 protocol mutexes.
3669 * pthread_mutex_getprioceiling.c: New file.
3670 * pthread_mutex_setprioceiling.c: New file.
3671 * pthread_mutexattr_getprioceiling.c: New file.
3672 * pthread_mutexattr_setprioceiling.c: New file.
3673 * pthread_mutexattr_getprotocol.c: New file.
3674 * pthread_mutexattr_setprotocol.c: New file.
3675
62f6b9b2
RM
36762006-02-27 Daniel Jacobowitz <dan@codesourcery.com>
3677
3678 * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
3679
e0a3ed4f
RM
36802006-02-27 Roland McGrath <roland@redhat.com>
3681
3682 * sysdeps/pthread/Subdirs: List nptl here too.
3683 * configure (libc_add_on_canonical): New variable.
3684
3685 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
3686
3687 * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
3688 self to get main source tree's file.
3689 * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
3690 * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
3691 * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
3692 * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
3693 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
3694 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
3695 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
3696 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
3697 * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
3698 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
3699 * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
3700 * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
3701 * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
3702
3703 * Makefile: Use $(sysdirs) in vpath directive.
3704
3705 * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
3706 (CPPFLAGS-timer_routines.c): Likewise.
3707
3708 * Makeconfig (includes): Variable removed.
3709
84cfa284
RM
37102006-02-26 Roland McGrath <roland@redhat.com>
3711
3712 * sysdeps/generic/pt-raise.c: Moved to ...
3713 * pt-raise.c: ... here.
3714 * sysdeps/generic/lowlevellock.h: Moved to ...
3715 * lowlevellock.h: ... here.
3716
c5132ca1
RM
37172006-02-23 Roland McGrath <roland@redhat.com>
3718
3719 * descr.h (struct pthread): Add final member `end_padding'.
3720 (PTHREAD_STRUCT_END_PADDING): Use it.
3721
37222006-02-20 Roland McGrath <roland@redhat.com>
3723
3724 * sysdeps/mips: Directory removed, saved in ports repository.
3725 * sysdeps/unix/sysv/linux/mips: Likewise.
3726
a93317a1
UD
37272006-02-18 Ulrich Drepper <drepper@redhat.com>
3728
3729 * tst-robust1.c: Add second mutex to check that the mutex list is
3730 handled correctly.
3731
f1740bc4
UD
37322006-02-17 Jakub Jelinek <jakub@redhat.com>
3733
3734 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
3735 lll_robust_mutex_trylock, lll_robust_mutex_lock,
3736 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
3737 lll_robust_mutex_unlock): New macros.
3738 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
3739 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3740 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3741 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3742 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
3743
a7245bf5
UD
37442006-02-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3745
3746 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
3747 definitions.
3748 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
3749
49bfc1fe
UD
37502006-02-17 Ulrich Drepper <drepper@redhat.com>
3751
3752 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3753 (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
3754 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
3755 (lll_robust_mutex_unlock): Likewise.
3756
56e987ac
UD
37572006-02-13 Jakub Jelinek <jakub@redhat.com>
3758
3759 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
3760 Set robust_list.__next rather than robust_list.
3761 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
3762 (__pthread_list_t): New typedef.
3763 (pthread_mutex_t): Replace __next and __prev fields with __list.
3764 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
3765 (__pthread_list_t): New typedef.
3766 (pthread_mutex_t): Replace __next and __prev fields with __list.
3767 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
3768 (__pthread_list_t, __pthread_slist_t): New typedefs.
3769 (pthread_mutex_t): Replace __next and __prev fields with __list.
3770 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
3771 (__pthread_list_t, __pthread_slist_t): New typedefs.
3772 (pthread_mutex_t): Replace __next and __prev fields with __list.
3773 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
3774 (__pthread_list_t, __pthread_slist_t): New typedefs.
3775 (pthread_mutex_t): Replace __next and __prev fields with __list.
3776 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
3777 (__pthread_slist_t): New typedef.
3778 (pthread_mutex_t): Replace __next field with __list.
3779
683040c3
UD
37802006-02-15 Ulrich Drepper <drepper@redhat.com>
3781
25bc77e6 3782 * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
683040c3
UD
3783 PTHREAD_MUTEX_OWNERDEAD.
3784 (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
3785 Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
3786 * Makefile (libpthread-routines): Add lowlevelrobustlock.
3787 * pthread_create.c (start_thread): Very much simplify robust_list loop.
3788 * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
3789 to PTHREAD_MUTEX_INCONSISTENT.
3790 * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
3791 * pthread_mutex_lock.c: Reimplement robust mutex handling.
3792 * pthread_mutex_trylock.c: Likewise.
3793 * pthread_mutex_timedlock.c: Likewise.
3794 * pthread_mutex_unlock.c: Likewise.
3795 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
3796 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
3797 lowlevelrobustlock.sym.
3798 * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
3799 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
3800 definitions.
3801 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3802 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
3803 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
3804 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
3805 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
3806
bbf209a4
UD
38072006-02-12 Ulrich Drepper <drepper@redhat.com>
3808
b007ce7c
UD
3809 * allocatestack.c (allocate_stack): Initialize robust_list.
3810 * init.c (__pthread_initialize_minimal_internal): Likewise.
3811 * descr.h (struct xid_command): Pretty printing.
3812 (struct pthread): Use __pthread_list_t or __pthread_slist_t for
3813 robust_list. Adjust macros.
3814 * pthread_create.c (start_thread): Adjust robust_list handling.
3815 * phtread_mutex_unlock.c: Don't allow unlocking from any thread
3816 but the owner for all robust mutex types.
3817 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
3818 __pthread_list_t and __pthread_slist_t. Use them in pthread_mutex_t.
0ca3379d 3819 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
b007ce7c
UD
3820 * sysdeps/pthread/pthread.h: Adjust mutex initializers.
3821
bbf209a4 3822 * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
b42a214c 3823 openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
bbf209a4 3824
b576fca1
UD
38252006-02-08 Jakub Jelinek <jakub@redhat.com>
3826
3827 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
3828 lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
3829
a6df7387
UD
38302006-01-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3831
3832 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
3833 Return status.
3834 (lll_futex_timed_wait): Define.
3835
7c65e900
UD
38362006-01-19 Ulrich Drepper <drepper@redhat.com>
3837
3838 * tst-cancel4.c: Test ppoll.
3839
5f9f21e8
AJ
38402006-01-18 Andreas Jaeger <aj@suse.de>
3841
cf407dfb 3842 [BZ #2167]
5f9f21e8
AJ
3843 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
3844 (pthread_mutex_t): Follow changes for other archs. Based on patch
3845 by Jim Gifford <patches@jg555.com>.
3846
251278c6
UD
38472006-01-13 Richard Henderson <rth@redhat.com>
3848
3849 * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
3850
de59a291
RM
38512006-01-10 Roland McGrath <roland@redhat.com>
3852
3853 * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
3854 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
3855 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
3856 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
3857 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
3858 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
3859 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
3860 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
3861 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
0ca13e14 3862 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
de59a291 3863
931786ee
RM
38642006-01-09 Roland McGrath <roland@redhat.com>
3865
5d42c8c3
RM
3866 * tst-initializers1-c89.c: New file.
3867 * tst-initializers1-c99.c: New file.
3868 * tst-initializers1-gnu89.c: New file.
3869 * tst-initializers1-gnu99.c: New file.
3870 * Makefile (tests): Add them.
3871 (CFLAGS-tst-initializers1-c89.c): New variable.
3872 (CFLAGS-tst-initializers1-c99.c): New variable.
3873 (CFLAGS-tst-initializers1-gnu89.c): New variable.
3874 (CFLAGS-tst-initializers1-gnu99.c): New variable.
3875
931786ee
RM
3876 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
3877 Use __extension__ on anonymous union definition.
3878 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3879 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
3880 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3881 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3c238452 3882 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
931786ee 3883
8dd18431
RM
38842006-01-08 Jakub Jelinek <jakub@redhat.com>
3885
3886 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
3887 Don't give the union a name because it changes the mangled name.
3888 Instead name the struct for __data.
3889 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
3890 Likewise.
3891 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
3892 Likewise.
3893
ae11e412
UD
38942006-01-09 Jakub Jelinek <jakub@redhat.com>
3895
3896 * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
3897 stack bias to mc_ftp field.
3898
c6885aa1
UD
38992006-01-07 Ulrich Drepper <drepper@redhat.com>
3900
3901 * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
6e741bc3 3902 being too clever and reloading the futex value where it shouldn't.
c6885aa1 3903
ae4ad00a
UD
39042006-01-06 Ulrich Drepper <drepper@redhat.com>
3905
3906 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
3907 correct type.
3908
ced368f7
UD
39092006-01-06 Jakub Jelinek <jakub@redhat.com>
3910
3911 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
3912 Add cfi directives.
3913
d804f5df
UD
39142006-01-06 Ulrich Drepper <drepper@redhat.com>
3915
cbbbb188 3916 * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
719046c1
UD
3917 * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
3918 rename in tcbhead_t.
3919
d804f5df
UD
3920 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
3921 Don't give the union a name because it changes the mangled name.
3922 Instead name the struct for __data.
3923 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3924 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3925 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3926 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3927 * pthread_create.c (start_thread): Adjust robust mutex free loop.
3928 * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
3929
679d83ba
UD
39302006-01-05 Ulrich Drepper <drepper@redhat.com>
3931
3932 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
3933 Return status.
3934 (lll_futex_timed_wait): Define.
3935 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3936 * sysdeps/pthread/aio_misc.h: New file.
3937
06dc5bf3
RM
39382006-01-03 Joseph S. Myers <joseph@codesourcery.com>
3939
3940 * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
3941
9759bbf1
UD
39422006-01-03 Steven Munroe <sjmunroe@us.ibm.com>
3943
3944 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3945 (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
3946 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
3947
db59b28b
UD
39482006-01-04 Ulrich Drepper <drepper@redhat.com>
3949
3950 * tst-cancel24.cc: Use C headers instead of C++ headers.
3951
b01fe5f7
UD
39522006-01-03 Jakub Jelinek <jakub@redhat.com>
3953
3954 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
3955 sparc-linux configured glibc.
3956 (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
3957 (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
3958 __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
3959 atomic_compare_and_exchange_val_24_acq instead of
3960 atomic_compare_and_exchange_val_acq.
3961 (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
3962 instead of atomic_exchange_rel.
3963 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
3964 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
3965 file.
3966 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
3967 file.
3968 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
3969 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
3970 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
3971 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
3972 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
3973 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
3974 New file.
3975 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
3976 New file.
3977 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
3978 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
3979 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
3980 file.
3981 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
3982 file.
3983 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
3984
35c2fd59
UD
39852006-01-03 Ulrich Drepper <drepper@redhat.com>
3986
3987 * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
3988 mutex initializers.
3989
305bb37e
UD
39902006-01-02 Jakub Jelinek <jakub@redhat.com>
3991
3992 * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
3993 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3994 THREAD_COPY_POINTER_GUARD): Define.
3995 * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
3996 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
3997
cc792128
UD
39982006-01-01 Ulrich Drepper <drepper@redhat.com>
3999
4000 * version.c: Update copyright year.
4001
db0a00d3
UD
40022005-12-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4003
4004 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
4005 .eh_frame section, use cfi_* directives.
4006 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
4007
b36205c4
UD
40082005-12-30 Ulrich Drepper <drepper@redhat.com>
4009
4010 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
4011 now.
4012
8b4f1598
UD
40132005-12-29 Ulrich Drepper <drepper@redhat.com>
4014
4015 * sysdeps/pthread/sigaction.c: Removed.
4016 * sigaction.c: New file.
4017 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
4018
fec5592d
UD
40192005-12-28 Ulrich Drepper <drepper@redhat.com>
4020
4021 * Makefile (tests): Add tst-signal7.
4022 * tst-signal7.c: New file.
4023
db169ed5
RM
40242005-12-27 Roland McGrath <roland@redhat.com>
4025
4026 * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
4027 (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
4028 * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
4029 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
4030 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
4031 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
4032 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
4033 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
4034 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
4035 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
4036 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
4037
bfffffae
UD
40382005-12-27 Jakub Jelinek <jakub@redhat.com>
4039
4040 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
4041 and __prev field to pthread_mutex_t.
4042 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4043 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4044 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4045 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4046 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
4047 to pthread_mutex_t.
4048
1bcfb5a5
UD
40492005-12-26 Ulrich Drepper <drepper@redhat.com>
4050
4051 * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
4052 PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
4053 PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
4054 PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
4055 PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
4056 and PTHREAD_MUTEXATTR_FLAG_BITS.
4057 * descr.h (struct pthread): Add robust_list field and define
4058 ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
4059 * pthread_mutexattr_getrobust.c: New file.
4060 * pthread_mutexattr_setrobust.c: New file.
4061 * pthread_mutex_consistent.c: New file.
4062 * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
4063 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
4064 Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
4065 Adjust pthread_mutex_t initializers.
4066 * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
4067 field to pthread_mutex_t.
4068 * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
4069 and __prev field to pthread_mutex_t.
4070 * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
4071 pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
4072 * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
4073 and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
4074 * pthread_mutexattr_gettype.c: Likewise.
4075 * pthread_mutexattr_setpshared.c: Likewise.
4076 * pthread_mutexattr_settype.c: Likewise.
4077 * pthread_mutex_init.c: Reject robust+pshared attribute for now.
4078 Initialize mutex kind according to robust flag.
4079 * pthread_mutex_lock.c: Implement local robust mutex.
4080 * pthread_mutex_timedlock.c: Likewise.
4081 * pthread_mutex_trylock.c: Likewise.
4082 * pthread_mutex_unlock.c: Likewise.
4083 * pthread_create.c (start_thread): Mark robust mutexes which remained
4084 locked as dead.
4085 * tst-robust1.c: New file.
4086 * tst-robust2.c: New file.
4087 * tst-robust3.c: New file.
4088 * tst-robust4.c: New file.
4089 * tst-robust5.c: New file.
4090 * tst-robust6.c: New file.
4091 * tst-robust7.c: New file.
4092 * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
4093 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
4094 (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
4095 tst-robust5, tst-robust6, and tst-robust7.
4096
4097 * tst-typesizes.c: New file.
4098 * Makefile (tests): Add tst-typesizes.
4099
4100 * tst-once3.c: More debug output.
4101
9333ed0d
UD
41022005-12-24 Ulrich Drepper <drepper@redhat.com>
4103
d4d138a4
UD
4104 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
4105 missing after last change.
4106
bfffffae 4107 * version.c: Update copyright year.
9333ed0d 4108
dcc73a8d
UD
41092005-12-23 Ulrich Drepper <drepper@redhat.com>
4110
4111 * pthread_mutex_destroy.c: Set mutex type to an invalid value.
4112 * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
4113 * pthread_mutex_trylock.c: Likewise.
4114 * pthread_mutex_timedlock.c: Likewise.
4115 * pthread_mutex_unlock.c: Likewise.
4116
879f3ca6
RM
41172005-12-22 Roland McGrath <roland@redhat.com>
4118
4119 * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
4120 so that #include_next's search location is not reset to the -I..
4121 directory where <nptl/...> can be found.
4122
077a0da7
UD
41232005-12-22 Ulrich Drepper <drepper@redhat.com>
4124
4125 [BZ #1913]
4126 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
4127 Fix unwind info. Remove useless branch prediction prefix.
7735afa2
UD
4128 * tst-cancel24.cc: New file.
4129 * Makefile: Add rules to build and run tst-cancel24.
077a0da7 4130
8dea90aa
RM
41312005-12-21 Roland McGrath <roland@redhat.com>
4132
4133 * libc-cancellation.c: Use <> rather than "" #includes.
4134 * pt-cleanup.c: Likewise.
4135 * pthread_create.c: Likewise.
4136 * pthread_join.c: Likewise.
4137 * pthread_timedjoin.c: Likewise.
4138 * pthread_tryjoin.c: Likewise.
4139 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
4140 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
4141 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
4142 * unwind.c: Likewise.
4143
8da21f96
UD
41442005-12-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4145
4146 * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
4147 * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
4148 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
4149 THREAD_COPY_POINTER_GUARD): Define.
4150
00c2b3b9
UD
41512005-12-19 Jakub Jelinek <jakub@redhat.com>
4152
4153 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
4154 rather than one.
4155 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
4156 THREAD_COPY_POINTER_GUARD): Define.
4157 * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
4158 * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
4159 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
4160 THREAD_COPY_POINTER_GUARD): Define.
4161 * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
4162 * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
4163 THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
4164 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
4165 Use PTR_DEMANGLE for B0 if defined.
4166
827b7087
UD
41672005-12-17 Ulrich Drepper <drepper@redhat.com>
4168
4169 * pthread_create.c (__pthread_create_2_1): Use
4170 THREAD_COPY_POINTER_GUARD if available.
4171 * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
4172 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
4173 * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
4174 Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
4175 * sysdeps/x86_64/tls.h: Likewise.
4176
2826ac7e
RM
41772005-12-15 Roland McGrath <roland@redhat.com>
4178
4179 * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
4180
b6ab06ce
UD
41812005-12-13 Ulrich Drepper <drepper@redhat.com>
4182
4183 * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
4184 sysdeps/generic.
4185 * errno-loc.c: New file.
4186
f0d1a3b5
RM
41872005-12-12 Roland McGrath <roland@redhat.com>
4188
4189 * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
4190 adjustments before choosing stack size. Update minimum stack size
4191 calculation to match allocate_stack change.
4192
db13ddbc
UD
41932005-12-12 Ulrich Drepper <drepper@redhat.com>
4194
4195 * allocatestack.c (allocate_stack): Don't demand that there is an
4196 additional full page available on the stack beside guard, TLS, the
4197 minimum stack.
4198
088f460f
UD
41992005-11-24 Ulrich Drepper <drepper@redhat.com>
4200
4201 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
4202 (__cleanup_fct_attribute): Use __regparm__ not regparm.
4203
4204 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
4205 compiling 32-bit code we must define __cleanup_fct_attribute.
4206
16feadf2
UD
4207005-11-24 Jakub Jelinek <jakub@redhat.com>
4208
4209 [BZ #1920]
4210 * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
4211 __attribute__ instead of __attribute.
4212 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
4213 (__cleanup_fct_attribute): Likewise.
4214
e6e493bb
UD
42152005-11-17 Jakub Jelinek <jakub@redhat.com>
4216
4217 * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
4218 a write barrier before writing libgcc_s_getcfa.
4219
8e635611
UD
42202005-11-06 Ulrich Drepper <drepper@redhat.com>
4221
4222 * sysdeps/unix/sysv/linux/configure: Removed.
4223
ce33ee7c
UD
42242005-11-05 Ulrich Drepper <drepper@redhat.com>
4225
4226 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
4227 optional init_array/fini_array support.
4228
20d511e0
RM
42292005-10-24 Roland McGrath <roland@redhat.com>
4230
4231 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
4232 versioned_symbol use.
4233
fe60d146
RM
42342005-10-16 Roland McGrath <roland@redhat.com>
4235
4236 * init.c (__pthread_initialize_minimal_internal): Even when using a
4237 compile-time default stack size, apply the minimum that allocate_stack
4238 will require, and round up to page size.
4239
0faa1cf5
RM
42402005-10-10 Daniel Jacobowitz <dan@codesourcery.com>
4241
4242 * Makefile ($(test-modules)): Remove static pattern rule.
4243
f9126cc2 42442005-10-14 Jakub Jelinek <jakub@redhat.com>
b42a214c 4245 Ulrich Drepper <drepper@redhat.com>
f9126cc2
UD
4246
4247 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
4248 alignment in callback function.
4249 * Makefile: Add rules to build and run tst-align3.
4250 * tst-align3.c: New file.
4251
015a5d22
RM
42522005-10-03 Jakub Jelinek <jakub@redhat.com>
4253
4254 * allocatestack.c (setxid_signal_thread): Add
4255 INTERNAL_SYSCALL_DECL (err).
4256
b71ce910
UD
42572005-10-02 Jakub Jelinek <jakub@redhat.com>
4258
4259 * allocatestack.c (setxid_signal_thread): Need to use
4260 atomic_compare_and_exchange_bool_acq.
4261
dff9a7a1 42622005-10-01 Ulrich Drepper <drepper@redhat.com>
b42a214c 4263 Jakub Jelinek <jakub@redhat.com>
dff9a7a1
UD
4264
4265 * descr.h: Define SETXID_BIT and SETXID_BITMASK. Adjust
4266 CANCEL_RESTMASK.
4267 (struct pthread): Move specific_used field to avoid padding.
4268 Add setxid_futex field.
4269 * init.c (sighandler_setxid): Reset setxid flag and release the
4270 setxid futex.
4271 * allocatestack.c (setxid_signal_thread): New function. Broken
4272 out of the bodies of the two loops in __nptl_setxid. For undetached
4273 threads check whether they are exiting and if yes, don't send a signal.
4274 (__nptl_setxid): Simplify loops by using setxid_signal_thread.
4275 * pthread_create.c (start_thread): For undetached threads, check
4276 whether setxid bit is set. If yes, wait until signal has been
4277 processed.
4278
4279 * allocatestack.c (STACK_VARIABLES): Initialize them.
4280 * pthread_create.c (__pthread_create_2_1): Initialize pd.
4281
560b4709
UD
42822004-09-02 Jakub Jelinek <jakub@redhat.com>
4283
4284 * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
4285 waiters, awake all waiters on the associated mutex.
4286
5eac4760
RM
42872005-09-22 Roland McGrath <roland@redhat.com>
4288
4289 * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
4290 ../sysdeps/x86_64/hp-timing.h).
4291
a3615024
UD
42922005-08-29 Jakub Jelinek <jakub@redhat.com>
4293
4294 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
4295 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4296 (lll_futex_wake_unlock): Define.
4297 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
4298 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4299 (lll_futex_wake_unlock): Define.
4300 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
4301 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4302 (lll_futex_wake_unlock): Define.
4303 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
4304 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4305 (lll_futex_wake_unlock): Define.
4306 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
4307 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4308 (lll_futex_wake_unlock): Define.
4309 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
4310 lll_futex_wake_unlock.
4311 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
4312 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4313 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
4314 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
4315 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4316 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
4317
bf017034
UD
43182005-09-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4319
4320 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
4321 Fix typo in register name.
4322
fd4af664
UD
43232005-08-23 Ulrich Drepper <drepper@redhat.com>
4324
8558d715
UD
4325 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
4326 Use __sigfillset. Document that sigfillset does the right thing wrt
4327 to SIGSETXID.
fd4af664 4328
3fd1bc67
UD
43292005-07-11 Jakub Jelinek <jakub@redhat.com>
4330
44d75caf 4331 [BZ #1102]
3fd1bc67
UD
4332 * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
4333 PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
4334 PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
4335 PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
4336 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
4337 PTHREAD_COND_INITIALIZER): Supply zeros for all fields
4338 in the structure.
4339 * Makefile (tests): Add tst-initializers1.
4340 (CFLAGS-tst-initializers1.c): Set.
4341 * tst-initializers1.c: New test.
4342
553185e2
UD
43432005-07-11 Jakub Jelinek <jakub@redhat.com>
4344
4345 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
4346 Make sure __flags are located at offset 48 from the start of the
4347 structure.
4348
8df08cb2
RM
43492005-07-02 Roland McGrath <roland@redhat.com>
4350
4351 * Makeconfig: Comment fix.
4352
253eb3a0
UD
43532005-07-05 Jakub Jelinek <jakub@redhat.com>
4354
4355 * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
4356 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
4357 is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
4358 (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
4359 TLS_PRE_TCB_SIZE is sizeof (struct pthread).
4360 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4361 * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
4362 Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
4363 * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
4364 assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
4365
bb6e8ca3
UD
43662005-06-25 Jakub Jelinek <jakub@redhat.com>
4367
4368 * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
4369 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4370 * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
4371 fields.
4372 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4373 * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
4374 field. Put in sysinfo field unconditionally.
4375 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4376 * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
4377 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4378 * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
4379 fields.
4380 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4381 * pthread_create.c (__pthread_create_2_1): Use
4382 THREAD_COPY_STACK_GUARD macro.
4383 * Makefile: Add rules to build and run tst-stackguard1{,-static}
4384 tests.
4385 * tst-stackguard1.c: New file.
4386 * tst-stackguard1-static.c: New file.
4387
99c7f870
UD
43882005-06-14 Alan Modra <amodra@bigpond.net.au>
4389
4390 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
4391 Invoke CGOTSETUP and CGOTRESTORE.
4392 (CGOTSETUP, CGOTRESTORE): Define.
4393
8074c5c5
RM
43942005-05-29 Richard Henderson <rth@redhat.com>
4395
4396 * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
4397 (tf_write, tf_writev): Use it.
4398 (do_test): Use socketpair instead of pipe. Set SO_SNDBUF to
4399 the system minimum.
4400
c179df4e
UD
44012005-05-23 Jakub Jelinek <jakub@redhat.com>
4402
4403 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
4404 [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
4405 __librt_*_asynccancel@local.
4406
b0e196a4
UD
44072005-05-17 Alan Modra <amodra@bigpond.net.au>
4408
4409 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
4410 all occurrences of JUMPTARGET. Instead append @local to labels.
4411
f7d78e18
UD
44122005-05-20 Jakub Jelinek <jakub@redhat.com>
4413
4414 * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
4415 size/alignment of struct pthread rather than tcbhead_t.
4416 * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
4417 Likewise.
4418 * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
4419 Likewise.
4420 * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
4421 Likewise.
4422
363dd976
UD
44232005-05-19 Richard Henderson <rth@redhat.com>
4424
4425 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
4426 __sync_val_compare_and_swap, not explicit _si variant.
4427 * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
4428
1ad9da69
UD
44292005-05-03 Ulrich Drepper <drepper@redhat.com>
4430
4431 [BZ #915]
4432 * sysdeps/pthread/pthread.h: Avoid empty initializers.
4433
5085cd1f
UD
44342005-05-03 Jakub Jelinek <jakub@redhat.com>
4435
4436 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
4437 .eh_frame section, use cfi_* directives.
4438
ad529081
UD
44392005-04-27 Jakub Jelinek <jakub@redhat.com>
4440
4441 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
4442 of "" includes.
4443
dea99685
UD
44442005-04-27 Ulrich Drepper <drepper@redhat.com>
4445
c06aad09 4446 [BZ #1075]
dea99685
UD
4447 * tst-cancel17.c (do_test): Add arbitrary factor to make sure
4448 aio_write blocks.
4449
84060bad
RM
44502005-04-27 Roland McGrath <roland@redhat.com>
4451
5e2d8ac8
RM
4452 * Makefile (tests): Remove tst-clock2.
4453
84060bad
RM
4454 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
4455 CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
4456 translating to the kernel clockid_t for our own process/thread clock.
4457
4458 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
4459
4a035b9d
RM
44602005-04-15 Jakub Jelinek <jakub@redhat.com>
4461
4462 * old_pthread_cond_init.c: Include <errno.h>.
4463 (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
4464 process shared or uses clock other than CLOCK_REALTIME.
4465 * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
4466
edac0e8f
UD
44672005-04-13 David S. Miller <davem@davemloft.net>
4468
4469 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
4470 * sysdeps/sparc/sparc64/clone.S: New file.
4471
613d8d52
RM
44722005-04-05 Jakub Jelinek <jakub@redhat.com>
4473
44d75caf 4474 [BZ #1102]
613d8d52
RM
4475 * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
4476 __inline instead of inline.
4477 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
4478
ee618985
UD
44792005-03-31 Jakub Jelinek <jakub@redhat.com>
4480
4481 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
4482 functionally equivalent, but shorter instructions.
4483 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
4484 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
4485 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
4486 Likewise.
4487 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
4488 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
4489 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
4490 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
4491 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4492 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
4493 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
4494 Likewise.
4495 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
4496 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
4497 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4498 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
4499 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
4500
f850220b
AJ
45012005-03-28 Daniel Jacobowitz <dan@codesourcery.com>
4502
4503 * sysdeps/mips/Makefile: New file.
4504 * sysdeps/mips/nptl-sysdep.S: New file.
4505 * sysdeps/mips/tcb-offsets.sym: New file.
4506 * sysdeps/mips/pthread_spin_lock.S: New file.
4507 * sysdeps/mips/pthread_spin_trylock.S: New file.
4508 * sysdeps/mips/pthreaddef.h: New file.
4509 * sysdeps/mips/tls.h: New file.
4510 * sysdeps/mips/jmpbuf-unwind.h: New file.
4511 * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
4512 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
4513 * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
4514 * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
4515 * sysdeps/unix/sysv/linux/mips/fork.c: New file.
4516 * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
4517 * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
4518 * sysdeps/unix/sysv/linux/mips/clone.S: New file.
4519 * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
4520 * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
4521
1e6da2b0
UD
45222005-03-23 Ulrich Drepper <drepper@redhat.com>
4523
c06aad09 4524 [BZ #1112]
1e6da2b0
UD
4525 * pthread_create.c (__pthread_create_2_1): Rename syscall error
4526 variable to scerr.
4527
5233d576
RM
45282005-03-10 Jakub Jelinek <jakub@redhat.com>
4529
4530 * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
4531
3053ff11
RM
45322005-02-25 Roland McGrath <roland@redhat.com>
4533
4534 * alloca_cutoff.c: Correct license text.
4535 * tst-unload.c: Likewise.
4536 * sysdeps/pthread/allocalim.h: Likewise.
4537 * sysdeps/pthread/pt-initfini.c: Likewise.
4538 * sysdeps/pthread/bits/libc-lock.h: Likewise.
4539 * sysdeps/pthread/bits/sigthread.h: Likewise.
4540 * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
4541 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
4542
9cfe5381
RM
45432005-02-16 Roland McGrath <roland@redhat.com>
4544
4545 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
4546 Use unsigned int * for ptr_nthreads.
4547
7de00121
RM
45482005-02-14 Alan Modra <amodra@bigpond.net.au>
4549
20d511e0 4550 [BZ #721]
7de00121
RM
4551 * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
4552 gcc4.
4553
4bae262d
UD
45542005-02-07 Richard Henderson <rth@redhat.com>
4555
613d8d52 4556 [BZ #787]
4bae262d
UD
4557 * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
4558 argument.
4559
75df54b7
RM
45602004-11-03 Marcus Brinkmann <marcus@gnu.org>
4561
4562 * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
4563 order of arguments in invocation of atomic_add_zero.
4564
ea9c93cc
UD
45652005-01-26 Jakub Jelinek <jakub@redhat.com>
4566
9cfe5381 4567 [BZ #737]
ea9c93cc
UD
4568 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
4569 Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
4570 at least gotntpoff relocation and addition.
4571 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
4572 Likewise.
4573 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
4574 Likewise.
4575 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
4576 Likewise.
4577
9dcafc55
UD
45782005-01-06 Ulrich Drepper <drepper@redhat.com>
4579
4580 * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
4581 entry for static tls deallocation fix.
4582 * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
4583 also contains information whether the memory pointed to is static
4584 TLS or not.
4585 * sysdeps/i386/tls.h: Likewise.
4586 * sysdeps/ia64/tls.h: Likewise.
4587 * sysdeps/powerpc/tls.h: Likewise.
4588 * sysdeps/s390/tls.h: Likewise.
4589 * sysdeps/sh/tls.h: Likewise.
4590 * sysdeps/sparc/tls.h: Likewise.
4591 * sysdeps/x86_64/tls.h: Likewise.
4592
a71c152c
UD
45932004-12-27 Ulrich Drepper <drepper@redhat.com>
4594
4595 * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
4596
d143c49e
UD
45972004-12-21 Jakub Jelinek <jakub@redhat.com>
4598
4599 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
4600 %esp.
4601 * Makefile (tests): Add tst-align2.
4602 * tst-align2.c: New test.
4603 * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
4604 -mpreferred-stack-boundary=4.
4605
50130ded
RM
46062004-12-18 Roland McGrath <roland@redhat.com>
4607
4608 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
4609 New file removed withdrawn for the moment.
4610
cbc53df0
RH
46112004-12-17 Richard Henderson <rth@redhat.com>
4612
4613 * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
4614 * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
50130ded 4615
fb9d5c73
UD
46162004-12-16 Ulrich Drepper <drepper@redhat.com>
4617
03332aa6
UD
4618 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
4619 Increased PTHREAD_STACK_MIN.
4620
fb9d5c73
UD
4621 * tst-context1.c (stacks): Use bigger stack size.
4622
e853ea00
UD
46232004-12-16 Jakub Jelinek <jakub@redhat.com>
4624
4625 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
4626 * sysdeps/sparc/tcb-offsets.sym: Add TID.
4627
f23673fc
UD
46282004-12-15 Jakub Jelinek <jakub@redhat.com>
4629
4630 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
4631 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
4632 * sysdeps/s390/tcb-offsets.sym (TID): Add.
4633
917fbe70
UD
46342004-12-15 Ulrich Drepper <drepper@redhat.com>
4635
4636 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
4637
1f9d7c27
UD
46382004-12-14 Ulrich Drepper <drepper@redhat.com>
4639
4640 * sysdeps/powerpc/tcb-offsets.sym: Add TID.
4641 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
4642
4643 * tst-getpid1.c: If child crashes, report this first. Print which
4644 signal.
4645
bf7c04cd
UD
46462004-12-09 Ulrich Drepper <drepper@redhat.com>
4647
4648 * init.c (__pthread_initialize_minimal_internal): Also unblock
4649 SIGSETXID.
4650
46512004-12-01 Jakub Jelinek <jakub@redhat.com>
4652
4653 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
4654 _POSIX_THREAD_CPUTIME): Define to 0.
4655 * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
4656 handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
4657 * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
4658 __timer_signal_thread_tclk): Remove.
4659 (init_module): Remove their initialization.
4660 (thread_cleanup): Remove their cleanup assertions.
4661 * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
4662 __timer_signal_thread_tclk): Remove.
4663 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
75df54b7 4664 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
bf7c04cd
UD
4665 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
4666
484cc801
UD
46672004-12-07 Jakub Jelinek <jakub@redhat.com>
4668
4669 * sysdeps/ia64/tcb-offsets.sym (TID): Add.
4670 * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
4671
4672 * Makefile (tests): Add tst-getpid2.
4673 * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
4674 (do_test): Use it. Use __clone2 instead of clone on ia64.
4675 * tst-getpid2.c: New test.
4676
2da9a6a1
UD
46772004-12-07 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4678
4679 * sysdeps/unix/sysv/linux/sh/clone.S: New file.
4680
1ff241b8
UD
46812004-12-04 Ulrich Drepper <drepper@redhat.com>
4682
4683 * Makefile (tests): Add tst-getpid1.
4684 * tst-getpid1.c: New file.
4685 * sysdeps/unix/sysv/linux/i386/clone.S: New file.
4686 * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
4687
3f488b9c
RM
46882004-12-02 Roland McGrath <roland@redhat.com>
4689
4690 * Makefile (libpthread-nonshared): Variable removed.
4691 ($(objpfx)libpthread_nonshared.a): Target removed.
4692 ($(inst_libdir)/libpthread_nonshared.a): Likewise.
4693 These are now handled by generic magic from
4694 libpthread-static-only-routines being set.
4695
597ce09c
UD
46962004-11-27 Ulrich Drepper <drepper@redhat.com>
4697
4698 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
4699 _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
4700 _POSIX_THREAD_PRIO_PROTECT): Define.
4701 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4702 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
4703 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
4704
60e4523a
UD
47052004-11-26 Jakub Jelinek <jakub@redhat.com>
4706
4707 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
4708 _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
4709 _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
4710 _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
4711 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4712 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
4713 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
4714
f1f2cafc
UD
47152004-11-24 Ulrich Drepper <drepper@redhat.com>
4716
bca2d208
UD
4717 * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
4718
f1f2cafc
UD
4719 * Makefile (libpthread-routines): Add pthread_setschedprio.
4720 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
4721 * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
4722 * pthread_setschedprio.c: New file.
4723
b639d0c9
UD
47242004-11-20 Jakub Jelinek <jakub@redhat.com>
4725
ef2bb413
UD
4726 * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
4727 * pthread_cancel.c (pthread_create): Likewise.
4728
b639d0c9
UD
4729 * Makefile (libpthread-routines): Add vars.
4730 * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
4731 * init.c (__default_stacksize, __is_smp): Remove.
4732 * vars.c: New file.
4733 * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
4734 and define a wrapper macro.
4735 (PTHREAD_STATIC_FN_REQUIRE): Define.
4736 * allocatestack.c (__find_thread_by_id): Undefine.
4737 * pthread_create (__pthread_keys): Remove.
4738 (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
4739 pthread_key_create, pthread_setspecific, pthread_getspecific): Add
4740 PTHREAD_STATIC_FN_REQUIRE.
4741
3defcff3
UD
47422004-11-18 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4743
4744 * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
4745 parameter to REGISTER macro.
4746
ec188f92
RM
47472004-11-17 Roland McGrath <roland@redhat.com>
4748
4749 * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
4750 Make sure SIGCANCEL is blocked as well.
4751
ccd8de9a
UD
47522004-11-10 Jakub Jelinek <jakub@redhat.com>
4753
4754 * sysdeps/pthread/setxid.h: New file.
4755 * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
4756 (struct xid_command): Add forward decl.
4757 (struct pthread_functions): Change return type of __nptl_setxid hook
4758 to int.
4759 * pthreadP.h (__nptl_setxid): Change return type to int.
4760 * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
4761 calling thread, return its return value and set errno on failure.
4762 * descr.h (struct xid_command): Change id type to long array.
4763
4764 * Makefile: Add rules to build and test tst-setuid1 and
4765 tst-setuid1-static.
4766 * tst-setuid1.c: New test.
4767 * tst-setuid1-static.c: New test.
4768
ed2ced8a
UD
47692004-11-10 Jakub Jelinek <jakub@redhat.com>
4770
4771 * Makefile (tests): Add tst-exit3.
4772 * tst-exit3.c: New test.
4773
948603ee
UD
47742004-11-09 Ulrich Drepper <drepper@redhat.com>
4775
4776 * Makefile (tests): Add tst-exit2.
4777 * tst-exit2.c: New file.
4778
ba5ffd2a
RM
47792004-11-09 Roland McGrath <roland@redhat.com>
4780
4781 [BZ #530]
4782 * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
4783 here, before calling clone.
4784 * pthread_create.c (start_thread): Don't do it here.
4785
c4d7bd39
RM
47862004-11-02 Jakub Jelinek <jakub@redhat.com>
4787
4788 * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
4789
543fb0c8
UD
47902004-10-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4791
4792 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
4793 Set ETIMEDOUT to errno when time is up. Tweak to avoid
4794 assembler warning.
4795
a1fbd858
UD
47962004-10-28 Jakub Jelinek <jakub@redhat.com>
4797
4798 * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
4799 if sched_priority is not between minprio and maxprio.
4800
c2a4357a
UD
48012004-10-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4802
4803 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4804 (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
4805
4806 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
4807 (__lll_mutex_timedlock_wait): Fix a bad branch condition.
4808
78d8d211
UD
48092004-10-24 Ulrich Drepper <drepper@redhat.com>
4810
4811 * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
4812 not-cancelable I/O functions.
4813
dd28590f
UD
48142004-10-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4815
4816 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
4817 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
4818 make sure 2 is stored in the futex and we looked at the old value.
4819 Fix a few other problems to return the correct value.
4820
f8c97af7
RH
48212004-10-14 Richard Henderson <rth@redhat.com>
4822
4823 * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
4824 make gcc4 happy.
4825
3feb8efa
UD
48262004-10-06 Jakub Jelinek <jakub@redhat.com>
4827
4828 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
4829 of pthread-functions.h and pthreaddef.h.
4830 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
4831
4832 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4833 Change __data.__nwaiters from int to unsigned int.
4834
4835 * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
4836 sysconf (_SC_THREAD_CPUTIME) returns negative value.
4837
4838 * allocatestack.c (__find_thread_by_id): Move attribute_hidden
4839 before return type.
4840
4841 * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
4842 (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
4843
67060ef5
UD
48442004-10-06 Ulrich Drepper <drepper@redhat.com>
4845
4846 * tst-cancel4.c (tf_msgrcv): Check for failure in msgget. If the
4847 test fails, remove message queue.
4848 (tf_msgsnd): Likewise.
4849
f38a3086
UD
48502004-10-05 Jakub Jelinek <jakub@redhat.com>
4851
4852 * tst-clock1.c: Change #ifdef to #if defined.
4853 * tst-clock2.c: Likewise.
4854 * tst-cond11.c: Likewise.
4855
2c03b6db
UD
4856 * sysdeps/pthread/timer_create.c (timer_create): Use
4857 defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
4858 defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
4859 THREAD_CPUTIME.
4860
6ab5f50d
UD
48612004-10-05 Jakub Jelinek <jakub@redhat.com>
4862
4863 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
4864 _POSIX_THREAD_CPUTIME): Define to 0.
4865
e4bb4853
UD
48662004-10-04 Ulrich Drepper <drepper@redhat.com>
4867
4868 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
4869 and _POSIX_THREAD_CPUTIME to zero.
4870 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
4871 * tst-barrier2.c: Fix testing for POSIX feature.
4872 * tst-clock1.c: Likewise.
4873 * tst-clock2.c: Likewise.
4874 * tst-cond11.c: Likewise.
4875 * tst-cond4.c: Likewise.
4876 * tst-cond6.c: Likewise.
4877 * tst-flock2.c: Likewise.
4878 * tst-mutex4.c: Likewise.
4879 * tst-mutex9.c: Likewise.
4880 * tst-rwlock12.c: Likewise.
4881 * tst-rwlock4.c: Likewise.
4882 * tst-signal1.c: Likewise.
4883 * tst-spin2.c: Likewise.
4884 * sysdeps/pthread/posix-timer.h: Likewise.
4885 * sysdeps/pthread/timer_create.c: Likewise.
4886 * sysdeps/pthread/timer_routines.c: Likewise.
4887
c1b48791
UD
48882004-10-01 Ulrich Drepper <drepper@redhat.com>
4889
927f0673
UD
4890 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4891 (__lll_mutex_timedlock_wait): Address futex correctly.
4892
c1b48791 4893 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
b610fa2d 4894 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
c1b48791
UD
4895 make sure 2 is stored in the futex and we looked at the old value.
4896 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4897 (__lll_mutex_timedlock_wait): Likewise. Fix a few other problems
4898 which might very well made the code not working at all before.
7b87aca6 4899 [BZ #417]
c1b48791 4900
e9f4e844
UD
49012004-09-28 Ulrich Drepper <drepper@redhat.com>
4902
4f21c95d
UD
4903 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
4904 allow SIGSETXID to be sent.
4905 * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
4906 for SIGSETXID to be defined.
4907 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
4908 SIGSETXID cannot be blocked.
4909
e9f4e844
UD
4910 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4911 Add __extension__ to long long types.
4912 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4913 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4914 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4915 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4916 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
4917 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4918 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4919
5f66b766
UD
49202004-09-25 Ulrich Drepper <drepper@redhat.com>
4921
4922 * descr.h (struct pthread): Add stopped_start field.
4923 * sysdeps/pthread/createthread.c (create_thread): Set
4924 start_stopped flag in descriptor for new thread appropriately.
4925 * pthread_create.c (start_thread): Only take lock to be stopped on
4926 startup if stopped_start flag says so.
4927
362038b0
UD
49282004-09-24 Ulrich Drepper <drepper@redhat.com>
4929
3f80a99b
UD
4930 * pthread_create.c (__pthread_create_2_1): Remember whether thread
4931 is created detached and if yes, do not try to free the stack in case
4932 the thread creation failed.
4933 * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
4934 call fails. Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
4935 case there has been no error. [BZ #405]
4936
362038b0
UD
4937 * pthread_create.c (start_thread): Don't wait for scheduler data
4938 etc to be set at the beginning of the function. The cancellation
4939 infrastructure must have been set up. And enable async
4940 cancellation before potentially going to sleep. [BZ #401]
4941
65f0beb9
UD
49422004-09-20 Ulrich Drepper <drepper@redhat.com>
4943
3c12b91a 4944 * Versions: Remove exports for pthread_set*id_np functions.
65f0beb9
UD
4945 * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
4946 for now.
4947 * Makefile: Don't build pthread_set*id code for now.
4948
2edb61e3
UD
49492004-09-19 Ulrich Drepper <drepper@redhat.com>
4950
4951 * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
4952 internal use.
4953 * allocatestack.c (__nptl_setxid): New function.
4954 * descr.h (struct xid_command): Define type.
4955 * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
4956 (sighandler_setxid): New function.
4957 (__pthread_initialize_minimal): Register sighandler_setxid for
4958 SIGCANCEL.
4959 * pt-allocrtsig.c: Update comment.
4960 * pthreadP.h: Define SIGSETXID. Declare __xidcmd variable.
4961 Declare __nptl_setxid.
4962 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
4963 * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
4964 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
4965 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
4966 and pthread_setresuid_np.
4967 * pthread_setgid_np.c: New file.
4968 * pthread_setuid_np.c: New file.
4969 * pthread_setegid_np.c: New file.
4970 * pthread_seteuid_np.c: New file.
4971 * pthread_setregid_np.c: New file.
4972 * pthread_setreuid_np.c: New file.
4973 * pthread_setresgid_np.c: New file.
4974 * pthread_setresuid_np.c: New file.
4975 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
4976 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
4977 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
4978 and pthread_setresuid_np.
4979 * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
4980 pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
4981 pthread_setregid, and pthread_setresgid.
4982
1ab1fa6f
UD
49832004-09-18 Ulrich Drepper <drepper@redhat.com>
4984
4985 * allocatestack.c (allocate_stack): Return EAGAIN instead of
4986 ENOMEM when out of memory.
4987
ae9e6b36
RM
49882004-09-10 Roland McGrath <roland@redhat.com>
4989
4990 [BZ #379]
4991 * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
4992 code, since we don't try to use the broken CLONE_STOPPED any more.
4993 * pthread_create.c (start_thread): Likewise.
4994
424bd2f8
RH
49952004-09-15 Richard Henderson <rth@redhat.com>
4996
4997 * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
4998
17b8a52d
UD
49992004-09-01 David Mosberger <davidm@hpl.hp.com>
5000
5001 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
5002 (__libc_unwind_longjmp): Delete macro and declare as function.
5003 * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
5004 __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
5005 nptl directory.
5006 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
5007 * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
5008 * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
5009
ccc63b07
UD
50102004-09-12 Ulrich Drepper <drepper@redhat.com>
5011
5012 * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
5013 for __USE_XOPEN2K.
5014 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
5015 types also for __USE_XOPEN2K.
5016 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5017 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5018 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5019 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5020 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5021 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5022 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5023 [BZ #320]
5024
31f93b3b
UD
50252004-09-08 Ulrich Drepper <drepper@redhat.com>
5026
5027 * sysdeps/pthread/pthread.h
5028 (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
5029 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
5030 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
5031 (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
5032 [BZ #375]
5033
e0329987
UD
50342004-09-07 Ulrich Drepper <drepper@redhat.com>
5035
590b40f7
UD
5036 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
5037 PSEUDO to be used with . prefix.
5038
67254a97
UD
5039 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
5040 Use atomic_increment instead of atomic_exchange_and_add.
5041 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
5042 Likewise.
5043 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
5044 Likewise.
5045 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
5046 Likewise.
5047
5048 * allocatestack.c (allocate_stack): Use atomic_increment_val
5049 instead of atomic_exchange_and_add.
5050 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
5051 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
5052 Likewise.
5053 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5054 Likewise.
5055
e0329987
UD
5056 * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
5057 the initialization function might throw.
5058
42d86dd6 50592005-09-05 Richard Henderson <rth@redhat.com>
e0329987 5060
42d86dd6
RH
5061 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
5062 Move definition inside libpthread, libc, librt check. Provide
5063 definition for rtld.
5064
73f7c32c
UD
50652004-09-02 Ulrich Drepper <drepper@redhat.com>
5066
f76c8499
UD
5067 * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
5068 * sysdeps/i386/jmpbuf-unwind.h: Likewise
5069 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
5070 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
5071 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
5072 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
5073 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
5074 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
5075 * unwind.c: Use it.
5076
73f7c32c
UD
5077 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
5078 Rename __data.__clock to __data.__nwaiters, make it unsigned int.
5079 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
5080 Likewise.
5081 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
5082 Decrement __nwaiters. If pthread_cond_destroy has been called and
5083 this is the last waiter, signal pthread_cond_destroy caller and
5084 avoid using the pthread_cond_t structure after unlock.
5085 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5086 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5087 Read clock type from the least significant bits of __nwaiters instead
5088 of __clock.
5089 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5090 * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
5091
50922004-08-31 Jakub Jelinek <jakub@redhat.com>
5093
5094 [BZ #342]
5095 * Makefile (tests): Add tst-cond20 and tst-cond21.
5096 * tst-cond20.c: New test.
5097 * tst-cond21.c: New test.
5098 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
5099 (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
5100 it unsigned int.
5101 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
5102 Likewise.
5103 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
5104 (pthread_cond_t): Likewise.
5105 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
5106 Likewise.
5107 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
5108 Likewise.
5109 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
5110 Likewise.
5111 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
5112 (cond_nwaiters): New.
5113 (clock_bits): New.
5114 * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
5115 if there are waiters not signalled yet.
5116 Wait until all already signalled waiters wake up.
5117 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
5118 __nwaiters. If pthread_cond_destroy has been called and this is the
5119 last waiter, signal pthread_cond_destroy caller and avoid using
5120 the pthread_cond_t structure after unlock.
5121 (__pthread_cond_wait): Increment __nwaiters in the beginning,
5122 decrement it when leaving. If pthread_cond_destroy has been called
5123 and this is the last waiter, signal pthread_cond_destroy caller.
5124 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5125 Likewise. Read clock type from the least significant bits of
5126 __nwaiters instead of __clock.
5127 * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
5128 whether clock ID can be encoded in COND_CLOCK_BITS bits.
5129 * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
5130 clock type just from the last COND_CLOCK_BITS bits of value.
5131 * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
5132 instead of __clock, just from second bit of condattr's value.
5133
409f7493
UD
51342004-08-30 Jakub Jelinek <jakub@redhat.com>
5135
5136 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
5137 bits/wordsize.h. Make the header match i386 header when __WORDSIZE
5138 != 64.
5139 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
5140
92c6ccd1
RM
51412004-08-15 Roland McGrath <roland@frob.com>
5142
5143 * pthread_atfork.c: Update copyright terms including special exception
5144 for these trivial files, which are statically linked into executables
5145 that use dynamic linking for the significant library code.
5146
4d004cfb
UD
51472004-08-09 Jakub Jelinek <jakub@redhat.com>
5148
5149 * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
5150 pthread_rwlock_rdlock.
5151 * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
5152 Decrease __nr_readers_queued after reacquiring lock.
5153 * sysdeps/pthread/pthread_rwlock_timedrdlock
5154 (pthread_rwlock_timedrdlock): Likewise.
5155 Reported by Bob Cook <bobcook47@hotmail.com>.
5156
90595fb6
RM
51572004-08-11 Jakub Jelinek <jakub@redhat.com>
5158
5159 * tst-rwlock14.c (tf): Read main thread handle from *ARG
5160 before pthread_barrier_wait.
5161
fa46f7ab
UD
51622004-08-07 Ulrich Drepper <drepper@redhat.com>
5163
5164 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
5165 Remove unnecessary exception handling data.
5166
15ef4b55
UD
51672004-07-23 Jakub Jelinek <jakub@redhat.com>
5168
5169 [BZ #284]
5170 * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
5171 instead of clockid_t.
5172
4fb907b7
RM
51732004-07-21 Roland McGrath <roland@redhat.com>
5174
5175 * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
5176
51772004-07-19 Roland McGrath <roland@redhat.com>
5178
5179 * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
5180
8f73811b
RM
51812004-07-02 Roland McGrath <roland@redhat.com>
5182
5183 * configure: Don't exit.
5184
290639c3
UD
51852004-07-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5186
5187 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
5188 (__pthread_cond_timedwait): Check for invalid nanosecond in
5189 timeout value.
5190
8e5aaad9
UD
51912004-07-07 Ulrich Drepper <drepper@redhat.com>
5192
5193 * Makefile: Add rules to build and run tst-fini1.
5194 * tst-fini1.c: New file.
5195 * tst-fini1mod.c: New file.
5196
ce6e047f
UD
51972004-07-05 Ulrich Drepper <drepper@redhat.com>
5198
5199 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
5200 if no cancellation support is needed.
5201 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
5202 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
5203 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
5204 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
5205 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
5206 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
5207 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
5208 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
5209 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
5210
5211 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
5212 only if not already defined.
5213
9b9ef823
UD
52142004-07-05 Jakub Jelinek <jakub@redhat.com>
5215
2dd18ce2
UD
5216 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
5217 constraint "m" instead of "0" for futex.
5218
9b9ef823
UD
5219 * shlib-versions: Add powerpc64-.*-linux.*.
5220
38205402
UD
52212004-07-04 Jakub Jelinek <jakub@redhat.com>
5222
5223 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
5224 (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
5225 for valid tv_nsec.
5226 * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
5227 1 billion and 64-bit tv_nsec which is valid when truncated to 32
5228 bits.
5229
78a9c837
RM
52302004-06-29 Roland McGrath <roland@redhat.com>
5231
5232 * Banner: NPTL no longer has its own version number.
5233 * Makefile (nptl-version): Variable removed.
5234 * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
5235 using $(version), the glibc version number.
5236
d3d35527
UD
52372004-06-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5238
5239 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
5240 Fix branch offset for a PLT entry.
5241 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
5242 Likewise.
5243 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
5244 Likewise.
5245 * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
5246 Likewise.
5247 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
5248 Likewise.
5249
346f18ae
UD
52502004-06-28 Jakub Jelinek <jakub@redhat.com>
5251
5252 * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
5253 unconditionally.
5254
f3a19754
UD
52552004-06-28 Jakub Jelinek <jakub@redhat.com>
5256
5257 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
5258 (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
5259 instead of tv_sec.
5260 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
5261 (pthread_rwlock_timedrdlock): Likewise.
5262
539842a4
UD
52632004-06-22 Jakub Jelinek <jakub@redhat.com>
5264
5265 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
5266 Set __r7 to val, not mutex.
5267
46f4c578
UD
52682004-06-27 Ulrich Drepper <drepper@redhat.com>
5269
5270 * Makefile: Add rules to build tst-rwlock14.
5271 * tst-rwlock14.c: New file.
5272
52732004-06-24 Boris Hu <boris.hu@intel.com>
5274
5275 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
5276 check.
5277 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
5278
9898e99c
AJ
52792004-06-19 Andreas Jaeger <aj@suse.de>
5280
5281 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
5282 assembler in last patch.
5283
7c3164bc
UD
52842004-06-17 Ulrich Drepper <drepper@redhat.com>
5285
5286 * sysdeps/pthread/pthread_cond_timedwait.c
5287 (__pthread_cond_timedwait): Also check for negativ nanoseconds.
5288 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5289 (__pthread_cond_timedwait): Check for invalid nanosecond in
5290 timeout value.
5291 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5292 * tst-cond19.c: New file.
5293 * Makefile: Add rules to build and run tst-cond19.
5294
72e61500
UD
52952004-06-15 Steven Munroe <sjmunroe@us.ibm.com>
5296
5297 * tst-context1.c (GUARD_PATTERN): Defined.
5298 (tst_context_t): Define struct containing ucontext_t & guard words.
5299 (ctx): Declare as an array of tst_context_t.
5300 (fct): Verify uc_link & guard words are still valid.
5301 (tf): Initialize guard words in ctx. Adjust ctx refs for new struct.
5302
7c370086
UD
53032004-06-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5304
5305 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
5306 Add __data.__futex field, reshuffle __data.__clock.
5307 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
5308 (__pthread_cond_signal): Increment __futex at the same time as
5309 __wakeup_seq or __total_seq. Pass address of __futex instead of
5310 address of low 32-bits of __wakeup_seq to futex syscall.
5311 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
5312 (__pthread_cond_wait): Likewise. Pass __futex value from before
5313 releasing internal lock to FUTEX_WAIT.
5314 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
5315 (__pthread_cond_timedwait): Likewise.
5316 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
5317 (FUTEX_CMP_REQUEUE): Define.
5318 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
5319 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
5320 Pass __futex value from before the unlock and __futex address instead
5321 of address of low 32-bits of __wakeup_seq to futex syscall.
5322 Fallback to FUTEX_WAKE all on any errors.
5323
a9e526e7
RM
53242004-06-08 Jakub Jelinek <jakub@redhat.com>
5325
5326 * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
5327 comment typo.
5328 * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
5329 * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
5330 * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
5331 * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
5332 Likewise. Reported by Bob Cook <bobcook47@hotmail.com>.
5333
f1847a84
RM
53342004-06-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
5335
5336 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
5337 Add memory clobber to inline assembly.
5338 (__lll_mutex_trylock): Likewise.
5339 (__lll_mutex_cond_trylock): Likewise.
5340
f7c81e1a
UD
53412004-06-07 Martin Schwidefsky <schwidefsky@de.ibm.com>
5342
5343 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
5344 Pass val argument as 6th system call argument in %r7.
5345
75fccede
UD
53462004-05-21 Jakub Jelinek <jakub@redhat.com>
5347
5348 * Makefile (tests): Add tst-cond16.
5349 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
5350 * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
5351 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
5352 Add __data.__futex field, reshuffle __data.__clock.
5353 * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
5354 (__pthread_cond_signal): Increment __futex at the same time as
5355 __wakeup_seq or __total_seq. Pass address of __futex instead of
5356 address of low 32-bits of __wakeup_seq to futex syscall.
5357 * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
5358 (__pthread_cond_wait): Likewise. Pass __futex value from before
5359 releasing internal lock to FUTEX_WAIT.
5360 * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
5361 (__pthread_cond_timedwait): Likewise.
5362 * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
5363 (FUTEX_CMP_REQUEUE): Define.
5364 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
5365 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
5366 Pass __futex value from before the unlock and __futex address instead
5367 of address of low 32-bits of __wakeup_seq to futex syscall.
5368 Fallback to FUTEX_WAKE all on any errors.
5369 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
5370 Define.
5371 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
5372 internally. Return non-zero if error, zero if success.
5373 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
5374 Add __data.__futex field, reshuffle __data.__clock.
5375 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
5376 Define.
5377 (lll_futex_requeue): Add val argument, return 1 unconditionally
5378 for the time being.
5379 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
5380 Add __data.__futex field, reshuffle __data.__clock.
5381 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
5382 Define.
5383 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
5384 internally. Return non-zero if error, zero if success.
5385 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
5386 (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
5387 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
5388 Define.
5389 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
5390 internally. Return non-zero if error, zero if success.
5391 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
5392 Add __data.__futex field, reshuffle __data.__clock.
5393 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
5394 Define.
5395 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
5396 internally. Return non-zero if error, zero if success.
5397 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
5398 Add __data.__futex field, reshuffle __data.__clock.
5399 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
5400 Add __data.__futex field, reshuffle __data.__clock.
5401 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
5402 Increment __futex at the same time as __wakeup_seq or __total_seq.
5403 Pass address of __futex instead of address of low 32-bits of
5404 __wakeup_seq to futex syscall.
5405 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
5406 Pass __futex value from before releasing internal lock
5407 to FUTEX_WAIT.
5408 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5409 Likewise. Avoid unnecessary shadowing of variables.
5410 * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
5411 Set __futex to 2 * __total_seq. Pass __futex value from before the
5412 unlock and __futex address instead of address of low 32-bits of
5413 __wakeup_seq to futex_requeue macro, adjust for new return value
5414 meaning.
5415 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
5416 (__pthread_cond_signal): Increment __futex at the same time as
5417 __wakeup_seq or __total_seq. Pass address of __futex instead of
5418 address of low 32-bits of __wakeup_seq to futex syscall.
5419 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
5420 (__pthread_cond_wait): Likewise. Pass __futex value from before
5421 releasing internal lock to FUTEX_WAIT.
5422 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5423 (__pthread_cond_timedwait): Likewise.
5424 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
5425 (FUTEX_CMP_REQUEUE): Define.
5426 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
5427 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
5428 Pass __futex value from before the unlock and __futex address instead
5429 of address of low 32-bits of __wakeup_seq to futex syscall.
5430 Fallback to FUTEX_WAKE all on any errors.
5431
54322004-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5433
5434 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
5435 Add nop to align the end of critical section.
5436 (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
5437
fbf86dda
UD
54382004-06-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5439
5440 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
5441 Add __broadcast_seq field.
5442 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
5443 all waiters as woken with woken_seq and bump broadcast counter.
5444 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
5445 __broadcast_seq. Increment __woken_seq correctly when cleanuped.
5446 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5447 Comment typo fixes. Avoid returning -ETIMEDOUT.
5448
54492004-06-01 Ulrich Drepper <drepper@redhat.com>
5450
5451 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5452 (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
5453 Reported by Kaz Kojima.
5454
ffdd5e50
UD
54552004-05-25 Jakub Jelinek <jakub@redhat.com>
5456
5457 * sysdeps/unix/sysv/linux/aio_misc.h: New file.
5458
3abc82c8
UD
54592004-05-21 Jakub Jelinek <jakub@redhat.com>
5460
5461 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
5462 __broadcast_seq with bc_seq after acquiring internal lock instead of
5463 before it.
5464
893a3511
UD
54652004-05-18 Jakub Jelinek <jakub@redhat.com>
5466
5467 * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
5468 compilation.
5469 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5470 (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
5471 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
5472 (pthread_cond_t): Add __data.__broadcast_seq field.
5473 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5474 (FRAME_SIZE): Define.
5475 (__pthread_cond_timedwait): Use it. Store/check broadcast_seq.
5476 Comment typo fixes.
5477 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
5478 Define.
5479 (__pthread_cond_wait): Use it. Store/check broadcast_seq. Comment
5480 typo fixes.
5481 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
5482 (__pthread_cond_broadcast): Increment broadcast_seq. Comment typo
5483 fixes.
5484
54852004-05-18 Ulrich Drepper <drepper@redhat.com>
5486
5487 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
5488 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
5489 Add __broadcast_seq field.
5490 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5491 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5492 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5493 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5494 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5495 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
5496 all waiters as woken with woken_seq and bump broadcast counter.
5497 * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
5498 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
5499 __broadcast_seq field.
5500 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5501 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
5502 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
5503 * pthread_cond_init.c: Initialize __broadcast_seq field.
5504 * Makefile (tests): Add tst-cond17 and tst-cond18.
5505 Add .NOTPARALLEL goal.
5506 * tst-cond16.c: New file. From Jakub.
5507 * tst-cond17.c: New file. From Jakub.
5508 * tst-cond18.c: New file. From Jakub.
5509
4123718e
UD
55102004-05-16 Ulrich Drepper <drepper@redhat.com>
5511
5512 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
5513 unwind info.
5514
5515 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
5516 Parametrize frame size. Correct some unwind info.
5517 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5518
2d7ae210
UD
55192004-05-04 Jakub Jelinek <jakub@redhat.com>
5520
5521 * tst-stack3.c: Note testing functionality beyond POSIX.
5522
50c2b6d7
UD
55232004-05-04 Jakub Jelinek <jakub@redhat.com>
5524
5525 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
5526 Change conditional from ifdef to if.
5527
27b02589
UD
55282004-04-23 Jakub Jelinek <jakub@redhat.com>
5529
5530 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
5531 SYSDEP_CANCEL_ERROR): Define.
5532 (PSEUDO): Use it.
5533
4bb8fc33
UD
55342004-05-01 Jakub Jelinek <jakub@redhat.com>
5535
5536 * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
5537
f9a06dc1
UD
55382004-04-20 Jakub Jelinek <jakub@redhat.com>
5539
5540 * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
5541
d3b52028
UD
55422004-04-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5543
5544 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
5545 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
5546 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
5547 info. Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
5548
a5dd0a6c
UD
55492004-04-19 Ulrich Drepper <drepper@redhat.com>
5550
5551 * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
5552 thread has all signals blocked.
5553
620c3354
AJ
55542004-04-18 Andreas Jaeger <aj@suse.de>
5555
5556 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
5557 (SEM_VALUE_MAX): Add missing brace.
5558
1683daeb
UD
55592004-04-17 Jakub Jelinek <jakub@redhat.com>
5560
5561 * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
5562 in rt subdir.
5563 (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
5564 * sysdeps/pthread/tst-mqueue8x.c: New test.
5565 * tst-cancel4.c: Update comment about message queues.
5566
5567 * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
5568 return it_value { 0, 0 }.
5569 * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
5570 like SIGEV_SIGNAL.
5571 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
5572 assertion for SIGEV_NONE.
5573 (thread_attr_compare): Compare all attributes, not just a partial
5574 subset.
5575
55762004-04-17 Jakub Jelinek <jakub@redhat.com>
5577
5578 * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
5579
f532641d
UD
55802004-04-17 Ulrich Drepper <drepper@redhat.com>
5581
5582 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
5583 Just use a plain number.
5584 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
5585 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
5586 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
5587 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
5588 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
5589 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
5590 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
5591
7eb7fdda
UD
55922004-04-16 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5593
53392906
UD
5594 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
5595 frame info.
5596 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7eb7fdda 5597
d7ba1313
UD
55982004-04-15 Jakub Jelinek <jakub@redhat.com>
5599
5600 * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
5601 (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
5602 of calling sigwaitinfo.
5603
5adac0e4
UD
56042004-04-16 Ulrich Drepper <drepper@redhat.com>
5605
5606 * allocatestack.c (allocate_stack): Set reported_guardsize
5607 unconditionally.
5608 * pthread_getattr_np.c (pthread_getattr_np): Use
5609 reported_guardsize instead of guardsize.
5610 * descr.h (struct pthread): Add reported_guardsize field.
5611
f93fa7d4
UD
56122004-04-13 Jakub Jelinek <jakub@redhat.com>
5613
5614 * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
5615
1b82c6c7
UD
56162004-04-12 Ulrich Drepper <drepper@redhat.com>
5617
5618 * sysdeps/unix/sysv/linux/mq-notify.c: New file.
5619
56202004-04-08 Jakub Jelinek <jakub@redhat.com>
5621
5622 * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
5623 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
5624 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
5625 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
5626 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
5627 Define.
5628 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
5629 (_POSIX_MESSAGE_PASSING): Define.
5630 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
5631 (_POSIX_MESSAGE_PASSING): Define.
5632 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
5633 (_POSIX_MESSAGE_PASSING): Define.
5634
e6eb894e
UD
56352004-04-04 Ulrich Drepper <drepper@redhat.com>
5636
5637 * tst-context1.c (fct): Check whether correct stack is used.
5638
1e084487
UD
56392004-04-03 Ulrich Drepper <drepper@redhat.com>
5640
4e73e115
UD
5641 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
5642 matching constraints for asm mem parameters.
5643
1e084487
UD
5644 * tst-clock2.c (tf): Don't define unless needed.
5645
feca5e0b
UD
56462004-03-30 H.J. Lu <hongjiu.lu@intel.com>
5647
5648 * Makefile (link-libc-static): Use $(static-gnulib) instead of
5649 $(gnulib).
5650
3fa21fd8
UD
56512004-03-30 Ulrich Drepper <drepper@redhat.com>
5652
5653 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
5654 * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
5655 * pthreadP.h: Declare __nptl_deallocate_tsd.
5656 * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
5657 Adjust caller.
5658
5659 * Makefile (tests): Add tst-tsd5.
5660 * tst-tsd5.c: New file.
5661
8e32efa6
UD
56622004-03-29 Ulrich Drepper <drepper@redhat.com>
5663
5664 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
5665 (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
5666 is SHLIB_COMPAT check.
5667 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
5668 (__pthread_attr_getaffinity_old): Likewise.
5669 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5670 (__pthread_getaffinity_old): Likewise.
5671 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
5672 (__pthread_setaffinity_old): Likewise.
5673
eec8b6ca
UD
56742004-03-26 Ulrich Drepper <drepper@redhat.com>
5675
5676 * allocatestack.c (_make_stacks_executable): Call
5677 _dl_make_stack_executable first.
5678
db2f05ba
RM
56792004-03-24 Roland McGrath <roland@redhat.com>
5680
5681 * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
5682 constraint instead of "0".
5683
6abbc501
UD
56842004-03-24 Ulrich Drepper <drepper@redhat.com>
5685
68dc4dcb
UD
5686 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
5687 (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
5688
6abbc501
UD
5689 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
5690 code to avoid warning.
5691
865e14d9
AJ
56922004-03-24 Andreas Jaeger <aj@suse.de>
5693
5694 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
5695 (__pthread_attr_setaffinity_old): Remove const.
5696
16b06b70
UD
56972004-03-23 Ulrich Drepper <drepper@redhat.com>
5698
2c0b891a
UD
5699 * sysdeps/unix/sysv/linux/smp.h: New file.
5700 * sysdeps/unix/sysv/linux/sh/smp.h: New file.
5701 * init.c: Define __is_smp.
5702 (__pthread_initialize_minimal_internal): Call is_smp_system to
5703 initialize __is_smp.
5704 * pthreadP.h: Declare __is_smp.
5705 Define MAX_ADAPTIVE_COUNT is necessary.
5706 * pthread_mutex_init.c: Add comment regarding __spins field.
5707 * pthread_mutex_lock.c: Implement adaptive mutex type.
5708 * pthread_mutex_timedlock.c: Likewise.
5709 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
5710 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
5711 Add __spins field.
5712 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5713 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5714 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5715 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5716 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5717 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5718 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5719 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
5720 lll_mutex_cond_trylock.
5721 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5722 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5723 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5724 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5725 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5726 Define BUSY_WAIT_NOP.
5727 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5728 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5729
5730 * tst-mutex5.c: Add support for testing adaptive mutexes.
5731 * tst-mutex7.c: Likewise.
5732 * tst-mutex5a.c: New file.
5733 * tst-mutex7a.c: New file.
5734 * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
5735
565699e4
UD
5736 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5737 (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
6abbc501 5738 vgettimeofday call might destroy the content.
565699e4 5739
7fe1586f
UD
5740 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
5741 @pause in the loop.
5742
e408880b
UD
5743 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
5744 No need to restrict type of ret. Make it int. Add comment.
5745
16b06b70
UD
5746 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
5747 Remove unnecessary setne instruction.
5748
61645263
UD
57492004-03-22 Jakub Jelinek <jakub@redhat.com>
5750
5751 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5752 (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
5753 * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
5754 If realloc fails, break out of the loop.
5755
e3d4c585
AJ
57562004-03-20 Andreas Jaeger <aj@suse.de>
5757
5758 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
5759 (__pthread_setaffinity_old): Fix interface.
5760 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5761 (__pthread_getaffinity_old): Likewise.
5762
5763 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
5764 (__pthread_setaffinity_new): Remove duplicate declaration.
5765
3abb1ff7
UD
57662004-03-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5767
5768 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
5769 the return value to a safe register.
5770 (CDISABLE): Set the function argument correctly.
5771
07bd2a3f
UD
57722004-03-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5773
5774 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
5775 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
5776 Rewrite so that only one locked memory operation per round is needed.
5777 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
5778 (pthread_barrier_wait): After wakeup, release lock only when the
5779 last thread stopped using the barrier object.
5780 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
5781 (__pthread_cond_wait): Don't store mutex address if the current
5782 value is ~0l. Add correct cleanup support and unwind info.
5783 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5784 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
5785 (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
5786 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
5787 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
5788 Add correct cleanup support and unwind info.
5789 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
5790 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
5791 information for syscall wrappers.
5792
14c35863
UD
57932004-03-18 Ulrich Drepper <drepper@redhat.com>
5794
5795 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
5796 cpusetsize field, remove next.
5797 * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
5798 parameter for size of the CPU set.
5799 (pthread_setaffinity_np): Likewise.
5800 (pthread_attr_getaffinity_np): Likewise.
5801 (pthread_attr_setaffinity_np): Likewise.
5802 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
5803 interface change, keep compatibility code.
5804 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
5805 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
5806 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
5807 * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np. Declare
5808 __pthread_getaffinity_np.
5809 * Versions: Add version for changed interfaces.
5810 * tst-attr3.c: Adjust test for interface change.
5811 * pthread_getattr_np.c: Query the kernel about the affinity mask with
5812 increasing buffer sizes.
5813 * pthread_attr_destroy.c: Remove unused list handling.
5814 * pthread_attr_init.c: Likewise.
5815
8e115d80
RM
58162004-03-17 Roland McGrath <roland@redhat.com>
5817
5818 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
5819 first argument to clock_getres so we ever enable kernel timers.
5820
e3b22ad3
UD
58212004-03-15 Ulrich Weigand <uweigand@de.ibm.com>
5822
5823 * init.c (nptl_version): Add __attribute_used__ to nptl_version.
5824
841153fa
RH
58252004-03-12 Richard Henderson <rth@redhat.com>
5826
e3b22ad3
UD
5827 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
5828 oldvalue from CENABLE to CDISABLE.
841153fa 5829
932dfea7
UD
58302004-03-12 Ulrich Drepper <drepper@redhat.com>
5831
5832 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
5833 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
5834 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
5835 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
5836
9852f6dc
RH
58372004-03-11 Richard Henderson <rth@redhat.com>
5838
5839 * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
5840 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
5841 * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
5842
43513fb7
UD
58432004-03-11 Jakub Jelinek <jakub@redhat.com>
5844
5845 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
5846 instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
5847 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
5848
58492004-03-11 Jakub Jelinek <jakub@redhat.com>
5850
5851 * forward.c (__pthread_cond_broadcast_2_0,
5852 __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
5853 __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
5854 __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
5855
8a3e10e0
UD
58562004-03-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5857
5858 * sysdeps/sh/tcb-offsets.sym: Add PID.
5859 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
5860 * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
5861
6d3a2bec
UD
58622004-03-10 Ulrich Drepper <drepper@redhat.com>
5863
5864 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
5865 include <sysdep-cancel.h>, vfork is no cancellation point.
5866 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
5867 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
5868 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
5869
d3a4a571
UD
58702004-03-10 Jakub Jelinek <jakub@redhat.com>
5871
73b4ce64
UD
5872 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
5873 libc_hidden_def.
5874 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
5875 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
5876 Likewise.
5877 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
5878 Likewise.
5879 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
5880 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
5881 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
5882 * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
5883 of DO_CALL_VIA_BREAK. Work around a gas problem.
5884
d682a515
UD
5885 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
5886 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
5887 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
5888 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
5889 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
5890 * sysdeps/powerpc/tcb-offsets.sym: Add PID.
5891
5892 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
5893 a local register for saving old PID. Negate PID in parent upon exit.
5894
d3a4a571
UD
5895 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
5896 tcb-offsets.h.
5897 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
5898 before syscall, set to the old value in the parent afterwards.
5899 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
5900 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
5901 tcb-offsets.h.
5902 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
5903 before syscall, set to the old value in the parent afterwards.
5904 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
5905 * sysdeps/s390/tcb-offsets.sym: Add PID.
5906
5907 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
5908 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
5909 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
5910 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
5911 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
5912 * sysdeps/sparc/tcb-offsets.sym: Add PID.
5913
59142004-03-10 Andreas Schwab <schwab@suse.de>
5915
5916 * sysdeps/ia64/tcb-offsets.sym: Add PID.
5917 * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
5918 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
5919
3f2fb223 59202004-03-09 Jakub Jelinek <jakub@redhat.com>
f4c024d1 5921
3f2fb223
UD
5922 * tst-cancel20.c (do_one_test): Clear in_sh_body first.
5923 * tst-cancel21.c (do_one_test): Likewise.
5924 Reported by Gordon Jin <gordon.jin@intel.com>.
f4c024d1 5925
8b9d6054
UD
59262004-02-09 Jakub Jelinek <jakub@redhat.com>
5927
5928 * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
5929 if non-zero and set to INT_MIN if zero.
5930 * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
5931 * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
5932 (SAVE_PID, RESTORE_PID): Define.
5933 (__vfork): Use it.
5934 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
5935 Use relative path to avoid including NPTL i386/vfork.S.
5936 (SAVE_PID, RESTORE_PID): Define.
5937 * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
5938 (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
5939 * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
5940 tst-vfork2x.
5941 (tests-reverse): Add tst-vfork1x and tst-vfork2x.
5942 * tst-vfork1.c: New test.
5943 * tst-vfork2.c: New test.
5944 * tst-vfork1x.c: New test.
5945 * tst-vfork2x.c: New test.
5946
02287d05
UD
59472004-03-08 Ulrich Drepper <drepper@redhat.com>
5948
c072ef6d 5949 * sysdeps/i386/tcb-offsets.sym: Add PID.
6fadea9f 5950 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
c072ef6d 5951 * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
6fadea9f 5952 * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
02287d05 5953
d4acd24b
UD
59542004-03-08 Steven Munroe <sjmunroe@us.ibm.com>
5955
5956 * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
5957
8acb4b81
UD
59582004-03-08 H.J. Lu <hongjiu.lu@intel.com>
5959
5960 * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
5961 _rtld_global_ro.
5962
4d1a02ef
UD
59632004-03-07 Ulrich Drepper <drepper@redhat.com>
5964
001836c8 5965 * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
8acb4b81 5966 _rtld_global_ro.
001836c8 5967
4d1a02ef
UD
5968 * tst-once4.c: Remove unnecessary macro definition.
5969
5970 * tst-mutex7.c (do_test): Limit thread stack size.
5971 * tst-once2.c (do_test): Likewise.
5972 * tst-tls3.c (do_test): Likewise.
5973 * tst-tls1.c (do_test): Likewise.
5974 * tst-signal3.c (do_test): Likewise.
5975 * tst-kill6.c (do_test): Likewise.
5976 * tst-key4.c (do_test): Likewise.
5977 * tst-join4.c (do_test): Likewise.
5978 * tst-fork1.c (do_test): Likewise.
5979 * tst-context1.c (do_test): Likewise.
5980 * tst-cond2.c (do_test): Likewise.
5981 * tst-cond10.c (do_test): Likewise.
5982 * tst-clock2.c (do_test): Likewise.
5983 * tst-cancel10.c (do_test): Likewise.
5984 * tst-basic2.c (do_test): Likewise.
5985 * tst-barrier4.c (do_test): Likewise.
5986
aa420660
UD
59872004-03-05 Ulrich Drepper <drepper@redhat.com>
5988
5989 * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
5990
cff08c81
UD
59912004-03-01 Ulrich Drepper <drepper@redhat.com>
5992
5993 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5994 (__pthread_cond_timedwait): Optimize wakeup test.
5995 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5996 (__pthread_cond_wait): Likewise.
5997 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
5998 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5999 Likewise.
6000
b7fe377c
UD
60012004-02-29 Ulrich Drepper <drepper@redhat.com>
6002
6003 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6004 (__lll_mutex_lock_wait): Optimize a bit more. Just one copy of
6005 the atomic instruction needed.
6006 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6007 (__lll_mutex_lock_wait): Likewise.
6008
4c771a3b
UD
60092004-02-28 Ulrich Drepper <drepper@redhat.com>
6010
6011 * Makefile (tests): Add tst-cond14 and tst-cond15.
6012 * tst-cond14.c: New file.
6013 * tst-cond15.c: New file.
6014
a2c33d5a
UD
60152004-02-27 Ulrich Drepper <drepper@redhat.com>
6016
6017 * sysdeps/pthread/createthread.c (create_thread): Remove use of
6018 CLONE_STOPPED. We cannot use SIGCONT which means CLONE_STOPPED
6019 needs to be implemented differently to be useful.
6020
261eada2
UD
60212004-02-26 Ulrich Drepper <drepper@redhat.com>
6022
14ffbc83
UD
6023 * pthread_attr_setschedparam.c: Don't test priority against limits
6024 here. Set ATTR_FLAG_SCHED_SET flag.
6025 * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
6026 * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
6027 from parent thread to child. If attribute is used and scheduling
6028 parameters are not inherited, copy parameters from attribute or
6029 compute them. Check priority value.
6030 * pthread_getschedparam.c: If the parameters aren't known yet get
6031 them from the kernel.
6032 * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
6033 ATTR_FLAG_POLICY_SET flag for thread.
6034 * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
6035 and ATTR_FLAG_POLICY_SET.
6036
6037 * sysdeps/pthread/createthread.c: Use tgkill if possible.
6038
261eada2
UD
6039 * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
6040 fail if stack address hasn't been set. Just return 0.
6041
701d185c
UD
60422004-02-25 Ulrich Drepper <drepper@redhat.com>
6043
25b8e63c
UD
6044 * Makefile (tests-nolibpthread): Add tst-unload. Don't link with
6045 libpthread for the files in this list.
6046 (CFLAGS-tst-unload): Removed.
6047 * tst-unload.c (do_test): Don't use complete path for
6048 LIBPHREAD_SO.
6049
701d185c
UD
6050 * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
6051 tst-_res1mod2.
6052
a8fd5a02
UD
60532004-02-22 Ulrich Drepper <drepper@redhat.com>
6054
6055 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6056 (__lll_mutex_lock_wait): Rewrite so that only one locked memory
6057 operation per round is needed.
6058 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6059 (__lll_mutex_lock_wait): Likewise.
6060
dd0b7b19
UD
60612004-02-20 Ulrich Drepper <drepper@redhat.com>
6062
6063 * tst-cancel9.c (cleanup): Don't print to stderr.
6064
5990e1fe
UD
60652004-02-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6066
6067 * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
6068
33ab3b66
UD
60692004-02-20 Jakub Jelinek <jakub@redhat.com>
6070
1be3130e
UD
6071 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
6072 (__syscall_error_handler2): Call CDISABLE.
6073 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
6074 (__syscall_error_handler2): Call CDISABLE.
6075
8ba5025a
UD
6076 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
6077 Release lock before the loop, don't reacquire it.
8ba5025a 6078
33ab3b66
UD
6079 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
6080
11986c68
UD
60812004-02-19 Andreas Schwab <schwab@suse.de>
6082
6083 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
6084 Fix last change.
6085
dc391246
UD
60862004-02-18 Ulrich Drepper <drepper@redhat.com>
6087
37c054c7
UD
6088 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
6089 (pthread_barrier_wait): After wakeup, release lock only when the
6090 last thread stopped using the barrier object.
6091 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
6092 (pthread_barrier_wait): Likewise.
6093 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
6094 Likewise.
6095 * Makefile (tests): Add tst-barrier4.
6096 * tst-barrier4.c: New file.
dc391246
UD
6097
6098 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6099 (__pthread_cond_timedwait): Perform timeout test while holding
6100 internal lock to prevent wakeup race.
6101 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
6102 * sysdeps/pthread/pthread_cond_timedwait.c
6103 (__pthread_cond_timedwait): Likewise.
6104 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6105 (__pthread_cond_timedwait): Likewise.
6106
4a08113c
UD
61072004-02-18 Jakub Jelinek <jakub@redhat.com>
6108
6109 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
6110 (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
6111 * Makefile (tests): Add tst-rwlock13.
6112 * tst-rwlock13.c: New test.
6113
71b1675e
UD
61142004-02-16 Ulrich Drepper <drepper@redhat.com>
6115
6116 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6117 (__condvar_tw_cleanup): Little optimization.
6118 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
6119
cd9fdc72
UD
61202004-02-16 Steven Munroe <sjmunroe@us.ibm.com>
6121
6122 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
6123 libpthread as "lib" parameter to SHLIB_COMPAT.
6124 (__novmx_siglongjmp): Fix typo in function name.
6125 (__novmx_longjmp): Fix typo in function name.
6126
82038750
UD
61272004-02-13 Ulrich Drepper <drepper@redhat.com>
6128
b078c591
UD
6129 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
6130 __builtin_expect.
6131
82038750
UD
6132 * sysdeps/generic/pt-longjmp.c: Moved to...
6133 * sysdeps/pthread/pt-longjmp.c: ...here. New file.
6134
e2982bf0
UD
61352004-01-29 Steven Munroe <sjmunroe@us.ibm.com>
6136
6137 * Makefile (libpthread-routines): Add pt-cleanup.
6138 * pt-longjmp.c: Removed.
6139 * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
6140 * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
6141 * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
6142 Version longjmp, siglongjmp for GLIBC_2.3.4.
6143 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
6144
3730d95c
UD
61452004-02-13 Ulrich Drepper <drepper@redhat.com>
6146
219304ec
UD
6147 * sysdeps/pthread/pthread_cond_timedwait.c
6148 (__pthread_cond_timedwait): Optimize. Drop internal lock earlier.
6149 Reuse code. Add __builtin_expects.
6150
3730d95c
UD
6151 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6152 (__pthread_cond_timedwait): Get internal lock in case timeout has
6153 passed before the futex syscall.
6154 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6155
5673ccc1
UD
61562004-01-20 Ulrich Drepper <drepper@redhat.com>
6157
debddf64
UD
6158 * allocatestack.c: Pretty printing.
6159
5673ccc1
UD
6160 * sysdeps/pthread/createthread.c (create_thread): Don't add
6161 CLONE_DETACHED bit if it is not necessary.
6162
6bae8725
UD
61632004-01-16 Ulrich Drepper <drepper@redhat.com>
6164
6165 * pthread_getattr_np.c: Include ldsodefs.h.
6166
ff151400
RH
61672004-01-16 Richard Henderson <rth@redhat.com>
6168
6bae8725
UD
6169 * allocatestack.c: Don't declare __libc_stack_end.
6170 * init.c (__pthread_initialize_minimal_internal): Likewise.
6171 * pthread_getattr_np.c (pthread_getattr_np): Likewise.
ff151400 6172
ba683832
RH
61732004-01-15 Richard Henderson <rth@redhat.com>
6174
6175 * sysdeps/alpha/tls.h (tcbhead_t): Add private.
6176 (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
6177 TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
6178 GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
6179 (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
6180 (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
6181 (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
6182 * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
6183
630d93a7
UD
61842004-01-14 Ulrich Drepper <drepper@redhat.com>
6185
219304ec 6186 * init.c (pthread_functions): Make array const.
630d93a7 6187
d1fc817e
UD
61882004-01-13 Ulrich Drepper <drepper@redhat.com>
6189
6190 * allocatestack.c (__make_stacks_executable): Change interface.
6191 Check parameters. Pass parameter on to libc counterpart.
6192 * pthreadP.h: Change declaration.
6193
dc927809
RH
61942004-01-13 Richard Henderson <rth@redhat.com>
6195
10677727
UD
6196 * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
6197 prototype form.
6198 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
6199 Likewise.
6200
d1fc817e
UD
6201 * sysdeps/alpha/Makefile: New file.
6202 * sysdeps/alpha/tcb-offsets.sym: New file.
6203 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
6204 Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
dc927809 6205
d1fc817e
UD
6206 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
6207 on powerpc version.
dc927809 6208
249a3d0c
UD
62092004-01-08 Jakub Jelinek <jakub@redhat.com>
6210
6211 * Makefile (tests): Add tst-backtrace1.
6212 * tst-backtrace1.c: New test.
6213
763c0490
RM
62142003-12-11 Ulrich Weigand <uweigand@de.ibm.com>
6215
6216 * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
6217 register as second parameter to the REGISTER macro.
6218 * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
6219 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
6220 * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
6221 * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
6222 * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
6223 of thread register as second parameter to REGISTER macro in 64 case.
6224
c7baafd5
UD
62252004-01-03 Ulrich Drepper <drepper@redhat.com>
6226
6227 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
6228 (CFLAGS-getpid.o): Defined.
6229 (CFLAGS-getpid.os): Defined.
6230
25ac0258
UD
62312003-12-31 Ulrich Drepper <drepper@redhat.com>
6232
6233 * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
6234 returned for main thread does not overlap with any other VMA.
6235 Patch by Jakub Jelinek.
6236
795985e4
UD
62372003-12-29 Jakub Jelinek <jakub@redhat.com>
6238
6239 * tst-raise1.c: Include stdio.h.
6240
cb5b9388
UD
62412003-12-23 Jakub Jelinek <jakub@redhat.com>
6242
6243 * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
6244 setting with __ASSUME_TGKILL || defined __NR_tgkill.
6245 If pid is 0, set it to selftid.
6246 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
6247 Don't set self->pid but self->tid. If self->pid == 0 and self->tid
6248 != 0, return self->tid without doing a syscall.
6249 * descr.h (struct pthread): Move pid field after tid.
6250
6251 * Makefile (tests): Add tst-raise1.
6252 * tst-raise1.c: New file.
6253
432aaf5b
RM
62542003-12-23 Roland McGrath <roland@redhat.com>
6255
6256 * tst-oddstacklimit.c: New file.
6257 * Makefile (tests): Add it.
6258 (tst-oddstacklimit-ENV): New variable.
6259
6260 * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
6261 value up to page size for __default_stacksize.
6262
33ebea17
UD
62632003-12-21 Ulrich Drepper <drepper@redhat.com>
6264
6265 * Makefile (tests): Add tst-eintr5.
6266 * tst-eintr5.c: New file.
6267
6268 * eintr.c (eintr_source): Prevent sending signal to self.
6269
6270 * tst-eintr2.c (tf1): Improve error message.
6271
bbe35eb5
UD
62722003-12-20 Ulrich Drepper <drepper@redhat.com>
6273
6274 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
6275 * sysdeps/unix/sysv/linux/getpid.c: New file.
c0ecb80a
UD
6276 * pthread_cancel.c: Add comment explaining use of PID field.
6277 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
6278 * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
6279 * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
6280 temporarily to signal the field must not be relied on and updated
6281 by getpid().
6282 * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
6283 temporarily negative.
6284 * sysdeps/unix/sysv/linux/raise.c: Likewise.
bbe35eb5 6285
4efdd8d3
UD
62862003-12-19 Ulrich Drepper <drepper@redhat.com>
6287
6288 * eintr.c (setup_eintr): Add new parameter. Pass to thread function.
6289 (eintr_source): If ARG != NULL, use pthread_kill.
6290 * tst-eintr1.c: Adjust for this change.
6291 * tst-eintr2.c: Likewise.
6292 * Makefile (tests): Add tst-eintr3 and tst-eintr4.
6293 * tst-eintr3.c: New file.
6294 * tst-eintr4.c: New file.
6295
62962003-12-19 Jakub Jelinek <jakub@redhat.com>
6297
6298 * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
6299 if CANCELSTATE_BITMASK is set.
6300 * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
6301 Likewise.
6302
6303 * Makefile (tests): Add tst-cancel22 and tst-cancel23.
6304 (tests-reverse): Add tst-cancel23.
6305 * tst-cancel22.c: New test.
6306 * tst-cancel23.c: New test.
6307
675620f7
UD
63082003-12-18 Ulrich Drepper <drepper@redhat.com>
6309
6310 * tst-eintr1.c: Better error messages.
6311
6312 * Makefile (tests): Add tst-eintr2.
6313 * tst-eintr2.c: New file.
6314
63152003-12-18 Jakub Jelinek <jakub@redhat.com>
6316
6317 * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
6318 (CFLAGS-tst-cancelx21.c): Set.
6319 * tst-cancel21.c: New test.
6320 * tst-cancelx21.c: New test.
6321
6322 * unwind.c (FRAME_LEFT): Add adj argument. Subtract it from each
6323 comparison operand.
6324 (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
6325 _JMPBUF_CFA_UNWINDS. Adjust FRAME_LEFT invocations.
6326 * pt-longjmp.c: Include jmpbuf-unwind.h.
6327 (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
6328 _JMPBUF_UNWINDS. Adjust compared pointers.
6329 * init.c (__pthread_initialize_minimal_internal): Initialize
6330 pd->stackblock_size.
6331 * sysdeps/pthread/jmpbuf-unwind.h: Removed.
6332 * sysdeps/alpha/jmpbuf-unwind.h: New file.
6333 * sysdeps/i386/jmpbuf-unwind.h: New file.
6334 * sysdeps/powerpc/jmpbuf-unwind.h: New file.
6335 * sysdeps/s390/jmpbuf-unwind.h: New file.
6336 * sysdeps/sh/jmpbuf-unwind.h: New file.
6337 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
6338 * sysdeps/x86_64/jmpbuf-unwind.h: New file.
2e5e031d 6339 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
675620f7
UD
6340 (_JMPBUF_CFA_UNWINDS): Remove.
6341 (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
6342
63432003-12-12 Jakub Jelinek <jakub@redhat.com>
6344
6345 * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
6346 (CFLAGS-tst-cancelx20.c): Set.
6347 * tst-cancel20.c: New test.
6348 * tst-cancelx20.c: New test.
6349
2d951ab6
UD
63502003-12-17 Ulrich Drepper <drepper@redhat.com>
6351
6352 * init.c (__pthread_initialize_minimal_internal): Don't treat
6353 architectures with separate register stack special here when
6354 computing default stack size.
6355
f8a3a2e7
RM
63562003-12-17 Roland McGrath <roland@redhat.com>
6357
6358 * Makefile (tst-cancelx7-ARGS): New variable.
6359 Reportd by Greg Schafer <gschafer@zip.com.au>.
6360
e796f92f
UD
63612003-12-17 Jakub Jelinek <jakub@redhat.com>
6362
6363 * Makefile (tests): Add tst-stack3. Depend on $(objpfx)tst-stack3-mem.
6364 (generated): Add tst-stack3.mtrace and tst-stack3-mem.
6365 (tst-stack3-ENV): Set.
6366 ($(objpfx)tst-stack3-mem): New.
6367 * tst-stack3.c: New test.
6368
092eb73c
UD
63692003-12-10 David Mosberger <davidm@hpl.hp.com>
6370
6371 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
6372 Add unwind directives. Drop unused .regstk directive.
6373 (_fini_EPILOG_BEGINS): Add unwind directives.
6374
ff48874d
UD
63752003-12-11 Ulrich Drepper <drepper@redhat.com>
6376
6377 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
6378 Assume parameter is a pointer.
6379 (lll_futex_wake): Likewise.
20945457
UD
6380 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
6381 Likewise.
6382 (lll_futex_wake): Likewise.
ff48874d
UD
6383 Reported by Boris Hu.
6384 * sysdeps/unix/sysv/linux/unregister-atfork.c
6385 (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
6386
6387 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
6388
1d9d0b80
UD
63892003-12-10 Ulrich Drepper <drepper@redhat.com>
6390
6391 * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
6392 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
6393 __rtld_lock_initialize for ld.so lock.
6394 Patch in part by Adam Li <adam.li@intel.com>.
6395
c776b3d7
UD
63962003-12-02 David Mosberger <davidm@hpl.hp.com>
6397
6398 * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
6399 in $(gnulib). Also, remove stale comment.
6400
64012003-11-12 David Mosberger <davidm@hpl.hp.com>
6402
6403 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
6404 advantage of new syscall stub and optimize accordingly.
6405
6406 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
6407 from SYS_futex, to match expectations of
6408 sysdep.h:DO_INLINE_SYSCALL.
6409 (lll_futex_clobbers): Remove.
6410 (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
6411 (lll_futex_wake): Likewise.
6412 (lll_futex_requeue): Likewise.
6413 (__lll_mutex_trylock): Rewrite to a macro, so we can include this
6414 file before DO_INLINE_SYSCALL is defined (proposed by Jakub
6415 Jelinek).
6416 (__lll_mutex_lock): Likewise.
6417 (__lll_mutex_cond_lock): Likewise.
6418 (__lll_mutex_timed_lock): Likewise.
6419 (__lll_mutex_unlock): Likewise.
6420 (__lll_mutex_unlock_force): Likewise.
6421
6422 * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
6423 comes before the include of <sysdep.h>.
6424 (THREAD_SELF_SYSINFO): New macro.
6425 (THREAD_SYSINFO): Likewise.
6426 (INIT_SYSINFO): New macro.
6427 (TLS_INIT_TP): Call INIT_SYSINFO.
6428
6429 * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
6430
6431 * sysdeps/pthread/createthread.c (create_thread): Use
6432 THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
6433 * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
6434 THREAD_SELF_SYSINFO instead of open code.
6435 * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
6436 (THREAD_SYSINFO): Likewise.
6437
6438 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
6439
6440 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
6441
57d20ee7
UD
64422003-12-06 Ulrich Drepper <drepper@redhat.com>
6443
6444 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
6445 instead of .init. Patch by David Mosberger.
6446
67aeab2a
AJ
64472003-11-30 Thorsten Kukuk <kukuk@suse.de>
6448
6449 * sysdeps/pthread/configure.in: Remove broken declaration in C
6450 cleanup handling check.
6451
8ca203e6
AJ
64522003-11-30 Andreas Jaeger <aj@suse.de>
6453
6454 * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
6455 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
6456 Likewise.
6457
46bf9de7
UD
64582003-11-27 Jakub Jelinek <jakub@redhat.com>
6459
6460 * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
6461 * pthread_attr_destroy.c: Include shlib-compat.h.
6462 (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
6463 is set in iattr->flags.
6464 * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
6465
1d9b73ab
UD
64662003-11-21 Jakub Jelinek <jakub@redhat.com>
6467
6468 * Makefile (distribute): Add tst-cleanup4aux.c.
6469
6470 * tst-cond12.c (prepare): Add prototype. Move after test-skeleton.c
6471 include.
6472
53f9084e
UD
64732003-11-21 Ulrich Drepper <drepper@redhat.com>
6474
1d9b73ab
UD
6475 * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
6476 pthread_cond_signal.
6477
e42a990e
UD
6478 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
6479 store mutex address if the current value is ~0l.
6480 * sysdeps/pthread/pthread_cond_timedwait.c
6481 (__pthread_cond_timedwait): Likewise.
6482 * sysdeps/pthread/pthread_cond_broadcast.c
6483 (__pthread_cond_broadcast): Don't use requeue for pshared
6484 condvars.
6485
6486 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
6487 (__pthread_cond_wait): Don't store mutex address if the current
6488 value is ~0l.
6489 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6490 (__pthread_cond_timedwait): Likewise.
6491 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
6492 (__pthread_cond_broadcast): Don't use requeue for pshared
6493 condvars.
6494
6495 * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
6496 element with ~0l for pshared condvars, with NULL otherwise.
6497
6498 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
6499 (__pthread_cond_wait): Don't store mutex address if the current
6500 value is ~0l.
6501 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6502 (__pthread_cond_timedwait): Likewise.
6503 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
6504 (__pthread_cond_broadcast): Don't use requeue for pshared
6505 condvars.
6506
bf68b236 6507 * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
53f9084e 6508 * tst-cond12.c: New file.
bf68b236 6509 * tst-cond13.c: New file.
53f9084e 6510
9780c971
UD
65112003-11-17 Ulrich Drepper <drepper@redhat.com>
6512
6513 * sysdeps/pthread/configure.in: Make missing forced unwind support
6514 fatal.
6515
74e12fbc
UD
65162003-11-11 Ulrich Drepper <drepper@redhat.com>
6517
6518 * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
6519
c685b2b0
UD
65202003-11-06 Ulrich Drepper <drepper@redhat.com>
6521
6522 * Makefile: Add magic to clean up correctly.
6523
44e94149
UD
65242003-11-05 Jakub Jelinek <jakub@redhat.com>
6525
6526 * unwind.c (FRAME_LEFT): Define.
6527 (unwind_stop): Handle old style cleanups here.
6528 (__pthread_unwind): Handle old style cleanups only if
6529 !HAVE_FORCED_UNWIND.
6530 * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
6531 (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
6532 ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
6533 ($(objpfx)tst-cleanupx4): Likewise.
6534 * tst-cleanup4.c: New test.
6535 * tst-cleanup4aux.c: New.
6536 * tst-cleanupx4.c: New test.
6537
c28422b5
UD
65382003-11-04 Ulrich Drepper <drepper@redhat.com>
6539
6540 * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
6541 lll_mutex_*lock macros to skip atomic operations on some archs.
6542
27176677
UD
65432003-11-03 Ulrich Drepper <drepper@redhat.com>
6544
6545 * sysdeps/pthread/tst-timer.c (main): Initialize
6546 sigev2.sigev_value as well.
6547
026395a2
RM
65482003-10-15 Roland McGrath <roland@redhat.com>
6549
6550 * sysdeps/pthread/configure.in: Barf if visibility attribute support
6551 is missing.
6552 * sysdeps/pthread/configure: Regenerated.
6553
fa3cbe3d
UD
65542003-10-09 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6555
6556 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
6557 locking macros. No distinction between normal and mutex locking
6558 anymore.
6559 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
6560 Merge bits from lowlevelmutex.S we still need.
6561 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
6562 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
6563 * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
6564 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
6565 new mutex implementation.
6566 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
6567 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
6568 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6569 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
6570 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
6571 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
6572 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
6573 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
6574 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6575 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
6576 symbol for entry point to avoid cancellation.
6577
e700a908
UD
65782003-10-07 Jakub Jelinek <jakub@redhat.com>
6579
6580 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
6581 changes.
6582 (SAVE_OLDTYPE_0): Fix a typo.
6583
c70a86b6
UD
65842003-10-03 Ulrich Drepper <drepper@redhat.com>
6585
6586 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
6587 Check __sigsetjmp return value. Reported by Daniel Jacobowitz.
6588
134abcb5
UD
65892003-10-02 Ulrich Drepper <drepper@redhat.com>
6590
6591 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
6592 correct offset.
6593
b77ca0e8
UD
65942003-10-02 Jakub Jelinek <jakub@redhat.com>
6595
6596 * Makefile (tests): Add tst-cancel19.
6597 * tst-cancel19.c: New test.
6598
4d961dc7
UD
65992003-10-02 Ulrich Drepper <drepper@redhat.com>
6600
6601 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
6602 restoring of the old cancellation type.
6603
1d5b20ad 66042003-09-30 Jakub Jelinek <jakub@redhat.com>
94ae6d75 6605
1d5b20ad
UD
6606 * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
6607
4106a403
RM
66082003-09-27 Wolfram Gloger <wg@malloc.de>
6609
4d961dc7 6610 * sysdeps/pthread/malloc-machine.h: New file
94ae6d75 6611
fca9d8e4
RM
66122003-09-24 Roland McGrath <roland@redhat.com>
6613
6614 * allocatestack.c (__make_stacks_executable): Don't ignore return
6615 value from _dl_make_stack_executable.
6616
c9c60884
UD
66172003-09-24 Ulrich Drepper <drepper@redhat.com>
6618
69c9fa04
UD
6619 * allocatestack.c (__make_stacks_executable): Also change
6620 permission of the currently unused stacks.
6621
279f1143
UD
6622 * allocatestack.c (change_stack_perm): Split out from
6623 __make_stacks_executable.
6624 (allocate_stack): If the required permission changed between the time
6625 we started preparing the stack and queueing it, change the permission.
6626 (__make_stacks_executable): Call change_stack_perm.
6627
c9c60884
UD
6628 * Makefile: Build tst-execstack-mod locally.
6629 * tst-execstack-mod.c: New file.
6630
54ee14b3
UD
66312003-09-23 Jakub Jelinek <jakub@redhat.com>
6632
6633 * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
6634
66352003-09-23 Roland McGrath <roland@redhat.com>
6636
6637 * tst-execstack.c: New file.
6638 * Makefile (tests): Add it.
6639 ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
6640 (LDFLAGS-tst-execstack): New variable.
6641
6642 * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
6643 whether to use PROT_EXEC for stack mmap.
6644 (__make_stacks_executable): New function.
6645 * pthreadP.h: Declare it.
6646 * init.c (__pthread_initialize_minimal_internal): Set
6647 GL(dl_make_stack_executable_hook) to that.
6648
365b1602
UD
66492003-09-22 Ulrich Drepper <drepper@redhat.com>
6650
6651 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
6652 recommendation from AMD re avoidance of lock prefix.
6653
39358e8b
UD
66542003-09-22 Jakub Jelinek <jakub@redhat.com>
6655
6656 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
6657 lll_futex_timed_wait instead of lll_futex_wait.
6658 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
6659 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
6660 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
6661 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
6662 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
6663 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
6664 * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
6665 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
6666 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
6667 Completely revamp the locking macros. No distinction between
6668 normal and mutex locking anymore.
6669 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
6670 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
6671 __lll_lock_timedwait): Fix prototypes.
6672 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
6673 __lll_lock_timedwait): Likewise.
6674 (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
6675 macros, add __builtin_expect.
6676 (lll_mutex_timedlock): Likewise. Fix return value.
6677 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
6678 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
6679 * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
6680 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
6681 * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
6682 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
6683 * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
6684 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
6685
9d08fbbb
UD
66862003-09-22 Ulrich Drepper <drepper@redhat.com>
6687
c0df57e1
UD
6688 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6689 (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
6690 operation if possible.
6691
9d08fbbb
UD
6692 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
6693 like jumping over the lock prefix.
6694
71451de2
UD
66952003-09-21 Ulrich Drepper <drepper@redhat.com>
6696
6697 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
6698 locking macros. No distinction between normal and mutex locking
6699 anymore.
3a226d33 6700 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
bc1989aa
UD
6701 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
6702 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
71451de2
UD
6703 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
6704 locking. Merge bits from lowlevelmutex.S we still need.
3a226d33 6705 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
bc1989aa 6706 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
71451de2 6707 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
3a226d33 6708 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
71451de2
UD
6709 * Makefile (routines): Remove libc-lowlevelmutex.
6710 (libpthread-rountines): Remove lowlevelmutex.
3a226d33
UD
6711 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
6712 for new mutex implementation.
6713 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
6714 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6715 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6716 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
6717 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6718 Likewise.
6719 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6720 Likewise.
6721 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
6722 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6723 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
6724 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
6725 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6726 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6727 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
6728 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
6729 Likewise.
6730 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
6731 Likewise.
6732 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
6733 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
6734 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
6735 Don't use requeue.
6736 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
bc1989aa 6737 * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
71451de2 6738
8f31c0ef
UD
67392003-09-20 Ulrich Drepper <drepper@redhat.com>
6740
56a4aa98
UD
6741 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
6742 in parameters of asm with output parameters.
6743
8f31c0ef
UD
6744 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
6745 type of DECR parameter to int.
6746 * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
6747
8b8074da
UD
67482003-09-18 Jakub Jelinek <jakub@redhat.com>
6749
6750 * tst-attr3.c (tf, do_test): Print stack start/end/size and
6751 guardsize for each thread.
6752
65af7e61
UD
67532003-09-17 Jakub Jelinek <jakub@redhat.com>
6754
9ba96eda
UD
6755 * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
6756 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
6757 (pthread_attr_setaffinity_np): Handle cpuset == NULL.
6758
06f6ca90
UD
6759 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
6760 (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
6761 NULL.
6762 * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
6763 * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
6764 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6765 (pthread_getaffinity_np): Add hidden_def.
6766
6767 * Makefile (tests): Add tst-attr3.
6768 * tst-attr3.c: New test.
6769
65af7e61
UD
6770 * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
6771
3402852c
UD
67722003-09-15 Jakub Jelinek <jakub@redhat.com>
6773
6774 * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
6775 CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
6776
a4db3439
UD
67772003-09-17 Jakub Jelinek <jakub@redhat.com>
6778
6779 * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
6780 * tst-align.c: Include tst-stack-align.h.
6781 (tf, do_test): Use TEST_STACK_ALIGN macro.
6782
67832003-09-17 Ulrich Drepper <drepper@redhat.com>
6784
6785 * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
6786 variable.
6787
92ce4676
UD
67882003-09-16 Ulrich Drepper <drepper@redhat.com>
6789
6790 * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
6791 stack-related values for the initial thread.
6792
e07bb02a
UD
67932003-09-15 Jakub Jelinek <jakub@redhat.com>
6794
6795 * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
6796
d087b5dc
UD
67972003-09-11 Ulrich Drepper <drepper@redhat.com>
6798
6799 * pthread_mutex_lock.c: Minor code rearrangements.
6800
7f08f55a
RM
68012003-09-05 Roland McGrath <roland@redhat.com>
6802
6803 * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
6804 Instead, include ../nptl_db/db_info.c to do its magic.
6805 * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
6806 (__pthread_pthread_key_2ndlevel_size): Likewise.
6807 * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
6808 * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
6809 * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
6810 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
6811 * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
6812 * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
6813 * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
6814 * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
6815 * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
6816 * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
6817 * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
6818 * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
6819 * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
6820 * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
6821 * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
6822 * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
6823 * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
6824
806e4a4a
UD
68252003-09-08 Ulrich Drepper <drepper@redhat.com>
6826
6827 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
6828 of pthread_t to be compatible with LT.
6829 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6830 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6831 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6832 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6833 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
6834 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6835 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6836
17f83e56
UD
68372003-09-04 Ulrich Drepper <drepper@redhat.com>
6838
6839 * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
6840
58e8ec84
UD
68412003-09-04 Jakub Jelinek <jakub@redhat.com>
6842
6843 * unwind-forcedunwind.c: Move to...
6844 * sysdeps/pthread/unwind-forcedunwind.c: ...here.
6845 (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
6846 * sysdeps/pthread/jmpbuf-unwind.h: New file.
6847 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
6848 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
6849 * unwind.c: Include jmpbuf-unwind.h.
6850 (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
6851
abf1cf21
JJ
68522003-09-02 Jakub Jelinek <jakub@redhat.com>
6853
4a244f0d
UD
6854 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
6855 * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
6856 pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
6857 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
6858 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
6859 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
6860 * sysdeps/unix/sysv/linux/sparc/Versions: New file.
6861 * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
6862 (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
6863 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
6864 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
6865 function.
6866 (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
6867 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
6868 * Makefile (tests): Add tst-stack2.
6869 * tst-stack2.c: New test.
6870 * tst-stack1.c: Include limits.h and sys/param.h.
6871 (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
6872
e29ef647
UD
6873 * pthread_condattr_setpshared.c: Include errno.h.
6874 (pthread_condattr_setpshared): Return EINVAL if pshared
6875 is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
6876
5777d565
UD
6877 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
6878 defined symbol for entry point to avoid cancellation.
6879 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
6880 Likewise.
6881 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
6882 Likewise.
6883 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
6884 Likewise.
6885 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
6886 Likewise.
6887 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
6888 Likewise.
6889 * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
6890 __close_nocancel, __read_nocancel, __write_nocancel,
6891 __waitpid_nocancel): Add attribute_hidden. If not in libc.so,
6892 libpthread.so or librt.so, define to corresponding function
6893 without _nocancel suffix.
6894 * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
6895 * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
6896 * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
6897
abf1cf21
JJ
6898 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
6899
8348dcc8
UD
69002003-09-02 Ulrich Drepper <drepper@redhat.com>
6901
6902 * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
1e03e0af 6903 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
8348dcc8
UD
6904
6905 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
6906 in subsections has a symbol associated with it.
6907
6908 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
6909 defined symbol for entry point to avoid cancellation.
6910 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
6911
c874a32e
UD
69122003-09-01 Jakub Jelinek <jakub@redhat.com>
6913
6914 * Makefile (tests): Add tst-tls5.
6915 (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
6916 ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
6917 ($(objpfx)tst-tls5): New.
6918 ($(objpfx)tst-tls6.out): Likewise.
6919 (tests): Depend on $(objpfx)tst-tls6.out.
6920 * tst-tls3.c: Include stdint.h and pthreaddef.h.
6921 (do_test): Check pthread_self () return value alignment.
6922 * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
6923 (tf): Check pthread_self () return value alignment.
6924 * tst-tls5.c: New test.
6925 * tst-tls5.h: New.
6926 * tst-tls5mod.c: New.
6927 * tst-tls5moda.c: New.
6928 * tst-tls5modb.c: New.
6929 * tst-tls5modc.c: New.
6930 * tst-tls5modd.c: New.
6931 * tst-tls5mode.c: New.
6932 * tst-tls5modf.c: New.
6933 * tst-tls6.sh: New test.
6934
c503d3dc
UD
6935 * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
6936 ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
6937 * init.c (pthread_functions): Initialize them.
6938 * forward.c (pthread_cond_timedwait@GLIBC_2.0,
6939 pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
6940 * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
6941 pthread_cond_timedwait@@GLIBC_2.3.2.
6942
48614753
JJ
69432003-09-01 Jakub Jelinek <jakub@redhat.com>
6944
56a1b877
JJ
6945 * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
6946 * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
6947 * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
6948 * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
6949 * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
6950 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
6951
6952 * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
6953
48614753
JJ
6954 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
6955 _POSIX_THREAD_PRIORITY_SCHEDULING.
6956 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
6957
28c97261
UD
69582003-08-31 Ulrich Drepper <drepper@redhat.com>
6959
eef80cf8
UD
6960 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
6961 nested function, use static inline function from libio.h.
6962 Code by Richard Henderson.
6963
28c97261
UD
6964 * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
6965 weak.
6966
cd2fbe58
UD
69672003-08-30 Jakub Jelinek <jakub@redhat.com>
6968
6969 * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
6970 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
6971 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
6972 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
6973 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
6974 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
6975 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
6976 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
6977 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
6978 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
6979 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
6980 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
6981 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
6982 * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
6983 * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
6984 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
6985 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
6986 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
6987 * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
6988 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
6989 * sysdeps/sparc/sparc32/pthreaddef.h: New file.
6990 * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
6991 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
6992 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
6993 * sysdeps/sparc/sparc64/pthreaddef.h: New file.
6994 * sysdeps/sparc/tls.h: New file.
6995 * sysdeps/sparc/tcb-offsets.sym: New file.
6996 * sysdeps/sparc/Makefile: New file.
6997 * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
6998 * init.c [__sparc__] (__NR_set_tid_address): Define.
6999
feda52c0
UD
70002003-08-29 Jakub Jelinek <jakub@redhat.com>
7001
7002 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
7003 _IO_release_lock): Define.
7004
7c868816
JJ
70052003-08-29 Jakub Jelinek <jakuB@redhat.com>
7006
0261d33f 7007 * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
7c868816
JJ
7008 sigemptyset before sigaddset. Reported by jreiser@BitWagon.com.
7009
68b9e1ae
UD
70102003-08-27 Ulrich Drepper <drepper@redhat.com>
7011
7012 * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
7013 (__pthread_cleanup_class): Add missing return types of member
7014 functions.
7015
13b3edfc
UD
70162003-08-26 Steven Munroe <sjmunroe@us.ibm.com>
7017
7018 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
7019 (lll_mutex_unlock_force): Add memory barrier between store and futex
7020 syscall.
7021
bb606fbe
UD
70222003-08-25 Ulrich Drepper <drepper@redhat.com>
7023
7024 * tst-cancel4.c (do_test): Also unlink tempfname and remove
7025 tempmsg in first loop.
7026
ee4e5a3d
UD
70272003-08-18 Ulrich Drepper <drepper@redhat.com>
7028
7029 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
7030 _POSIX_THREAD_PRIORITY_SCHEDULING.
7031 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
7032
334fcf2a
UD
70332003-08-07 Jakub Jelinek <jakub@redhat.com>
7034
7035 * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
7036 (__rtld_lock_default_lock_recursive,
7037 __rtld_lock_default_unlock_recursive): Define.
7038 [_LIBC && SHARED] (__rtld_lock_lock_recursive,
7039 __rtld_lock_unlock_recursive): Define using
7040 GL(_dl_rtld_*lock_recursive).
7041 * init.c (__pthread_initialize_minimal_internal): Initialize
7042 _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
7043 Lock GL(_dl_load_lock) the same number of times as
7044 GL(_dl_load_lock) using non-mt implementation was nested.
7045
7046 * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
7047 * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
7048
a30fb2df
UD
70492003-08-06 Jakub Jelinek <jakub@redhat.com>
7050
7051 * tst-cancel17.c (do_test): Make len2 maximum of page size and
7052 PIPE_BUF.
7053
ce0d30a0
JJ
70542003-08-07 Jakub Jelinek <jakub@redhat.com>
7055
7056 * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
7057
9c988b83
UD
70582003-08-03 Jakub Jelinek <jakub@redhat.com>
7059
7060 * sysdeps/pthread/createthread.c (do_clone): Move error handling
7061 to first syscall error check. Move syscall error check for tkill
7062 into __ASSUME_CLONE_STOPPED #ifdef.
7063
5c5252bd
UD
70642003-08-02 Ulrich Drepper <drepper@redhat.com>
7065
f1205aa7
UD
7066 * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
7067 is not defined, do explicit synchronization.
7068 (create_thread): Do not lock pd->lock here. If __ASSUME_CLONE_STOPPED
7069 is not defined also unlock pd->lock for non-debugging case in case
7070 it is necessary.
7071 * pthread_create.c (start_thread): Always get and release pd->lock
7072 if __ASSUME_CLONE_STOPPED is not defined.
7073 (start_thread_debug): Removed. Adjust users.
7074 * allocatestack.c (allocate_stack): Always initialize lock if
7075 __ASSUME_CLONE_STOPPED is not defined.
7076 * Makefile (tests): Add tst-sched1.
7077 * tst-sched1.c: New file.
7078
5c5252bd
UD
7079 * sysdeps/pthread/createthread.c (do_clone): Only use
7080 sched_setschduler and pass correct parameters.
7081
973d66e4
UD
70822003-07-31 Jakub Jelinek <jakub@redhat.com>
7083
7084 * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
7085 pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
7086 PTHREAD_STACK_MIN in comments.
7087
d347a4ab
UD
70882003-07-31 Jakub Jelinek <jakub@redhat.com>
7089
7090 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
7091 Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
7092 argument.
7093 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
7094 * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
7095 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
7096 (__pthread_cleanup_upto): Fix prototype.
7097 (_longjmp_unwind): Adjust caller.
7098 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
7099 Change second argument to const struct pointer.
7100 * tst-sem8.c (main): Remove unused s2 and s3 variables.
7101 * tst-sem9.c (main): Likewise.
7102 * unwind.c: Include string.h for strlen prototype.
7103
1b26e9a5
UD
71042003-07-31 Ulrich Drepper <drepper@redhat.com>
7105
7106 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7107 (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
7108 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
7109 Define HAVE_CMOV.
7110 Patch by Nicholas Miell <nmiell@attbi.com>.
7111
adc12574
UD
71122003-07-30 Jakub Jelinek <jakub@redhat.com>
7113
7114 * init.c (__pthread_initialize_minimal_internal): Initialize
7115 GL(dl_init_static_tls).
7116 * pthreadP.h (__pthread_init_static_tls): New prototype.
7117 * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
7118 New functions.
7119 * Makefile (tests): Add tst-tls4.
7120 (modules-names): Add tst-tls4moda and tst-tls4modb.
7121 ($(objpfx)tst-tls4): Link against libdl and libpthread.
7122 ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
7123 tst-tls4modb.so.
7124 * tst-tls4.c: New file.
7125 * tst-tls4moda.c: New file.
7126 * tst-tls4modb.c: New file.
7127
a7f6c66e
RM
71282003-06-19 Daniel Jacobowitz <drow@mvista.com>
7129
7130 * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
7131 before __timer_dealloc.
7132 * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
7133 Don't call list_unlink.
7134
172ce013
RM
71352003-07-29 Roland McGrath <roland@redhat.com>
7136
7137 * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
7138
7b787f85
UD
71392003-07-25 Jakub Jelinek <jakub@redhat.com>
7140
7141 * tst-cancel17.c (do_test): Check if aio_cancel failed.
7142 Don't reuse struct aiocb A if it failed.
7143 Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
7144 not just one byte, as that does not block.
7145
0e9d6240
UD
71462003-07-22 Jakub Jelinek <jakub@redhat.com>
7147
9d79e037
UD
7148 * sysdeps/pthread/unwind-resume.c: New file.
7149 * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
7150 unwind-resume in csu subdir.
7151 (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
7152 exceptions.
7153 (librt-sysdep_routines, librt-shared-only-routines): Add
7154 rt-unwind-resume.
7155 * sysdeps/pthread/rt-unwind-resume.c: New file.
7156 * unwind-forcedunwind.c: New file.
7157 * Makefile (libpthread-routines): Add unwind-forcedunwind.
7158 (libpthread-shared-only-routines): Likewise.
7159 (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
7160 * pthreadP.h (pthread_cancel_init): New prototype.
7161 * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
7162
7163 * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
7164 attr argument const struct pthread_attr *.
7165
0e9d6240
UD
7166 * res.c (__res_state): Return __resp.
7167 * descr.h: Include resolv.h.
7168 (struct pthread): Add res field.
7169 * pthread_create.c: Include resolv.h.
7170 (start_thread): Initialize __resp.
7171 * Makefile (tests): Add tst-_res1.
7172 (module-names): Add tst-_res1mod1, tst-_res1mod2.
7173 ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
7174 ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
7175 libpthread.
7176 * tst-_res1.c: New file.
7177 * tst-_res1mod1.c: New file.
7178 * tst-_res1mod2.c: New file.
7179
1a379ea0
UD
71802003-07-21 Ulrich Drepper <drepper@redhat.com>
7181
7e939b21
UD
7182 * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
7183
1a379ea0
UD
7184 * Makefile: Define various *-no-z-defs variables for test DSOs
7185 which has undefined symbols.
7186
ca86a763
UD
71872003-07-21 Steven Munroe <sjmunroe@us.ibm.com>
7188
7189 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
7190 Retry if the stwcx fails to store once_control.
7191
80f536db
UD
71922003-07-20 Ulrich Drepper <drepper@redhat.com>
7193
7194 * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
7195 pthread_attr_setaffinity.
7196 * Versions [libpthread] (GLIBC_2.3.3): Likewise.
7197 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
7198 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
7199 * pthread_attr_destroy.c: Free cpuset element if allocated.
7200 * pthread_create.c: Pass iattr as additional parameter to
7201 create_thread.
7202 * sysdeps/pthread/createthread.c: If attribute is provided and
7203 a new thread is created with affinity set or scheduling parameters,
7204 start thread with CLONE_STOPPED.
7205 * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
7206 pthread_attr_setaffinity.
7207 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
7208 cpuset element.
7209
73299943
UD
72102003-07-15 Ulrich Drepper <drepper@redhat.com>
7211
7212 * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
7213
da35d15e
UD
72142003-07-14 Ulrich Drepper <drepper@redhat.com>
7215
7216 * sysdeps/pthread/configure.in: Require CFI directives also for
7217 ppc and s390.
7218
75540d8a
UD
72192003-07-15 Jakub Jelinek <jakub@redhat.com>
7220
7221 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
7222 Add cfi directives.
7223
4a17085f
UD
72242003-07-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7225
7226 * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
7227 CLEANUP_JMP_BUF.
7228 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
7229 registers as variables. Call __pthread_mutex_unlock_usercnt.
7230 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7231 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
7232 not self pointer in __writer. Compare with TID to determine
7233 deadlocks.
7234 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7235 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
7236 Likewise.
7237 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
7238 Likewise.
7239 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
7240 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
7241 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
7242 macros also when compiling librt.
7243
6080ecdf
UD
72442003-07-11 Jakub Jelinek <jakub@redhat.com>
7245
7246 * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
7247 -fasynchronous-unwind-tables.
7248 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
7249 (PSEUDO): Add cfi directives.
7250 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
7251 Likewise.
7252 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
7253 Likewise.
7254
da0c02ee
UD
72552003-07-08 Jakub Jelinek <jakub@redhat.com>
7256
7257 * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
7258 __pthread_unregister_cancel): Add prototypes and hidden_proto.
7259 * unwind.c (__pthread_unwind_next): Add hidden_def.
7260 * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
7261 Likewise.
7262 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
7263 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
7264 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
7265 Likewise.
7266 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
7267 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
7268 Likewise.
7269 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
7270 HIDDEN_JUMPTARGET to call __pthread_register_cancel,
7271 __pthread_unregister_cancel and __pthread_unwind_next.
7272
57a5ea02
UD
72732003-07-04 Jakub Jelinek <jakub@redhat.com>
7274
7275 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
7276 different symbol for the cancellation syscall wrapper and
7277 non-cancellation syscall wrapper.
7278 (PSEUDO_END): Define.
7279
d810b358
UD
72802003-07-05 Richard Henderson <rth@redhat.com>
7281
7282 * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
7283 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
42d86dd6
RH
7284 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
7285 return actual return value from the syscall, not 0.
d810b358 7286
db54f488
UD
72872003-07-07 Ulrich Drepper <drepper@redhat.com>
7288
7289 * descr.h (struct pthread): Add pid field.
7290 * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
7291 (__reclaim_stacks): Likewise.
7292 * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
7293 also check for PID of the signal source.
7294 (__pthread_initialize_minimal_internal): Also initialize pid field
7295 of initial thread's descriptor.
7296 * pthread_cancel.c: Use tgkill instead of tkill if possible.
7297 * sysdeps/unix/sysv/linux/fork.c: Likewise.
7298 * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
7299 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
7300 * sysdeps/unix/sysv/linux/raise.c: Likewise.
7301
5e497a41
UD
73022003-07-05 Ulrich Drepper <drepper@redhat.com>
7303
7304 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
7305 Fix use of parameter.
7306 (__libc_cleanup_pop): Likewise.
7307
86a0c4fa
UD
73082003-07-04 Ulrich Drepper <drepper@redhat.com>
7309
7310 * init.c (sigcancel_handler): Change parameters to match handler
7311 for SA_SIGACTION. Check signal number and code to recognize
7312 invalid invocations.
7313
bdbecaa3
RM
73142003-07-03 Roland McGrath <roland@redhat.com>
7315
7316 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
7317 Apply sizeof (struct pthread) bias to r13 value.
7318
56421b23
UD
73192003-07-03 Ulrich Drepper <drepper@redhat.com>
7320
fbd90f6c
UD
7321 * sysdeps/pthread/configure.in: Require CFI directives.
7322
56421b23
UD
7323 * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
7324 definition.
7325 * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
7326 libpthread compilation.
7327 * unwind.c (__pthread_unwind): Add hidden_def.
7328 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
7329
ca2b4cd7
UD
73302003-07-01 Ulrich Drepper <drepper@redhat.com>
7331
7332 * libc-cancellation.c (__libc_cleanup_routine): Define.
7333 * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
7334 (__pthread_cleanup_pop): Define.
7335
f036e569
UD
73362003-07-01 Richard Henderson <rth@redhat.com>
7337
7338 * sysdeps/alpha/elf/pt-initfini.c: New file.
7339 * sysdeps/alpha/pthread_spin_lock.S: New file.
7340 * sysdeps/alpha/pthread_spin_trylock.S: New file.
7341 * sysdeps/alpha/pthreaddef.h: New file.
7342 * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
7343 * sysdeps/alpha/tls.h: New file.
7344 * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
7345 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
7346 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
7347 * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
7348 * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
7349 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
7350 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
7351 * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
7352 * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
7353 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
7354
3b985826
UD
73552003-07-01 Ulrich Drepper <drepper@redhat.com>
7356
7357 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
7358 cleanup support and unwind info.
7359
3a4d1e1e
UD
73602003-06-30 Ulrich Drepper <drepper@redhat.com>
7361
7362 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
7363 Use correct cleanup handler registration. Add unwind info.
96c814d3
UD
7364 * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
7365 * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
3a4d1e1e
UD
7366 * tst-once3.c: Add cleanup handler and check it is called.
7367 * tst-once4.c: Likewise.
7368 * tst-oncex3.c: New file.
7369 * tst-oncex4.c: New file.
7370 * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
7371
e479cc8e
UD
73722003-06-29 Ulrich Drepper <drepper@redhat.com>
7373
7374 * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
7375
7d7ff54c
UD
73762003-06-27 Ulrich Drepper <drepper@redhat.com>
7377
483e95d0
UD
7378 * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
7379 (tf_msgsnd): Likewise.
7380
7d7ff54c
UD
7381 * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
7382 premature returns a bit more.
7383
7539c7ec
UD
73842003-06-26 Ulrich Drepper <drepper@redhat.com>
7385
7386 * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
7387 definition to the front.
7388
7389 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
7390 the cleanup functions to make the names unique. Fix dwarf opcode
7391 un unwind table.
7392 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
7393 functions to make the names unique. Fix CFA offset for two blocks.
7394
0af6a1d9
UD
73952003-06-25 Ulrich Drepper <drepper@redhat.com>
7396
7397 * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
7398 missing closing braces.
7399 Patch by Christophe Saout <christophe@saout.de>.
7400
eef4a9f3
RM
74012003-06-24 Roland McGrath <roland@redhat.com>
7402
7403 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
7404
4165d44d
UD
74052003-06-24 Ulrich Drepper <drepper@redhat.com>
7406
7f8f7b9d
UD
7407 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
7408 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
7409
4165d44d
UD
7410 * pthreadP.h: Declare __find_thread_by_id.
7411 * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
7412 * pthread_clock_gettime.c: Allow using other thread's clock.
7413 * pthread_clock_settime.c: Likewise.
7414 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
7415 * Makefile: Add rules to build and run tst-clock2.
7416 * tst-clock2.c: New file.
7417
67b78ef9
UD
74182003-06-23 Ulrich Drepper <drepper@redhat.com>
7419
7420 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
7421 to use exception-based cleanup handler.
7422 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7423
7424 * tst-cond8.c (ch): Announce that we are done.
7425
7426 * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
7427
7428 * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
7429 Also test aio_suspend with timeout value.
7430
61623643
UD
74312003-06-22 Ulrich Drepper <drepper@redhat.com>
7432
3a4f2043
UD
7433 * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
7434 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
7435 attribute_hidden.
7436
61623643
UD
7437 * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
7438 (__pthread_mutex_lock_internal): Likewise.
7439 (__pthread_mutex_unlock_internal): Likewise.
7440 (__pthread_mutex_unlock_usercnt): Declare.
7441 * pthread_mutex_destroy.c: Always fail if used in any way.
7442 * pthread_mutex_init.c: Update comment.
7443 * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
7444 * pthread_mutex_timedlock.c: Adjust __nusers.
7445 * pthread_mutex_trylock.c: Adjust __nusers.
7446 * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
7447 and public interfaces are wrapper with pass additional parameter.
7448 __pthread_mutex_unlock_usercnt does not adjust __nusers if second
7449 parameter zero.
7450 * tst-mutex8.c: New file.
7451 * Makefile (tests): Add tst-mutex8.
7452 * sysdeps/pthread/pthread_cond_timedwait.c: Call
7453 __pthread_mutex_unlock_usercnt.
7454 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
7455 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7456 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7457 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7458 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7459 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
7460 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
7461 Add __nusers.
7462 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7463 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7464 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7465 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7466 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7467
7468 * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
7469 * pthread_mutex_timedlock.c: Likewise.
7470 * pthread_mutex_trylock.c: Adjust __nusers.
7471 * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
7472 * tst-mutex9.c: New file.
7473 * Makefile (tests): Add tst-mutex9.
7474 * sysdeps/i386/tls.h: Remove THREAD_ID definition.
7475 * sysdeps/ia64/tls.h: Likewise.
7476 * sysdeps/powerpc/tls.h: Likewise.
7477 * sysdeps/s390/tls.h: Likewise.
7478 * sysdeps/sh/tls.h: Likewise.
7479 * sysdeps/x86_64/tls.h: Likewise.
7480 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
7481 Change type of __owner.
7482 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7483 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7484 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7485 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7486 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7487
9bdabb94
UD
74882003-06-19 Jakub Jelinek <jakub@redhat.com>
7489
7490 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
7491 * sysdeps/unix/sysv/linux/sem_post.c: ...here.
7492
7493 * sysdeps/unix/sysv/linux/sem_post.c: Move to...
7494 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here. Pass nr + 1
7495 instead of nr to lll_futex_wake. Only set errno and return -1
7496 if err < 0.
7497
7498 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
7499 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
7500 return actual return value from the syscall, not 0.
7501
f6c93bd9
UD
75022003-06-18 Ulrich Drepper <drepper@redhat.com>
7503
ca343e73
UD
7504 * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
7505 find a random value.
7506 (tf_msgrcv): Likewise. Also don't report msgrcv returns if
7507 errno==EIDRM.
7508
50441a98
UD
7509 * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
7510 compat_timer_settime.
7511 * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
7512 compat_timer_gettime.
7513 * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
9bdabb94 7514 compat_timer_getoverrun.
50441a98
UD
7515 * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
7516 compat_timer_delete.
7517
f6c93bd9
UD
7518 * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
7519 error-checking mutex detect busy mutexes.
7520
047aec8f
UD
75212003-06-17 Ulrich Drepper <drepper@redhat.com>
7522
1d53508d
UD
7523 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
7524 Add ax to clobber list.
7525 (lll_mutex_cond_lock): Likewise.
7526 (lll_mutex_unlock): Likewise.
7527 (lll_lock): Likewise.
7528 (lll_unlock): Likewise.
7529
f23b30e2
UD
7530 * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
7531 * tst-cancel18.c: New file.
7532 * tst-cancelx18.c: New file.
7533
7534 * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
7535 and tcdrain.
7536
7537 * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
7538 * tst-cancel17.c: New file.
7539 * tst-cancelx17.c: New file.
7540
7541 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
7542 * sysdeps/unix/sysv/linux/sigwait.c: New file.
7543 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
7544
047aec8f
UD
7545 * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
7546
bbde8527
UD
75472003-06-16 Jakub Jelinek <jakub@redhat.com>
7548
7549 * sysdeps/pthread/createthread.c (create_thread): Set
7550 header.multiple_threads unconditionally.
7551 * allocatestack.c (allocate_stack): Likewise.
7552 * descr.h (struct pthread): Add header.multiple_threads
7553 unconditionally.
7554 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
7555 Define for librt. #error if neither libpthread, libc nor librt.
7556 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
7557 Likewise.
7558 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
7559 CDISABLE): Likewise.
7560 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
7561 CDISABLE): Likewise.
7562 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
7563 CDISABLE): Likewise.
7564 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
7565 CDISABLE): Likewise. Access header.multiple_threads outside of
7566 libc and libpthread.
7567 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
7568 Likewise.
7569 * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
7570 * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
7571
26676450
UD
75722003-06-17 Ulrich Drepper <drepper@redhat.com>
7573
7574 * tst-cancel4.c: Add tests for the socket and signal functions, pause.
7575 Also test early cancellation before the thread reaches the cancellation
7576 point.
7577
7578 * Makefile: Compile forward.c with exceptions.
7579
7580 * sysdeps/unix/sysv/linux/sleep.c: New file.
7581
301a6724
UD
75822003-06-16 Ulrich Drepper <drepper@redhat.com>
7583
0e0deb03
UD
7584 * Makefile: Add CFLAGS definition to compile function wrappers
7585 duplicated from libc with exceptions.
7586 * tst-cancel4.c: Also check cancellation handlers.
7587
301a6724
UD
7588 * Makefile: Add rules to build and run tst-cancel16 and
7589 tst-cancelx16. Add missing CFLAGS definitions.
7590 * tst-cancel16.c: New file.
7591 * tst-cancelx16.c: New file.
7592
7a114794
UD
75932003-06-15 Ulrich Drepper <drepper@redhat.com>
7594
452aea84
UD
7595 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
7596 (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
7597 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
7598 (DL_SYSINFO_IMPLEMENTATION): Likewise.
7599
7a114794
UD
7600 * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
7601 (LIBC_CANCEL_RESET): Likewise.
7602 Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
7603 * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
7604 librt-cancellation.
7605 (CFLAGS-libcrt-cancellation.c): Define.
7606 * sysdeps/pthread/librt-cancellation.c: New file.
7607 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
7608 macros also when compiling librt.
7609 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
7610 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
7611 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
7612 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
7613 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
7614 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
7615 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
7616
7617 * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
7618 compat_timer_create.
7619
8ba1d429
UD
76202003-06-14 Ulrich Drepper <drepper@redhat.com>
7621
cc8fb6f3
UD
7622 * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
7623
8ba1d429
UD
7624 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
7625 __register_atfork.
7626 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
7627 Add libc_hidden_def.
7628
d4f100e2
RM
76292003-06-13 Roland McGrath <roland@redhat.com>
7630
7631 * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
7632 constant from <sys/reg.h> to ps_get_thread_area, not register contents.
7633
dd9423a6
UD
76342003-06-11 Ulrich Drepper <drepper@redhat.com>
7635
7636 * allocatestack.c (queue_stack): Always inline.
7637 * ptreadhP.h (__do_cancel): Likewise.
7638
ed24330d
JJ
76392003-06-10 Jakub Jelinek <jakub@redhat.com>
7640
7641 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
7642 a typo.
7643
06120d79
UD
76442003-06-10 Ulrich Drepper <drepper@redhat.com>
7645
7646 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
7647 (__pthread_cond_signal): Remove incorrect second addition for
7648 cond_lock!=0.
7649
b1720346
UD
76502003-06-09 Ulrich Drepper <drepper@redhat.com>
7651
5b318f85
UD
7652 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
7653 (__pthread_cond_signal): Use correct futex pointer in
7654 __lll_mutex_lock_wait call.
7655
b1720346
UD
7656 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
7657 (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
7658
3e36c37d
UD
76592003-06-08 Ulrich Drepper <drepper@redhat.com>
7660
ecf7955d
UD
7661 * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
7662 cancelable.
ed24330d 7663 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
ecf7955d
UD
7664 Likewise.
7665
3e36c37d
UD
7666 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
7667 hand-written CFI generation code. Since ENTRY/END also initiated
7668 CFI frames this caused two CFI sets to be generated.
7669
7726edc2
UD
76702003-06-07 Ulrich Drepper <drepper@redhat.com>
7671
7672 * cleanup_routine.c: New file.
7673 * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
7674 * sysdeps/pthread/pthread.h: Add support for fully exception-based
7675 cleanup handling.
7676 * Makefile (libpthread-routines): Add cleanup_routine.
7677 Add more CFLAGS variables to compile with exceptions. Add comments
7678 why which file needs unwind tables.
7679 (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
7680 tests.
7681 * tst-cancelx1.c: New file.
7682 * tst-cancelx2.c: New file.
7683 * tst-cancelx3.c: New file.
7684 * tst-cancelx4.c: New file.
7685 * tst-cancelx5.c: New file.
7686 * tst-cancelx6.c: New file.
7687 * tst-cancelx7.c: New file.
7688 * tst-cancelx8.c: New file.
7689 * tst-cancelx9.c: New file.
7690 * tst-cancelx10.c: New file.
7691 * tst-cancelx11.c: New file.
7692 * tst-cancelx12.c: New file.
7693 * tst-cancelx13.c: New file.
7694 * tst-cancelx14.c: New file.
7695 * tst-cancelx15.c: New file.
7696 * tst-cleanupx0.c: New file.
7697 * tst-cleanupx0.expect: New file.
7698 * tst-cleanupx1.c: New file.
7699 * tst-cleanupx2.c: New file.
7700 * tst-cleanupx3.c: New file.
7701
7702 * tst-cleanup0.c: Make standard compliant.
7703 * tst-cleanup1.c: Likewise.
7704
7705 * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
7706 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
7707 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
7708 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
7709 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
7710 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7711 * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
7712 CLEANUP_JMP_BUF.
7713 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
7714 * tst-cancel12.c: New file.
7715 * tst-cancel13.c: New file.
7716 * tst-cancel14.c: New file.
7717 * tst-cancel15.c: New file.
7718 * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
7719 and tst-cancel15.
7720
7721 * tst-cancel1.c: Add some comments.
7722
7723 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
7724 timeout correctly.
7725
7a8a8e21
UD
77262003-06-06 Ulrich Drepper <drepper@redhat.com>
7727
7728 * Makefile (CFLAGS-pthread_cancel.c): Define.
7729
4ad0bbf4
UD
77302003-06-05 Ulrich Drepper <drepper@redhat.com>
7731
7732 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
7733 Change type of __writer element to int.
7734 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7735 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7736 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7737 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7738 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7739 * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
7740 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
7741 * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
7742 Compare with TID to determine deadlocks.
7743 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
7744 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
7745 * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
7746 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
7747 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
7748 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7749 Likewise.
7750 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7751 Likewise.
7752 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7753 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
7754 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
7755 Likewise.
7756 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
7757 Likewise.
7758 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
7759 * Makefile (tests): Add tst-rwlock12.
7760 * tst-rwlock12.c: New file.
7761
332faa96
JJ
77622003-06-05 Jakub Jelinek <jakub@redhat.com>
7763
7764 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
7765 __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
7766 Remove bogus hidden_proto.
7767 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
7768 Likewise.
7769 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
7770 lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
7771 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
7772 ___lll_mutex_timedlock): Likewise.
7773
29d9e2fd
UD
77742003-06-04 Ulrich Drepper <drepper@redhat.com>
7775
7776 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
7777 (__pthread_cond_signal): Add some code to eventually handle
7778 cond_lock!=0.
7779
6f1acb30
UD
77802003-06-01 Ulrich Drepper <drepper@redhat.com>
7781
7782 * Makefile (tests): Add tst-exec4.
7783 (tst-exec4-ARGS): Define.
7784 * tst-exec4.c: New file.
7785
49b65043
UD
77862003-05-31 Ulrich Drepper <drepper@redhat.com>
7787
31195be2
UD
7788 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
7789 Also fail if tv_nsec < 0.
7790 (__lll_timedwait_tid): Likewise.
7791 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
7792 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
7793 Likewise.
7794 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
7795 Likewise.
7796 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
7797 Likewise.
7798 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
7799 Likewise.
80b54217
UD
7800 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
7801 Likewise.
7802 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
7803 Likewise.
31195be2 7804
dcfc8224
UD
7805 * Makefile (tests): Add tst-sem8 and tst-sem9.
7806 * tst-sem8.c: New file.
7807 * tst-sem9.c: New file.
7808 * sem_open.c: Fix creation of in_use record if the file exists but
7809 no internal record.
7810
49b65043
UD
7811 * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
7812 definitions.
7813
7814 * sysdeps/pthread/timer_create.c (timer_create): In case
7815 evp==NULL, assign timer ID to sival_ptr.
7816
7817 * descr.h (struct pthread_unwind_buf): Change type of prev element to
7818 struct pthread_unwind_buf *.
7819 (struct pthread): Likewise for cleanup_jmp_buf element.
7820
7821 * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
7822 * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
7823 * unwind.c (__pthread_unwind_next): Likewise.
7824
50794a45
UD
78252003-05-30 Ulrich Drepper <drepper@redhat.com>
7826
5d4f57bd
UD
7827 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7828 (lll_futex_timed_wait): Use int for futex value parameter.
7829 (lll_futex_wake): Likewise.
7830 (lll_futex_requeue): Likewise.
7831
7832 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
7833 Replace one memory operation with one register operation.
7834
7835 * tst-join4.c (do_test): Fix error message.
7836
7ab7ea33
UD
7837 * tst-rwlock6.c (do_test): Use correct format specifier.
7838
7839 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
7840 (__lll_mutex_lock_wait): Replace one memory operation with one
7841 register operation.
7842 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
7843 (__lll_mutex_lock_wait): Likewise.
7844
50794a45
UD
7845 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7846 (__lll_mutex_cond_lock): Add one to value parameter of
7847 __lll_lock_wait to reflect reality in the futex syscall.
7848 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
7849 (lll_mutex_cond_lock): Likewise.
7850
5a70784e
JJ
78512003-05-30 Jakub Jelinek <jakub@redhat.com>
7852
7853 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
7854 New function.
7855 (lll_mutex_cond_lock): Define.
7856
e7c5ac68
UD
78572003-05-29 Ulrich Drepper <drepper@redhat.com>
7858
586d1748
UD
7859 * Makefile (tests): Add tst-signal6.
7860 * tst-signal6.c: New file.
7861
b8ba4a27
UD
7862 * sysdeps/unix/sysv/linux/s390/lowlevellock.h
7863 (__lll_mutex_unlock_force): New function
7864 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
7865
65d46efe
UD
7866 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7867 (__lll_mutex_unlock_force): New function.
7868 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
7869
7870 * tst-rwlock7.c (do_test): Use correct format specifier.
7871
e7c5ac68
UD
7872 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
7873 Find break parameter in correct asm argument.
7874
284bdc42
UD
78752003-05-27 Jakub Jelinek <jakub@redhat.com>
7876
7877 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
7878 Remove out4.
7879 (lll_futex_requeue): Fix __o3 constraint, return negative errno if
7880 error occured.
7881 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
7882 Add __mutex.
7883 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
7884 lll_futex_requeue, lll_mutex_unlock_force): Define.
7885
e7c5ac68
UD
78862003-05-30 Jakub Jelinek <jakub@redhat.com>
7887
7888 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7889 (pthread_cond_t): Add __mutex.
7890 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
7891 lll_futex_requeue, lll_mutex_unlock_force): Define.
7892
ea2630c6
UD
78932003-05-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7894
7895 * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
7896 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
42d86dd6 7897 Add __mutex field.
ea2630c6
UD
7898 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
7899 Define.
7900 (lll_futex_wait, lll_futex_wake): Define.
7901 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
7902 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
7903 FUTEX_REQUEUE instead of FUTEX_WAIT.
7904 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
7905 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
7906 mutex which was used in condvar structure. Call
7907 __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
7908 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
7909
7910 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
7911 include tcb-offsets.h. Read wakeup value in locked region.
7912 Use the value of gbr register as THREAD_ID.
7913 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7914 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7915 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7916
7917 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
7918 macros.
7919
5a77f150
UD
79202003-05-28 Ulrich Drepper <drepper@redhat.com>
7921
7922 * sysdeps/pthread/pthread_cond_broadcast.c
7923 (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
7924
7661d9f7
UD
79252003-05-26 Ulrich Drepper <drepper@redhat.com>
7926
7927 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
7928 typo in register name.
7929 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
7930 correctly. Actually use requeue. Little optimization.
7931 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
7932 mutex address early. Handle cancellation state as 32-bit value.
7933 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7934 Remove unnecessary label.
7935
69431c9a
UD
79362003-05-25 Ulrich Drepper <drepper@redhat.com>
7937
7938 * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
7939 instead of FUTEX_WAIT.
7940 * sysdeps/pthread/pthread_cond_signal.c: Likewise.
7941 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
7942 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
7943 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
7944 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
7945 * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
7946 used in condvar structure. Call __pthread_mutex_cond_lock instead
7947 of __pthread_mutex_lock_internal.
7948 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7949 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7950 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
7951 (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
7952 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7953 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7954 * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
7955 Add pthread_mutex_cond_lock.
7956 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
7957 * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
7958 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
7959 lll_mutex_cond_lock.
7960 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
7961 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
248a3490 7962 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
69431c9a 7963 Add __mutex field.
248a3490 7964 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
69431c9a
UD
7965 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7966
7967 * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
7968 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
7969
7970 * pthreadP.h: Declare __pthread_mutex_cond_lock.
7971 * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
7972 Use it instead of lll_mutex_lock. If __pthread_mutex_lock is a
7973 macro don't define aliases.
7974
7975 * cancellation.c: Remove __pthread_enable_asynccancel_2.
7976 * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
7977 * sysdeps/pthread/pthread_cond_timedwait.c: Use
7978 __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
7979 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7980 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7981 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
7982 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7983 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7984
fddfebbd
UD
79852003-05-17 Ulrich Drepper <drepper@redhat.com>
7986
7987 * sem_open.c: Fix one endless loop. Implement correct semantics
7988 wrt opening the same semaphore more then once.
7989 * sem_close.c: Adjust for sem_open change.
7990 * semaphoreP.h: Include <semaphore.h>. Define struct inuse_sem.
7991 Declare __sem_mappings, __sem_mappings_lock, __sem_search.
7992 * Makefile (tests): Add tst-sem7.
7993 * tst-sem7.c: New file.
7994
1eefffb0
RM
79952003-05-16 Roland McGrath <roland@redhat.com>
7996
7997 * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
7998 uninitialized variable braino.
7999
6e66dc78
UD
80002003-05-16 Ulrich Drepper <drepper@redhat.com>
8001
23ae6451
UD
8002 * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
8003 test for syscall availability.
8004
8005 * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
8006 __no_posix_timers to -1 if the syscalls don't exist.
8007
7ac5b8e2
UD
8008 * pthread_join.c (pthread_join): Set tid field of the joined
8009 thread to -1. This isn't necessary but helps to recognize some
8010 error conditions with almost no cost.
8011
8012 * allocatestack.c (FREE_P): Also negative values indicate an
8013 unused stack.
8014
6e66dc78
UD
8015 * unwind.c: Include <unistd.h>.
8016
855dba3c
UD
80172003-05-14 Ulrich Drepper <drepper@redhat.com>
8018
8019 * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
8020
81f3ac4c
UD
80212003-05-14 Jakub Jelinek <jakub@redhat.com>
8022
8023 * Makefile (crti-objs, crtn-objs): New variables.
8024 (omit-deps, extra-objs): Add crtn.
8025 ($(objpfx)libpthread.so): Depend on both crti and crtn
8026 and links to them in multidir.
8027 ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
8028
7158eae4
UD
80292003-05-12 Steven Munroe <sjmunroe@us.ibm.com>
8030
8031 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
8032 (lll_mutex_unlock): Use atomic_exchange_rel.
8033
edf205d5
UD
80342003-05-11 Ulrich Drepper <drepper@redhat.com>
8035
8036 * cond-perf.c (cons): Add missing locking around setting of alldone.
8037
a3f979a7
UD
80382003-05-10 Ulrich Drepper <drepper@redhat.com>
8039
8040 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
8041 related macros.
8042 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8043
880867a4
UD
80442003-05-09 Ulrich Drepper <drepper@redhat.com>
8045
949ec764
UD
8046 * tst-sem6.c: New file.
8047 * Makefile (tests): Add tst-sem6.
8048
8049 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
8050 Use atomic_exchange_rel instead of atomic_exchange.
8051 * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
8052 Likewise.
8053
8054 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
8055 code for lll_futex_wait and lll_futex_wake in static apps. Use
8056 vsyscall is possible.
8057
8058 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
8059 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
8060 * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
8061 pthread_setaffinity_np.
8062 * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
8063 and pthread_setaffinity_np.
8064 * Makefile (libpthread-routines): Add pthread_getaffinity and
8065 pthread_setaffinity.
8066
880867a4
UD
8067 * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
8068 use it in case mmap to allocate the stack fails.
8069 * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
8070 ARCH_MAP_FLAGS here.
8071 * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
8072 ARCH_RETRY_MMAP.
8073
92d83c72
UD
80742003-05-08 Ulrich Drepper <drepper@redhat.com>
8075
8076 * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
8077 handler implementation. It is now lockless in fork().
8078 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
8079 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
8080 * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>. Don't
8081 declare the __fork_*_lists.
8082 (struct fork_handler): Include pointers to all three functions.
8083 Add next, refcntr and need_signal elements.
8084 (__fork_handlers): New declaration.
8085 (__register_atfork_malloc): Remove declaration.
8086 (HAVE_register_atfork_malloc): Remove definition.
8087 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
8088 __pthread_child_handler variable.
8089 (__libc_pthread_init): Use __register_atfork instead of explicitly
8090 adding to the list.
8091 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
8092 and lll_futex_wake.
8093 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
8094
8095 * unwind.c (unwind_cleanup): Print error message and then abort. This
8096 function must never be reached.
8097
8098 * cond-perf.c: New file.
8099
be4d8038
UD
81002003-05-05 Ulrich Drepper <drepper@redhat.com>
8101
8102 * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
8103
c6696b79
RM
81042003-05-04 Roland McGrath <roland@redhat.com>
8105
8106 * Makefile ($(objpfx)../libc.so): New target.
8107
7da168bf
UD
81082003-05-02 Ulrich Drepper <drepper@redhat.com>
8109
8110 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
8111 (pthread_condattr_t): Size is only an int, don't use long for
8112 alignment.
8113 (pthread_mutexattr_t): Likewise.
7da168bf
UD
8114 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8115 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8116 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8117
9a7178d6
UD
81182003-05-01 Ulrich Drepper <drepper@redhat.com>
8119
8120 * sysdeps/i386/tls.h: Define THREAD_ID.
8121 * sysdeps/ia64/tls.h: Likewise.
8122 * sysdeps/powerpc/tls.h: Likewise.
8123 * sysdeps/s390/tls.h: Likewise.
8124 * sysdeps/sh/tls.h: Likewise.
8125 * sysdeps/x86_64/tls.h: Likewise.
8126 * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
8127 record ownership.
8128 * pthread_mutex_timedlock.c: Likewise.
8129 * pthread_mutex_trylock.c: Likewise.
8130 * pthread_mutex_unlock.c: Likewise.
8131 * pthread_rwlock_trywrlock.c: Likewise.
8132 * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
8133 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
8134 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
8135 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
8136
8137 * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
8138 flag.
8139
a234e27d
UD
81402003-04-29 Jakub Jelinek <jakub@redhat.com>
8141
8142 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
8143 (__SIZEOF_PTHREAD_COND_T): Define to 48.
8144 (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
8145 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
8146 Make __align long long instead of long.
8147 (pthread_rwlock_t): Formatting.
8148 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
8149 (pthread_rwlock_t): Formatting.
8150 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
8151 (pthread_cond_t): Make __align long long instead of long.
8152 (pthread_rwlock_t): Move __flags field to the same position as in
8153 linuxthreads.
8154
f025c136
UD
81552003-04-30 Ulrich Drepper <drepper@redhat.com>
8156
8157 * tst-rwlock6.c (do_test): Use correct printf format specifiers.
8158 * tst-rwlock7.c (do_test): Likewise.
8159
7531ab9e
RM
81602003-04-26 Roland McGrath <roland@redhat.com>
8161
8162 * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
8163
299601a1
UD
81642003-04-22 Jakub Jelinek <jakub@redhat.com>
8165
299601a1
UD
8166 * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
8167 sizeof (struct pthread).
8168 (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
468777e1 8169 1 struct pthread.
299601a1
UD
8170 * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
8171 to 0.
8172 (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
8173 struct pthread.
8174 (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
8175 to 32-bit bytes.
8176 (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
8177 tcbp.
8178 (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
8179 unneccessarily.
8180 (NO_TLS_OFFSET): Define.
299601a1
UD
8181 * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
8182 add TLS_TCB_SIZE unnecessarily.
299601a1 8183
950094f8
RM
81842003-04-22 Roland McGrath <roland@redhat.com>
8185
8186 * Makeconfig (shared-thread-library): Reverse link order to work
8187 around linker bug.
8188
dc2f6455
UD
81892003-04-22 Ulrich Drepper <drepper@redhat.com>
8190
8191 * semaphore.h: Fix typo in comment.
8192
e7608d77
UD
81932003-04-21 Ulrich Drepper <drepper@redhat.com>
8194
6a87ee19
UD
8195 * sysdeps/pthread/sigfillset.c: New file.
8196
e7608d77
UD
8197 * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
8198 * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
8199 * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
8200 * sysdeps/pthread/sigaction.c: Likewise.
8201 * sysdeps/pthread/sigprocmask.c: New file.
8202 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
8203 __SIGRTMIN+1.
8204 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
8205 Block SIGTIMER. Also handle SI_TKILL events and terminate thread
8206 in this case.
8207
0b3df49e
UD
82082003-04-19 Ulrich Drepper <drepper@redhat.com>
8209
58a7a325
UD
8210 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
8211 (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
8212
0b3df49e
UD
8213 * sysdeps/unix/sysv/linux/unregister-atfork.c
8214 (__unregister_atfork): Don't free memory not allocated dynamically.
8215
8216 * semaphore.h: Remove __THROW marker from cancellation points.
8217 * nptl/sysdeps/pthread/pthread.h: Likewise.
8218
7d74651e
UD
82192003-04-18 Ulrich Drepper <drepper@redhat.com>
8220
76a67697
UD
8221 * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
8222 pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
7d74651e
UD
8223 __THROW.
8224
dd9d6538
JJ
82252003-04-16 Jakub Jelinek <jakub@redhat.com>
8226
8227 * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
8228
4ab6f47c
RM
82292003-04-15 Roland McGrath <roland@redhat.com>
8230
8231 * forward.c (__pthread_unwind): Tweak to avoid warning.
8232
162434a6
UD
82332003-04-15 Ulrich Drepper <drepper@redhat.com>
8234
8235 * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
8236
35909161
UD
82372003-04-14 Ulrich Drepper <drepper@redhat.com>
8238
18ddd3aa 8239 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
35909161
UD
8240 overflow CFA advance instructions.
8241 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8242
18a8e730
UD
82432003-04-14 Jakub Jelinek <jakub@redhat.com>
8244
bd4f43b4
UD
8245 * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
8246 * sysdeps/i386/pthread_spin_lock.c: Likewise.
8247 * sysdeps/x86_64/tls.h: Likewise. Define LOCK_PREFIX if not already
8248 defined.
8249
18a8e730
UD
8250 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
8251 DW_CFA_advance_loc2 for .Laddl-.Lsubl.
8252 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
8253 DW_CFA_advance_loc for .Laddl-.Lsubl.
8254
08c765fa
UD
82552003-04-13 Ulrich Drepper <drepper@redhat.com>
8256
18a8e730
UD
8257 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
8258 position-independent unwind data for static libraries.
8259 Add missing unwind info. Add comments.
8260
ad2be852
UD
8261 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
8262 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8263 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
08c765fa
UD
8264 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8265
177d1ad3
UD
82662003-04-12 Ulrich Drepper <drepper@redhat.com>
8267
08c765fa
UD
8268 * Makefile: Make sure all cancellation points are compiled with
8269 exception and asynchronous unwind tables.
8270
177d1ad3
UD
8271 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
8272 which mishandles loading of global object addresses in PIC.
8273 (THREAD_SETMEM_NC): Likewise.
8274
09d65ff3
UD
82752003-04-11 Ulrich Drepper <drepper@redhat.com>
8276
8277 * pthread.h: Define new data structure for cleanup buffer. Declare
8278 new cleanup handler interfaces.
8279 * descr.h: Include <unwind.h> if necessary. Define pthread_unwind_buf.
8280 (struct pthread): Add cleanup_jmp_buf pointer. Define
8281 HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
8282 * pthreadP.h: Declare __pthread_unwind. Define __do_cancel to use
8283 it. Declare old cleanup handler installation functions.
8284 * cleanup.c: Rewrite. Install handler for unwind-based cleanup
8285 handling.
8286 * cleanup_defer.c: Likewise.
8287 * cleanup_compat.c: New file. Old cleanup code.
8288 * cleanup_def_compat.c: New file. Old cleanup code.
8289 * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
8290 if own thread descriptor.
8291 * unwind.c: New file.
8292 * forward.c: Add __pthread_unwind.
8293 * init.c (pthread_functions): Add __pthread_unwind.
8294 * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
8295 Add ptr___pthread_unwind.
8296 * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
8297 and unwind function.
8298 * Makefile (libpthread-routines): Add cleanup_compat,
8299 cleanup_def_compat, and unwind. Define CFLAGS to enable unwind
8300 table generation if necessary.
8301 * version.c: Record whether unwind support is compiled in.
8302 * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
8303 * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
8304 handler interfaces.
8305 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
8306 complication to generate unwind information for syscall wrappers.
68107ec0 8307 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
09d65ff3
UD
8308 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
8309 __cleanup_fct_attribute.
8310
8311 * Makefile: Add rules to build and run tst-cleanup0.
8312 * tst-cleanup0.c: New file.
8313 * tst-cleanup0.expect: New file.
8314
8315 * pthread_create.c (deallocate_tsd): Don't take parameter. Adjust
8316 caller. Optimize to avoid often unecessary local variable.
8317
0dc44b51
RM
83182003-04-11 Roland McGrath <roland@redhat.com>
8319
8320 * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
8321 sets variable `multidir'; include that.
8322 (generated): Add it.
8323 ($(objpfx)$(multidir)/crti.o): New target.
8324 [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
8325
84a80719
UD
83262003-04-11 Ulrich Drepper <drepper@redhat.com>
8327
8328 * tst-attr2.c (do_test): Add cast to avoid warning.
8329 * tst-mutex4.c (do_test): Likewise.
8330
88ff4759
UD
83312003-04-10 Ulrich Drepper <drepper@redhat.com>
8332
8333 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
8334 in child.
8335
b2041097
UD
83362003-04-09 Ulrich Drepper <drepper@redhat.com>
8337
8338 * Makefile (tests): Add tst-detach1.
8339 * tst-detach1.c: New file.
8340
f9657e88
UD
83412003-04-08 Ulrich Drepper <drepper@redhat.com>
8342
9afe4964
UD
8343 * sysdeps/pthread/pthread.h: Remove duplicate
8344 pthread_cleanup_{push,pop} definitions.
8345
f9657e88
UD
8346 * tst-barrier2.c: Eliminate warnings.
8347 * tst-cancel4.c: Likewise.
8348 * tst-cond4.c: Likewise.
8349 * tst-cond6.c: Likewise.
8350 * tst-detach1.c: Likewise.
8351 * tst-rwlock4.c: Likewise.
8352 * tst-rwlock6.c: Likewise.
8353 * tst-rwlock7.c: Likewise.
8354 * tst-sem3.c: Likewise.
8355 * tst-spin2.c: Likewise.
8356 * tst-umask1.c: Likewise.
8357
69b35e86
UD
83582003-04-07 Ulrich Drepper <drepper@redhat.com>
8359
8360 * pthread_detach.c (pthread_detach): Fix test for invalid TID.
8361
c70ad7d7
UD
83622003-04-06 Ulrich Drepper <drepper@redhat.com>
8363
8364 * descr.h (struct pthread): Move cancelhandling member to the front.
8365
54e0138f
UD
83662003-04-05 Ulrich Drepper <drepper@redhat.com>
8367
8368 * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
8369 malloc_parent, and malloc_child statically.
8370 (__register_atfork_malloc): New function.
8371 (free_mem): Don't free any of the malloc_* variables on the list.
8372 * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
8373 Define HAVE_register_atfork_malloc.
8374
b22d701b
UD
83752003-04-04 Ulrich Drepper <drepper@redhat.com>
8376
8377 * sysdeps/pthread/createthread.c (create_thread): Add some more
8378 comments explaining when to set multiple_threads and when not.
8379
8380 * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
8381 THREAD_ATOMIC_BIT_SET if not already defined.
8382 * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
8383 THREAD_ATOMIC_BIT_SET:
8384 * sysdeps/x86_64/tls.h: Likewise.
8385 * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
8386 THREAD_ATOMIC_CMPXCHG_VAL.
8387 (_pthread_cleanup_pop_restore): Likewise.
8388 * cancellation.c (__pthread_enable_asynccancel): Likewise.
8389 (__pthread_enable_asynccancel_2): Likewise.
8390 (__pthread_disable_asynccancel): Likewise.
8391 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
8392 (__libc_disable_asynccancel): Likewise.
8393 * init.c (sigcancel_handler): Likewise.
8394 * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
8395 * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
8396
86246935
UD
83972003-04-03 Ulrich Drepper <drepper@redhat.com>
8398
8399 * init.c (sigcancel_handler): Don't set EXITING_BIT here.
8400 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
8401 * pthreadP.h (__do_cancel): Set EXITING_BIT here.
8402 * Makefile (tests): Add tst-cancel11.
8403 * tst-cancel11.c: New file.
8404
6b4686a5
UD
84052003-04-01 Ulrich Drepper <drepper@redhat.com>
8406
8407 * pthread_create.c (deallocate_tsd): Clear/free memory after the last
8408 round, not the first. Use specific_used flag instead of local
8409 found_nonzero variable. Use THREAD_[SG]ETMEM where possible.
8410 (__free_tcb): Don't call deallocate_tsd here.
8411 (start_thread): Call deallocate_tsd here.
8412 * pthread_setspecific.c: Set specific_used flag really only when
8413 needed.
0d73a73b 8414 * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
6b4686a5 8415 * tst-tsd3.c: New file.
0d73a73b 8416 * tst-tsd4.c: New file.
6b4686a5 8417
42b2395d
UD
84182003-03-31 Ulrich Drepper <drepper@redhat.com>
8419
211d90c5
UD
8420 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
8421 Use atomic_exchange_and_add instead of __lll_add.
8422 (__lll_mutex_timedlock): Likewise.
8423 Patch by Ian Wienand.
8424
84252003-03-24 Steven Munroe <sjmunroe@us.ibm.com>
8426
8427 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
8428 (SINGLE_THREAD_P): Fix typo.
8429 * tst-cancel-wrappers.sh: Handle '.'ed symbols.
8430
84312003-03-31 Ulrich Drepper <drepper@redhat.com>
8432
8433 * Makefile (tests): Add tst-align.
8434 * tst-align.c: New file.
8435 * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
211d90c5 8436
42b2395d
UD
8437 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
8438 function correctly.
8439
211d90c5
UD
8440 * tst-tsd2.c: Add casts to avoid warnings.
8441
163b180f
UD
84422003-03-30 Ulrich Drepper <drepper@redhat.com>
8443
8444 * descr.h (struct pthread): Move most often used elements to the front.
8445
ea473bad
UD
84462003-03-29 Ulrich Drepper <drepper@redhat.com>
8447
8448 * Makefile (libpthread-routines): Add pthread_atfork.
8449 (libpthread-static-only-routines): Add pthread_atfork.
8450
dd731d53
UD
84512003-03-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
8452
8453 * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
8454 of TLS_DTV_AT_TP.
8455 (INSTALL_DTV): Add parens.
8456 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
8457 Use passed descr instead of THREAD_SELF.
8458 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
8459 (__lll_mutex_timedlock_wait): Correct expected value after
8460 spurious wakeup.
8461 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
8462 Release lock before waking up the waiters.
8463 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
8464 criteria. Reorderstruct passed to cleanup handler. Fix
8465 handling of cancellation and failung pthread_mutex_unlock call.
8466 Use __pthread_enable_asynccancel_2 instead of
8467 __pthread_enable_asynccancel.
8468 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
8469 Return result of lock re-get if it fails.
8470 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
8471 for __pthread_cleanup_push.
8472 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
8473 completely broken rwlock implementation.
8474 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8475 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
8476 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
8477 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
8478 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8479 * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value. Use
8480 versioned_symbol macro.
8481 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
8482 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
8483
c75d02f0
UD
84842003-03-27 Ulrich Drepper <drepper@redhat.com>
8485
5f5004df
UD
8486 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
8487 __timer_helper_thread. Declare __start_helper_thread, __helper_once,
8488 and __helper_tid.
8489 (struct timer): Remove th and bar field.
8490 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
8491 debugging code. Create only one helper thread.
8492 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
8493 helper thread.
8494 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
8495 Renamed. Define statically. Use thread info from siginfo.
8496 (__helper_once): New variable.
8497 (__helper_tid): New variable.
8498 (__reset_helper_control): New function.
8499 (__start_helper_thread): New function.
8500
18d009ca
UD
8501 * pthread_create.c (start_thread): Don't use setjmp inside
8502 __builtin_expect to work around gcc bug.
8503
c75d02f0
UD
8504 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
8505 timer_delete syscall fails, but not with ENOSYS, set
8506 __no_posix_timers.
8507
8508 * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
8509 (timer_settime): Fix typo.
28cf3058
UD
8510 * sysdeps/unix/sysv/linux/timer_getoverr.c
8511 [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
c75d02f0 8512
049ac259
JJ
85132003-03-27 Jakub Jelinek <jakub@redhat.com>
8514
8515 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
8516 offset of cleanupbuf.__prev.
8517
f93d39dd
JJ
85182003-03-26 Jakub Jelinek <jakub@redhat.com>
8519
8520 * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
8521 of included file.
8522
f064e4c5
UD
85232003-03-26 Ulrich Drepper <drepper@redhat.com>
8524
8525 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
8526 NULL provide default definition to syscall.
8527
83e886a3
RM
85282003-03-25 Roland McGrath <roland@redhat.com>
8529
8530 * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
8531 (timer_id2ptr): Fix typo.
8532
09402f5b
UD
85332003-03-25 Ulrich Drepper <drepper@redhat.com>
8534
8535 * pthreadP.h: Define SIGCANCEL and SIGTIMER.
8536 * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
8537 * sysdeps/ia64/pthreaddef.h: Likewise.
8538 * sysdeps/powerpc/pthreaddef.h: Likewise.
8539 * sysdeps/s390/pthreaddef.h: Likewise.
8540 * sysdeps/sh/pthreaddef.h: Likewise.
8541 * sysdeps/x86_64/pthreaddef.h: Likewise.
8542 * init.c (__pthread_initialize_minimal): Block SIGTIMER.
8543 * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
8544 being changed.
8545 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
8546 SIGTIMER is not unblocked.
8547 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
8548 RT signal taken.
8549 * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
8550 be send.
8551 * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
8552 pass pointer through as ID.
8553 * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
8554 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
8555 * sysdeps/unix/sysv/linux/timer_create.c: New file.
8556 * sysdeps/unix/sysv/linux/timer_delete.c: New file.
8557 * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
8558 * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
8559 * sysdeps/unix/sysv/linux/timer_routines.c: New file.
8560 * sysdeps/unix/sysv/linux/timer_settime.c: New file.
8561 * sysdeps/unix/sysv/linux/ia64/Versions: New file.
8562 * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
8563 * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
8564 * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
8565 * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
8566 * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
8567 * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
8568 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
8569 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
8570 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
8571 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
8572 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
8573 * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
8574 * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
8575 * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
8576 * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
8577 * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
8578 * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
8579 * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
8580 * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
8581 * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
8582 * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
8583 * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
8584 * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
8585 * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
8586
8587 * pthreadP.h: Remove FRAME_LEFT definition.
8588 * cleanup.c (_pthread_cleanup_push): Don't check for reference to
8589 already left frame. Programs which have this problem are not POSIX
8590 compliant.
8591 * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
8592
5e826ab5
UD
85932003-03-24 Ulrich Drepper <drepper@redhat.com>
8594
8595 * sysdeps/pthread/tst-timer.c: Check return values of the
8596 functions we test.
8597
b910f788
RM
85982003-03-23 Roland McGrath <roland@redhat.com>
8599
3045a1fe
RM
8600 * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
8601 * tst-tls3mod.c: Likewise.
8602 * tst-tls1.c: Likewise.
8603 * tst-tls2.c: Likewise.
8604
85047fe3
RM
8605 * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
8606 undefined behavior.
8607
b910f788
RM
8608 * tst-join5.c (tf1, tf2): Add a cast.
8609
8610 * Makeconfig (includes): Append -I$(..)nptl to this variable.
8611
8612 * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
8613 Don't test anything.
8614 * tst-cond4.c: Likewise.
8615 * tst-cond6.c: Likewise.
8616 * tst-flock2.c: Likewise.
8617 * tst-mutex4.c: Likewise.
8618 * tst-rwlock4.c: Likewise.
8619 * tst-signal1.c: Likewise.
8620 * tst-spin2.c: Likewise.
8621 * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
8622
8623 * tst-mutex4.c: Use test-skeleton.c.
8624 * tst-spin2.c: Likewise.
8625 * tst-sysconf.c: Likewise.
8626 * tst-barrier2.c: Likewise.
8627 * tst-cond4.c: Likewise.
8628 * tst-cond6.c: Likewise.
8629 * tst-rwlock4.c: Likewise.
8630 * tst-unload.c: Likewise.
8631 * tst-flock2.c (do_test): Use return instead of exit.
8632
4baa087a
RM
86332003-03-22 Jakub Jelinek <jakub@redhat.com>
8634
8635 * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
8636
5a3ab2fc
UD
86372003-03-21 Ulrich Drepper <drepper@redhat.com>
8638
9f07eae2
UD
8639 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8640 (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
8641 instead of __lll_compare_and_swap.
8642 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
8643 Likewise.
8644 Removed definition if __lll_compare_and_swap.
8645
5a3ab2fc
UD
8646 * cancellation.c: Adjust for new form of compare&exchange macros.
8647 * cleanup_defer.c: Likewise.
8648 * init.c: Likewise.
8649 * libc-cancellation.c: Likewise.
8650 * old_pthread_cond_broadcast.c: Likewise.
8651 * old_pthread_cond_signal.c: Likewise.
8652 * old_pthread_cond_timedwait.c: Likewise.
8653 * old_pthread_cond_wait.c: Likewise.
8654 * pthread_cancel.c: Likewise.
8655 * pthread_create.c: Likewise.
8656 * pthread_detach.c: Likewise.
8657 * pthread_join.c: Likewise.
8658 * pthread_key_delete.c: Likewise.
8659 * pthread_setcancelstate.c: Likewise.
8660 * pthread_setcanceltype.c: Likewise.
8661 * pthread_timedjoin.c: Likewise.
8662 * pthread_tryjoin.c: Likewise.
8663 * sysdeps/pthread/createthread.c: Likewise.
8664
b1aea098
UD
86652003-03-20 Ulrich Drepper <drepper@redhat.com>
8666
8667 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
4baa087a 8668 Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
b1aea098
UD
8669 definitions. Replace uses with calls to atomic_* functions.
8670 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
8671 * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
8672 __lll_test_and_set calls with atomic_exchange_and_add and
8673 atomic_exchange calls respectively.
8674 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
8675 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
8676 * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
8677 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
8678 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
8679 * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
8680 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
8681
8682 * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
8683 returns the old value.
8684
100a7100
RM
86852003-03-20 Martin Schwidefsky <sky@mschwid3.boeblingen.de.ibm.com>
8686
8687 * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
8688 int for variable OLDVAL and correct inline assembler contraint.
8689 * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
8690 type int for variable OLD.
8691
8692 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
8693 only for s390-32.
8694 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
8695 (SINGLE_THREAD_P): Use global variable __local_multiple_threads
8696 instead of multiple_threads field in the TCB.
8697
95767b36
UD
86982003-03-19 Ulrich Drepper <drepper@redhat.com>
8699
4009bf40
UD
8700 * sysdeps/i386/i686/bits/atomic.h: Removed.
8701 * sysdeps/i386/i586/bits/atomic.h: Removed.
8702 * sysdeps/i386/i486/bits/atomic.h: Removed. Moved to glibc.
8703 * sysdeps/x86_64/bits/atomic.h: Removed. Moved to glibc.
8704 * sysdeps/s390/bits/atomic.h: Removed. Moved to glibc.
8705 * sysdeps/sh/bits/atomic.h: Removed. Moved to glibc.
8706 * sysdeps/ia64/bits/atomic.h: Removed. Moved to glibc.
8707 * sysdeps/powerpc/bits/atomic.h: Removed. Moved to glibc.
8708 * atomic.h: Removed. Moved to glibc.
8709
560a784f
UD
8710 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
8711 support for clock selection.
8712
95767b36
UD
8713 * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
8714 signalling waiters.
8715
043ad426
RM
87162003-03-18 Roland McGrath <roland@redhat.com>
8717
94659495
RM
8718 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
8719 Add __lll_rel_instr first. Add memory clobber.
8720 (lll_mutex_unlock): Use __lll_test_and_set.
8721 From Paul Mackerras <paulus@samba.org>.
8722
8723 * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
8724 unconditionally.
8725 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
8726 (SINGLE_THREAD_P): Add `header.' prefix.
8727 From Paul Mackerras <paulus@samba.org>.
8728
043ad426
RM
8729 * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
8730 pthread_timedjoin_np to ...
8731 (libpthread: GLIBC_2.3.3): ... here.
8732 (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
8733
8734 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
8735 Avoid shadowing VAL variable.
8736
8737 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
8738 New macro.
8739
86a9ee5e
UD
87402003-03-18 Ulrich Drepper <drepper@redhat.com>
8741
ac9e0aa1
UD
8742 * Makefile (tests): Add tst-cond11.
8743 * tst-cond11.c: New file.
8744
a14b373c
UD
8745 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
8746 struct passed to cleanup handler to eliminate one more
8747 instruction.
8748 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8749
24a49f38
UD
8750 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
8751 (pthrad_cond_t): Replace __unused field with __clock.
8752
8753 * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
8754 waken all waiters in cleanup handler.
8755 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8756 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8757
86a9ee5e
UD
8758 * pthread_condattr_getclock.c: New file.
8759 * pthread_condattr_setclock.c: New file.
8760 * sysdeps/pthread/pthread.h: Declare these new functions.
8761 * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
8762 * Makefile (libpthread-routines): Add the new functions.
8763 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
8764 Renamed field to value. Document use of the bits.
8765 * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
8766 change.
8767 * pthread_condattr_setpshared.c: Likewise.
d5cb8389 8768 * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
86a9ee5e
UD
8769 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
8770 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
8771 Add __clock field.
8772 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8773 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8774 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8775 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8776 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
8777 Implement clock selection.
8778 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
8779 * pthread-errnos.sym: Add ENOSYS.
8780 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
8781 _POSIX_CLOCK_SELECTION.
8782 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
8783
8784 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
8785 invalid .size directive.
8786
98054a05
RM
87872003-03-17 Roland McGrath <roland@redhat.com>
8788
8789 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
8790 Formatting tweaks.
8791
001bea71
UD
87922003-03-17 Ulrich Drepper <drepper@redhat.com>
8793
4773086e
UD
8794 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
8795 Use __lll_add instead of spelling it out. Use protected symbol names.
8796 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
8797 Use __lll_add.
8798 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
8799 Renamed from lll_compare_and_swap. Use new name where necessary.
8800 (__lll_add): Defined.
8801 (__lll_dec_if_positive): Defined.
8802 (__lll_test_and_set): Defined.
8803 * sysdeps/ia64/pthread_spin_init.c: Removed.
8804 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
8805 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
8806 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
8807 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
8808 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
8809 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
8810 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
001bea71
UD
8811 * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
8812 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
8813 __sync_lock_release_si.
8814 Patch by Jakub Jelinek.
8815
8816 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
8817 Fix timeout handling.
8818 (__lll_timedwait_tid): Likewise.
8819 (lll_unlock_wake_cb): Wake up other waiters if necessary.
8820 Patch by Jakub Jelinek.
8821
8822 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
8823
de4471dd
RM
88242003-03-17 Roland McGrath <roland@redhat.com>
8825
8826 PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
8827 * sysdeps/pthread/pthread_spin_init.c: New file.
8828 * sysdeps/pthread/pthread_spin_unlock.c: New file.
8829 * sysdeps/powerpc/Makefile: New file.
8830 * sysdeps/powerpc/pthread_spin_lock.c: New file.
8831 * sysdeps/powerpc/pthread_spin_trylock.c: New file.
8832 * sysdeps/powerpc/pthreaddef.h: New file.
8833 * sysdeps/powerpc/tcb-offsets.sym: New file.
8834 * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
8835 * sysdeps/powerpc/tls.h: New file.
8836 * sysdeps/powerpc/bits/atomic.h: New file.
8837 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
8838 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
8839 * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
98054a05 8840
de4471dd
RM
8841 * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
8842 * sysdeps/unix/sysv/linux/sem_post.c: New file.
8843 * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
8844 * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
8845 * sysdeps/unix/sysv/linux/sem_wait.c: New file.
8846 * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
8847 * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
8848 * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
8849 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
8850 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
8851 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
8852 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
8853 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
8854 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
8855 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
8856
8857 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
8858 not gettimeofday.
8859 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
8860 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
8861 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
8862 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
8863 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8864
5778033f
UD
88652003-03-17 Ulrich Drepper <drepper@redhat.com>
8866
8867 * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
8868 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
8869 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8870 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8871 Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
8872
796038f8
RM
88732003-03-16 Roland McGrath <roland@redhat.com>
8874
8875 * tst-fork4.c: Include <string.h>.
8876 * tst-signal2.c: Likewise.
8877 * tst-mutex5.c (do_test): exit -> return.
8878 * tst-mutex2.c: Include <stdlib.h>.
8879
51d0678c
UD
88802003-03-16 Ulrich Drepper <drepper@redhat.com>
8881
5778033f
UD
8882 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8883 (__lll_mutex_timedlock_wait): Correct expected value after
8884 spurious wakeup. Otherwise we would never wait again.
8885
b6e2f87a
UD
8886 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
8887 zone versus inline asm stupidity. Use correct instructions.
8888
51d0678c
UD
8889 * tst-rwlock6.c: Add some more status output.
8890
8112cc70
RM
88912003-03-15 Roland McGrath <roland@redhat.com>
8892
8893 * sysdeps/pthread/configure.in: New file.
8894 * sysdeps/pthread/configure: New file (generated).
8895
49773c19
UD
88962003-03-15 Ulrich Drepper <drepper@redhat.com>
8897
8898 * allocatestack.c (allocate_stack): Store the exact stack size of
8899 user allocated stacks.
8900
eec0ca9f
JJ
89012003-03-15 Jakub Jelinek <jakub@redhat.com>
8902
8903 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
8904 (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
8905 * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
8906 * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
8907 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
8908 Use `header.' prefix.
8909 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
8910
a87731e2
UD
89112003-03-15 Ulrich Drepper <drepper@redhat.com>
8912
8913 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
8914 __builtin_frame_address, use stack pointer.
8915
8916 * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
8917 instead of __builtin_frame_pointer.
8918
e22a221d
UD
89192003-03-14 Ulrich Drepper <drepper@redhat.com>
8920
92ed3daf
UD
8921 * tst-basic1.c (do_test): Add cast to avoid warning.
8922 * tst-basic2.c (do_test): Likewise.
8923
9b89567d
UD
8924 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
8925 amount of stack correction.
8926
e22a221d
UD
8927 * tst-fork4.c: Use test-skeleton.c.
8928
2e49caba
RM
89292003-03-14 Roland McGrath <roland@redhat.com>
8930
8931 * init.c: Fix typo "#eli" for "#else".
8932
415ef7d8
RM
89332003-03-14 Steven Munroe <sjmunroe@us.ibm.com>
8934
8935 * allocatestack.c (__stack_user): Use hidden_data_def.
8936 * pthread_create.c (__pthread_keys): Likewise.
8937
8938 * init.c [__powerpc__] (__NR_set_tid_address): Define it.
8939
52287505
RM
89402003-03-14 Roland McGrath <roland@redhat.com>
8941
415ef7d8
RM
8942 * tst-fork4.c: New file.
8943 * Makefile (tests): Add it.
8944
52287505
RM
8945 * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
8946 we always define the padding space.
8947 [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
8948 stopped supporting its own extensions fully.
8949 [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
8950 struct also called `header', so `header.multiple_threads' is the field
8951 name to use on all machines.
8952 * allocatestack.c (allocate_stack): Use `header.' prefix.
8953 * sysdeps/pthread/createthread.c (create_thread): Likewise.
8954 * pthread_create.c (__pthread_create_2_1): Likewise.
8955 * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
8956 (THREAD_SELF): Likewise.
8957 * sysdeps/x86_64/tls.h: Likewise.
8958 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
8959 (SINGLE_THREAD_P): Likewise.
8960 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
8961 (SINGLE_THREAD_P): Likewise.
8962 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
8963 (SINGLE_THREAD_P): Likewise.
8964
8965 * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
8966 value directly.
8967
c44bf9aa
UD
89682003-03-14 Ulrich Drepper <drepper@redhat.com>
8969
e22a221d
UD
8970 * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
8971 * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
8972
0eb18281
UD
8973 * pthread_create.c (start_thread): setjmp is expected to return 0.
8974
c44bf9aa
UD
8975 * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
8976 (THREAD_GETMEM_NC): Likewise.
8977
564cd8b6
UD
89782003-03-13 Ulrich Drepper <drepper@redhat.com>
8979
8980 * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
8981 and the size of the stack which must be allocated is a multiple,
8982 allocate one more page.
8983 * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
8984 MULTI_PAGE_ALIASING.
8985
6461e577
RM
89862003-03-13 Roland McGrath <roland@redhat.com>
8987
8988 * pthread_create.c (start_thread): Set EXITING_BIT after the
8989 event-reporting (and destructors), not before.
8990
b5ec5617
UD
89912003-03-13 Jakub Jelinek <jakub@redhat.com>
8992
6461e577
RM
8993 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
8994 lll_futex_wake): Declare register variables as long int instead of
8995 unsigned long int. Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
8996 Make syscall arguments clobbered by the syscall.
8997 (lll_futex_wait): Define using lll_futex_timed_wait.
8998
8999 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
9000 to void *.
9001
9002 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
9003 PPID if [! NDEBUG].
9004
9005 * allocatestack.c (nptl_ncreated): Only declare if
9006 COLORING_INCREMENT != 0.
9007
9008 * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
9009 (__libc_enable_asynccancel_2): Remove prototype.
9010
b5ec5617
UD
9011 * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
9012 ctid to match kernel.
9013
d0369fb8
UD
90142003-03-12 Ulrich Drepper <drepper@redhat.com>
9015
7588880f
UD
9016 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
9017 libc_multiple_threads.
9018 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
9019 __libc_multiple_threads to...
9020 * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here. New file.
9021
9022 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
9023 versioning.
9024 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
9025 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
9026
9027 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
9028 (__pthread_once_internal): Define.
9029
9030 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
9031 macros instead of .symver directly.
9032 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
9033 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
9034
d0369fb8
UD
9035 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
9036 * sysdeps/x86_64/tcb-offsets.sym: New file.
9037 * sysdeps/x86_64/Makefile: New file.
9038
9039 * sysdeps/i386/tcb-offsets.sym: Add SELF.
9040 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
9041 to access own pthread_t in TCB.
9042 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9043 Likewise.
9044 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9045 Likewise.
9046 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
9047
0bb2ac85
RM
90482003-03-12 Roland McGrath <roland@redhat.com>
9049
9050 * pthread-errnos.sym: New file.
9051 * Makefile (gen-as-const-headers): New variable, list that file.
9052 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
9053 header <pthread-errnos.h> instead of defining errno values here.
9054 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
9055 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
9056 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
9057 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
9058 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9059 Likewise.
9060 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9061 Likewise.
9062 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
9063 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9064 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
9065 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
9066 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
9067 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
9068 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
9069 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
9070 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9071 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
9072 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
9073 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
9074 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
9075 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
9076 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
9077 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9078 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
9079 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
9080 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
9081 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
9082 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
9083 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
9084 * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
9085 * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
9086 * sysdeps/sh/pthread_spin_trylock.S: Likewise.
9087 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
9088 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
9089
9090 * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
9091 CLONE_CHILD_SETTID worked.
9092
35e148cb
UD
90932003-03-12 Ulrich Drepper <drepper@redhat.com>
9094
d0369fb8
UD
9095 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
9096 file.
9097 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
9098 file.
9099
9100 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
9101 (pthread_cond_t): Add padding.
9102
da49194d
UD
9103 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
9104 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
9105 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
9106
35e148cb
UD
9107 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
9108 (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
9109 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
9110 (__pthread_rwlock_timedrdlock): Likewise.
9111 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
9112 (__pthread_rwlock_wrlock): Likewise.
9113 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
9114 (__pthread_rwlock_rdlock): Likewise.
9115
9116 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
9117
9118 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
9119 result of lock re-get if it fails.
9120
3e976b96
UD
91212003-03-11 Ulrich Drepper <drepper@redhat.com>
9122
5a03acfe
UD
9123 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
9124 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
9125 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
9126 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
9127 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9128 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
9129 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
9130 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
9131 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
9132 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
9133
9134 * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
9135 THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
9136
9137 * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
9138 Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
9139 * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
9140 (create_thread): Likewise.
9141 Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
9142 * init.c (__pthread_initialize_minimal_internal): Initialize
9143 __libc_multiple_threads_ptr if necessary.
9144 * pthreadP.h: Adjust prototype for __libc_pthread_init. Declare
9145 __pthread_multiple_threads and __libc_multiple_threads_ptr.
9146 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
9147 __libc_multiple_threads.
9148 (__libc_pthread_init): Return pointer to __libc_pthread_init if
9149 necessary.
9150
9151 * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
9152 (THREAD_SETMEM_NC): Likewise.
9153
9154 * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
9155 * sysdeps/x86_64/pthread_spin_trylock.S: New file.
9156 * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
9157 * sysdeps/x86_64/pthread_spin_unlock.S: New file.
9158
9159 * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
9160 Eliminate one entire instruction.
9161
32a589b1
UD
9162 * cancellation.c (__pthread_enable_asynccancel_2): New function.
9163 * pthreadP.h: Declare __pthread_enable_asynccancel_2.
9164 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
9165 (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
9166 instead of __pthread_enable_asynccancel.
9167 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
9168 (__pthread_cond_wait): Likewise.
9169 * sysdeps/pthread/pthread_cond_timedwait.c
9170 (__pthread_cond_timedwait): Likewise.
9171 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
9172
3e976b96
UD
9173 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
9174 (__condvar_cleanup): Wake up all waiters in case we got signaled
9175 after being woken up but before disabling asynchronous
9176 cancellation.
9177 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
9178 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
9179 (__condvar_cleanup): Likewise.
9180
9181 * init.c (__NR_set_tid_address): If already defined, don't redefine.
9182 Make it an error if architecture has no #if case. Add x86-64.
9183
9184 * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
9185 pt-initfini.s generation.
9186
9187 * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
9188 (TLS_INIT_TP): Fix typo.
9189
6c477888
UD
91902003-03-11 Jakub Jelinek <jakub@redhat.com>
9191
9192 * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
9193 3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
9194
9195 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
9196 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
9197 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
9198 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
9199 * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
9200 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
9201 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
9202 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
9203
ea694823
UD
92042003-03-11 Ulrich Drepper <drepper@redhat.com>
9205
6c477888
UD
9206 * sysdeps/pthread/pthread_cond_timedwait.c
9207 (__pthread_cond_timedwait): Return the result of the final
9208 locking. If it succeeds, the regular function return value.
9209
9210 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
9211 Return result of the final locking.
9212 * version.c (__nptl_main): Work around problems with the strange
9213 INTERNAL_SYSCALL macro on ppc32.
9214 * init.c (__pthread_initialize_minimal_internal): Unblock
9215 SIGCANCEL in case the parent blocked it.
9216 Reported by Paul Mackerras <paulus@samba.org>.
9217
ea694823
UD
9218 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
9219 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
9220 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
9221
b33e6163
RM
92222003-03-11 Jakub Jelinek <jakub@redhat.com>
9223
9224 * sysdeps/pthread/pthread_cond_timedwait.c
9225 (__pthread_cond_timedwait): Unlock and fail if
9226 __pthread_mutex_unlock_internal failed.
9227
9228 * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
9229 (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
9230 Use ARCH_CLONE.
9231 * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
9232 [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
9233 STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
9234 ALLOCATE_STACK): New macros.
9235 (TLS_TPADJ): New macro.
9236 (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
9237 (allocate_stack): Handle TLS_DTV_AT_TP and
9238 NEED_SEPARATE_REGISTER_STACK. Use TLS_TPADJ.
9239 * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
9240 Don't set PD->self.
9241 * init.c [__ia64__] (__NR_set_tid_address): Define.
9242
9243 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
9244 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
9245 * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
9246 * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
9247 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
9248 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
9249 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
9250 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
9251 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
9252 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
9253 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
9254 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
9255 * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
9256 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
9257 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
9258 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
9259 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
9260 * sysdeps/ia64/bits/atomic.h: New file.
9261 * sysdeps/ia64/Makefile: New file.
9262 * sysdeps/ia64/pthread_spin_init.c: New file.
9263 * sysdeps/ia64/pthread_spin_lock.c: New file.
9264 * sysdeps/ia64/pthread_spin_trylock.c: New file.
9265 * sysdeps/ia64/pthread_spin_unlock.c: New file.
9266 * sysdeps/ia64/pthreaddef.h: New file.
9267 * sysdeps/ia64/tcb-offsets.sym: New file.
9268 * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
9269 * sysdeps/ia64/tls.h: New file.
9270
9271 * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
9272 to syscall instead of no arguments.
9273
2b30b2e5
UD
92742003-03-10 Ulrich Drepper <drepper@redhat.com>
9275
db5f2fc9
UD
9276 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
9277 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
9278 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
9279 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
9280
9281 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
9282 unused code.
9283
6a4263e3
UD
9284 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
9285
3de7c2a9
UD
9286 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
9287 lowlevelbarrier.sym.
9288 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
9289 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
9290 Include lowlevelbarrier.h and don't define offsets locally.
6a4263e3 9291 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
3de7c2a9 9292
2a544d82
UD
9293 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
9294 (__lll_mutex_lock_wait): Reverse order of first two parameters.
9295 (__lll_mutex_timedlock_wait): Likewise.
9296 (lll_mutex_lock): Adjust asm for that.
9297 (lll_mutex_timedlock): Likewise. Mark cx, cc, r10 as clobbered.
9298 (lll_lock): Adjust asm for operand order change.
9299 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
9300 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
9301
ec06436c
UD
9302 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
9303 Reverse order of parameters.
9304 (__lll_timedwait_tid): Remove regparms attribute.
9305 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
9306 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
9307
3273832c
UD
9308 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
9309 (__lll_timedwait_tid): Remove one unnecessary instruction.
9310
51f32ab8
UD
9311 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
9312 __lll_mutex_timedlock_wait only for NOT_IN_libc.
9313 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
9314 lowlevelmutex.S.
9315
9316 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
9317 lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
9318 for NOT_IN_libc.
9319 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
9320 lowlevellock.S.
9321
fad48d9e
UD
9322 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
9323 LOCK is already defined. Don't define __lll_mutex_timedlock_wait
9324 for libc.so.
9325 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
9326 define LOCK here (if UP is not defined). The actual code is in
9327 lowlevelmutex.S.
9328
9356d063
UD
9329 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
9330 LOCK is already defined. Don't define lll_unlock_wake_cb and
9331 __lll_timedwait_tid for libc.so.
9332 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
9333 define LOCK here (if UP is not defined). The actual code is in
9334 lowlevellock.S.
9335
ebf0cbc5 9336 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
106f6f9d
UD
9337 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
9338 * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
9339 instead of lowlevelsem.h.
9340 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
9341 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
9342 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
0be8ee21 9343
c915e5ad
UD
9344 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
9345 lowlevelrwlock.sym.
9346 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
9347 * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
146fa1ee 9348 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
c915e5ad 9349
4c3c2e8a
UD
9350 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
9351 register loading.
9352 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
9353 last changed. D'oh.
9354
2b30b2e5
UD
9355 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
9356
9357 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
9358 of __libc_locking_needed.
9359 (lll_trylock): Initialize %eax to zero.
9360
2b30b2e5
UD
9361 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
9362 pthread_cond_t definition.
9363
e48f9638
RM
93642003-03-10 Roland McGrath <roland@redhat.com>
9365
9366 * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
9367 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
9368 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
9369 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
9370 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
9371
9372 * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
9373 Instead of setting PD->multiple_threads, set globals
9374 __pthread_multiple_threads and __libc_multiple_threads.
9375 * sysdeps/pthread/createthread.c (create_thread): Likewise.
9376 * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
9377 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
9378
9379 * descr.h (struct pthread): Conditionalize first member on
9380 [!TLS_DTV_AT_TP]. Replace the `header' member with an anonymous union
9381 containing an anonymous tcbhead_t. Move `list' member out.
9382 [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
9383 * allocatestack.c: Remove use of `header.data.' prefix.
9384 * pthread_create.c: Likewise.
9385 * init.c (__pthread_initialize_minimal_internal): Likewise.
9386 * sysdeps/pthread/createthread.c (create_thread): Likewise.
9387 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
9388 (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
9389 * sysdeps/x86_64/tls.h: Likewise.
9390 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
9391 (SINGLE_THREAD_P): Likewise.
9392 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
9393 (SINGLE_THREAD_P): Likewise.
9394 * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
9395 * sysdeps/s390/tls.h (tcbhead_t): Likewise.
9396
c37cae9e
UD
93972003-03-09 Ulrich Drepper <drepper@redhat.com>
9398
d38c777e
RM
9399 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
9400
7b44a5e0 9401 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
2b30b2e5 9402 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
7b44a5e0 9403
c2e5e085
UD
9404 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
9405 leftovers from the ia32 code.
9406
9407 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
9408 memory load.
9409 (clear_once_control): Don't load %esi.
9410
9411 * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
9412 handling.
9413
9414 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
9415
cd4b2a55
UD
9416 * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
9417 * sysdeps/unix/sysv/linux/createthread.c: ...here.
9418
c37cae9e
UD
9419 * Makefile (tests): Add tst-cond10.
9420 * tst-cond10.c: New file.
9421
d130a341
UD
94222003-03-08 Ulrich Drepper <drepper@redhat.com>
9423
ccf1d573
UD
9424 * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
9425 * tst-signal3.c (do_test): Likewise.
9426 * tst-sem5.c (do_test): Likewise.
9427 * tst-kill6.c (do_test): Likewise.
9428 * tst-tls3.c (do_test): Likewise. Include <errno.h>.
9429
9430 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
9431 of inc/dec.
9432 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
9433 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
9434 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
9435 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
9436 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
9437 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
9438 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9439 Likewise.
9440 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9441 Likewise.
9442 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
9443 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9444 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9445 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
9446 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
9447 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
9448 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
9449 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
9450
d130a341
UD
9451 * allocatestack.c (allocate_stack): If mprotect() fails free the
9452 TLS memory.
9453
bc6389ad
UD
94542003-03-07 Ulrich Drepper <drepper@redhat.com>
9455
41d4d223
UD
9456 * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
9457
9458 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
9459 lll_wake_tid. This was used only to work around kernel limits in
9460 the early days.
9461 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
9462 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
9463 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
9464 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
9465
bc6389ad
UD
9466 * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
9467 (__pthread_initialize_minimal_internal): Change initialization of
9468 __static_tls_align_m1 appropriately.
9469 * pthreadP.h (__static_tls_align_m1): Renamed from
9470 __static_tls_align.
9471 * allocatestack.c (allocate_stack): Use __static_tls_align_m1
9472 instead of __static_tls_align-1.
9473
cc775edf
UD
94742003-03-04 Ulrich Drepper <drepper@redhat.com>
9475
0de28d5c 9476 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
6245b6ae 9477
518b5308
UD
9478 * pthread_create.c: Define __pthread_keys using nocommon
9479 attribute, not by placing it explicitly in bss.
9480 Remove DEFINE_DEALLOC definition. Not needed anymore.
9481
9482 * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
9483 Use it in mmap call to allocate stacks.
9484
9485 * sysdeps/pthread/createthread.c (create_thread): Fix comment.
9486
cc775edf
UD
9487 * pthread_create.c (start_thread): Use THREAD_SETMEM to store
9488 result of the thread function.
9489
4f6f0a8f
UD
94902003-03-03 Ulrich Drepper <drepper@redhat.com>
9491
f04a2721
UD
9492 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed. The generic
9493 version is just fine.
9494
4f6f0a8f
UD
9495 * sysdeps/unix/sysv/linux/libc_pthread_init.c
9496 (__pthread_child_handler): Renamed from pthread_child_handler,
9497 exported, and marked hidden. Change all users.
9498 * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
9499 free __pthread_child_handler from child list.
9500
7ce5c164
UD
95012003-03-03 Martin Schwidefsky <schwidefsky@de.ibm.com>
9502
9503 * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
9504
9505 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
9506 Fix handling of cancellation and failing pthread_mutex_unlock call.
9507 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
9508 (__pthread_cond_wait): Likewise.
9509
9510 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
9511 (pthread_rwlock_timedrdlock): Fix clobber of result variable by
9512 lll_futex_timed_wait call.
9513 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
9514 (pthread_rwlock_timedwrlock): Likewise.
9515
9516 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
9517 Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
9518 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
9519
9520 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
9521 check of lll_futex_wake return value.
9522
ea6a015b
RM
95232003-03-03 Roland McGrath <roland@redhat.com>
9524
9525 * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
9526
9527 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
9528 Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
9529 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
9530
4adacf57
UD
95312003-03-02 Ulrich Drepper <drepper@redhat.com>
9532
1be3d664
UD
9533 * sysdeps/pthread/timer_create.c (timer_create): Return correct
9534 error for CPU clocks.
9535
885bafa1
UD
9536 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
9537 _POSIX_MONOTONIC_CLOCK.
9538 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
9539
4adacf57
UD
9540 * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
9541 recent kernels.
9542
86bfff4d
UD
95432003-03-01 Ulrich Drepper <drepper@redhat.com>
9544
9545 * descr.h (struct pthread): Move cleanup field to the front.
9546
d1149385
RM
95472003-03-01 Roland McGrath <roland@redhat.com>
9548
9549 * sem_open.c (sem_open): Braino fix.
9550
bd8bb78b
UD
95512003-03-01 Ulrich Drepper <drepper@redhat.com>
9552
748bec08
UD
9553 * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
9554 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
9555 __pthread_cleanup_pop functionality.
9556 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9557
bd8bb78b
UD
9558 * descr.h (struct pthread): Move tid field to the front now that
9559 it is often used.
9560
9561 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
9562 (__lll_mutex_timedlock_wait): Remove.
9563 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
9564 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
9565 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
9566 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
9567 (lll_unlock_wake_cb): Don't save and restore %esi.
9568 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
9569 %esi.
9570 (__lll_timedwait_tid): Add alignment.
9571 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
9572 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
9573 %esi.
9574 (__lll_timedwait_tid): Removed.
9575 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
9576 (__pthread_cond_broadcast): Don't save, load, and restore %esi.
9577 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
9578 (pthread_barrier_wait): Don't save, load, and restore %esi for
9579 last thread.
9580 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
9581 (__pthread_cond_signal): Don't save, load, and restore %esi.
9582 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
9583 (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
9584 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
9585 Don't save, load, and restore %esi.
9586
d2637c70
UD
95872003-02-27 Ulrich Drepper <drepper@redhat.com>
9588
567fb22a
UD
9589 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
9590 Release lock before waking up the waiters.
9591
427f5fa1
UD
9592 * tst-exit1.c (do_test): Don't start more than one thread in parallel.
9593
a2d83cfb
UD
9594 * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
9595 (reader_thread): Likewise.
9596
d2637c70
UD
9597 * sysdeps/pthread/pthread_rwlock_unlock.c
9598 (__pthread_rwlock_unlock): Release internal lock early. Don't try
9599 to wake up readers if there are none.
9600
9601 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
9602 Release internal lock before wake threads.
9603
b1531183
UD
96042003-02-26 Ulrich Drepper <drepper@redhat.com>
9605
dbf6131c
UD
9606 * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
9607 * tst-rwlock8.c: Initialize lock with INIT. Allow INIT to be
9608 predefined.
9609 * tst-rwlock9.c: Likewise.
9610 * tst-rwlock10.c: New file.
9611 * tst-rwlock11.c: New file.
9612
695799fe
UD
9613 * Makefile (tests): Add tst-dlsym1.
9614 * tst-dlsym1.c: New file.
9615
b1531183
UD
9616 * init.c (__pthread_initialize_minimal_internal): Set
9617 GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
9618 * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
9619
3724f268
UD
96202003-02-24 Ulrich Drepper <drepper@redhat.com>
9621
3857ca78
UD
9622 * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
9623
80d80779
UD
9624 * tst-cond2.c: Fix sychronization with child.
9625
86371308
UD
9626 * tst-rwlock8.c (reader_thread): Remove unused variable.
9627
ffeb4481
UD
9628 * Makefile: Add rules to build and run tst-tls3.
9629 * tst-tls3.c: New file.
9630 * tst-tls3mod.c: New file.
9631
3724f268
UD
9632 * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
9633 * tst-rwlock8.c: New file.
9634 * tst-rwlock9.c: New file.
9635 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
9636 complete broken rwlock implementation.
9637 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9638 Likewise.
9639 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9640 Likewise.
9641 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
9642 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
18a53579
UD
9643 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
9644 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
9645 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
9646 * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
9647 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
3724f268 9648
8915cc40
RM
96492003-02-23 Roland McGrath <roland@redhat.com>
9650
9651 * Makefile (nptl-version): Change regexp so case sensitivity is ok.
9652
fd1a0d0c
UD
96532003-02-23 Ulrich Drepper <drepper@redhat.com>
9654
ecf28959
UD
9655 * Makefile (tests): Add tst-context1.
9656 * tst-context1.c: New file.
9657
5e47b76b
UD
9658 * Makefile (tests): Add tst-tls1 and tst-tls2.
9659 * tst-tls1.c: New file.
9660 * tst-tls2.c: New file.
9661
5a6bbb41
UD
9662 * libc-cancellation.c (__libc_enable_asynccancel): Correct test
9663 for failed cmpxchg.
9664
fd1a0d0c
UD
9665 * pthread_create.c (start_thread): Set EXITING_BIT early.
9666
9667 * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
9668 (THREAD_GETMEM_NC): Likewise.
9669
757f9fcb
UD
96702003-02-22 Ulrich Drepper <drepper@redhat.com>
9671
b1b8e747
UD
9672 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
9673 off 3 more bytes by using offset-less instructions when possible.
9674
c780aa21 9675 * Makefile: Add dependency for $(objpfx)version.d.
757f9fcb
UD
9676
9677 * eintr.c (eintr_source): Add unnecessary return but the compiler
9678 insists.
9679
9680 * tst-kill3.c: Include <unistd.h>.
9681
5148559c
RM
96822003-02-21 Roland McGrath <roland@redhat.com>
9683
9684 * pthread_create.c (start_thread): Call __libc_thread_freeres.
9685
ab2d98e3
UD
96862003-02-21 Ulrich Drepper <drepper@redhat.com>
9687
71028edd
UD
9688 * Makefile (tests): Add tst-eintr1.
9689 (distribute): Add eintr.c.
9690 * tst-eintr1.c: New file.
9691 * eintr.c: New file.
9692
e814f748
UD
9693 * pthread_cancel.c (pthread_cancel): Use tkill directly.
9694
9695 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
9696 Disallow sending SIGCANCEL.
9697
ab2d98e3 9698 * Makefile (tests): Remove tst-basic7. Add tst-kill1, tst-kill2,
9c03686d 9699 tst-kill3, tst-kill4, tst-kill5, tst-kill6.
e814f748
UD
9700 * tst-kill1.c: New file.
9701 * tst-kill2.c: New file.
9702 * tst-kill3.c: New file.
9703 * tst-kill5.c: New file.
9c03686d 9704 * tst-kill6.c: New file.
e814f748
UD
9705 * tst-basic7.c: Renamed to...
9706 * tst-kill4.c: ...this.
ab2d98e3 9707
59fed0e2
RM
97082003-02-21 Roland McGrath <roland@redhat.com>
9709
9710 * Makefile (install-lib-ldscripts): New variable.
9711
49dc759f
UD
97122003-02-21 Ulrich Drepper <drepper@redhat.com>
9713
8c2e9a29
UD
9714 * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
9715 * pthread_cancel.c: Use INVALID_TD_P.
9716 * pthread_detach.c: Likewise.
9717 * pthread_getschedparam.c: Likewise.
9718 * pthread_setschedparam.c: Likewise.
9719 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
9720 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
9721 * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
9722 * pthread_timedjoin.c: Likewise.
9723
9724 * tst-basic7.c: Include <signal.h>.
9725
49dc759f
UD
9726 * pthread_join.c (pthread_join): Limited checking for invalid
9727 descriptors.
9728 * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
9729
df5803bf
UD
97302003-02-20 Ulrich Drepper <drepper@redhat.com>
9731
c5acd3d7
UD
9732 * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
9733 beginning of the loop. Clear the entire first block of TSD.
df5803bf
UD
9734 * Makefile (tests): Add tst-key4.
9735 * tst-key4.c: New file.
9736
729924a0
UD
97372003-02-18 Ulrich Drepper <drepper@redhat.com>
9738
2f7dc594
UD
9739 * Makefile (tests): Add tst-basic7.
9740 * tst-basic7.c: New file.
9741
ba25bb0f
UD
9742 * pthread_create.c (deallocate_tsd): Mark as internal_function.
9743 Add some more __builtin_expect.
9744
12fd3c5f 9745 * pthreadP.h: Define dummy version of DEBUGGING_P.
729924a0 9746
5430d926
UD
97472003-02-17 Ulrich Drepper <drepper@redhat.com>
9748
b0db7fbe
UD
9749 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
9750 _POSIX_THREAD_PRIORITY_SCHEDULING.
9751 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
9752 _XOPEN_REALTIME_THREADS.
9753 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
9754
9755 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
9756 kernel returns EINVAL for PID <= 0, work around it.
9757
ecfda9bd
UD
9758 * Makefile (tests): Add tst-signal5.
9759 * tst-signal5.c: New file.
9760
7d78ab99
UD
9761 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
9762 and LOGIN_NAME_MAX.
9763
371a2972
UD
9764 * tst-cancel1.c (tf): Block all signals.
9765
5430d926
UD
9766 * Makefile (tests): Add tst-basic6.
9767 * tst-basic6.c: New file.
9768
9769 * tst-basic1.c: Add test for process ID.
9770
9771 * Makefile (tests): Add tst-cancel10.
9772 * tst-cancel10.c: New file.
9773
9774 * Makefile (tests): Add tst-signal4.
9775 * tst-signal4.c: New file.
9776
9777 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
9778 __sigismember instead of sigismember. Add __builtin_expect.
9779
1564916a
UD
97802003-02-16 Ulrich Drepper <drepper@redhat.com>
9781
179ff175
UD
9782 * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
9783 pthread_setcancelstate, and pthread_rwlock_setpshared.
9784
e4335f9a
UD
9785 * tst-cancel7.c (do_test): Make sure the pid file exists before
9786 canceling the thread.
9787
0a37669a
UD
9788 * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
9789 pthread_rwlock_timedrdlock tests.
9790 * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
9791 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9792 Check for invalid tv_nsec field.
9793 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9794 Likewise.
9795
9796 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
9797 recursive mutex of overflow.
9798
9799 * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
9800
e4335f9a 9801 * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
1564916a
UD
9802 going into an endless loop.
9803 * Makefile (tests): Add tst-cancel9.
9804 * tst-cancel9.c: New file.
9805
9806 * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
9807
b270b548
UD
98082003-02-15 Ulrich Drepper <drepper@redhat.com>
9809
1c82b97f
UD
9810 * tst-mutex5.c (do_test): Add more timedlock tests.
9811
b2f05465 9812 * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
c3bb9ee1
UD
9813 * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
9814
e798b60f
UD
9815 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
9816 use INLINE_SYSCALL. Error number is returned, not -1.
9817
90491dc4
UD
9818 * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
9819 and __deallocate_stack with internal_function.
9820 * pthread_create.c: Adjust definitions appropriately.
9821 * allocatestack.c: Likewise.
9822
9823 * pthread_join.c: Add one more __builtin_expect.
9824 * pthread_timedjoin.c: Likewise.
9825
9826 * pthread_getspecific.c (__pthread_getspecific): Clear data->data
9827 not data of sequence number does not match.
9828 Add one __builtin_expect.
9829
c6247c9d
UD
9830 * Makefile (tests): Add tst-clock1.
9831 * tst-clock1.c: New file.
9832
b270b548
UD
9833 * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
9834 negative arguments.
9835 * Makefile (tests): Add tst-basic5.
9836 * tst-basic5.c: New file.
9837
700bf7af
UD
98382003-02-14 Ulrich Drepper <drepper@redhat.com>
9839
757de559
UD
9840 * Makefile (tests): Add tst-basic4.
9841 * tst-basic4.c: New file.
9842
47202270
UD
9843 * pthreadP.h: Add declaraction for __nptl_nthreads.
9844 * pthread_create.c: Define __nptl_nthreads
9845 (start_thread): Increment __nptl_nthreads at beginning. Decrement
b270b548 9846 after thread is done. If then zero, call exit(0).
47202270
UD
9847 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
9848 Add ptr_nthreads. Define HAVE_PTR_NTHREADS.
9849 * init.c (pthread_functions): Initialize ptr_nthreads.
9850 * allocatestack.c (nptl_nthreads): Remove definition and all uses.
9851 (__reclaim_stacks): Decrement __nptl_nthreads.
9852 * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
9853 Define.
9854 * Makefile (tests): Add tst-basic3.
9855 * tst-basic3.c: New file.
9856
e320ef46
UD
9857 * descr.h: Define CANCELING_BIT and CANCELING_BITMASK. Introduce
9858 after CANCELTYPE_BIT, move the other bits up. Update CANCEL_RESTMASK.
9859 * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
9860 * pthread_cancel.c (pthread_cancel): Likewise. Also set CANCELING_BIT
9861 if asynchronous canceling is enabled.
9862 * pthread_join.c (pthread_join): When recognizing circular joins,
9863 take into account the other thread might be already canceled.
9864 * Makefile (tests): Add tst-join5.
9865 * tst-join5.c: New file.
9866
700bf7af
UD
9867 * Makefile (tests): Add tst-join4.
9868 * tst-join4.c: New file.
9869
98702003-02-13 Ulrich Drepper <drepper@redhat.com>
9871
9872 * tst-cond4.c (main): Add test of pthread_attr_getpshared.
9873
dac0f772
UD
98742003-02-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
9875
9876 * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
9877 THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
9878 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
9879 warning.
9880 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
9881 to avoid warning.
9882 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
9883 error if lll_futex_wake failed.
9884
e8cda341
UD
98852003-02-13 Ulrich Drepper <drepper@redhat.com>
9886
a7720b5e
UD
9887 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
9888 handling of cancellation and failung pthread_mutex_unlock call.
9889 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9890 * Makefile (tests): Add tst-cond8 and tst-cond9.
9891 * tst-cond8.c: New file.
9892 * tst-cond9.c: New file.
9893
a1ea4c06
UD
9894 * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
9895
9896 * sysdeps/pthread/pthread.h: Add missing initializers. Protect
9897 non-standard initializers with __USE_GNU.
9898
e8cda341
UD
9899 * Makefile (tests): Add tst-cleanup3.
9900 * tst-cleanup3.c: New file.
9901
2067577c
UD
99022003-02-12 Ulrich Drepper <drepper@redhat.com>
9903
89e78a95
UD
9904 * Makefile (tests): Add tst-attr1 and tst-attr2.
9905 * tst-attr1.c: New file.
9906 * tst-attr2.c: New file.
9907
dfdd294a
UD
9908 * Makefile: Add rules to build and run tst-atfork2 test.
9909 * tst-atfork2.c: New file.
9910 * tst-atfork2mod.c: New file.
9911
9912 * sysdeps/unix/sysv/linux/unregister-atfork.c
9913 (__unregister_atfork): Free the memory allocated for the handlers
9914 after removing them from the lists.
9915
9916 * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
9917 cleanup function.
9918
9919 * tst-atfork1.c (do_test): Wait for the child we forked.
9920 Report error in child.
9921
9922 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
9923
2067577c
UD
9924 * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
9925
2a8a8a84
UD
99262003-02-10 Ulrich Drepper <drepper@redhat.com>
9927
d9dd121e
UD
9928 * Makefile (tests): Add tst-cancel8.
9929 * tst-cancel8.c: New file.
9930
2a8a8a84
UD
9931 * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
9932 clearing of control variable.
defd1870 9933 * Makefile (tests): Add tst-once3 and tst-once4.
2a8a8a84 9934 * tst-once3.c: New file.
defd1870 9935 * tst-once4.c: New file.
2a8a8a84 9936
a54e8d33
UD
99372003-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
9938
9939 * sysdeps/sh/Makefile: New file.
9940 * sysdeps/sh/bits/atomic.h: New file.
9941 * sysdeps/sh/pthread_spin_init.c: New file.
9942 * sysdeps/sh/pthread_spin_lock.c: New file.
9943 * sysdeps/sh/pthread_spin_trylock.S: New file.
9944 * sysdeps/sh/pthread_spin_unlock.S: New file.
9945 * sysdeps/sh/pthreaddef.h: New file.
9946 * sysdeps/sh/tcb-offsets.sym: New file.
9947 * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
9948 * sysdeps/sh/tls.h: New file.
9949 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
9950 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
9951 * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
9952 * sysdeps/unix/sysv/linux/sh/fork.c: New file.
9953 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
9954 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
9955 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
9956 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
9957 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
9958 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
9959 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
9960 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
9961 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
9962 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
9963 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
9964 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
9965 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
9966 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
9967 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
9968 * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
9969 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
9970 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
9971 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
9972 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
9973 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
9974 * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
9975 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
9976 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
9977 * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
9978 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
9979
696e556e
UD
99802003-02-08 Ulrich Drepper <drepper@redhat.com>
9981
9982 * tst-cond2.c: Rearrange code to not rely on behavior undefined
9983 according to POSIX.
9984
9985 * tst-basic2.c (do_test): Lock mutex before creating the thread.
9986
fef710d6
UD
99872003-02-07 Ulrich Drepper <drepper@redhat.com>
9988
c6180643
UD
9989 * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
9990 (TLS_GET_FS): New #define.
9991 (TLS_SET_FS): New #define.
9992 Correct value of __NR_set_thread_area.
9993
fef710d6
UD
9994 * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
9995
11090a99
UD
99962003-02-06 Ulrich Drepper <drepper@redhat.com>
9997
65c68990
UD
9998 * Makefile (tests): Add tst-popen1.
9999 * tst-popen1.c: New file.
10000
11090a99
UD
10001 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
10002 but inactive generalization.
10003 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10004 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
10005 Minor optimization, remove one instruction.
10006 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
10007
a88c9263
UD
100082003-02-04 Martin Schwidefsky <schwidefsky@de.ibm.com>
10009
10010 * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
10011
100122003-01-31 Martin Schwidefsky <schwidefsky@de.ibm.com>
10013
10014 * init.c (__NR_set_tid_address): Add #ifdef for s390.
10015 * sysdeps/pthread/pthread_barrier_wait.c: New file.
10016 * sysdeps/pthread/pthread_cond_broadcast.c: New file.
10017 * sysdeps/pthread/pthread_cond_signal.c: New file.
10018 * sysdeps/pthread/pthread_cond_timedwait.c: New file.
10019 * sysdeps/pthread/pthread_cond_wait.c: New file.
10020 * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
10021 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
10022 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
10023 * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
10024 * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
10025 * sysdeps/s390/Makefile: New file.
10026 * sysdeps/s390/bits/atomic.h: New file.
10027 * sysdeps/s390/pthread_spin_init.c: New file.
10028 * sysdeps/s390/pthread_spin_lock.c: New file.
10029 * sysdeps/s390/pthread_spin_trylock.c: New file.
10030 * sysdeps/s390/pthread_spin_unlock.c: New file.
10031 * sysdeps/s390/pthreaddef.h: New file.
10032 * sysdeps/s390/tcb-offsets.sym: New file.
10033 * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
10034 * sysdeps/s390/tls.h: New file.
10035 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
10036 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
10037 * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
10038 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
10039 * sysdeps/unix/sysv/linux/s390/fork.c: New file.
10040 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
10041 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
10042 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
10043 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
10044 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
10045 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
10046 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
10047 * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
10048 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
10049 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
10050 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
10051 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
10052 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
10053 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
10054 * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
10055 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
10056 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
10057 * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
10058
6f1cff95
UD
100592003-02-04 Ulrich Drepper <drepper@redhat.com>
10060
ec609a8e
UD
10061 * atomic.h: Add a couple more default implementations.
10062 (atomic_compare_and_exchange_acq): Use
d45e8740
UD
10063 __arch_compare_and_exchange_32_acq in return value definition. It
10064 always exists.
10065 (atomic_bit_set): Renamed from atomic_set_bit.
0289bef9 10066 Add missing atomic_ prefixes.
e3ec8904 10067
6f1cff95
UD
10068 * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
10069 thread library is available, use correct value to mark initialized
10070 once variable.
10071
4f088329
UD
100722003-02-03 Ulrich Drepper <drepper@redhat.com>
10073
6f1cff95
UD
10074 * allocatestack.c (allocate_stack): Use __getpagesize instead of
10075 __sysconf to determine pagesize.
10076
3e4fc359 10077 * pthread_create.c: Include <atomic.h>.
4f088329
UD
10078 * allocatestack.c (allocate_stack): Implement coloring of the
10079 allocated stack memory. Rename pagesize to pagesize_m1. It's the
10080 size minus one. Adjust users.
3e4fc359 10081 * sysdeps/i386/i686/Makefile: New file.
4f088329 10082
2f42e8be
UD
100832003-02-02 Ulrich Drepper <drepper@redhat.com>
10084
4301f7e2
UD
10085 * allocatestack.c: Improve comment throughout the file.
10086
2f42e8be 10087 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
a37818b3 10088 (__lll_lock_wait): Add branch prediction.
2f42e8be
UD
10089 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
10090 (__lll_lock_wait): Likewise.
10091 (lll_unlock_wake_cb): Removed.
10092
4a7d6545
UD
100932003-01-31 Ulrich Drepper <drepper@redhat.com>
10094
10095 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
10096 _POSIX_THREAD_PRIORITY_SCHEDULING.
10097
886d5973
UD
100982003-01-30 Jakub Jelinek <jakub@redhat.com>
10099
10100 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
10101 Fix return type of ptr___pthread_getspecific.
10102
e474ca78
UD
101032003-01-29 Ulrich Drepper <drepper@redhat.com>
10104
10105 * Makefile (tests): Add tst-umask1.
10106 (tst-umask1-ARGS): Define.
10107 * tst-umask1.c: New file.
10108
e6ebd2e4
UD
101092003-01-28 Ulrich Drepper <drepper@redhat.com>
10110
6cf26f41
UD
10111 * Makefile (libpthread-routines): Remove lowlevelrwlock. Add
10112 pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
10113 pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
10114 pthread_rwlock_unlock.
10115 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
10116 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
10117 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
10118 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
10119 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10120 New file.
10121 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
10122 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10123 New file.
10124 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
10125 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
10126 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
10127 New file.
10128 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
10129 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
10130 New file.
10131 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
10132 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
10133 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
10134 New file.
10135 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
10136 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
10137 New file.
10138 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
10139
1d087a7e
UD
10140 * Makefile (libpthread-routines): Remove lowlevelcond and
10141 lowlevelsem. Add sem_wait, sem_trywait, sem_timedwait, sem_post,
10142 pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
10143 and pthread_cond_broadcast.
4a99d160
UD
10144 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
10145 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
10146 * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
10147 * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
10148 * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
10149 * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
10150 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
10151 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
10152 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
10153 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
10154 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
10155 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
10156 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
10157 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
10158 * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
10159 * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
10160 * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
10161 * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
10162 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
10163 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
10164 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
10165 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
10166 * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
10167 * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
10168 * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
10169 * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
10170 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
10171 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
10172 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
10173 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
10174 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
1d087a7e 10175
e6ebd2e4
UD
10176 * sysdeps/unix/sysv/linux/i386/createthread.c: Define
10177 PREPARE_CREATE and TLS_VALUE with x86-specific bits. All the rest
10178 of the code is moved to ...
10179 * sysdeps/pthread/createthread.c: ...here. New file.
10180
a15698cb
UD
101812003-01-27 Ulrich Drepper <drepper@redhat.com>
10182
0566b130
UD
10183 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
10184 (__new_sem_post): Clear %eax before returning.
10185 Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
10186
e6fb8846
UD
10187 * Makefile (tests): Add tst-cleanup2.
10188 * tst-cleanup2.c: New file.
10189
a15698cb
UD
10190 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
10191 Interpret first parameter correctly.
10192
8824b0a1
UD
101932003-01-17 Ulrich Drepper <drepper@redhat.com>
10194
10195 * Makefile (headers): Add bits/semaphore.h.
10196
850dcfca
UD
101972003-01-16 Jakub Jelinek <jakub@redhat.com>
10198
10199 * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
10200 if not SHARED.
10201
574b892e
UD
102022003-01-14 Ulrich Drepper <drepper@redhat.com>
10203
a8d87c92
UD
10204 * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
10205 must be used and mapping failed.
10206 Reported by Luke Elliott <luke.elliott@activfinancial.com>.
10207
574b892e
UD
10208 * Makefile (CFLAGS-pthread_self.os): Define this, not
10209 CFLAGS-pthread_self.c.
10210
fb48047a
UD
102112003-01-13 Ulrich Drepper <drepper@redhat.com>
10212
47805511
UD
10213 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
10214 lll_unlock_wake_cb.
10215
fb48047a
UD
10216 * Makefile (libpthread-routines): Add version. Add rules to build
10217 version.os and banner.h.
10218 * version.c: New file.
10219
115bb61d
UD
102202003-01-13 Jakub Jelinek <jakub@redhat.com>
10221
10222 * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
10223 the alias unconditional.
10224 * pthread_mutex_unlock.c (__pthread_mutex_unlock_internal): Likewise.
10225
102262003-01-13 Ulrich Drepper <drepper@redhat.com>
10227
10228 * Makefile (CFLAGS-pthread_self.c): New definition.
10229
6aca81bb
UD
102302003-01-06 Jakub Jelinek <jakub@redhat.com>
10231
10232 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
10233 INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
10234 * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
10235 * init.c (__pthread_initialize_minimal_internal): Likewise.
10236
e9c7764e
UD
102372003-01-07 Jakub Jelinek <jakub@redhat.com>
10238
b5facfda
UD
10239 * pthreadP.h (__pthread_cond_timedwait): Add prototype.
10240
e9c7764e
UD
10241 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
10242 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
10243 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
10244 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
10245 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
10246 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
10247
bef1e42f
UD
102482003-01-06 Jakub Jelinek <jakub@redhat.com>
10249
10250 * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
10251 * pt-system.c (LIBC_CANCEL_HANDLED): Add.
10252 * tst-cancel-wrappers.sh: Remove all exceptions.
10253
bbd17455
UD
102542003-01-05 Ulrich Drepper <drepper@redhat.com>
10255
a73ab6df
UD
10256 * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
10257 features. Reported by Marijn Ros <marijn@mad.scientist.com>.
10258
bbd17455
UD
10259 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
10260 Use __libc_pthread_functions array if SHARED.
10261
10262 * pthreadP.h: Move pthread_cond_2_0_t definition to...
10263 * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
10264
10265 * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
10266 (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
10267 __libc_key_create, __libc_getspecific, __libc_setspecific): Use
10268 __libc_ptf_call instead of __libc_maybe_call.
10269 (PTF): New #define.
10270 (__libc_cleanup_region_start): Wrap function name with PTF call.
10271 (__libc_cleanup_region_end): Likewise.
10272 (__libc_cleanup_end): Likewise.
10273
10274 * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
10275 * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
10276 * pthread_key_create.c: Add __pthread_key_create_internal alias.
10277 * pthreadP.h: Add prototypes.
10278
10279 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
10280 __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
10281 __pthread_rwlock_unlock aliases.
10282 * pthreadP.h: Add prototypes for new aliases.
10283
10284 * pthreadP.h (struct pthead_functions): Moved to...
10285 * sysdeps/pthread/pthread-functions.h: ...here. New file.
10286 * init.c (pthread_functions): Add initializers for new elements.
10287
10288 * cleanup_defer.c: Add __pthread_cleanup_push_defer and
10289 __pthread_cleanup_pop_restore aliases.
10290 * pthreadP.h: Add prototypes.
10291
10292 * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
10293 and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
10294 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
10295 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
10296 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
10297 * pthreadP.h: Adjust prototypes and callers.
10298
d27a78be
UD
102992003-01-04 Ulrich Drepper <drepper@redhat.com>
10300
b74121ae
UD
10301 * Makefile (tests): Add tst-cancel7.
10302 (tst-cancel7-ARGS): New variable.
bbd17455 10303 * tst-cancel7.c: New file.
b74121ae 10304
29bc410c
UD
10305 * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
10306 around gcc defficiencies.
10307 * old_pthread_cond_signal.c: Likewise.
10308 * old_pthread_cond_timedwait.c: Likewise.
10309 * old_pthread_cond_wait.c: Likewise.
10310
d27a78be
UD
10311 * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
10312
733f25e6
UD
103132003-01-03 Ulrich Drepper <drepper@redhat.com>
10314
7edb2ae3
UD
10315 * Makefile (tests): Add tst-cond7.
10316 * tst-cond7.c: New file.
10317
b1151300
UD
10318 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
10319 (condvar_cleanup): Get condvar address from the right place.
10320
733f25e6
UD
10321 * atomic.h: Correct definitions of atomic_full_barrier,
10322 atomic_read_barrier, atomic_write_barrier.
10323
10324 * old_pthread_cond_broadcast.c: Make memory allocate and initialization
10325 race-free.
10326 * old_pthread_cond_signal.c: Likewise.
10327 * old_pthread_cond_timedwait.c: Likewise.
10328 * old_pthread_cond_wait.c: Likewise.
10329
686b7223
UD
103302003-01-03 Jakub Jelinek <jakub@redhat.com>
10331
10332 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
10333
0e07706e
UD
103342003-01-03 Ulrich Drepper <drepper@redhat.com>
10335
997256dd
UD
10336 * pthreadP.h (pthread_cond_2_0_t): New type.
10337 (struct pthread_functions): Use new type for 2.0 condvar callbacks.
10338 Use new type for the 2.0 condvar function prototypes.
10339 * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
10340 * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
10341 parameter.
10342 * old_pthread_cond_destroy.c: Likewise.
10343 * old_pthread_cond_broadcast.c: Likewise. Lock appropriately.
10344 * old_pthread_cond_signal.c: Likewise.
10345 * old_pthread_cond_timedwait.c: Likewise.
10346 * old_pthread_cond_wait.c: Likewise.
10347
842d2817
UD
10348 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
10349 (__pthread_cond_wait): Don't save cancellation mode and seq value
10350 in same location.
10351
0e07706e
UD
10352 * herrno.c (__h_errno_location): Don't define as weak.
10353
bf293afe
UD
103542003-01-02 Jakub Jelinek <jakub@redhat.com>
10355
10356 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
10357 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
10358 and pthread_cond_wait.
10359 * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
10360 Renamed to...
10361 (__pthread_cond_broadcast_2_0): ... this.
10362 * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
10363 Renamed to...
10364 (__pthread_cond_destroy_2_0): ... this.
10365 * old_pthread_cond_init.c (__old_pthread_cond_init):
10366 Renamed to...
10367 (__pthread_cond_init_2_0): ... this.
10368 * old_pthread_cond_signal.c (__old_pthread_cond_signal):
10369 Renamed to...
10370 (__pthread_cond_signal_2_0): ... this.
10371 * old_pthread_cond_wait.c (__old_pthread_cond_wait):
10372 Renamed to...
10373 (__pthread_cond_wait_2_0): ... this.
10374 * pthread_cond_destroy.c: Include shlib-compat.h.
10375 (pthread_cond_destroy): Change strong_alias into versioned_symbol.
10376 * pthread_cond_init.c: Include shlib-compat.h.
10377 (pthread_cond_init): Change strong_alias into versioned_symbol.
10378 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
10379 fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
10380 fields.
10381 (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
10382 __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
10383 __pthread_cond_wait_2_0): New prototypes.
10384 (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
10385 __old_pthread_cond_init, __old_pthread_cond_signal,
10386 __old_pthread_cond_wait): Removed.
10387 * init.c: Include shlib-compat.h.
10388 (pthread_functions): Guard ptr___pthread_attr_init_2_0
10389 initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
10390 Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
10391 ptr___pthread_cond_*_2_0 fields.
10392 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
10393 pthread_cond_*@GLIBC_2.0 compatibility symbols.
10394
10395 * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
10396 LIBC_SIGACTION was not yet defined.
10397 [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
10398 [!defined LIBC_SIGACTION] (__sigaction): New function and
10399 libc_hidden_weak.
10400 [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
10401 [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
10402
104032003-01-02 Jakub Jelinek <jakub@redhat.com>
10404
10405 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
10406
05df18c3
UD
104072003-01-02 Ulrich Drepper <drepper@redhat.com>
10408
10409 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
10410 New, larger type definition.
10411 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
10412 implementation.
10413 * Versions [libpthread]: Add definitions for new pthread_cond_*
10414 interfaces for version GLIBC_2.3.2.
10415 * pthread_cond_init.c: Update initialization for new type definition.
10416 * Makefile (libpthread-routines): Remove pthread_cond_wait,
10417 pthread_cond_timedwait, pthread_cond_signal, and
10418 pthread_cond_broadcast. Add old_pthread_cond_init,
10419 old_pthread_cond_destroy, old_pthread_cond_wait,
10420 old_pthread_cond_timedwait, old_pthread_cond_signal, and
10421 old_pthread_cond_broadcast.
10422 * old_pthread_cond_broadcast.c: New file.
10423 * old_pthread_cond_destroy.c: New file.
10424 * old_pthread_cond_init.c: New file.
10425 * old_pthread_cond_signal.c: New file.
10426 * old_pthread_cond_timedwait.c: New file.
10427 * old_pthread_cond_wait.c: New file.
10428 * pthreadP.h: Add prototypes for the compatibility interfaces.
10429
10430 * pthread_cond_destroy.c: Don't include <errno.h>.
10431
fd8979e4
UD
104322003-01-01 Ulrich Drepper <drepper@redhat.com>
10433
10434 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
10435 unnecessary zero offset when addressing MUTEX.
10436
6d6ee629
UD
104372002-12-31 Ulrich Drepper <drepper@redhat.com>
10438
10439 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
10440 __register_atfork.
10441 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
10442 for __register_atfork.
10443
a4baf360
UD
104442002-12-31 Jakub Jelinek <jakub@redhat.com>
10445
10446 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
10447 instead of ASSEMBLER test macro.
10448
10449 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
10450 __libc_current_sigrtmax): Add libc_hidden_def.
10451
10452 * sysdeps/pthread/list.h: Remove assert.h include.
10453
e9395a94
UD
104542002-12-31 Ulrich Drepper <drepper@redhat.com>
10455
10456 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
10457 __pthread_initialize_minimal_internal not
10458 __pthread_initialize_minimal.
10459
89d6e444
UD
104602002-12-30 Ulrich Drepper <drepper@redhat.com>
10461
416d2de6
UD
10462 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
10463 __pthread_initialize_minimal as hidden.
10464
89d6e444
UD
10465 * init.c (__pthread_initialize_minimal_internal): Don't mark as
10466 constructor.
10467
104682002-12-31 Jakub Jelinek <jakub@redhat.com>
10469
10470 * Makefile ($(inst_libdir)/libpthread.so): Depend on
10471 $(common-objpfx)format.lds, include that into the output script.
10472 Fix comment.
10473 (extra-B-pthread.so): Change linuxthreads/ into nptl/.
10474
8cac677c
UD
104752002-12-28 Andreas Jaeger <aj@suse.de>
10476
10477 * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
10478 nsec resolution changes.
10479 (xstat64_conv): Likewise.
10480 (xstat32_conv): Likewise.
10481 * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
10482 struct kernel_stat.
10483 * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
10484 structs stat and stat64.
10485 * time/time.h (__timespec_defined): Define for __USE_MISC.
89d6e444 10486 * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
8cac677c 10487
49e9f864
UD
104882002-12-30 Jakub Jelinek <jakub@redhat.com>
10489
10490 * forward.c (FORWARD2): Renamed from FORWARD3. Remove unused export
10491 argument.
10492 (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
10493 (pthread_exit): Use strong_alias to avoid warnings.
10494 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
10495 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
10496 ptr___pthread_attr_init_2_*.
10497 * init.c (pthread_functions): Adjust.
10498
bab09b26
UD
104992002-12-29 Ulrich Drepper <drepper@redhat.com>
10500
598d7a42
UD
10501 * forward.c: Make all functions available by default again. It
10502 caused too much trouble.
10503
bab09b26
UD
10504 * pt-siglongjmp.c: Removed.
10505
3b7ed871
UD
105062002-12-28 Jakub Jelinek <jakub@redhat.com>
10507
10508 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
10509 (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
10510 * sysdeps/i386/Makefile: New file.
10511 * sysdeps/i386/tcb-offsets.sym: New file.
10512 * sysdeps/pthread/tcb-offsets.h: New file.
10513 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
10514 Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
10515
10516 * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
10517 __register_atfork...
10518 (GLIBC_2.3.2): ...here.
10519
105202002-12-28 Ulrich Drepper <drepper@redhat.com>
10521
10522 * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
10523 pthread_attr_setstackaddr with __attribute_deprecated__.
10524
270d9d47
UD
105252002-12-27 Jakub Jelinek <jakub@redhat.com>
10526
10527 * pt-system.c (system): Remove cancellation handling.
10528 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
10529 cancellation routines.
10530
131fd126
UD
105312002-12-28 Ulrich Drepper <drepper@redhat.com>
10532
afb2e954
UD
10533 * descr.h: Include <dl-sysdep.h>.
10534 (struct pthread): Move header.data.list to the back of the struct.
131fd126
UD
10535 * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
10536 (MULTIPLE_THREADS_OFFSET): Adjust offset.
10537 (SYSINFO_OFFSEET): Likewise.
10538
105392002-12-27 Jakub Jelinek <jakub@redhat.com>
10540
10541 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
10542 Define.
10543 (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
10544 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
10545 DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
10546 (USE_DL_SYSINFO): Undef.
10547
105482002-12-22 Jakub Jelinek <jakub@redhat.com>
10549
10550 * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
10551 $(common-objpfx)libc.so.
10552 * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
10553 it is bigger than pipe buffer size even on arches with bigger
10554 page size.
10555 (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
10556
a218c9cf
UD
105572002-12-25 Ulrich Drepper <drepper@redhat.com>
10558
10559 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
10560 correct errno access for case that USE___THREAD is not defined.
10561
015a2dc9
UD
105622002-12-24 Ulrich Drepper <drepper@redhat.com>
10563
10564 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
10565 Patch by Marijn Ros <marijn@mad.scientist.com>.
10566
5220f9ac
RM
105672002-12-22 Roland McGrath <roland@redhat.com>
10568
10569 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
10570
1561bf63
UD
105712002-12-20 Ulrich Drepper <drepper@redhat.com>
10572
10573 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
10574
3325198e
UD
105752002-12-19 Ulrich Drepper <drepper@redhat.com>
10576
057c823f
UD
10577 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
10578 NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
10579 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
10580
097eca29
UD
10581 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
10582 of int $0x80.
10583 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
10584 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
10585 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
10586 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
10587 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
10588 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
10589 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
10590 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
10591
10592 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
10593 sysenter.
10594 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
10595
10596 * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
10597
5f5843e3
UD
10598 * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
10599 in new TCB.
10600 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
10601 that sysinfo is properly initialized.
10602 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
10603 to 1 only for ld.so.
10604
3325198e
UD
10605 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
10606 RTLD_CORRECT_DYNAMIC_WEAK.
10607
74e8f2dc
UD
106082002-12-19 Jakub Jelinek <jakub@redhat.com>
10609
10610 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
10611 Use return 0 as 6th argument to FORWARD4.
10612 * pthread_equal.c: Include pthreadP.h instead of pthread.h.
10613
df45b31e
UD
106142002-12-18 Ulrich Drepper <drepper@redhat.com>
10615
10616 * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
10617 * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
10618 Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
10619 (INIT_SYSINFO): New #define.
10620 (TLS_TP_INIT): Use INIT_SYSINFO.
10621 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
10622 At test to make sure SYSINFO_OFFSET value is correct.
10623 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
10624
3d539579
UD
106252002-12-18 Jakub Jelinek <jakub@redhat.com>
10626
10627 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
10628 * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
10629 * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
10630 [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
10631 __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
10632 __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
10633 __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
10634
d7913e0e
UD
106352002-12-18 Ulrich Drepper <drepper@redhat.com>
10636
f051627f
UD
10637 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
10638 macro instead of using int $0x80 directly.
10639
d7913e0e
UD
10640 * sysdeps/pthread/bits/stdio-lock.h: New file.
10641 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
10642 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
10643 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
10644 * Makefile (routines): Add libc-lowlevelmutex.
10645
10646 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
10647 __i686.get_pc_thunk.dx.
10648
f077a4a9
UD
106492002-12-17 Jakub Jelinek <jakub@redhat.com>
10650
10651 * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
10652 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
10653 ($(objpfx)tst-cancel-wrappers.out): New rule.
10654 * tst-cancel-wrappers.sh: New test.
10655 * tst-locale1.c: Include signal.h.
10656 (uselocale): Test static linking of __libc_current_sigrt*.
10657
106582002-12-17 Ulrich Drepper <drepper@redhat.com>
10659
10660 * Makefile (tests): Add tst-cancel6.
10661 * tst-cancel6.c: New file
10662
bd499a3b
UD
106632002-12-17 Jakub Jelinek <jakub@redhat.com>
10664
10665 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
10666 Define meaningfully for assembler as well.
10667 * pthreadP.h (struct pthread_functions): Remove
10668 ptr_pthread_attr_init field. Add ptr_pthread_attr_init_2_0
10669 and ptr_pthread_attr_init_2_1 fields.
10670 * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
10671 and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
10672 * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
10673 (FORWARD3): Define using FORWARD4.
10674 (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
10675 versions.
10676 * pt-system.c: Remove duplicate stdlib.h include.
10677
0a1063f4
UD
106782002-12-16 Ulrich Drepper <drepper@redhat.com>
10679
87d60668
UD
10680 * sem_init.c: Define sem_init@GLIBC_2.0.
10681 * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
10682 * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
10683
0a1063f4
UD
10684 * flockfile.c: Moved to...
10685 * sysdeps/pthread/flockfile.c: ...here. New file.
10686 * funlockfile.c: Moved to...
10687 * sysdeps/pthread/funlockfile.c: ...here. New file.
10688 * ftrylockfile.c: Moved to...
10689 * sysdeps/pthread/ftrylockfile.c: ...here. New file.
10690
9634cf9d
UD
106912002-12-16 Jakub Jelinek <jakub@redhat.com>
10692
10693 * libc-cancellation.c: Guard both function with
10694 #if !defined NOT_IN_libc.
10695 * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
10696 automatically provided pthread wrappers.
10697 * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
10698 CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
10699 nor in libpthread.
10700 * pt-open.c: Removed.
10701 * pt-fcntl.c: Removed.
10702 * pt-fsync.c: Removed.
10703 * pt-lseek.c: Removed.
10704 * pt-msgrcv.c: Removed.
10705 * pt-msgsnd.c: Removed.
10706 * pt-msync.c: Removed.
10707 * pt-nanosleep.c: Removed.
10708 * pt-open64.c: Removed.
10709 * pt-pause.c: Removed.
10710 * pt-pread.c: Removed.
10711 * pt-pread64.c: Removed.
10712 * pt-pwrite.c: Removed.
10713 * pt-pwrite64.c: Removed.
10714 * pt-read.c: Removed.
10715 * pt-recv.c: Removed.
10716 * pt-recvfrom.c: Removed.
10717 * pt-recvmsg.c: Removed.
10718 * pt-send.c: Removed.
10719 * pt-sendto.c: Removed.
10720 * pt-sigtimedwait.c: Removed.
10721 * pt-sigwait.c: Removed.
10722 * pt-wait.c: Removed.
10723 * pt-waitpid.c: Removed.
10724 * pt-write.c: Removed.
10725 * pt-accept.c: Removed.
10726 * pt-close.c: Removed.
10727 * pt-connect.c: Removed.
10728 * pt-lseek64.c: Removed.
10729 * pt-sendmsg.c: Removed.
10730 * pt-tcdrain.c: Removed.
10731
6ee8d334
UD
107322002-12-15 Ulrich Drepper <drepper@redhat.com>
10733
81fa9371
UD
10734 * init.c (__pthread_initialize_minimal_internal): Renamed from
10735 __pthread_initialize_minimal. Make old name an alias. This
10736 converts a normal relocation into a relative relocation.
10737
f3015aa5
UD
10738 * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
10739
4cbc1950
UD
10740 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
10741 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
10742 * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
10743 pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
10744 pt-sigwaitinfo, pt-waitid, and pt-writev.
10745 * pt-creat.c: Removed.
10746 * pt-poll.c: Removed.
10747 * pt-pselect.c: Removed.
10748 * pt-readv.c: Removed.
10749 * pt-select.c: Removed.
10750 * pt-sigpause.c: Removed.
10751 * pt-sigsuspend.c: Removed.
10752 * pt-sigwaitinfo.c: Removed.
10753 * pt-waitid.c: Removed.
10754 * pt-writev.c: Removed.
10755
8454830b
UD
10756 * init.c (pthread_functions): New variable.
10757 (__pthread_initialize_minimal): Pass pointer to pthread_functions
10758 (or NULL) to __libc_pthread_init.
10759 * forward.c: Rewrite to use __libc:pthread_functions array to get
10760 function addresses.
10761 * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
10762 prototype.
10763 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
10764 Take new parameter. Copy content of variable pointed to by it
10765 to __libc_pthread_init.
10766
10767 * pthreadP.h (struct pthread_functions): New type.
10768 (__libc_pthread_init): Declare.
10769
10770 * pthread_attr_destroy.c: Add namespace protected alias.
10771 * pthread_attr_getdetachstate.c: Likewise.
10772 * pthread_attr_getinheritsched.c: Likewise.
10773 * pthread_attr_getschedparam.c: Likewise.
10774 * pthread_attr_getschedpolicy.c: Likewise.
10775 * pthread_attr_getscope.c: Likewise.
10776 * pthread_attr_setdetachstate.c: Likewise.
10777 * pthread_attr_setinheritsched.c: Likewise.
10778 * pthread_attr_setschedparam.c: Likewise.
10779 * pthread_attr_setschedpolicy.c: Likewise.
10780 * pthread_attr_setscope.c: Likewise.
10781 * pthread_cond_broadcast.c: Likewise.
10782 * pthread_cond_destroy.c: Likewise.
10783 * pthread_cond_init.c: Likewise.
10784 * pthread_cond_signal.c: Likewise.
10785 * pthread_cond_wait.c: Likewise.
10786 * pthread_condattr_destroy.c: Likewise.
10787 * pthread_condattr_init.c: Likewise.
10788 * pthread_equal.c: Likewise.
10789 * pthread_exit.c: Likewise.
10790 * pthread_getschedparam.c: Likewise.
10791 * pthread_self.c: Likewise.
10792 * pthread_setcancelstate.c: Likewise.
10793 * pthread_setschedparam.c: Likewise.
10794 * pthread_mutex_destroy.c: Likewise.
10795 * pthread_mutex_init.c: Likewise.
10796 * pthreadP.h: Add prototypes for the aliases.
10797
0d5f4929
UD
10798 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
10799 multiple_threads member in correct TCB to 1.
10800
6ee8d334
UD
10801 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
10802 SINGLE_THREAD_P. If in libc or libpthread examine multiple_thread
10803 member of thread decriptor, otherwise return unconditionally 1.
10804
2fb6444d
UD
108052002-12-14 Ulrich Drepper <drepper@redhat.com>
10806
10807 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
10808 regular Linux version. Remove file.
10809 * sysdeps/unix/sysv/linux/connect.S: Likewise. Remove file.
10810 * sysdeps/unix/sysv/linux/llseek.c: Likewise. Remove file.
10811 * sysdeps/unix/sysv/linux/msgrcv.c: Likewise. Remove file.
10812 * sysdeps/unix/sysv/linux/msgsnd.c: Likewise. Remove file.
10813 * sysdeps/unix/sysv/linux/open64.c: Likewise. Remove file.
10814 * sysdeps/unix/sysv/linux/poll.c: Likewise. Remove file.
10815 * sysdeps/unix/sysv/linux/pread.c: Likewise. Remove file.
10816 * sysdeps/unix/sysv/linux/pread64.c: Likewise. Remove file.
10817 * sysdeps/unix/sysv/linux/pselect.c: Likewise. Remove file.
10818 * sysdeps/unix/sysv/linux/pwrite.c: Likewise. Remove file.
10819 * sysdeps/unix/sysv/linux/pwrite64.c: Likewise. Remove file.
10820 * sysdeps/unix/sysv/linux/readv.c: Likewise. Remove file.
10821 * sysdeps/unix/sysv/linux/recv.S: Likewise. Remove file.
10822 * sysdeps/unix/sysv/linux/recvfrom.S: Likewise. Remove file.
10823 * sysdeps/unix/sysv/linux/recvmsg.S: Likewise. Remove file.
10824 * sysdeps/unix/sysv/linux/send.S: Likewise. Remove file.
10825 * sysdeps/unix/sysv/linux/sendmsg.S: Likewise. Remove file.
10826 * sysdeps/unix/sysv/linux/sendto.S: Likewise. Remove file.
10827 * sysdeps/unix/sysv/linux/sigpause.c: Likewise. Remove file.
10828 * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise. Remove file.
10829 * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise. Remove file.
10830 * sysdeps/unix/sysv/linux/sigwait.c: Likewise. Remove file.
10831 * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise. Remove file.
10832 * sysdeps/unix/sysv/linux/system.c: Likewise. Remove file.
10833 * sysdeps/unix/sysv/linux/tcdrain.c: Likewise. Remove file.
10834 * sysdeps/unix/sysv/linux/wait.c: Likewise. Remove file.
10835 * sysdeps/unix/sysv/linux/waitid.c: Likewise. Remove file.
10836 * sysdeps/unix/sysv/linux/waitpid.c: Likewise. Remove file.
10837 * sysdeps/unix/sysv/linux/writev.c: Likewise. Remove file.
10838 * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise. Remove file.
10839
86b2dc40
UD
108402002-12-14 Jakub Jelinek <jakub@redhat.com>
10841
10842 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
10843 * sysdeps/unix/sysv/linux/open.c: Removed.
10844 * sysdeps/unix/sysv/linux/fsync.c: Removed.
10845 * sysdeps/unix/sysv/linux/lseek.c: Removed.
10846 * sysdeps/unix/sysv/linux/msync.c: Removed.
10847 * sysdeps/unix/sysv/linux/read.c: Removed.
10848 * sysdeps/unix/sysv/linux/close.c: Removed.
10849 * sysdeps/unix/sysv/linux/creat.c: Removed.
10850 * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
10851 * sysdeps/unix/sysv/linux/pause.c: Removed.
10852 * sysdeps/unix/sysv/linux/select.c: Removed.
10853 * sysdeps/unix/sysv/linux/write.c: Removed.
10854
9d263d72
UD
108552002-12-14 Ulrich Drepper <drepper@redhat.com>
10856
10857 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
10858 element in TCB to see whether locking is needed.
10859
10860 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
10861 MULTIPLE_THREADS_OFFSET value is correct.
10862
10863 * sysdeps/unix/sysv/linux/close.c: New file.
10864 * sysdeps/unix/sysv/linux/connect.S: New file.
10865 * sysdeps/unix/sysv/linux/creat.c: New file.
10866 * sysdeps/unix/sysv/linux/fsync.c: New file.
10867 * sysdeps/unix/sysv/linux/llseek.c: New file.
10868 * sysdeps/unix/sysv/linux/lseek.c: New file.
10869 * sysdeps/unix/sysv/linux/msgrcv.c: New file.
10870 * sysdeps/unix/sysv/linux/msgsnd.c: New file.
10871 * sysdeps/unix/sysv/linux/msync.c: New file.
10872 * sysdeps/unix/sysv/linux/nanosleep.c: New file.
10873 * sysdeps/unix/sysv/linux/open.c: New file.
10874 * sysdeps/unix/sysv/linux/open64.c: New file.
10875 * sysdeps/unix/sysv/linux/pause.c: New file.
10876 * sysdeps/unix/sysv/linux/poll.c: New file.
10877 * sysdeps/unix/sysv/linux/pread.c: New file.
10878 * sysdeps/unix/sysv/linux/pread64.c: New file.
10879 * sysdeps/unix/sysv/linux/pselect.c: New file.
10880 * sysdeps/unix/sysv/linux/pwrite.c: New file.
10881 * sysdeps/unix/sysv/linux/pwrite64.c: New file.
10882 * sysdeps/unix/sysv/linux/readv.c: New file.
10883 * sysdeps/unix/sysv/linux/recv.S: New file.
10884 * sysdeps/unix/sysv/linux/recvfrom.S: New file.
10885 * sysdeps/unix/sysv/linux/recvmsg.S: New file.
10886 * sysdeps/unix/sysv/linux/select.c: New file.
10887 * sysdeps/unix/sysv/linux/send.S: New file.
10888 * sysdeps/unix/sysv/linux/sendmsg.S: New file.
10889 * sysdeps/unix/sysv/linux/sendto.S: New file.
10890 * sysdeps/unix/sysv/linux/sigpause.c: New file.
10891 * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
10892 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
10893 * sysdeps/unix/sysv/linux/sigwait.c: New file.
10894 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
10895 * sysdeps/unix/sysv/linux/system.c: New file.
10896 * sysdeps/unix/sysv/linux/tcdrain.c: New file.
10897 * sysdeps/unix/sysv/linux/wait.c: New file.
10898 * sysdeps/unix/sysv/linux/waitid.c: New file.
10899 * sysdeps/unix/sysv/linux/waitpid.c: New file.
10900 * sysdeps/unix/sysv/linux/writev.c: New file.
10901 * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
10902
10903 * pt-readv.c: Fix comment.
10904
109052002-12-14 Jakub Jelinek <jakub@redhat.com>
10906
10907 * tst-cleanup1.c: Include stdlib.h.
10908
10909 * tst-cancel5.c: New test.
10910 * Makefile (tests): Add tst-cancel5.
10911 (tst-cancel5): Link against libc.so libpthread.so in that order.
10912
9ae0909b
UD
109132002-12-13 Ulrich Drepper <drepper@redhat.com>
10914
b7bdd9c4
UD
10915 * forward.c (test_loaded): Prevent recursive calls.
10916
9ae0909b
UD
10917 * Makefile (routines): Add libc-cancellation.
10918 * libc-cancellation.c: New file.
10919 * descr.h (struct pthread): Add multiple_threads field.
10920 * allocatestack.c (allocate_stack): Initialize multiple_header field of
10921 new thread descriptor to 1.
10922 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
10923 Initialize multiple_thread field after successful thread creation.
10924 * cancellation.c (__do_cancel): Move to pthreadP.h.
10925 (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
10926 (__pthread_disable_asynccancel): Add internal_function attribute.
10927 * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
10928 * pthread_setcancelstate.c: Likewise.
10929 * pthread_setcanceltype.c: Likewise.
10930 * pthread_exit.c: Likewise.
10931 * pthreadP.h (CANCELLATION_P): Likewise.
10932 (__do_cancel): Define as static inline.
10933 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
10934 (__libc_enable_asynccancel, __libc_disable_asynccancel): New
10935 declarations.
10936 * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
10937 fields. Define MULTIPLE_THREADS_OFFSET.
10938 * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
10939 declaration.
10940 * sysdeps/unix/sysv/linux/accept.S: New file.
10941 * sysdeps/unix/sysv/linux/read.c: New file.
10942 * sysdeps/unix/sysv/linux/write.c: New file.
10943 * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
10944 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
10945 initialization of __libc_locking_needed.
10946 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
10947 __libc_locking_needed, use multiple_threads field in TCB.
10948 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
10949
22f20674
UD
109502002-12-12 Ulrich Drepper <drepper@redhat.com>
10951
2ad2e1e7
UD
10952 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
10953 version.
10954 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
10955
22f20674
UD
10956 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
10957 access to __libc_locking_needed for PIC.
10958
aa80bf86
UD
109592002-12-12 Jakub Jelinek <jakub@redhat.com>
10960
10961 * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
10962 declare for libc.so.
10963 (__libc_lock_init, __libc_lock_init_recursive): Change into comma
10964 expression.
10965 (__libc_lock_lock): Put into statement expression.
10966 (__libc_lock_unlock): Remove trailing semicolon.
10967 * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
10968
24021373
RM
109692002-12-12 Roland McGrath <roland@redhat.com>
10970
10971 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
10972 "m" constraint to refer to __libc_locking_needed. Declare it here.
10973
14e7aece
UD
109742002-12-12 Ulrich Drepper <drepper@redhat.com>
10975
10976 * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
10977 * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
10978 Initialize __libc_locking_needed.
10979 * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
10980 instead of __register_pthread_fork_handler.
10981 * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
10982 * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
10983 fork-gen with libc_pthread_init.
10984 * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
10985 of __register_pthread_fork_handler.
10986 * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
10987 of __register_pthread_fork_handler.
10988 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
10989 __libc_locking_needed to determine whether lock prefix can be avoided.
10990 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
10991
85631c8e
UD
109922002-12-11 Ulrich Drepper <drepper@redhat.com>
10993
da63009e
UD
10994 * Makefile (tests): Add tst-cleanup1.
10995 * tst-cleanup1.c: New file.
10996 * cancellation.c (__cleanup_thread): Removed.
10997 (__do_cancel): Remove call to __cleanup_thread.
10998 * pthreadP.h: Remove __cleanup_thread prorotype.
10999
000160a2
UD
11000 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
11001 Remember function and argument even if cancellation handler
11002 function is not available.
11003 (__libc_cleanup_region_end): Execute registered function directly if
11004 pthread functions are not available.
11005 (__libc_cleanup_end): Likewise.
11006
85631c8e
UD
11007 * init.c (__pthread_initialize_minimal): Fix initialization in
11008 static lib by preventing gcc from being too clever.
11009
dce8f2b6
UD
110102002-12-10 Ulrich Drepper <drepper@redhat.com>
11011
34a075be
UD
11012 * init.c (__pthread_initialize_minimal): Remove unneccesary
11013 sigaddset call.
11014
dce8f2b6
UD
11015 * Makefile (tests): We can run tst-locale2 now.
11016
e5e45b53
UD
110172002-12-09 Ulrich Drepper <drepper@redhat.com>
11018
11019 * Versions: Remove duplicated sigwait entry.
11020
bdb04f92
UD
110212002-12-08 Ulrich Drepper <drepper@redhat.com>
11022
1e506629
UD
11023 * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
11024 inside libpthread.
11025
a3957dd5
UD
11026 * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
11027
bdb04f92
UD
11028 * pthreadP.h: Declare __pthread_enable_asynccancel and
11029 __pthread_disable_asynccancel.
11030 (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
11031 (CANCEL_RESET): Use __pthread_disable_asynccancel.
11032 * cancellation.c (__pthread_enable_asynccancel): New function.
11033 (__pthread_disable_asynccancel): New function.
11034 * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
11035 * pt-close.c: Likewise.
11036 * pt-connect.c: Likewise.
11037 * pt-creat.c: Likewise.
11038 * pt-fcntl.c: Likewise.
11039 * pt-fsync.c: Likewise.
11040 * pt-lseek.c: Likewise.
11041 * pt-lseek64.c: Likewise.
11042 * pt-msgrcv.c: Likewise.
11043 * pt-msgsnd.c: Likewise.
11044 * pt-msync.c: Likewise.
11045 * pt-nanosleep.c: Likewise.
11046 * pt-open.c: Likewise.
11047 * pt-open64.c: Likewise.
11048 * pt-pause.c: Likewise.
11049 * pt-poll.c: Likewise.
11050 * pt-pread.c: Likewise.
11051 * pt-pread64.c: Likewise.
11052 * pt-pselect.c: Likewise.
11053 * pt-pwrite.c: Likewise.
11054 * pt-pwrite64.c: Likewise.
11055 * pt-read.c: Likewise.
11056 * pt-readv.c: Likewise.
11057 * pt-recv.c: Likewise.
11058 * pt-recvfrom.c: Likewise.
11059 * pt-recvmsg.c: Likewise.
11060 * pt-select.c: Likewise.
11061 * pt-send.c: Likewise.
11062 * pt-sendmsg.c: Likewise.
11063 * pt-sendto.c: Likewise.
11064 * pt-sigpause.c: Likewise.
11065 * pt-sigsuspend.c: Likewise.
11066 * pt-sigtimedwait.c: Likewise.
11067 * pt-sigwait.c: Likewise.
11068 * pt-sigwaitinfo.c: Likewise.
11069 * pt-system.c: Likewise.
11070 * pt-tcdrain.c: Likewise.
11071 * pt-wait.c: Likewise.
11072 * pt-waitid.c: Likewise.
11073 * pt-waitpid.c: Likewise.
11074 * pt-write.c: Likewise.
11075 * pt-writev.c: Likewise.
a3957dd5
UD
11076 * pthread_join.c: Likewise.
11077 * pthread_timedjoin.c: Likewise.
bdb04f92
UD
11078
11079 * pt-sigpause.c (sigsuspend): Call __sigsuspend.
11080 (__xpg_sigpause): New function.
11081 * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
11082
6ccb3834
UD
110832002-12-07 Ulrich Drepper <drepper@redhat.com>
11084
09efc3ba
UD
11085 * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
11086
11087 * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
11088 _GI_pthread_cleanup_pop to pthreadP.h.
11089
11090 * ftrylockfile.c: Use _IO_lock_trylock instead of
11091 pthread_mutex_trylock.
11092
11093 * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
11094 (CANCEL_RESET): Likewise.
11095 (__pthread_setcanceltype_): Declare.
11096 (__pthread_mutex_lock_internal): Declare.
11097 (__pthread_mutex_unlock_internal): Declare.
11098 (__pthread_once_internal): Declare.
11099 (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
11100 (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
11101
11102 * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
11103 and pthread_mutex_unlock.
11104 * pthread_cond_wait.c: Likewise.
11105 * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
11106 * pthread_mutex_unlock.c: Likewise.
11107
11108 * pthread_setcanceltype.c: Add additional alias
11109 __pthread_setcanceltype.
11110
11111 * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
11112 * sem_open.c (sem_open): Likewise.
11113 Use __libc_open, __libc_write, and __libc_close instead of
11114 open, write, and close respectively.
11115
11116 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
11117 Rewrite as statement expression since it must return a value.
11118
11119 * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
11120 * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
11121 __pthread_kill.
11122
11123 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
11124 alias __pthread_once_internal.
11125
6ccb3834
UD
11126 * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
11127
d3c9f895
UD
111282002-12-06 Ulrich Drepper <drepper@redhat.com>
11129
4614167a
UD
11130 * Makefile (tests): Add tst-stdio1 and tst-stdio2.
11131 * tst-stdio1.c: New file.
11132 * tst-stdio2.c: New file.
11133
a4548cea
UD
11134 * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
11135
d3c9f895
UD
11136 * Makefile (tests): Comment out tst-locale2 for now.
11137 (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
11138
11139 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
11140 -D_IO_MTSAFE_IO.
11141 * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
11142 Use _IO_lock_init instead of explicit assignment.
11143
11144 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
11145 Define __libc_lock_* and __libc_lock_recursive macros with
11146 lowlevellock macros, not pthread mutexes.
11147
11148 * flockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_lock instead
11149 of pthread_mutex_lock.
11150 * funlockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_unlock
11151 instead of pthread_mutex_unlock.
11152
fde89ad0
RM
111532002-12-06 Roland McGrath <roland@redhat.com>
11154
11155 * allocatestack.c (__stack_user): Use uninitialized defn.
11156 * init.c (__pthread_initialize_minimal): Initialize it here.
11157
11767d47
RM
111582002-12-05 Roland McGrath <roland@redhat.com>
11159
fde89ad0
RM
11160 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
11161 string.
11162 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
11163
11767d47
RM
11164 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
11165 missing & here too.
11166
440d8bc2
UD
111672002-12-05 Ulrich Drepper <drepper@redhat.com>
11168
11169 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
11170 lowlevellock.
11171 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
11172 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
11173 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
11174 * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
11175 for __libc_lock_* macros.
11176 * Makefile (routines): Add libc-lowlevellock.
11177
111782002-10-09 Roland McGrath <roland@redhat.com>
11179
11180 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
11181 Under [__PIC__], call the function via the pointer fetched for
11182 comparison rather than a call by name that uses the PLT.
11183 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
11184 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
11185 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
11186 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
11187 (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
11188
d5ed0118
RM
111892002-12-04 Roland McGrath <roland@redhat.com>
11190
11191 * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
11192
11193 * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
11194 * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
11195
11196 * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
11197
eaa4099f
UD
111982002-12-04 Ulrich Drepper <drepper@redhat.com>
11199
11200 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
11201 a completely opaque, non-integer type.
11202 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
11203
33b5d0cc
UD
112042002-12-05 Jakub Jelinek <jakub@redhat.com>
11205
11206 * sysdeps/i386/tls.h: Include stdlib.h.
11207 * sysdeps/x86_64/tls.h: Likewise.
11208
7a5cdb30
UD
112092002-12-04 Ulrich Drepper <drepper@redhat.com>
11210
c4a6d859
UD
11211 * Makefile (tests): Add tst-locale2.
11212 (tests-static): Likewise.
11213 * tst-locale2.c: New file.
11214
7a5cdb30
UD
11215 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
11216 volatile and add memory clobbers to lock operations.
11217
d82d5d12
UD
112182002-12-03 Ulrich Drepper <drepper@redhat.com>
11219
69cae3cf
UD
11220 * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
11221 * sysdeps/i386/i486/bits/atomic.h: New file.
11222 * sysdeps/i386/i586/bits/atomic.h: New file.
11223 * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
11224 include i486 version.
11225 * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
11226 * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
c97c64de 11227 Patch by Marijn Ros <marijn@mad.scientist.com>.
69cae3cf 11228
e4044c01
UD
11229 * allocatestack.c (get_cached_stack): Don't crash if we first
11230 found a stack with a larger size then needed.
11231 Reported by Hui Huang <hui.huang@sun.com>.
11232
d82d5d12
UD
11233 * Makefile (tests): Add tst-sysconf.
11234 * tst-sysconf.c: New file.
11235
11236 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
11237 PTHREAD_THREADS_MAX.
11238
fa9a4ff0
RM
112392002-12-02 Roland McGrath <roland@redhat.com>
11240
11241 * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
11242 Declare using hidden_proto instead of attribute_hidden, so there are
11243 non-.hidden static symbols for gdb to find.
11244 (__pthread_keys): Likewise.
11245 * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
11246 * allocatestack.c (__stack_user): Likewise.
11247 * pthread_create.c (__pthread_keys): Likewise.
11248 (__nptl_threads_events, __nptl_last_event): Make these static instead
11249 of hidden.
11250 * pthread_key_create.c (__pthread_pthread_keys_max,
11251 __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
11252
91949a33
UD
112532002-12-02 Ulrich Drepper <drepper@redhat.com>
11254
c22b52fa
UD
11255 * Makefile (tests): Add tst-locale1. If buid-static is yes link
11256 statically.
11257 * tst-locale1.c: New file.
11258
beb6aa41
UD
11259 * pthread_cond_timedwait.c: Include <stdlib.h>.
11260
91949a33
UD
11261 * Makefile (tests): Add tst-fork2 and tst-fork3.
11262 * tst-fork2.c: New file.
11263 * tst-fork3.c: New file.
11264
654dff90
UD
112652002-11-28 Ulrich Drepper <drepper@redhat.com>
11266
cb0e76b4
UD
11267 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
11268
11269 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
11270 require it to 200112L.
11271
11272 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
11273 instruction only if HAVE_CMOV is defined.
11274 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
11275
975aa229
UD
11276 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
11277
654dff90
UD
11278 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
11279
11280 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
11281
11282 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
11283
a3931336
UD
112842002-11-27 Ulrich Drepper <drepper@redhat.com>
11285
c10c099c
UD
11286 * sysdeps/x86_64/bits/atomic.h: New file.
11287
11288 * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
11289 16-bit operations.
11290
dca99d27
UD
11291 * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
11292 possible since gettid cannot fail.
11293
f78deea6
UD
11294 * sysdeps/x86_64/pthreaddef.h: New file.
11295
11296 * sysdeps/i386/pthreaddef.h (gettid): Removed.
11297
11298 * sysdeps/x86_64/pthread_spin_init.c: New file.
11299 * sysdeps/x86_64/pthread_spin_lock.c: New file.
11300 * sysdeps/x86_64/pthread_spin_trylock.c: New file.
11301 * sysdeps/x86_64/pthread_spin_unlock.c: New file.
11302
11303 * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
11304 Add missing lock prefix. Minute optimization.
11305
11306 * tst-spin2.c (main): Also check successful trylock call.
11307
11308 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
11309 syscall. Fix typo in case INTERNAL_SYSCALL is not used.
11310
11311 * sysdeps/i386/pthread_spin_destroy.c: Moved to...
11312 * sysdeps/pthread/pthread_spin_destroy.c: ...here. New file.
11313
11314 * sysdeps/i386/pthread_sigmask.c: Removed. Use the generic code.
11315 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
11316 value in case of an error. Add support for INTERNAL_SYSCALL.
b54e18eb
UD
11317
11318 * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
11319 value in case of an error.
11320
a3931336
UD
11321 * sysdeps/x86_64/tls.h: New file.
11322
76a50749
UD
113232002-11-26 Ulrich Drepper <drepper@redhat.com>
11324
117c452c
UD
11325 * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface. It now
11326 takes the array member name and the index as parameters.
11327 (THREAD_SETMEM_NC): Likewise.
11328 * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
11329 * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
11330 interfaces.
11331
11332 * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
11333 to decide which code to use.
11334 (THREAD_SETMEM_NC): Likewise.
11335
76a50749
UD
11336 * allocatestack.c (queue_stack): Don't remove stack from list here.
11337 Do it in the caller. Correct condition to prematurely terminate
11338 loop to free stacks.
11339 (__deallocate_stack): Remove stack from list here.
11340
113412002-11-26 Ulrich Drepper <drepper@redhat.com>
11342
11343 * Makefile (tests): Add tst-stack1.
11344 * tst-stack1.c: New file.
11345
11346 * allocatestack.c (allocate_stack): Initialize the TCB on a user
11347 provided stack.
11348
11349 * pthread_attr_getstack.c: Return bottom of the thread area.
11350
113512002-11-25 Ulrich Drepper <drepper@redhat.com>
11352
11353 * Makefile (libpthread-routines): Add pt-allocrtsig and
11354 pthread_kill_other_threads.
11355 * pt-allocrtsig.c: New file.
11356 * pthread_kill_other_threads.c: New file.
11357 * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
11358 all three functions.
11359 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
11360 allocrtsig.
11361 * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
11362 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
11363 and __libc_allocate_rtsig_private.
11364 * Versions (libpthread): Export pthread_kill_other_threads_np,
11365 __libc_current_sigrtmin, and __libc_current_sigrtmax.
11366
113672002-11-24 Ulrich Drepper <drepper@redhat.com>
11368
11369 * allocatestack.c (allocate_stack): stackaddr in attribute points to
11370 the end of the stack. Adjust computations.
11371 When mprotect call fails dequeue stack and free it.
11372 * pthread_attr_setstack.c: Store top of the stack in stackaddr
11373 attribute.
11374 * pthread_getattr_np.c: Likewise.
11375
11376 * descr.h (IS_DETACHED): Add some more parenthesis to prevent
11377 surprises.
11378
113792002-11-23 Ulrich Drepper <drepper@redhat.com>
11380
11381 * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
11382 attribute definitions. Patch by Luca Barbieri <ldb@ldb.ods.org>.
11383
113842002-11-22 Ulrich Drepper <drepper@redhat.com>
11385
11386 * pthread_getspecific.c: Optimize access to first 2nd-level array.
11387 * pthread_setspecific.c: Likewise.
11388
113892002-11-21 Ulrich Drepper <drepper@redhat.com>
11390
11391 * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
11392 definitions. Get them from the official place.
11393 * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
11394
11395 * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
11396 Use new CLONE_ flags in clone() calls.
11397
11398 * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
11399 * sysdeps/unix/sysv/linux/i386/fork.c: New file.
11400
11401 * Versions: Add pthread_* functions for libc.
11402 * forward.c: New file.
11403
11404 * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
11405 errno-loc.
11406 * herrno.c: New file.
11407 * res.c: New file.
11408
11409 * Makefile (libpthread-routines): Remove sem_post, sem_wait,
11410 sem_trywait, and sem_timedwait. Add herrno and res.
11411 * sem_init.c: Don't initialize lock and waiters members.
11412 * sem_open.c: Likewise.
11413 * sem_post.c: Removed.
11414 * sem_wait.c: Removed.
11415 * sem_trywait.c: Removed.
11416 * sem_timedwait.c: Removed.
11417 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
11418 Includes full implementations of sem_post, sem_wait, sem_trywait,
11419 and sem_timedwait.
11420 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
11421 for new implementation.
11422 * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
11423 and waiters fields.
11424
11425 * tst-sem3.c: Improve error message.
11426 * tst-signal3.c: Likewise.
11427
11428 * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
11429 to tell the kernel about the termination futex and to initialize tid
11430 member. Don't initialize main_thread.
11431 * descr.h (struct pthread): Remove main_thread member.
11432 * cancelllation.c (__do_cancel): Remove code handling main thread.
11433 The main thread is not special anymore.
11434
11435 * allocatestack.c (__reclaim_stacks): Mark stacks as unused. Add
11436 size of the stacks to stack_cache_actsize.
11437
11438 * pt-readv.c: Add missing "defined".
11439 * pt-sigwait.c: Likewise.
11440 * pt-writev.c: Likewise.
11441
114422002-11-09 Ulrich Drepper <drepper@redhat.com>
11443
11444 * Versions: Export __connect from libpthread.
11445 Patch by Luca Barbieri <ldb@ldb.ods.org>.
11446
11447 * Makefile (libpthread-routines): Add pt-raise.
11448 * sysdeps/unix/sysv/linux/raise.c: New file.
11449 * sysdeps/unix/sysv/linux/pt-raise.c: New file.
11450 * sysdeps/generic/pt-raise.c: New file.
11451
11452 * pthread_cond_init.c: Initialize all data elements of the condvar
11453 structure. Patch by Luca Barbieri <ldb@ldb.ods.org>.
11454
11455 * pthread_attr_init.c: Actually implement 2.0 compatibility version.
11456 * pthread_create.c: Likewise.
11457
11458 * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
11459 * tst-key1.c: New file.
11460 * tst-key2.c: New file.
11461 * tst-key3.c: New file.
11462
11463 * Versions: Export pthread_detach for version GLIBC_2.0.
11464 Reported by Saurabh Desai <sdesai@austin.ibm.com>.
11465
114662002-11-08 Ulrich Drepper <drepper@redhat.com>
11467
11468 * pthread_key_create.c: Terminate search after an unused key was found.
11469 Patch by Luca Barbieri <ldb@ldb.ods.org>.
11470
11471 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
11472 Patch by Luca Barbieri <ldb@ldb.ods.org>.
11473
114742002-10-10 Ulrich Drepper <drepper@redhat.com>
11475
11476 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
11477 dynamic lookup for errno in PIC.
11478
11479 * allocatestack.c (get_cached_stack): Rearrange code slightly to
11480 release the stack lock as soon as possible.
11481 Call _dl_allocate_tls_init for TCB from the cache to re-initialize
11482 the static TLS block.
11483 (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
11484
11485 * cancellation.c: Renamed from cancelation.c.
11486 * Makefile: Adjust accordingly.
11487 * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
11488 * cleanup_defer.c: Use CANCELLATION_P.
11489 * pthread_testcancel.c: Likewise.
11490 * descr.h: Fix spelling in comments.
11491 * init.c: Likewise.
11492 * pthread_getattr_np.c: Likewise.
11493 * pthread_getschedparam.c: Likewise.
11494 * pthread_setschedparam.c: Likewise.
11495 * Versions: Likewise.
11496
11497 * pt-pselect.c: New file.
11498 * Makefile (libpthread-routines): Add pt-pselect.
11499 * Versions: Add pselect.
11500
11501 * tst-cancel4.c: New file.
11502 * Makefile (tests): Add tst-cancel4.
11503
115042002-10-09 Ulrich Drepper <drepper@redhat.com>
11505
11506 * pthread_mutex_lock.c: Always record lock ownership.
11507 * pthread_mutex_timedlock.c: Likewise.
11508 * pthread_mutex_trylock.c: Likewise.
11509
11510 * pt-readv.c: New file.
11511 * pt-writev.c: New file.
11512 * pt-creat.c: New file.
11513 * pt-msgrcv.c: New file.
11514 * pt-msgsnd.c: New file.
11515 * pt-poll.c: New file.
11516 * pt-select.c: New file.
11517 * pt-sigpause.c: New file.
11518 * pt-sigsuspend.c: New file.
11519 * pt-sigwait.c: New file.
11520 * pt-sigwaitinfo.c: New file.
11521 * pt-waitid.c: New file.
11522 * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
11523 pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
11524 pt-sigwait, pt-sigwaitinfo, and pt-waitid.
11525 * Versions: Add all the new functions.
11526
11527 * tst-exit1.c: New file.
11528 * Makefile (tests): Add tst-exit1.
11529
11530 * sem_timedwait.c: Minor optimization for more optimal fastpath.
11531
115322002-10-08 Ulrich Drepper <drepper@redhat.com>
11533
11534 * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
11535
11536 * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
11537 call. pthread_join is an official cancellation point.
11538 * pthread_timedjoin.c: Likewise.
11539
11540 * pthread_cond_wait.c: Revert order in which internal lock are dropped
11541 and the condvar's mutex are retrieved.
11542 * pthread_cond_timedwait.c: Likewise.
11543 Reported by dice@saros.East.Sun.COM.
11544
115452002-10-07 Ulrich Drepper <drepper@redhat.com>
11546
11547 * pthreadP.h: Cut out all type definitions and move them...
11548 * sysdeps/unix/sysv/linux/internaltypes.h: ...here. New file.
11549 * pthreadP.h: Include <internaltypes.h>.
11550
11551 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
11552 performance tweaks.
11553
11554 * sem_trywait.c: Shuffle #includes around to get right order.
11555 * sem_timedwait.c: Likewise.
11556 * sem_post.c: Likewise.
11557 * sem_wait.c: Likewise.
11558
11559 * nptl 0.3 released.
11560
11561 * Makefile (tests): Add tst-signal3.
11562 * tst-signal3.c: New file.
11563
115642002-10-05 Ulrich Drepper <drepper@redhat.com>
11565
11566 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
11567 the asms modify the sem object.
11568 (__lll_sem_timedwait): Now takes struct sem* as first parameter.
11569
11570 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
11571 the actual members.
11572 * pthreadP.h (struct sem): New type. Actual semaphore type.
11573 * semaphoreP.h: Include pthreadP.h.
11574 * sem_getvalue.c: Adjust to sem_t change.
11575 * sem_init.c: Likewise.
11576 * sem_open.c: Likewise.
11577 * sem_post.c: Likewise.
11578 * sem_timedwait.c: Likewise.
11579 * sem_trywait.c: Likewise.
11580 * sem_wait.c: Likewise.
11581
115822002-10-04 Ulrich Drepper <drepper@redhat.com>
11583
11584 * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
11585 * tst-basic2.c: New file.
11586 * tst-exec1.c: New file.
11587 * tst-exec2.c: New file.
11588 * tst-exec3.c: New file.
11589
11590 * tst-fork1.c: Remove extra */.
11591
11592 * nptl 0.2 released. The API for IA-32 is complete.