]> git.ipfire.org Git - thirdparty/glibc.git/blame - nptl/ChangeLog
Use -frounding-math for math testsuite
[thirdparty/glibc.git] / nptl / ChangeLog
CommitLineData
6d5c57fa
AS
12012-04-28 Andreas Schwab <schwab@linux-m68k.org>
2
3 * Makefile ($(objpfx)tst-stack3-mem, $(objpfx)tst-tls6.out): Don't
4 run when cross-compiling.
5
6e236b92
SP
62012-04-26 Siddhesh Poyarekar <siddhesh@redhat.com>
7
8 * sysdeps/pthread/unwind-forcedunwind.c: Include gnu/lib-names.h
9 instead of libgcc_s.h.
10
0cec7c54
PP
112012-04-20 Paul Pluzhnikov <ppluzhnikov@google.com>
12
13 * sysdeps/x86_64/tls.h (TLS_GET_FS, TLS_SET_FS): Delete.
14
7ac88e38
DM
152012-03-27 David S. Miller <davem@davemloft.net>
16
17 * tst-cond16.c (do_test): Use a thread stack size which is either
18 PTHREAD_STACK_MIN or the page size, whichever is larger.
19 * tst-cond18.c (do_test): Likewise.
20
24d8f4b7
L
212012-03-19 H.J. Lu <hongjiu.lu@intel.com>
22
23 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Use
24 register char * __asm__("rsp") to get stack frame.
25
4adaaafc
L
262012-03-19 H.J. Lu <hongjiu.lu@intel.com>
27
28 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (SYS_futex): Use
29 __NR_futex directly.
30
ca7b8af5
L
312012-03-19 H.J. Lu <hongjiu.lu@intel.com>
32
33 * unwind.c (unwind_stop): Cast _Unwind_GetCFA return to
34 _Unwind_Ptr first.
35
7e7fa5f8
DM
362012-03-16 David S. Miller <davem@davemloft.net>
37
38 [BZ #13844]
39 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: Include using <..>
40 instead of "...".
41 * sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c:
42 Delete, not needed.
43
c4a7b16e
DM
442012-03-15 David S. Miller <davem@davemloft.net>
45
46 [BZ #13844]
47 * sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c: New file.
48
c524201a
PE
492012-03-09 Paul Eggert <eggert@cs.ucla.edu>
50
51 [BZ #13673]
52 * pt-crti.S: Replace FSF snail mail address with URL.
53
90ad551f
JM
542012-03-09 Joseph Myers <joseph@codesourcery.com>
55
56 * sysdeps/pthread/pthread.h (__need_clockid_t, __need_timespec):
57 Do not define before including <time.h>.
58
c64bf5fe
DM
592012-03-08 David S. Miller <davem@davemloft.net>
60
61 * sysdeps/unix/sysv/linux/sparc/sem_post.c: Update copyright year.
62
48aff776
TS
632012-03-08 Thomas Schwinge <thomas@codesourcery.com>
64
2edd9a79
TS
65 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
66 Check for timestamp before the Epoch.
67
c564a812
TS
68 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Fix
69 updating nwaiters.
70
48aff776
TS
71 * tst-sem13.c (do_test): Add another test case.
72 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
73 Fix updating nwaiters.
74
e7dbb1be
JM
752012-03-07 Joseph Myers <joseph@codesourcery.com>
76
77 [BZ #10545]
78 * sysdeps/pthread/configure.in (libc_cv_forced_unwind): Change
79 link test to a compile test.
80 (libc_cv_c_cleanup): Likewise. Declare puts rather than including
81 <stdio.h>.
82 * sysdeps/pthread/configure: Regenerated.
83
a4300c7a
UD
842012-03-07 Ulrich Drepper <drepper@gmail.com>
85
86 * Makefile (distribute): Remove variable.
87
840df61e
TS
882012-01-23 Thomas Schwinge <thomas@codesourcery.com>
89
90 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Get rid of
91 superfluous assignment.
92 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c (sem_timedwait):
93 Likewise.
94 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
95 (sem_timedwait): Likewise.
96
9463518d
UD
972012-03-06 Ulrich Drepper <drepper@gmail.com>
98
abdf2e19
UD
99 * sysdeps/pthread/bits/libc-lock.h: Move information not needed in
100 installed headers to...
9463518d
UD
101 * sysdeps/pthread/bits/libc-lockP.h: ...here. New file.
102
e9258400
DM
1032012-03-06 David S. Miller <davem@davemloft.net>
104
105 * sysdeps/unix/sysv/linux/sparc/sem_post.c (__new_sem_post): Use
106 atomic_increment and remove unused local variable.
107 (__old_sem_post): Likewise.
108
22f9d9df
DM
1092012-02-27 David S. Miller <davem@davemloft.net>
110
9463518d
UD
111 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Don't refer to
112 non-existing __pthread_attr.
22f9d9df
DM
113 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
114 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
115 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
116 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
117 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
118
4efeffc1
UD
1192012-02-26 Ulrich Drepper <drepper@gmail.com>
120
d94a4670
UD
121 * sysdeps/pthread/pthread.h: Define __need_clockid_t for __USE_XOPEN2K.
122
4efeffc1
UD
123 * sysdeps/pthread/pthread.h: Define __need_timespec before including
124 <time.h>.
125 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Name pthread_attr_t
126 union.
127 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
128 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
129 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
130 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
131 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
132
0e7dfaef
JM
1332012-02-21 Joseph Myers <joseph@codesourcery.com>
134
135 [BZ #13695]
136 * Makefile (generated): Remove crti.S, crtn.S, defs.h and
137 pt-initfini.s.
138 [crti.S not in sysdirs] (omit-deps): Do not append.
139 [crti.S not in sysdirs] (CFLAGS-pt-initfini.s): Remove variable.
140 [crti.S not in sysdirs] (pt-initfini.c): Remove vpath directive.
141 [crti.S not in sysdirs] ($(objpfx)crti.S): Remove rule.
142 [crti.S not in sysdirs] ($(objpfx)crtn.S): Likewise.
143 [crti.S not in sysdirs] ($(objpfx)defs.h): Likewise.
144 [crti.S not in sysdirs] ($(objpfx)crti.o): Likewise.
145 [crti.S not in sysdirs] ($(objpfx)crtn.o): Likewise.
146 [crti.S in sysdirs] (extra-objs): Append unconditionally.
147 [crti.S in sysdirs] ($(objpfx)crti.o): Define rule
148 unconditionally.
149 * sysdeps/pthread/pt-initfini.c: Remove file.
150
e3b69ca7
RH
1512012-02-16 Richard Henderson <rth@twiddle.net>
152
959e12e3
UD
153 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: Remove file.
154 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: Remove file.
e3b69ca7 155
df83af67
KK
1562012-02-15 Kaz Kojima <kkojima@rr.iij4u.or.jp>
157
158 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Remove file.
159
f63f3380
DM
1602012-02-16 David S. Miller <davem@davemloft.net>
161
162 * sysdeps/sparc/Makefile: Add -fPIC when building pt-crti.S and crtn.S
163
d463ab10
MP
1642012-02-15 Marek Polacek <polacek@redhat.com>
165
166 * sysdeps/unix/sysv/linux/x86_64/Makefile: Remove file.
167
59ba27a6
PE
1682012-02-09 Paul Eggert <eggert@cs.ucla.edu>
169
170 Replace FSF snail mail address with URLs, as per GNU coding standards.
171
28328403
AS
1722012-02-08 Andreas Schwab <schwab@linux-m68k.org>
173
174 * Makefile (extra-objs) [crti.S in sysdirs]: Add pt-crti.o.
175
3add8e13
JM
1762012-02-08 Joseph Myers <joseph@codesourcery.com>
177
178 Support crti.S and crtn.S provided directly by architectures.
179 * Makefile [crti.S in sysdirs] (omit-deps): Do not append.
180 [crti.S in sysdirs] (CFLAGS-pt-initfini.s): Do not define variable.
181 [crti.S in sysdirs] ($(objpfx)pt-initfini.s): Disable rule.
182 [crti.S in sysdirs] ($(objpfx)crti.S): Likewise.
183 [crti.S in sysdirs] ($(objpfx)crtn.S): Likewise.
184 [crti.S in sysdirs] ($(objpfx)defs.h): Likewise.
185 [crti.S in sysdirs] ($(objpfx)crti.o): Likewise.
186 [crti.S in sysdirs] ($(objpfx)crtn.o): Likewise.
187 [crti.S in sysdirs] (pt-initfini.c): Remove vpath directive.
188 [crti.S in sysdirs] ($(objpfx)crti.o): New rule.
189 * pt-crti.S: New file.
190 * sysdeps/unix/sysv/linux/i386/Makefile: Remove file.
191
9a1d9254
JM
1922012-02-03 Joseph Myers <joseph@codesourcery.com>
193
194 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
195 macros for PIC register setup.
196 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
197 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
198 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
199 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
200 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
201
5452bffe
UD
2022012-01-11 Marek Polacek <polacek@redhat.com>
203
204 * forward.c (FORWARD_NORETURN): Define macro.
205 (__pthread_unwind): Use FORWARD_NORETURN macro to avoid warning.
206 (__pthread_exit): Likewise.
207
356fa562
UD
2082012-01-10 Ulrich Drepper <drepper@gmail.com>
209
8898f020
UD
210 * sysdeps/pthread/pthread.h: Add const attribute to pthread_equal.
211
356fa562
UD
212 * pthreadP.h: Add noreturn to __pthread_exit.
213 * sysdeps/pthread/pthread-functions.h: Likewise for ptr___pthread_exit.
214
f5420cf0
AZ
2152011-12-30 Adhemerval Zanella <azanella@linux.vnet.ibm.com>
216
217 * sysdeps/unix/sysv/linux/aio_misc.h (__aio_create_helper_thread):
218 Call pthread_attr_setstacksize() with result of
219 __pthread_get_minstack() to account for application TLS usage.
220
c473bd1c
MP
2212012-01-08 Marek Polacek <polacek@redhat.com>
222
223 * sysdeps/unix/sysv/linux/mq_notify.c: Include <nptl/pthreadP.h>.
224
120ced3f
UD
2252012-01-07 Ulrich Drepper <drepper@gmail.com>
226
a784e502
UD
227 [BZ #13553]
228 * pthreadP.h: Use const instead of __const.
229 * semaphore.h: Likewise.
230 * sysdeps/pthread/bits/libc-lock.h: Likewise.
231 * sysdeps/pthread/bits/sigthread.h: Likewise.
232 * sysdeps/pthread/pthread.h: Likewise.
233
0269750c
UD
234 * Makefile: Remove elf=yes test, only ELF is supported.
235
ecb6fb48
UD
236 * shlib-versions: Remove entries for ports architectures.
237
120ced3f
UD
238 In case anyone cares, the IA-64 architecture could move to ports.
239 * sysdeps/ia64/*: Removed.
240 * sysdeps/unix/sysv/linux/ia64/*: Removed.
241
2c1094bd
UD
2422011-12-22 Ulrich Drepper <drepper@gmail.com>
243
ee9e0640
UD
244 * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread): Use
245 __pthread_get_minstack.
246 * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Likewise.
247
2c1094bd
UD
248 [BZ #13088]
249 * sysdeps/unix/sysv/linux/timer_routines.c: Get minimum stack size
250 through __pthread_get_minstack.
251 * nptl-init.c (__pthread_initialize_minimal_internal): Get page size
252 directly from _rtld_global_ro.
253 (__pthread_get_minstack): New function.
254 * pthreadP.h: Declare __pthread_get_minstack.
255 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_get_minstack.
256
60e8585f
UD
2572011-12-21 Ulrich Drepper <drepper@gmail.com>
258
259 [BZ #13515]
260 * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
261 Correct reading name from file.
262
caafb2b0
CD
2632011-12-14 Carlos O'Donell <carlos@systemhalted.org>
264
265 * allocatestack.c (allocate_stack): Return errno on failure.
266
e988dba9
JL
2672011-12-14 Jeff Law <law@redhat.com>
268
269 [BZ #5245]
270 * pthread_create.c (__pthread_create_2_1): Translate ENOMEM to EAGAIN.
271
ade60c89
UD
2722011-11-28 Andreas Schwab <schwab@redhat.com>
273
274 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Handle
275 EAGAIN from FUTEX_WAIT_REQUEUE_PI.
276 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
277
312be3f9
UD
2782011-11-15 Ulrich Drepper <drepper@gmail.com>
279
280 * pthread_getattr_np.c (pthread_getattr_np): Set FD_CLOEXEC for
281 /proc/self/maps.
282
c2b18f7a
UD
2832011-10-29 Ulrich Drepper <drepper@gmail.com>
284
285 [BZ #13358]
286 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
287 (__pthread_cond_timedwait): Initialize %r15 correctly also for code
288 path for kernels with FUTEX_CLOCK_REALTIME.
289 Debugged by H.J. Lu <hjl.tools@gmail.com>.
290
3871f58f
AS
2912011-10-27 Andreas Schwab <schwab@redhat.com>
292
293 [BZ #13344]
294 * sysdeps/pthread/pthread.h: Use __THREADNL instead of __THREAD
295 for memory synchronization functions.
296 * semaphore.h: Likewise.
297
485683c3
UD
2982011-10-24 Ulrich Drepper <drepper@gmail.com>
299
300 * tst-cancel7.c: Avoid warning.
301 * tst-mutex6.c: Likewise.
302 * tst-mutex9.c: Likewise.
303 * tst-mutexpi6.c: Likewise.
304
10d005f7
UD
3052011-10-23 Ulrich Drepper <drepper@gmail.com>
306
307 * sysdeps/i386/tls.h: Remove #include <list.h>.
308
fd5bdc09
UD
3092011-10-15 Ulrich Drepper <drepper@gmail.com>
310
10d005f7 311 * pthread_create.c (start_thread): Call __ctype_init.
fd5bdc09 312
7a775e6b
AS
3132011-09-15 Andreas Schwab <schwab@redhat.com>
314
315 * sysdeps/pthread/list.h: Define only list_t if __need_list_t is
316 defined.
317 (list_add): Add atomic_write_barrier.
318 * descr.h: Define __need_list_t before including <list.h>.
319 * nptl-init.c: Include <list.h>
320 * allocatestack.c: Likewise.
321
83cd1420
UD
3222011-09-11 Ulrich Drepper <drepper@gmail.com>
323
324 * sysdeps/i386/tls.h: Remove HAVE_TLS_SUPPORT test.
325 * sysdeps/ia64/tls.h: Likewise.
326 * sysdeps/powerpc/tls.h: Likewise.
327 * sysdeps/s390/tls.h: Likewise.
328 * sysdeps/sh/tls.h: Likewise.
329 * sysdeps/sparc/tls.h: Likewise.
330 * sysdeps/x86_64/tls.h: Likewise.
331
3ce1f295
UD
3322011-09-10 Ulrich Drepper <drepper@gmail.com>
333
02d46fc4
UD
334 * sysdeps/pthread/malloc-machine.h: Define MUTEX_INITIALIZER.
335
d063d164
UD
336 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Don't handle
337 !USE___THREAD.
338 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
339 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
340 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
341 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
342 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
343 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
344 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
345 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
346 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
347 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
348 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
349 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
350
3ce1f295
UD
351 * tst-tls1.c: Support for __thread is now mandatory.
352 * tst-tls2.c: Likewise.
353 * tst-tls3.c: Likewise.
354 * tst-tls3mod.c: Likewise.
355 * tst-tls4.c: Likewise.
356 * tst-tls4moda.c: Likewise.
357 * tst-tls4modb.c: Likewise.
358 * tst-tls5.h: Likewise.
359
1e4bd093
L
3602011-09-08 Ulrich Drepper <drepper@gmail.com>
361
362 [BZ #12403]
363 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
364 (pthread_rwlock_timedwrlock): Use correct macro in test.
365 Patch by H.J. Lu <hongjiu.lu@intel.com>.
366
a0e1f41b
UD
3672011-09-06 Ulrich Drepper <drepper@gmail.com>
368
369 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait): Don't
370 use gettimeofday vsyscall, just call gettimeofday.
9e5c9dcd
UD
371 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
372 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
373 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
374 Likewise.
375 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
376 Likewise.
377 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
378 Simplify __vdso_clock_gettime use.
a0e1f41b 379
39c4451c
DM
3802011-09-05 David S. Miller <davem@davemloft.net>
381
382 * sysdeps/unix/sysv/linux/sem_timedwait.c (do_futex_timed_wait):
383 New function.
384 (sem_timedwait): Call it to force an exception region around
385 the async cancel enable and the futex operation.
386 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: Likewise.
387 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: Likewise.
388 * sysdeps/unix/sysv/linux/sem_wait.c (do_futex_wait): New function.
389 (__new_sem_wait): Call it to force an exception region around
390 the async cancel enable and the futex operation.
391 * sysdeps/unix/sysv/linux/sparc/sem_wait.c: Likewise.
392 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: Likewise.
393
523df511
AS
3942011-08-31 Andreas Schwab <schwab@redhat.com>
395
396 * allocatestack.c (setxid_mark_thread): Ensure that the exiting
397 thread is woken up.
398
e315850c
DM
3992011-08-20 David S. Miller <davem@davemloft.net>
400
401 * Makefile (tst-cleanup0.out): Fix typo in output redirection.
402
5744c68d
RM
4032011-08-14 Roland McGrath <roland@hack.frob.com>
404
405 * sysdeps/i386/pthreaddef.h (TCB_ALIGNMENT): Set to 64, optimal on Atom.
406 * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Likewise.
407
a724d1b9
AS
4082011-08-08 Andreas Schwab <schwab@redhat.com>
409
410 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Maintain aligned
411 stack.
412 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
413 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
414
7a03a9c8
UD
4152011-07-22 Ulrich Drepper <drepper@gmail.com>
416
417 * sysdeps/pthread/unwind-forcedunwind.c (_Unwind_Resume): Add read
418 barrier.
419 (__gcc_personality_v0): Likewise.
420 (_Unwind_ForcedUnwind): Likewise.
421 (_Unwind_GetCFA): Likewise.
422
4b3d3e28
RM
4232011-07-14 Roland McGrath <roland@hack.frob.com>
424
425 * allocatestack.c (__reclaim_stacks): Use uintptr_t cast rather than
426 UINTMAX_C.
427
6f8326ca
UD
4282011-06-30 Ulrich Drepper <drepper@gmail.com>
429
430 * nptl-init.c (__nptl_set_robust): New function.
431 (pthread_functions): Add reference.
432 * npthreadP.h: Declare __nptl_set_robust.
433 * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
434 ptr_set_robust member.
435 * sysdeps/unix/sysv/linux/fork.c: Call set_robust_list syscall in
436 child if threads are used.
437
c71ca1f8
AJ
4382011-06-14 Andreas Jaeger <aj@suse.de>
439
440 * pthread_rwlock_init.c: Include <string.h> for memset declaration.
441
5bdcc103
UD
4422011-05-11 Ulrich Drepper <drepper@gmail.com>
443
444 [BZ #386]
445 * allocatestack.c (allocate_stack): Convert ENOMEM error to EAGAIN.
446
e6c61494
UD
4472011-04-10 Ulrich Drepper <drepper@gmail.com>
448
449 [BZ #12650]
450 * allocatestack.c (get_cached_stack): Deallocate DTV entries before
451 clearing memory.
452 Patch partly by Robert Rex <robert.rex@exasol.com>.
453
c5be0f71
RM
4542011-01-19 Roland McGrath <roland@redhat.com>
455
456 * pthread_cond_wait.c (__pthread_cond_wait): Fix comment typo.
457 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
458 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Likewise.
459 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
460 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock): Likewise.
461 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock): Likewise.
462
1f20b93a
AS
4632011-01-16 Andreas Schwab <schwab@linux-m68k.org>
464
465 * Makefile (test-extras): Add tst-cleanup4aux.
466
70181fdd
UD
4672011-01-14 Ulrich Drepper <drepper@gmail.com>
468
469 [BZ #10563]
470 * sysdeps/pthread/setxid.h (__SETXID_1): Add cast to assignment.
471 (__SETXID_2): Likewise.
472 (__SETXID_3): Likewise.
473
451f001b
UD
4742011-01-13 Ulrich Drepper <drepper@gmail.com>
475
476 [BZ #10484]
477 * Versions [libc] (GLIBC_PRIVATE): Export __libc_alloca_cutoff.
a85b5cb4 478 * alloca_cutoff.c: Add libc_hidden_def.
451f001b 479
f9068148
L
4802010-10-13 H.J. Lu <hongjiu.lu@intel.com>
481
482 [BZ #12113]
483 * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Changed to 32.
484 * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Defined with alignment
485 of "struct pthread".
486
c3758fee
AS
4872010-09-21 Andreas Schwab <schwab@redhat.com>
488
489 * sysdeps/pthread/pthread.h (pthread_cleanup_push)
490 [!__EXCEPTIONS]: Mangle local variable not_first_call.
491 (pthread_cleanup_push_defer_np): Likewise.
492
4ac42e19
UD
4932010-09-03 Ulrich Drepper <drepper@redhat.com>
494
495 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Expect blocks are
496 small.
497
022f6b89
DG
4982010-08-10 Dinakar Guniguntala <dino@in.ibm.com>
499 Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
500
501 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: If
502 FUTEX_WAKE_OP fails make sure to call FUTEX_WAKE instead.
503
f8392f40
L
5042010-08-12 H.J. Lu <hongjiu.lu@intel.com>
505
93f17abf 506 * sysdeps/unix/sysv/linux/i386/Makefile: New file.
f8392f40 507
bebff237
AM
5082010-05-01 Alan Modra <amodra@gmail.com>
509
510 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
511 (PSEUDO): Use correct cr save. Don't use wrong parm save area
512 to save temps. Correct cfi for possible later frame manipulation.
513 (DOCARGS_1, UNDOCARGS_1): Use the correct parm save area.
514 (DOCARGS_2, UNDOCARGS_2, DOCARGS_3, UNDOCARGS_3): Likewise.
515 (DOCARGS_4, UNDOCARGS_4, DOCARGS_5, UNDOCARGS_5): Likewise.
516 (DOCARGS_6, UNDOCARGS_6): Likewise.
517 (CENABLE, CDISABLE): Add nops for non-shared calls.
518
e8ee8bdf
AS
5192010-07-06 Andreas Schwab <schwab@redhat.com>
520
521 * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
522 Fix type mismatch.
523
03e87550
UD
5242010-07-03 Ulrich Drepper <drepper@redhat.com>
525
526 * tst-abstime.c (do_test): Some more cleanups
527
145569dc
UD
5282010-07-02 Ulrich Drepper <drepper@redhat.com>
529
530 * tst-abstime.c: Correct testing and add test for sem_timedwait.
531
2983d85e
AS
5322010-07-01 Andreas Schwab <schwab@redhat.com>
533 Ulrich Drepper <drepper@redhat.com>
534
535 * Makefile (tests): Add tst-abstime.
536 * tst-abstime.c: New file.
537 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
538 (__lll_timedlock_wait): Check for timestamp before the Epoch.
539 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
540 (__lll_timedlock_wait): Likewise.
541 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
542 (__lll_robust_timedlock_wait): Likewise.
543 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
544 (__pthread_cond_timedwait): Likewise.
545 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
546 (pthread_rwlock_timedrdlock): Likewise.
547 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
548 (pthread_rwlock_timedwrlock): Likewise.
549 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
550 Likewise.
551
72b6e8c8
UD
5522010-07-01 Ulrich Drepper <drepper@redhat.com>
553
554 * Makefile (tst-_res1): Add tst-_res1mod1 to dependency list.
555
4bc93b30
TY
5562010-06-01 Takashi Yoshii <takashi.yoshii.zj@renesas.com>
557
558 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Fix incorrect
559 location of ifndef __ASSUME_FUTEX_CLOCK_REALTIME.
560
86a4c67f
UD
5612010-04-09 Ulrich Drepper <drepper@redhat.com>
562
563 [BZ #11390]
564 * sysdeps/unix/sysv/linux/pthread_getname.c: New file.
565 * sysdeps/unix/sysv/linux/pthread_setname.c: New file.
566 * nptl/sysdeps/pthread/pthread.h: Declare pthread_getname and
567 pthread_setname.
568 * Makefile (libpthread-routines): Add pthread_getname and
569 pthread_setname.
570 * Versions: Export pthread_getname and pthread_setname for GLIBC_2.12.
571
f571a994
RM
5722010-04-05 Thomas Schwinge <thomas@schwinge.name>
573
574 * sysdeps/pthread/unwind-resume.c: Moved to main tree sysdeps/gnu/.
575 * sysdeps/pthread/rt-unwind-resume.c: Likewise.
576 * sysdeps/pthread/Makefile: Remove csu section and rt section's
577 unwind-resume bits, now in main tree sysdeps/gnu/Makefile instead.
578
7749bf5f
LM
5792010-03-23 Luis Machado <luisgpm@br.ibm.com>
580
581 * pthread_cond_timedwait.c: Add check for
582 HAVE_CLOCK_GETTIME_VSYSCALL to use VDSO whenever possible.
583 (pthread_cond_timedwait): Use INTERNAL_VSYSCALL instead of
584 INTERNAL_SYSCALL.
585
1d78f299
UD
5862010-03-09 Ulrich Drepper <drepper@redhat.com>
587
588 * pthread_create.c (__pthread_create_2_1): If priorities are incorrect
589 and the call fails wake eventually waiting setxid threads. Don't free
590 stack here if we try starting a thread.
591 * sysdeps/pthread/createthread.c (do_clone): Only wake setxid waiter
592 if the clone call failed.
593
058e9ba9
AS
5942010-03-08 Andreas Schwab <schwab@redhat.com>
595
596 * pthread_create.c (__pthread_create_2_1): Don't set setxid_futex.
597 * allocatestack.c (get_cached_stack): Set setxid_futex.
598 (allocate_stack): Likewise.
599
66f1b8ee
UD
6002010-03-05 Andreas Schwab <schwab@redhat.com>
601 Ulrich Drepper <drepper@redhat.com>
602
603 * allocatestack.c (setxid_mark_thread): Delay handling of thread if
604 it is creating a thread or it is just being created.
605 * pthread_create.c (start_thread): Wake setxid thread if it is
606 waiting.
607 (__pthread_create_2_1): Initialize setxid_futex.
608 * sysdeps/pthread/createthread.c (do_clone): Wake setxid thread if it
609 is waiting.
610
893549c5
MS
6112010-01-15 Ulrich Drepper <drepper@redhat.com>
612
613 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
614 Fix unwind info.
615 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
616
6172010-01-15 Michal Schmidt <mschmidt@redhat.com>
618
619 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
620 Fix pthread_cond_timedwait with requeue-PI.
621 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
622 Fix pthread_cond_wait with requeue-PI.
623
402cd987
UD
6242010-01-14 Ulrich Drepper <drepper@redhat.com>
625
78ee2185
UD
626 * Versions: Add pthread_mutex_consistent, pthread_mutexattr_getrobust,
627 and pthread_mutexattr_setrobust for GLIBC_2.12.
402cd987 628 * pthread_mutex_consistent.c: Define alias pthread_mutex_consistent.
78ee2185
UD
629 * pthread_mutexattr_getrobust.c: Define alias
630 pthread_mutexattr_getrobust.
631 * pthread_mutexattr_setrobust.c: Define alias
632 pthread_mutexattr_setrobust.
402cd987 633
d3c7e686
UD
6342010-01-12 Ulrich Drepper <drepper@redhat.com>
635
636 * sysdeps/pthread/pthread.h: Cleanup. Fix up for XPG7.
637
f095bb72
UD
6382010-01-08 Ulrich Drepper <drepper@redhat.com>
639
640 * sysdeps/pthread/pthread.h: Fix pthread_mutex_consistent declaration.
641
d34bd80f
TS
6422009-12-18 Thomas Schwinge <thomas@codesourcery.com>
643
644 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c (_init): Don't
645 call __gmon_start__.
646 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c (_init): Likewise.
647
f01c2359
UD
6482009-12-17 Ulrich Drepper <drepper@redhat.com>
649
650 * pthread_rwlock_init.c (__pthread_rwlock_init): Simplify code by
651 using memset.
652
75956694
DG
6532009-12-01 Dinakar Guniguntala <dino@in.ibm.com>
654
655 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.h: Define
656 FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
657 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: If mutex
658 is a non robust PI mutex, then use FUTEX_CMP_REQUEUE_PI.
659 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
660 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: If mutex
661 is a non robust PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
662 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
663
9554ebf2
UD
6642009-12-12 Ulrich Drepper <drepper@redhat.com>
665
666 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
667 Don't update nwaiters after invalid timeout is recognized.
668
ebb92a49
TS
6692009-11-27 Thomas Schwinge <thomas@codesourcery.com>
670
671 * sysdeps/unix/sysv/linux/sh/pt-initfini.c (_init): Don't call
672 __gmon_start__.
673
b55ec98c
AS
6742009-11-27 Andreas Schwab <schwab@redhat.com>
675
676 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Reload
677 THREAD_SELF->cancelhandling after returning from futex call.
678
80b3a4ea
UD
6792009-11-24 Ulrich Drepper <drepper@redhat.com>
680
681 * tst-sem13.c: New file.
682 * Makefile (tests): Add tst-sem13.
683
57a299fe
RM
6842009-11-22 Roland McGrath <roland@redhat.com>
685
686 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: # include "i686/dl-sysdep.h"
687 instead of recapitulating its contents.
688
dfedb126
UD
6892009-11-18 Ulrich Drepper <drepper@redhat.com>
690
691 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Minor
692 optimizations and cleanups.
693
dd7106b3
DG
6942009-11-18 Dinakar Guniguntala <dino@in.ibm.com>
695
696 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
697 Remove redundant code. Fix cfi offsets.
698 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
699 Fix cfi offsets.
700
f8c10bb4
UD
7012009-11-17 Ulrich Drepper <drepper@redhat.com>
702
62616842
UD
703 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Minimally
704 reduce size of unwind info.
705
f8c10bb4
UD
706 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Convert to use
707 cfi directives.
708 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
709 Based on a patch by Dinakar Guniguntala <dino@in.ibm.com>.
710
13f6812f
AS
7112009-11-03 Andreas Schwab <schwab@linux-m68k.org>
712
713 [BZ #4457]
714 * sysdeps/pthread/unwind-resume.c: Include <libgcc_s.h> and use
715 LIBGCC_S_SO.
716 * sysdeps/pthread/unwind-forcedunwind.c: Likewise.
717
25db0f6c
DJ
7182009-10-30 Ulrich Drepper <drepper@redhat.com>
719
9c04f7c1
UD
720 * tst-sem11.c (main): Rewrite to avoid aliasing problems.
721
25db0f6c
DJ
722 [BZ #3270]
723 * allocatestack.c (__nptl_setxid): Perform the operation in multiple
724 steps to avoid races with creation and terminations.
725 * nptl-init.c (sighandler_setxid): Adjust.
726 Patch by Daniel Jacobowitz.
727
3d60eb17
AS
7282009-09-07 Andreas Schwab <schwab@redhat.com>
729
730 * sysdeps/pthread/bits/libc-lock.h (BP_SYM): Remove space before paren.
731
38eb6136
SP
7322009-09-02 Suzuki K P <suzuki@in.ibm.com>
733 Joseph Myers <joseph@codesourcery.com>
734
735 [BZ #7094]
736 * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
737 Initialize the sigev_notify field for newly created timer to make sure
01034d75 738 the timer gets deleted from the active timer's list upon timer_delete.
38eb6136 739
7812c65b
AS
7402009-08-27 Andrew Stubbs <ams@codesourcery.com>
741
742 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
743 Correct a logic error.
744
84088310
UD
7452009-08-25 Ulrich Drepper <drepper@redhat.com>
746
747 * sysdeps/x86_64/tls.h (RTLD_ENABLE_FOREIGN_CALL): Store old value
748 of the field in local variables.
749 (RTLD_FINALIZE_FOREIGN_CALL): Restore rtld_must_xmm_save from local
750 variable and don't unconditionally clear it.
751
b42a214c
UD
7522009-08-24 Ulrich Drepper <drepper@redhat.com>
753
754 * pthread_create.c (start_thread): Hint to the kernel that memory for
755 the stack can be reused. We do not mark all the memory. The part
756 still in use and some reserve are kept.
757
2d094b73
UD
7582009-08-23 Ulrich Drepper <drepper@redhat.com>
759
760 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Clean up namespace.
761
ae0d5450
UD
7622009-08-11 Ulrich Drepper <drepper@redhat.com>
763
764 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Add CFI
765 directives.
766
1bc2b97e
UD
7672009-08-10 Ulrich Drepper <drepper@redhat.com>
768
769 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Add CFI
770 directives.
771 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
772
ec492239
AS
7732009-08-10 Andreas Schwab <schwab@redhat.com>
774
775 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
776 (__pthread_cond_signal): Don't clobber register used for syscall
777 number.
778
49eea97b
UD
7792009-08-08 Ulrich Drepper <drepper@redhat.com>
780
efa0569d
UD
781 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
782 Optimize code path used when FUTEX_CLOCK_REALTIME is supported.
783
49eea97b
UD
784 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
785 (__pthread_cond_wait): Optimize by avoiding use of callee-safe
786 register.
787
9083bcc5
UD
7882009-08-07 Ulrich Drepper <drepper@redhat.com>
789
790 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Little optimizations
791 enabled by the special *_asynccancel functions.
792 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
793 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
794
795 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Include lowlevellock.h.
796
421665c4
UD
7972009-08-04 Ulrich Drepper <drepper@redhat.com>
798
799 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: New file.
800 * sysdeps/unix/sysv/linux/x86_64/libc-cancellation.S: New file.
801 * sysdeps/unix/sysv/linux/x86_64/librt-cancellation.S: New file.
802 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Optimize
803 since we can assume the special __*_{en,dis}able_asynccancel
804 functions.
805 (PUSHARGS_*, POPARGS_*, SAVESTK_*, RESTSTK_*): Removed.
806 * sysdeps/x86_64/tcb-offsets.sym: Add cancellation-related bits
807 and PTHREAD_CANCELED.
808
bd03a1af
UD
8092009-07-31 Ulrich Drepper <drepper@redhat.com>
810
811 * descr.h: Better definition of *_BITMASK macros for cancellation.
812
b48a267b
UD
8132009-07-29 Ulrich Drepper <drepper@redhat.com>
814
586fa886
UD
815 * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Define explicitly to 32.
816
b48a267b 817 * sysdeps/x86_64/tls.h (tcbhead_t): Add room for SSE registers the
586fa886
UD
818 dynamic linker might have to save.
819 Define RTLD_CHECK_FOREIGN_CALL, RTLD_ENABLE_FOREIGN_CALL,
820 RTLD_PREPARE_FOREIGN_CALL, and RTLD_FINALIZE_FOREIGN_CALL. Pretty
821 printing.
822
b48a267b
UD
823 * sysdeps/x86_64/tcb-offsets.sym: Add RTLD_SAVESPACE_SSE.
824
b0948ffd
UD
8252009-07-28 Ulrich Drepper <drepper@redhat.com>
826
827 * pthread_mutex_lock.c [NO_INCR] (__pthread_mutex_cond_lock_adjust):
828 New function.
829 * pthreadP.h: Declare __pthread_mutex_cond_lock_adjust.
830 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add ROBUST_BIT.
831 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Don't use
832 requeue_pi for robust mutexes.
833 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
834 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
835 Don't only skip __pthread_mutex_cond_lock. Call instead
836 __pthread_mutex_cond_lock_adjust.
837 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
838
839 * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Minor
840 optimization of PI mutex handling.
841
e73e694e
UD
8422009-07-27 Ulrich Drepper <drepper@redhat.com>
843
844 [BZ #10418]
845 * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Use _rel
846 instead of of _acq variants of cmpxchg.
847
f1adf1f4
UD
8482009-07-23 Ulrich Drepper <drepper@redhat.com>
849
01b597da
UD
850 * sysdeps/x86_64/configure.in: New file.
851
f1adf1f4
UD
852 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix error
853 path when not using absolute timeout futex.
854
c3db953c
UD
8552009-07-20 Ulrich Drepper <drepper@redhat.com>
856
857 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Minor
858 optimizations of last changes.
859 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
860
515a8908
UD
8612009-07-19 Ulrich Drepper <drepper@redhat.com>
862
42e69bcf
UD
863 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
864 FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
865 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: If mutex
866 is a PI mutex, then use FUTEX_CMP_REQUEUE_PI.
867 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
868 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: If mutex
869 is a PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
870 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
871
515a8908
UD
872 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
873 (__pthread_cond_timedwait): Make more robust.
874
30b1954a
UD
8752009-07-18 Ulrich Drepper <drepper@redhat.com>
876
e2dca2fe
UD
877 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
878 (__lll_robust_timedlock_wait): If possible use FUTEX_WAIT_BITSET to
879 directly use absolute timeout.
880
3d77b268
UD
881 * tst-sem5.c (do_test): Add test for premature timeout.
882 * Makefile: Linu tst-sem5 with librt.
883
d979611e
UD
884 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
885 (pthread_rwlock_timedwrlock): If possible use FUTEX_WAIT_BITSET to
886 directly use absolute timeout.
32c6c342
UD
887 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
888 (pthread_rwlock_timedrdlock): Likewise.
d979611e 889
f8b6cd21
UD
890 * tst-cond11.c (run_test): Add test to check that the timeout is
891 long enough.
892
e88726b4
UD
893 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
894 (__pthread_cond_timedwait): If possible use FUTEX_WAIT_BITSET to
895 directly use absolute timeout.
896
30b1954a
UD
897 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
898 (__pthread_cond_wait): Convert to using exception handler instead of
899 registered unwind buffer.
92618c95
UD
900 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
901 (__pthread_cond_timedwait): Likewise.
30b1954a 902
d52c96e7
UD
9032009-07-17 Ulrich Drepper <drepper@redhat.com>
904
f351f2b7
UD
905 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
906 If possible use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME to directly
907 use absolute timeout.
908
0adae468
UD
909 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Optimize
910 handling of uncontested semaphore.
911
d52c96e7
UD
912 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
913 (__condvar_cleanup): Rewrite to use cfi directives instead of
914 hand-coded unwind tables.
63601ccd
UD
915 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S (__pthread_once):
916 Likewise.
c3c2f3cf 917 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
aee2665a
UD
918 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
919 Likewise.
d52c96e7 920
bfdb73e1
UD
9212009-06-12 Ulrich Drepper <drepper@redhat.com>
922
923 * Makefile (libpthread-routines): Add pthread_sigqueue.
924 * Versions: Add pthread_sigqueue for GLIBC_2.11.
925 * sysdeps/pthread/bits/sigthread.h: Declare pthread_sigqueue.
926 * sysdeps/unix/sysv/linux/pthread_sigqueue.c: New file.
927
1828530f
BK
9282009-06-11 Ulrich Drepper <drepper@redhat.com>
929
930 [BZ #10262]
931 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
932 (LOAD_FUTEX_WAIT_ABS): Fix futex parameter in case private futexes
933 cannot be assumed.
934 Patch by Bryan Kadzban <bz-glibc@kdzbn.homelinux.net>.
935
a5b8b56d
UD
9362009-05-16 Ulrich Drepper <drepper@redhat.com>
937
e20c4ef0
UD
938 * libc-cancellation.c: Move __libc_cleanup_routine to...
939 * libc-cleanup.c: ...here. New file.
940 * Makefile (routines): Add libc-cleanup.
941
cba0ca79
UD
942 * cancellation.c (__pthread_disable_asynccancel): Remove unnecessary
943 test.
944 * libc-cancellation.c: Use <nptl/cancellation.c: to define the code.
945 * sysdeps/pthread/librt-cancellation.c: Likewise.
946
a5b8b56d
UD
947 [BZ #9924]
948 * nptl-init.c: Renamed from init.c.
949 * Makefile: Change all occurences of init.c to nptl-init.c.
950
1a7f254b
UD
9512009-05-15 Ulrich Drepper <drepper@redhat.com>
952
9437b427
UD
953 * cancellation.c (__pthread_disable_asynccancel): Correct the bits
954 to test when deciding on the delay.
955 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
956 * pthread_cancel.c: Close race between deciding on sending a signal
957 and setting the CANCELING_BIT bit.
958
1a7f254b
UD
959 * cancellation.c (__pthread_disable_asynccancel): Don't return if
960 thread is canceled.
961 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
962
d5c157a9
UD
9632009-04-27 Ulrich Drepper <drepper@redhat.com>
964
965 * cancellation.c (__pthread_disable_asynccancel): Use THREAD_ATOMIC_AND
966 is available.
967 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
968 * sysdeps/x86_64/tls.h: Define THREAD_ATOMIC_AND.
969 * sysdeps/i386/tls.h: Likewise.
970 (tcbhead_t): Add __private_tm member.
971
f521be31
UD
9722009-04-26 Ulrich Drepper <drepper@redhat.com>
973
5efe8650
UD
974 * sem_open.c (sem_open): Rewrite initialization of initsem to
975 avoid warnings.
976
f521be31
UD
977 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
978 Avoid warning by using may_alias attribute on ptrhack.
979
d301a6e1
UD
9802009-04-22 Ulrich Drepper <drepper@redhat.com>
981
5497de87 982 [BZ #10090]
d301a6e1
UD
983 * pthread_attr_setschedparam.c (__pthread_attr_setschedparam):
984 Check policy and priority for validity.
985 Patch mostly by Zhang Xiliang <zhangxiliang@cn.fujitsu.com>.
986
71a5bd3e
UD
9872009-03-15 Ulrich Drepper <drepper@redhat.com>
988
989 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
990 (__pthread_cond_timedwait): Change to use cfi directives instead of
991 hand-coded unwind sections.
992
30991b8b
UD
9932009-03-10 Ulrich Drepper <drepper@redhat.com>
994
995 * init.c (nptl_freeres): Compile only for SHARED.
996
9920a6b8
JJ
9972009-03-09 Jakub Jelinek <jakub@redhat.com>
998
999 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Define
1000 FUTEX_WAIT_BITSET, FUTEX_WAKE_BITSET, FUTEX_CLOCK_REALTIME and
1001 FUTEX_BITSET_MATCH_ANY.
1002
e965d514
RM
10032009-02-27 Roland McGrath <roland@redhat.com>
1004
1005 * init.c (__nptl_initial_report_events): Mark __attribute_used__.
1006 * pthread_create.c (__nptl_threads_events, __nptl_last_event): Likewise.
1007
6cbe890a
UD
10082009-02-26 Ulrich Drepper <drepper@redhat.com>
1009
1010 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1011 _POSIX_THREAD_ROBUST_PRIO_INHERIT and
1012 _POSIX_THREAD_ROBUST_PRIO_PROTECT. Reset value of macros from
1013 200112L to 200809L.
1014
77db439e
UD
10152009-02-25 Ulrich Drepper <drepper@redhat.com>
1016
1017 * sysdeps/pthread/pthread.h: The robust mutex functions are in
1018 POSIX 2008.
1019
5be0a688
UD
10202009-02-24 Ulrich Drepper <drepper@redhat.com>
1021
1022 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_BITS_POSIX_OPT_H):
1023 Unify name of include protector macro.
1024
4c869eb6
UD
10252009-02-14 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
1026
1027 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
1028 LOAD_FUTEX_WAIT_ABS even if (FUTEX_WAIT == 0).
1029
cca50323
UD
10302009-01-29 Ulrich Drepper <drepper@redhat.com>
1031
7f901dd7
UD
1032 * sysdeps/pthread/unwind-forcedunwind.c: Encrypt all function
1033 pointer variables.
1034
cca50323
UD
1035 * allocatestack.c (__free_stacks): Renamed from free_stacks.
1036 (__free_stack_cache): Removed. Change callers to call __free_stacks.
1037 * init.c (nptl_freeres): New function.
1038 (pthread_functions): Initialize ptr_freeres to nptl_freeres.
1039 * pthreadP.h: Don't declare __free_stack_cache. Declare __free_stacks.
1040 * sysdeps/pthread/unwind-forcedunwind.c (libgcc_s_handle): New
1041 variable.
1042 (pthread_cancel_init): Depend in libgcc_s_handle for decision to
1043 load DSO. Assign last.
1044 (__unwind_freeres): New function.
1045
1046 * allocatestack.c (__reclaim_stacks): Reset in_flight_stack later
1047 for better debugging. No need to use stack_list_add here.
1048
a7bd183f
UD
10492009-01-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1050
1051 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
1052 (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
1053 instead of computing relative timeout.
1054 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
1055 FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
1056
563ee1cb
UD
10572009-01-25 Ulrich Drepper <drepper@redhat.com>
1058
1059 * pthread_mutex_lock.c (__pthread_mutex_lock): Remove unused label out.
1060
f25c7b08
UD
10612009-01-08 Ulrich Drepper <drepper@redhat.com>
1062
1063 * sysdeps/pthread/list.h (list_add): Initialize new element first.
1064 (list_add_tail): Removed.
1065
40de0fe3
JJ
10662009-01-07 Ulrich Drepper <drepper@redhat.com>
1067
1068 * (in_flight_stack): New variable.
1069 (stack_list_del): New function. Use instead of list_del.
1070 (stack_list_add): New function. Use instead of list_add when adding to
1071 stack_cache and stack_used lists.
1072 (__reclaim_stacks): Complete operations on stack_cache and stack_used lists
1073 when the fork call interrupted another thread.
1074
3c612057
UD
10752009-01-04 Ulrich Drepper <drepper@redhat.com>
1076
1077 * init.c (__pthread_initialize_minimal_internal): Optimize test
1078 FUTEX_CLOCK_REALTIME a bit.
1079
19834b42
UD
10802009-01-03 Ulrich Drepper <drepper@redhat.com>
1081
1082 * init.c (__pthread_initialize_minimal_internal): Cheat a bit by
1083 only passing five parameters to FUTEX_WAIT_BITSET call.
1084
1085 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
a9fa090b 1086 (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
19834b42
UD
1087 instead of computing relative timeout.
1088
7dd650d7
UD
10892009-01-02 Ulrich Drepper <drepper@redhat.com>
1090
cbd8aeb8
UD
1091 * init.c (__pthread_initialize_minimal_internal): Check for
1092 FUTEX_CLOCK_REALTIME flag.
1093 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
a9fa090b 1094 Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME instead of computing
cbd8aeb8
UD
1095 relative timeout.
1096
7dd650d7
UD
1097 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
1098 FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
1099 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1100 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1101 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1102 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1103
217d45cd
UD
11042008-12-09 Ulrich Drepper <drepper@redhat.com>
1105
1106 * sysdeps/pthread/pthread.h (pthread_cleanup_pop): Use { } as empty
1107 loop body instead of ; to avoid gcc warnings.
1108 (pthread_cleanup_pop_restore_np): Likewise.
1109 Patch by Caolán McNamara <caolanm@redhat.com>.
1110
6de79a49
UD
11112008-12-09 Jakub Jelinek <jakub@redhat.com>
1112
1113 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle only the
1114 fast path here, for robust/PI/PP mutexes call
1115 __pthread_mutex_lock_full. Don't use switch, instead use a series
1116 of ifs according to their probability.
1117 (__pthread_mutex_lock_full): New function.
1118 * pthread_mutex_unlock.c: Include assert.h.
1119 (__pthread_mutex_unlock_usercnt): Handle only the
1120 fast path here, for robust/PI/PP mutexes call
1121 __pthread_mutex_unlock_full. Don't use switch, instead use a series
1122 of ifs according to their probability.
1123 (__pthread_mutex_unlock_full): New function.
1124 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c
1125 (__pthread_mutex_lock_full): Define.
1126
71bb2639
UD
11272008-12-08 Ulrich Drepper <drepper@redhat.com>
1128
1129 * sysdeps/x86_64/tls.h (tcbhead_t): Add fields reserved for TM
1130 implementation. Add necessary padding and.
1131 * descr.h (struct pthread): Increase padding for tcbhead_t to 24
1132 words.
1133
247626f3
UD
11342008-12-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1135
1136 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define FUTEX_WAIT_BITSET
1137 and FUTEX_WAKE_BITSET.
1138
da5ac135
UD
11392008-12-02 Ulrich Drepper <drepper@redhat.com>
1140
1141 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_WAIT_BITSET
1142 and FUTEX_WAKE_BITSET.
1143 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1144 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1145 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1146 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1147
c0439b95
RM
11482008-11-25 Roland McGrath <roland@redhat.com>
1149
1150 * sysdeps/alpha, sysdeps/unix/sysv/linux/alpha:
1151 Subdirectories moved to ports repository as
1152 sysdeps/.../nptl subdirectories.
1153
0e54a725
UD
11542008-11-12 Jakub Jelinek <jakub@redhat.com>
1155
1156 [BZ #7008]
1157 * pthread_condattr_setclock.c (pthread_condattr_setclock): Fix masking
1158 of old value.
1159 * pthread_cond_init.c (__pthread_cond_init): Fix
1160 cond->__data.__nwaiters initialization.
1161 * Makefile (tests): Add tst-cond23.
1162 * tst-cond23.c: New test.
1163
4b23f9bd
JJ
11642008-11-07 Jakub Jelinek <jakub@redhat.com>
1165
1166 * sysdeps/pthread/malloc-machine.h (MALLOC): Adjust __libc_tsd_define
1167 arguments.
1168 (tsd_setspecific, tsd_getspecific): Adjust __libc_tsd_{set,get}
1169 arguments.
1170
efac1fce
UD
11712008-11-01 Ulrich Drepper <drepper@redhat.com>
1172
1173 [BZ #6955]
1174 * pthread_mutex_lock.c: Add support for private PI mutexes.
1175 * pthread_mutex_timedlock.c: Likewise.
1176 * pthread_mutex_trylock.c: Likewise.
1177 * pthread_mutex_unlock.c: Likewise.
1178 Patch mostly by Ben Jackson <ben@ben.com>.
1179
bf837fa3
UD
11802008-10-31 Ulrich Drepper <drepper@redhat.com>
1181
1182 [BZ #6843]
1183 * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread):
1184 Increase stack size for helper thread.
1185
208bc836
UD
11862008-10-06 Martin Schwidefsky <schwidefsky@de.ibm.com>
1187
1188 * sysdeps/s390/tls.h (THREAD_SET_STACK_GUARD): Add empty inline
1189 assembly with a clobber list for access registers a0 and a1.
1190
17f8b4a9
UD
11912008-09-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
1192
1193 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Add memory barrier
1194 to force runp->refcntr to be read from memory.
1195
2458c748
AJ
11962008-09-08 Richard Guenther <rguenther@suse.de>
1197
1198 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_lock,
1199 lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
1200 lll_timedlock, lll_robust_timedlock, lll_unlock,
1201 lll_robust_unlock): Promote private to int.
1202
965805e8
UD
12032008-08-15 Ulrich Drepper <drepper@redhat.com>
1204
1205 * sysdeps/x86_64/pthreaddef.h: Remove ARCH_MAP_FLAGS and
1206 ARCH_RETRY_MMAP definitions.
1207 * allocatestack.c: Remove definition of ARCH_MAP_FLAGS.
1208 Define MAP_STACK when not defined.
1209 (allocate_stack): Use MAP_STACK instead of ARCH_MAP_FLAGS. Remove
1210 handling of ARCH_RETRY_MMAP.
1211
bd7f4857
UD
12122008-07-30 Ulrich Drepper <drepper@redhat.com>
1213
1214 * tst-align2.c (f): Print message that f is reached.
1215
619cc2f6
UD
12162008-04-28 Hiroki Kaminaga <kaminaga@sm.sony.co.jp>
1217
1218 [BZ #6740]
1219 * sysdeps/powerpc/tcb-offsets.sym (PRIVATE_FUTEX_OFFSET): Guard symbol
1220 definition with #ifndef __ASSUME_PRIVATE_FUTEX.
1221
8ccf22f9
UD
12222008-07-25 Ulrich Drepper <drepper@redhat.com>
1223
1224 * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Use
1225 SOCK_CLOEXEC if possible.
1226
12272008-05-29 Ulrich Drepper <drepper@redhat.com>
1228
1229 * Makefile (tests): Add tst-rwlock2a.
1230 * tst-rwlock2.c: Use TYPE macro to decide what rwlock type to use.
1231 * tst-rwlock2a.c: New file.
1232
5a337776
UD
12332008-06-12 Ulrich Drepper <drepper@redhat.com>
1234
1235 * sysdeps/pthread/pthread.h: Remove inadvertant checkin.
1236
e4d6e7f5
UD
12372008-05-17 Samuel Thibault <samuel.thibault@ens-lyon.org>
1238
1239 * sysdeps/pthread/pthread.h: Fix typo in comment.
1240
d6296e88
UD
12412008-05-28 Ulrich Drepper <drepper@redhat.com>
1242
1243 * sysdeps/pthread/createthread.c (do_clone): Pass accurate length
1244 of CPU set to the kernel.
1245
62605cbf
UD
12462008-05-23 Paul Pluzhnikov <ppluzhnikov@google.com>
1247
1248 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Add
1249 cfi directives.
1250 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
1251 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
1252 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1253 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1254 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1255 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1256
12572008-05-22 Paul Pluzhnikov <ppluzhnikov@google.com>
1258
1259 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: Add
1260 cfi directives.
1261 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1262 Likewise.
1263 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1264 Likewise.
1265 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1266 Likewise.
1267
4b2c85c0
UD
12682008-05-26 Ulrich Drepper <drepper@redhat.com>
1269
1270 * tst-typesizes.c: Explicitly check __SIZEOF_PTHREAD_* constants.
1271
b72f5692 12722008-05-20 Jakub Jelinek <jakub@redhat.com>
4b2c85c0
UD
1273
1274 David S. Miller <davem@davemloft.net>
3b15b590 1275
b72f5692 1276 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
3b15b590 1277
cdffaaa6
UD
12782008-05-10 Ulrich Drepper <drepper@redhat.com>
1279
1280 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Access
1281 __pshared correctly.
1282 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1283 Likewise.
1284 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1285 Likewise.
1286 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
1287 Likewise.
1288 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
1289 Likewise.
1290 Reported by Clemens Kolbitsch <clemens.kol@gmx.at>.
1291
2313c48f
JJ
12922008-04-14 David S. Miller <davem@davemloft.net>
1293
1294 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
1295 (__old_sem_wait): Fix argument to lll_futex_wait().
1296
2f611ada
UD
12972007-11-26 Daniel Jacobowitz <dan@codesourcery.com>
1298
1299 * pthread_create.c: Require pthread_mutex_trylock and
1300 pthread_key_delete for libgcc.
1301
d24be489
JJ
13022008-04-08 Jakub Jelinek <jakub@redhat.com>
1303
1304 [BZ #6020]
1305 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
1306 (lll_futex_wake_unlock): Add private argument to the pre-v9 macro.
1307 Patch by Sunil Amitkumar Janki <devel.sjanki@gmail.com>.
1308
f96853be
UD
13092008-03-27 Ulrich Drepper <drepper@redhat.com>
1310
8ccf22f9 1311 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine ARG_MAX if
f96853be
UD
1312 <linux/limits.h> has defined it.
1313 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
1314 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
1315 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
1316 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
1317
354b7527
JJ
13182008-03-18 Jakub Jelinek <jakub@redhat.com>
1319
1320 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Use __ASSEMBLER__ instead
1321 of ASSEMBLER.
1322 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
1323 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Likewise.
1324
702ae329
UD
13252008-03-14 Ulrich Drepper <drepper@redhat.com>
1326
1327 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
1328 HAVE_DL_DISCOVER_OSVERSION.
1329 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
1330 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Likewise.
1331
443db178
UD
13322008-03-07 Ulrich Drepper <drepper@redhat.com>
1333
1334 [BZ #5778]
1335 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Change
1336 _POSIX_CHOWN_RESTRICTED value to zero.
1337
67fbfa5c
RM
13382008-01-31 Roland McGrath <roland@redhat.com>
1339
1340 * Makefile (omit-deps): Variable removed.
1341
dd3113da
UD
13422008-01-30 Ulrich Drepper <drepper@redhat.com>
1343
1344 * sysdeps/unix/sysv/linux/x86_64/sem_post.S (sem_post): Avoid
1345 unnecessary addr32 prefix.
1346
16cd816f
RM
13472008-01-29 Roland McGrath <roland@redhat.com>
1348
1349 * Makeconfig (ptw-CPPFLAGS, sysd-rules-patterns): New variables.
1350
b4b166af
UD
13512008-01-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1352
1353 * sysdeps/unix/sysv/linux/sh/sem_post.S: Don't overflow value field.
1354
13552008-01-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1356
1357 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XADD): Use
1358 a scratch register.
1359 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
1360 (__lll_lock_wait_private): Fix typo.
1361 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
1362 (pthread_barrier_wait): Likewise. Adjust XADD use.
1363 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
1364 Adjust XADD use.
1365 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
1366 (pthread_rwlock_timedrdlock): Return correct return value.
1367 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
16cd816f 1368 (pthread_rwlock_timedwrlock): Likewise.
b4b166af 1369
eaf95a26
UD
13702008-01-15 Ulrich Drepper <drepper@redhat.com>
1371
1372 * tst-eintr2.c (do_test): make sure that if mutex_lock in main
1373 thread returns the program exits with an error code.
1374
ab355d9a
UD
13752008-01-10 Ulrich Drepper <drepper@redhat.com>
1376
1377 * pthread-errnos.sym: Add EOVERFLOW.
1378 * sysdeps/unix/sysv/linux/structsem.sym: Add SEM_VALUE_MAX.
1379 * sysdeps/unix/sysv/linux/sem_post.c: Don't overflow value field.
1380 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1381 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1382
b8cca206
UD
13832007-12-14 Ulrich Drepper <drepper@redhat.com>
1384
1385 * sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
1386 parameter. Passed it as permission to mmap.
1387 * allocatestack.c (allocate_stack): Pass prot as second parameter
1388 to ARCH_RETRY_MMAP.
1389
189dce4f
UD
13902007-12-12 Ulrich Drepper <drepper@redhat.com>
1391
3eb0e1c6
UD
1392 * tst-basic7.c: Allocate memory for the stack.
1393
189dce4f
UD
1394 [BZ #5465]
1395 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
1396 (__pthread_cond_timedwait): Don't use VDSO.
58d11795 1397 Patch by Michal Januszewski.
189dce4f 1398
26e21e75
UD
13992007-12-07 Ulrich Drepper <drepper@redhat.com>
1400
1401 [BZ #5455]
1402 * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
1403 Allow label before pthread_cleanup_pop.
1404 (pthread_cleanup_pop_restore_np): Likewise.
1405
191ec77f
UD
14062007-12-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1407
1408 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
1409 Store 2 before returning ETIMEDOUT.
1410
c012be6f
UD
14112007-11-23 Ulrich Drepper <drepper@redhat.com>
1412
1413 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
1414 Store 2 before returning ETIMEDOUT.
1415 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
1416 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
1417 (__lll_lock_wait_private): Optimize.
1418 (__lll_lock_wait): Likewise.
1419
77f1e09a
UD
14202007-11-20 Jakub Jelinek <jakub@redhat.com>
1421
1422 * sysdeps/pthread/pthread.h (pthread_cleanup_push,
1423 pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
1424 g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
1425
0f7e0ee5
UD
14262007-11-08 Ulrich Drepper <drepper@redhat.com>
1427
cbed6a60
UD
1428 [BZ #5240]
1429 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
1430 If we time out, try one last time to lock the futex to avoid
1431 losing a wakeup signal.
1432 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1433 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1434
0f7e0ee5
UD
1435 [BZ #5245]
1436 * sysdeps/pthread/createthread.c (do_clone): Translate clone error
1437 if necessary.
1438
f6ed654c
UD
14392007-11-07 Ulrich Drepper <drepper@redhat.com>
1440
1441 [BZ #5245]
1442 * allocatestack.c (allocate_stack): Change ENOMEM error in case
1443 mmap failed to EAGAIN.
1444 * Makefile (tests): Add tst-basic7.
1445 * tst-basic7.c: New file.
1446
b92e3780
UD
14472007-11-05 Ulrich Drepper <drepper@redhat.com>
1448
1449 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
1450 Use __linkin_atfork.
1451
94a749f6
UD
14522007-11-03 Mike Frysinger <vapier@gentoo.org>
1453
1454 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
1455 missing line continuations.
1456 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
1457 LOAD_FUTEX_WAKE): Likewise. Also add missing 3rd parameter.
1458
f160a450
UD
14592007-10-28 Ulrich Drepper <drepper@redhat.com>
1460
1461 [BZ #5220]
1462 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
1463 __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
1464 (struct timer): Add next element.
1465 * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
1466 enqueue timer structure into __active_timer_sigev_thread list.
1467 * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
1468 remove timer struct from __active_timer_sigev_thread.
1469 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
1470 Before using timer structure make sure it is still on the
1471 __active_timer_sigev_thread list. Keep lock until done.
1472 Define __active_timer_sigev_thread and
1473 __active_timer_sigev_thread_lock.
1474
94833f11
UD
14752007-10-27 Ulrich Drepper <drepper@redhat.com>
1476
1477 * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
1478 Redefine thread_atfork for use of ATFORK_MEM.
1479 * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
1480 * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
1481 function.
1482 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
1483 Use atomic operation when removing first element of list.
1484
96c06e08
JJ
14852007-10-17 Jakub Jelinek <jakub@redhat.com>
1486
1487 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
1488 routine instead of an alias to __new_sem_post.
1489
e807818b
JJ
14902007-10-15 Jakub Jelinek <jakub@redhat.com>
1491
1492 * init.c (__pthread_initialize_minimal): Initialize word to appease
1493 valgrind.
1494
59d430c6
UD
14952007-10-10 Jakub Jelinek <jakub@redhat.com>
1496
1497 * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
1498 libc.so just clear NAME.
1499 (__libc_rwlock_fini): Nop inside of libc.so.
1500 * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
1501 all zeros.
1502
221d9d8e
UD
15032007-09-02 Ulrich Drepper <drepper@redhat.com>
1504
1505 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1506 (__pthread_cond_wait): Fix unlocking of internal lock after mutex
1507 unlocking failed.
1508 Patch by Luca Barbieri <luca.barbieri@gmail.com>.
1509
2a01ce56
UD
15102007-08-21 Ulrich Drepper <drepper@redhat.com>
1511
1512 [BZ #4938]
1513 * allocatestack.c (__reclaim_stacks): Clear the TSD in the
1514 reclaimed stack if necessary.
1515 * Makefile (tests): Add tst-tsd6.
1516 * tst-tsd6.c: New file.
1517
c273641b
JJ
15182007-08-21 Jakub Jelinek <jakub@redhat.com>
1519
1520 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
1521 Add private argument.
1522
fb84593c
UD
15232007-08-20 Ulrich Drepper <drepper@redhat.com>
1524
1525 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1526 (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
1527
3e8d1eab
JJ
15282007-08-16 Jakub Jelinek <jakub@redhat.com>
1529
1530 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
1531 (__lll_robust_timedlock): Pass private as last argument to
1532 __lll_robust_timedlock_wait.
1533 (__lll_unlock): Fix a pasto.
1534
e4720b0e
JJ
15352007-08-15 Jakub Jelinek <jakub@redhat.com>
1536
1537 * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
1538 sparc_old_sem): New structs.
1539 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
1540 (__sem_wait_cleanup): New function.
1541 (__new_sem_wait): Use sparc_new_sem structure. Bump and afterwards
1542 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
1543 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
1544 lll_futex_wait.
1545 (__old_sem_wait): New function.
1546 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
1547 nptl/sysdeps/unix/sysv/linux/sparc version.
1548 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
1549 Likewise.
1550 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
1551 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
1552 (__new_sem_trywait): Use sparc_old_sem structure.
1553 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
1554 (sem_timedwait): Use sparc_new_sem structure. Bump and afterwards
1555 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
1556 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
1557 lll_futex_timed_wait.
1558 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
1559 Use sparc_new_sem structure. Only wake if nwaiters > 0. Pass
1560 isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
1561 lll_futex_wake.
1562 (__old_sem_post): New function.
1563 * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
1564 * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
1565 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
1566 * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
1567 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
1568 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
1569
d13f4a43
UD
15702007-08-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1571
1572 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
1573 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
1574 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1575 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
1576 * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
1577 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
1578 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1579 Use FUTEX_WAKE_OP.
1580 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
1581 kernel-features.h and tcb-offsets.h.
1582 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
1583 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
1584 process private.
1585 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
1586 tcb-offsets.h.
1587 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
1588 to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
1589 process private.
1590 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
1591 __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
1592 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
1593 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
1594 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
1595 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
1596 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1597
702a9414
JJ
15982007-08-14 Jakub Jelinek <jakub@redhat.com>
1599
467d1345
JJ
1600 * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
1601 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
1602 (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
1603 lll_futex_timed_wait.
1604
702a9414
JJ
1605 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
1606 __lll_robust_unlock): Rewrite as macros instead of inline functions.
1607 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
1608 __lll_robust_unlock, __lll_wait_tid): Likewise.
1609
22502ea2
UD
16102007-08-13 Jakub Jelinek <jakub@redhat.com>
1611
1612 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
1613 Fix a pasto.
1614 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
1615 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
1616 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1617 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
1618 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
1619 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
1620 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1621 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
1622 kernel-features.h.
1623 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
1624 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
1625 process private. Switch DW_CFA_advance_loc1 and some
1626 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
1627 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
1628 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
1629 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
1630 process private. Switch DW_CFA_advance_loc{1,2} and some
1631 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
1632 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
1633 #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
1634 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1635 Likewise.
1636 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1637 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1638 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1639 Likewise.
1640 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
1641 (__pthread_cond_broadcast): Compare %r8 instead of
1642 dep_mutex-cond_*(%rdi) with $-1.
1643 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
1644 (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
1645 of oring.
1646
4baf59ad
UD
16472007-08-13 Ulrich Drepper <drepper@redhat.com>
1648
1649 * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
1650
9c6f6953
UD
16512007-08-13 Jakub Jelinek <jakub@redhat.com>
1652
1653 * allocatestack.c: Include kernel-features.h.
1654 * pthread_create.c: Likewise.
1655 * pthread_mutex_init.c: Likewise.
1656 * init.c: Likewise.
1657 * pthread_cond_timedwait.c: Likewise.
1658 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
1659 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1660 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1661 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1662 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1663 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1664 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1665 Likewise.
1666 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1667 Likewise.
1668 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1669 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1670 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1671 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
1672
974a1f0f
UD
16732007-08-12 Jakub Jelinek <jakub@redhat.com>
1674
1675 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
1676 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
1677 byte elements. One of them is the new __shared element.
1678 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
1679 adjust names of other padding elements.
1680 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
1681 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
1682 byte elements. One of them is the new __shared element.
1683 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
1684 adjust names of other padding elements.
1685 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
1686 Renamed __pad1 element to __shared, adjust names of other padding
1687 elements.
1688 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
1689 (pthread_rwlock_t): Likewise.
1690 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
1691 typo.
1692
16932007-08-09 Anton Blanchard <anton@samba.org>
1694
1695 * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
1696
f47e2626
UD
16972007-08-12 Ulrich Drepper <drepper@redhat.com>
1698
1699 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
1700 <kernel-features.h>.
1701 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1702
5bd8a249
UD
17032007-08-11 Ulrich Drepper <drepper@redhat.com>
1704
1705 * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
1706 * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
1707 dealing with robust mutexes.
1708 * pthread_mutex_timedlock.c: Likewise.
1709 * pthread_mutex_trylock.c: Likewise.
1710 * pthread_mutex_unlock.c: Likewise.
1711 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
1712
17132007-08-06 Jakub Jelinek <jakub@redhat.com>
1714
1715 * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
1716 (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
1717 (PTHREAD_MUTEX_PSHARED): Define.
1718 * pthread_mutex_init.c (__pthread_mutex_init): Set
1719 PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
1720 mutexes.
1721 * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
1722 instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
1723 as second argument to lll_lock.
1724 (LLL_MUTEX_TRYLOCK): Take mutex as argument
1725 instead of its __data.__lock field.
1726 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
1727 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
1728 to lll_robust_lock.
1729 (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
1730 LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
1731 instead of mutex->__data.__kind directly, pass
1732 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
1733 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
1734 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
1735 directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
1736 (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
1737 to lll_timedlock, lll_robust_timedlock, lll_unlock and
1738 lll_futex_timed_wait. Use PTHREAD_MUTEX_TYPE (mutex) instead
1739 of mutex->__data.__kind directly.
1740 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
1741 PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
1742 lll_robust_timedlock, lll_unlock and lll_futex_timed_wait. Use
1743 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
1744 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
1745 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
1746 and lll_futex_wake.
1747 * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
1748 PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
1749 Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
1750 directly.
1751 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
1752 Take mutex as argument instead of its __data.__lock field, pass
1753 PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
1754 (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
1755 __data.__lock field.
1756 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
1757 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
1758 to lll_robust_cond_lock.
1759 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
1760 variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
1761 lll_futex_wake. Don't use lll_futex_requeue if dependent mutex
1762 has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
1763 * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
1764 variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
1765 lll_futex_wait.
1766 * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
1767 variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
1768 lll_futex_wake.
1769 * pthread_cond_timedwait.c (__pthread_cond_wait): Add
1770 pshared variable, pass it to lll_lock, lll_unlock,
1771 lll_futex_timedwait and lll_futex_wake.
1772 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
1773 pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
1774 and lll_futex_wake.
1775 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
1776 lll_futex_wake_unlock): Add private argument, use __lll_private_flag
1777 macro.
1778 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
1779 lll_futex_wake_unlock): Likewise.
1780 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
1781 Likewise.
1782 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
1783 lll_futex_wake_unlock): Likewise.
1784 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
1785 Likewise.
1786 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
1787 lll_futex_wake_unlock): Likewise.
1788 (lll_futex_wake): Fix a typo.
1789 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
1790 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
1791 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
1792 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1793 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
1794 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
1795 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
1796 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1797 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1798 (__pthread_cond_timedwait): Likewise.
1799 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
1800 (__condvar_cleanup, __pthread_cond_wait): Likewise.
1801
0470fa46
JJ
18022007-08-05 Jakub Jelinek <jakub@redhat.com>
1803
1804 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
1805 Don't use CGOTSETUP and CGOTRESTORE macros.
1806 (CGOTSETUP, CGOTRESTORE): Remove.
1807 <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
1808 @local symbol.
1809
64f6281c
UD
18102007-08-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1811
1812 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
1813 definitions for private futexes.
1814 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
1815 kernel-features.h and lowlevellock.h. Use private futexes if
1816 they are available.
1817 (__lll_lock_wait_private, __lll_unlock_wake_private): New.
1818 (__lll_mutex_lock_wait): Rename to
1819 (__lll_lock_wait): ... this. Don't compile in for libc.so.
1820 (__lll_mutex_timedlock_wait): Rename to ...
1821 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday.
1822 Don't compile in for libc.so.
1823 (__lll_mutex_unlock_wake): Rename to ...
1824 (__lll_unlock_wake): ... this. Don't compile in for libc.so.
1825 (__lll_timedwait_tid): Use __NR_gettimeofday.
1826 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
1827 the header from assembler. Renamed all lll_mutex_* resp.
1828 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
1829 Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
1830 (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
1831 Define.
1832 (__lll_lock_wait_private): Add prototype.
1833 (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
1834 __lll_robust_timedlock_wait, __lll_unlock_wake_private,
1835 __lll_unlock_wake): Likewise.
1836 (lll_lock): Add private argument. Call __lll_lock_wait_private
1837 if private is constant LLL_PRIVATE.
1838 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
1839 lll_timedlock, lll_robust_timedlock): Add private argument.
1840 (lll_unlock): Add private argument. Call __lll_unlock_wake_private
1841 if private is constant LLL_PRIVATE.
1842 (lll_robust_unlock, lll_robust_dead): Add private argument.
1843 (lll_lock_t): Remove.
1844 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
1845 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
1846 lll_cond_wake, lll_cond_broadcast): Remove.
1847 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
1848 kernel-features.h and lowlevellock.h.
1849 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
1850 (LOAD_FUTEX_WAIT): Define.
1851 (__lll_robust_mutex_lock_wait): Rename to ...
1852 (__lll_robust_lock_wait): ... this. Add private argument.
1853 Use LOAD_FUTEX_WAIT macro.
1854 (__lll_robust_mutex_timedlock_wait): Rename to ...
1855 (__lll_robust_timedlock_wait): ... this. Add private argument.
1856 Use __NR_gettimeofday. Use LOAD_FUTEX_WAIT macro.
1857 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
1858 lowlevellock.h.
1859 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
1860 (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
1861 __lll_mutex_{lock,unlock}_*.
1862 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
1863 lowlevellock.h and pthread-errnos.h.
1864 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
1865 FUTEX_CMP_REQUEUE, EINVAL): Remove.
1866 (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
1867 __lll_mutex_{lock,unlock}_*.
1868 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
1869 lowlevellock.h and pthread-errnos.h.
1870 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
1871 (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
1872 __lll_mutex_{lock,unlock}_*.
1873 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
1874 lowlevellock.h.
1875 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
1876 (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
1877 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
1878 (__condvar_tw_cleanup): Likewise.
1879 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
1880 lowlevellock.h.
1881 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
1882 (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
1883 __lll_mutex_{lock,unlock}_*.
1884 ( __condvar_w_cleanup): Likewise.
1885 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
1886 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1887 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
1888 lowlevellock.h.
1889 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1890 (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
1891 __lll_mutex_{lock,unlock}_*.
1892 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
1893 lowlevellock.h.
1894 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
1895 FUTEX_PRIVATE_FLAG): Remove.
1896 (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
1897 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
1898 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
1899 lowlevellock.h.
1900 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
1901 FUTEX_PRIVATE_FLAG): Remove.
1902 (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
1903 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
1904 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
1905 lowlevellock.h.
1906 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1907 (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
1908 __lll_mutex_{lock,unlock}_*.
1909 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
1910 lowlevellock.h.
1911 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1912 (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
1913 __lll_mutex_{lock,unlock}_*.
1914 * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
1915 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1916 (__new_sem_post): Use standard initial exec code sequences.
1917 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
1918 lowlevellock.h.
1919 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
1920 FUTEX_PRIVATE_FLAG): Remove.
1921 (sem_timedwait): Use __NR_gettimeofday. Use standard initial
1922 exec code sequences.
1923 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
1924 (__new_sem_trywait): Use standard initial exec code sequences.
1925 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
1926 (__new_sem_wait): Use standard initial exec code sequences.
1927
e51deae7
UD
19282007-07-31 Anton Blanchard <anton@samba.org>
1929
1930 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
1931 Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
1932 atomic_full_barrier.
1933
19342007-07-31 Jakub Jelinek <jakub@redhat.com>
1935
1936 * allocatestack.c (stack_cache_lock): Change type to int.
1937 (get_cached_stack, allocate_stack, __deallocate_stack,
1938 __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
1939 __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
1940 as second argument to lll_lock and lll_unlock macros on
1941 stack_cache_lock.
1942 * pthread_create.c (__find_in_stack_list): Likewise.
1943 (start_thread): Similarly with pd->lock. Use lll_robust_dead
1944 macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
1945 as second argument.
1946 * descr.h (struct pthread): Change lock and setxid_futex field
1947 type to int.
1948 * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
1949 LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
1950 * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
1951 * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
1952 Likewise.
1953 * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
1954 * pthread_cond_init.c (__pthread_cond_init): Likewise.
1955 * pthreadP.h (__attr_list_lock): Change type to int.
1956 * pthread_attr_init.c (__attr_list_lock): Likewise.
1957 * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
1958 ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
1959 lll_{,un}lock.
1960 * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
1961 also for lll_futex_{wake,wait}.
1962 * pthread_barrier_init.c (pthread_barrier_init): Make iattr
1963 a pointer to const.
1964 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
1965 LLL_SHARED as second argument to lll_{,un}lock.
1966 * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
1967 * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
1968 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
1969 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
1970 Likewise.
1971 * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
1972 as second argument to lll_{,un}lock macros on pd->lock.
1973 * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
1974 * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
1975 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
1976 * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
1977 Likewise.
1978 * sysdeps/pthread/createthread.c (do_clone, create_thread):
1979 Likewise.
1980 * pthread_once.c (once_lock): Change type to int.
1981 (__pthread_once): Pass LLL_PRIVATE as second argument to
1982 lll_{,un}lock macros on once_lock.
1983 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
1984 lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
1985 rwlock->__data.__shared as second argument to them and similarly
1986 for lll_futex_w*.
1987 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
1988 Likewise.
1989 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
1990 Likewise.
1991 * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
1992 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
1993 * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
1994 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1995 * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
1996 to lll_{,un}lock macros on __sem_mappings_lock.
1997 * sem_open.c (check_add_mapping): Likewise.
1998 (__sem_mappings_lock): Change type to int.
1999 * semaphoreP.h (__sem_mappings_lock): Likewise.
2000 * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
2001 LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
2002 instead of lll_*mutex_*, pass LLL_SHARED as last
2003 argument.
2004 (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
2005 pass LLL_SHARED as last argument.
2006 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
2007 LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
2008 lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
2009 pass LLL_SHARED as last argument.
2010 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
2011 lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
2012 LLL_SHARED as last argument.
2013 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
2014 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
2015 Similarly.
2016 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
2017 __libc_lock_lock_recursive, __libc_lock_unlock,
2018 __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
2019 argument to lll_{,un}lock.
2020 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
2021 _IO_lock_unlock): Likewise.
2022 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
2023 compound literal.
2024 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
2025 Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
2026 __fork_lock.
2027 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
2028 free_mem): Likewise.
2029 (__fork_lock): Change type to int.
2030 * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
2031 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
2032 isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
2033 lll_futex_wake.
2034 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
2035 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
2036 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
2037 New function.
2038 (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
2039 pass it through to lll_futex_*wait, only compile in when
2040 IS_IN_libpthread.
2041 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
2042 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
2043 argument and pass it through to lll_futex_*wait.
2044 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
2045 lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
2046 lll_robust_*. Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
2047 inline functions to __lll_* resp. __lll_robust_*.
2048 (LLL_MUTEX_LOCK_INITIALIZER): Remove.
2049 (lll_mutex_dead): Add private argument.
2050 (__lll_lock_wait_private): New prototype.
2051 (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
2052 __lll_robust_lock_timedwait): Add private argument to prototypes.
2053 (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
2054 call __lll_lock_wait_private, otherwise pass private to
2055 __lll_lock_wait.
2056 (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
2057 __lll_robust_timedlock): Add private argument, pass it to
2058 __lll_*wait functions.
2059 (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
2060 call __lll_unlock_wake_private, otherwise pass private to
2061 __lll_unlock_wake.
2062 (__lll_robust_unlock): Add private argument, pass it to
2063 __lll_robust_unlock_wake.
2064 (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
2065 lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
2066 argument, pass it through to __lll_* inline function.
2067 (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
2068 (lll_lock_t): Remove.
2069 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
2070 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
2071 lll_cond_wake, lll_cond_broadcast): Remove.
2072 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2073 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2074 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2075 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2076 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
2077 the header from assembler. Renamed all lll_mutex_* resp.
2078 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
2079 (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
2080 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2081 (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
2082 LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
2083 (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
2084 __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
2085 Remove prototype.
2086 (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
2087 (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
2088 rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
2089 (lll_trylock): Likewise, use __lll_trylock_asm, pass
2090 MULTIPLE_THREADS_OFFSET as another asm operand.
2091 (lll_lock): Add private argument, use __lll_lock_asm_start, pass
2092 MULTIPLE_THREADS_OFFSET as last asm operand, call
2093 __lll_lock_wait_private if private is constant LLL_PRIVATE,
2094 otherwise pass private as another argument to __lll_lock_wait.
2095 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
2096 lll_timedlock, lll_robust_timedlock): Add private argument, pass
2097 private as another argument to __lll_*lock_wait call.
2098 (lll_unlock): Add private argument, use __lll_unlock_asm, pass
2099 MULTIPLE_THREADS_OFFSET as another asm operand, call
2100 __lll_unlock_wake_private if private is constant LLL_PRIVATE,
2101 otherwise pass private as another argument to __lll_unlock_wake.
2102 (lll_robust_unlock): Add private argument, pass private as another
2103 argument to __lll_unlock_wake.
2104 (lll_robust_dead): Add private argument, use __lll_private_flag
2105 macro.
2106 (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
2107 LLL_MUTEX_LOCK_INITIALIZER.
2108 (lll_lock_t): Remove.
2109 (LLL_LOCK_INITIALIZER_WAITERS): Define.
2110 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
2111 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
2112 lll_cond_wake, lll_cond_broadcast): Remove.
2113 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2114 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
2115 2007-05-2{3,9} changes.
2116 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
2117 kernel-features.h and lowlevellock.h.
2118 (LOAD_PRIVATE_FUTEX_WAIT): Define.
2119 (LOAD_FUTEX_WAIT): Rewritten.
2120 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
2121 define.
2122 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
2123 (__lll_mutex_lock_wait): Rename to ...
2124 (__lll_lock_wait): ... this. Take futex addr from %edx instead of
2125 %ecx, %ecx is now private argument. Don't compile in for libc.so.
2126 (__lll_mutex_timedlock_wait): Rename to ...
2127 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday. %esi
2128 contains private argument. Don't compile in for libc.so.
2129 (__lll_mutex_unlock_wake): Rename to ...
2130 (__lll_unlock_wake): ... this. %ecx contains private argument.
2131 Don't compile in for libc.so.
2132 (__lll_timedwait_tid): Use __NR_gettimeofday.
2133 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
2134 kernel-features.h and lowlevellock.h.
2135 (LOAD_FUTEX_WAIT): Define.
2136 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
2137 define.
2138 (__lll_robust_mutex_lock_wait): Rename to ...
2139 (__lll_robust_lock_wait): ... this. Futex addr is now in %edx
2140 argument, %ecx argument contains private. Use LOAD_FUTEX_WAIT
2141 macro.
2142 (__lll_robust_mutex_timedlock_wait): Rename to ...
2143 (__lll_robust_timedlock_wait): ... this. Use __NR_gettimeofday.
2144 %esi argument contains private, use LOAD_FUTEX_WAIT macro.
2145 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
2146 lowlevellock.h.
2147 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2148 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
2149 PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
2150 __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
2151 to __lll_lock_wait in %edx.
2152 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
2153 Include lowlevellock.h and pthread-errnos.h.
2154 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
2155 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
2156 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
2157 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
2158 pass LLL_SHARED in %ecx to both __lll_lock_wait and
2159 __lll_unlock_wake.
2160 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
2161 Include lowlevellock.h and pthread-errnos.h.
2162 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
2163 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
2164 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
2165 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
2166 pass LLL_SHARED in %ecx to both __lll_lock_wait and
2167 __lll_unlock_wake.
2168 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
2169 Include lowlevellock.h.
2170 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
2171 Don't define.
2172 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
2173 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
2174 pass LLL_SHARED in %ecx to both __lll_lock_wait and
2175 __lll_unlock_wake. Use __NR_gettimeofday.
2176 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
2177 Include lowlevellock.h.
2178 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2179 (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
2180 to __lll_*, pass cond_lock address in %edx rather than %ecx to
2181 __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
2182 and __lll_unlock_wake.
2183 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
2184 Include lowlevellock.h.
2185 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2186 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
2187 MUTEX(%ebx) address in %edx rather than %ecx to
2188 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
2189 and __lll_unlock_wake. Move return value from %ecx to %edx
2190 register.
2191 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2192 Include lowlevellock.h.
2193 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
2194 Don't define.
2195 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
2196 MUTEX(%ebp) address in %edx rather than %ecx to
2197 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
2198 and __lll_unlock_wake. Move return value from %ecx to %edx
2199 register. Use __NR_gettimeofday.
2200 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2201 Include lowlevellock.h.
2202 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
2203 Don't define.
2204 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
2205 MUTEX(%ebp) address in %edx rather than %ecx to
2206 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
2207 and __lll_unlock_wake. Move return value from %ecx to %edx
2208 register. Use __NR_gettimeofday.
2209 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
2210 Include lowlevellock.h.
2211 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2212 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
2213 MUTEX(%edi) address in %edx rather than %ecx to
2214 __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
2215 and __lll_unlock_wake.
2216 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
2217 Include lowlevellock.h.
2218 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2219 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
2220 MUTEX(%ebx) address in %edx rather than %ecx to
2221 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
2222 and __lll_unlock_wake. Move return value from %ecx to %edx
2223 register.
2224 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
2225 lowlevellock.h.
2226 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
2227 define.
2228 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
2229 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
2230 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
2231 lowlevellock.h.
2232 (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
2233 (sem_timedwait): Use __NR_gettimeofday.
2234 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
2235 lowlevellock.h.
2236 (LOCK): Don't define.
2237 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
2238 lowlevellock.h.
2239 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
2240 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
2241 are waiters.
2242 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
2243 2007-05-2{3,9} changes.
2244 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
2245 kernel-features.h and lowlevellock.h.
2246 (LOAD_PRIVATE_FUTEX_WAIT): Define.
2247 (LOAD_FUTEX_WAIT): Rewritten.
2248 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
2249 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
2250 (__lll_mutex_lock_wait): Rename to ...
2251 (__lll_lock_wait): ... this. %esi is now private argument.
2252 Don't compile in for libc.so.
2253 (__lll_mutex_timedlock_wait): Rename to ...
2254 (__lll_timedlock_wait): ... this. %esi contains private argument.
2255 Don't compile in for libc.so.
2256 (__lll_mutex_unlock_wake): Rename to ...
2257 (__lll_unlock_wake): ... this. %esi contains private argument.
2258 Don't compile in for libc.so.
2259 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
2260 kernel-features.h and lowlevellock.h.
2261 (LOAD_FUTEX_WAIT): Define.
2262 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
2263 (__lll_robust_mutex_lock_wait): Rename to ...
2264 (__lll_robust_lock_wait): ... this. %esi argument contains private.
2265 Use LOAD_FUTEX_WAIT macro.
2266 (__lll_robust_mutex_timedlock_wait): Rename to ...
2267 (__lll_robust_timedlock_wait): ... this. %esi argument contains
2268 private, use LOAD_FUTEX_WAIT macro.
2269 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
2270 lowlevellock.h.
2271 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2272 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
2273 PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
2274 __lll_lock_wait and __lll_unlock_wake.
2275 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
2276 Include lowlevellock.h and pthread-errnos.h.
2277 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
2278 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
2279 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
2280 pass LLL_SHARED in %esi to both __lll_lock_wait and
2281 __lll_unlock_wake.
2282 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
2283 Include lowlevellock.h and pthread-errnos.h.
2284 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
2285 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
2286 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
2287 pass LLL_SHARED in %esi to both __lll_lock_wait and
2288 __lll_unlock_wake.
2289 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
2290 Include lowlevellock.h.
2291 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2292 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
2293 pass LLL_SHARED in %esi to both __lll_lock_wait and
2294 __lll_unlock_wake.
2295 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
2296 Include lowlevellock.h.
2297 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2298 (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
2299 to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
2300 and __lll_unlock_wake.
2301 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
2302 Include lowlevellock.h.
2303 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2304 Don't define.
2305 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
2306 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
2307 and __lll_unlock_wake.
2308 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
2309 Include lowlevellock.h.
2310 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2311 Don't define.
2312 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
2313 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
2314 and __lll_unlock_wake.
2315 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2316 Include lowlevellock.h.
2317 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2318 Don't define.
2319 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
2320 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
2321 and __lll_unlock_wake.
2322 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
2323 Include lowlevellock.h.
2324 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2325 Don't define.
2326 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
2327 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
2328 and __lll_unlock_wake.
2329 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
2330 Include lowlevellock.h.
2331 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2332 Don't define.
2333 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
2334 pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
2335 and __lll_unlock_wake.
2336 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
2337 lowlevellock.h.
2338 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
2339 define.
2340 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
2341 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
2342 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
2343 lowlevellock.h.
2344 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
2345 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
2346 lowlevellock.h.
2347 (LOCK): Don't define.
2348 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
2349 lowlevellock.h.
2350 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
2351 * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
2352 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
2353 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
2354 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
2355 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
2356 (__lll_lock_wait_private): New function.
2357 (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
2358 it to lll_futex_*wait. Don't compile in for libc.so.
2359 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
2360 Remove.
2361 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
2362 (struct sparc_pthread_barrier): Remove.
2363 (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
2364 struct sparc_pthread_barrier. Pass
2365 ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
2366 and lll_futex_wait macros.
2367 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
2368 Remove.
2369 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
2370 Include sparc pthread_barrier_wait.c instead of generic one.
2371
6f59d56e
UD
23722007-07-30 Jakub Jelinek <jakub@redhat.com>
2373
1475e201
UD
2374 * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
2375
6f59d56e
UD
2376 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
2377 (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
2378 %ecx.
2379 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
2380 (pthread_rwlock_timedwrlock): Likewise.
2381 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
2382 (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
2383
558f0300
JJ
23842007-07-31 Jakub Jelinek <jakub@redhat.com>
2385
2386 * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
2387
cedb4109
UD
23882007-07-26 Jakub Jelinek <jakub@redhat.com>
2389
2390 * tst-locale2.c (useless): Add return statement.
2391
085a4412
UD
23922007-07-24 Jakub Jelinek <jakub@redhat.com>
2393
2394 * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
2395 lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
2396 * pthread_create.c (start_thread): Likewise.
2397 * init.c (sighandler_setxid): Likewise.
2398 * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2399 * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2400 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2401 * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2402 * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2403 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2404 * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2405 * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2406 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
2407 Likewise.
2408 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
2409 Likewise.
2410 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
2411 Likewise.
2412 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
2413 __rtld_notify): Likewise.
2414 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
2415 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
2416 __pthread_once): Likewise.
2417 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
2418 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
2419 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
2420 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
2421 (lll_futex_wait): Add private argument, define as wrapper around
2422 lll_futex_timed_wait.
2423 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
2424 use __lll_private_flag macro.
2425 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
2426 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
2427 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
2428 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
2429 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
2430 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
2431 (lll_futex_wait): Add private argument, define as wrapper around
2432 lll_futex_timed_wait.
2433 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
2434 use __lll_private_flag macro.
2435 (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
2436 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
2437 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
2438 Define.
2439 (lll_futex_timed_wait, lll_futex_wake): Use it.
2440 (lll_private_futex_wait, lll_private_futex_timed_wait,
2441 lll_private_futex_wake): Removed.
2442 * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
2443 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
2444 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
2445 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
2446 (lll_futex_wait): Add private argument, define as wrapper around
2447 lll_futex_timed_wait.
2448 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
2449 use __lll_private_flag macro.
2450 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
2451 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
2452 to lll_futex_*.
2453 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
2454 (lll_private_futex_wait, lll_private_futex_timed_wait,
2455 lll_private_futex_wake): Removed.
2456 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
2457 Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
2458 (lll_private_futex_wait, lll_private_futex_timed_wait,
2459 lll_private_futex_wake): Removed.
2460 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
2461 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
2462 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
2463 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
2464 (lll_futex_wait): Add private argument, define as wrapper around
2465 lll_futex_timed_wait.
2466 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
2467 use __lll_private_flag macro.
2468 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
2469 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
2470 to lll_futex_*.
2471 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
2472 Define.
2473 (lll_futex_timed_wait, lll_futex_wake): Use it.
2474 (lll_private_futex_wait, lll_private_futex_timed_wait,
2475 lll_private_futex_wake): Removed.
2476
ef0af159
JJ
24772007-07-27 Jakub Jelinek <jakub@redhat.com>
2478
2479 * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
2480 of the structure for sparc32.
2481
24822007-07-26 Aurelien Jarno <aurelien@aurel32.net>
2483
2484 * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
2485
eb4f5909
UD
24862007-07-23 Ulrich Drepper <drepper@redhat.com>
2487
2488 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
2489 code used when private futexes are assumed.
2490 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2491 Likewise.
2492
b5f13526
UD
24932007-07-23 Jakub Jelinek <jakub@redhat.com>
2494
2495 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
2496 (__lll_private_flag): Define.
2497 (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
2498 (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
2499 __lll_private_flag.
2500 (lll_private_futex_wait, lll_private_futex_timedwait,
2501 lll_private_futex_wake): Define as wrapper around non-_private
2502 macros.
2503 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2504 (__lll_private_flag): Define.
2505 (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
2506 (lll_private_futex_wait, lll_private_futex_timedwait,
2507 lll_private_futex_wake): Define as wrapper around non-_private
2508 macros.
2509
eb7721f2
UD
25102007-07-10 Steven Munroe <sjmunroe@us.ibm.com>
2511
2512 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
2513 parameter to lll_futex_wait call.
2514 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
2515
2516 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
2517 Replace lll_futex_wait with lll_private_futex_wait.
2518 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
2519 Add LLL_SHARED parameter to lll_futex_wake().
2520
2521 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
2522 LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
2523 lll_private_futex_wake.
2524 (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
2525 bit from private parm before syscall.
2526 (lll_futex_timed_wait): Likewise.
2527 (lll_futex_wake): Likewise.
2528 (lll_futex_wake_unlock): Likewise.
2529 (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
2530 (lll_robust_mutex_unlock): Likewise.
2531 (lll_mutex_unlock_force): Likewise.
2532 (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
2533
defc45f2
UD
25342007-07-23 Ulrich Drepper <drepper@redhat.com>
2535
2536 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
2537 compilation when unconditionally using private futexes.
2538 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
2539 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2540 Likewise.
2541 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
2542 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
2543
087722b8
UD
25442007-07-17 Jakub Jelinek <jakub@redhat.com>
2545
2546 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
2547 Define.
2548
765c6b0c
UD
25492007-07-06 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2550
2551 * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
2552 kernel-features.h.
2553
7d9d8bd1
RM
25542007-05-16 Roland McGrath <roland@redhat.com>
2555
2556 * init.c (__nptl_initial_report_events): New variable.
2557 (__pthread_initialize_minimal_internal): Initialize pd->report_events
2558 to that.
2559
a4915df2
UD
25602007-06-22 Jakub Jelinek <jakub@redhat.com>
2561
2562 * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
2563 cpusetsize if pthread_getaffinity_np failed with ENOSYS.
2564
e4eb675d
UD
25652007-06-19 Ulrich Drepper <drepper@redhat.com>
2566
2567 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
2568 implementation.
2569
ae1ad3ae
UD
25702007-06-18 Ulrich Drepper <drepper@redhat.com>
2571
2572 * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
2573 * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
2574 * pthread_mutex_timedlock.c: Likewise.
2575 * pthread_mutex_trylock.c: Likewise.
2576 * pthread_mutex_unlock.c: Likewise.
2577
89074592
UD
25782007-06-17 Andreas Schwab <schwab@suse.de>
2579
2580 * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
2581 sections.
2582
d4201cc4
UD
25832007-06-17 Ulrich Drepper <drepper@redhat.com>
2584
2585 * allocatestack.c (allocate_stack): Make code compile if
2586 __ASSUME_PRIVATE_FUTEX is set.
2587
339dbf0e
UD
25882007-06-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2589
2590 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
2591 (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
2592 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
2593 (__pthread_rwlock_wrlock): Likewise.
2594 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
2595 (pthread_rwlock_timedrdlock): Likewise.
2596 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
2597 (pthread_rwlock_timedwrlock): Likewise.
2598 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
2599 (__pthread_rwlock_unlock): Likewise.
2600
26012007-06-10 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2602
2603 * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
2604 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
2605 Split __flags into __flags, __shared, __pad1 and __pad2.
2606 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
b42a214c 2607 futexes if they are available.
339dbf0e 2608 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
b42a214c 2609 in libc-lowlevellock.S allow using private futexes.
339dbf0e
UD
2610 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
2611 FUTEX_PRIVATE_FLAG. Add additional parameter to lll_futex_wait,
2612 lll_futex_timed_wait and lll_futex_wake. Change lll_futex_wait
2613 to call lll_futex_timed_wait. Add lll_private_futex_wait,
2614 lll_private_futex_timed_wait and lll_private_futex_wake.
2615 (lll_robust_mutex_unlock): Fix typo.
2616 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
b42a214c 2617 field in futex command setup.
339dbf0e
UD
2618 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
2619 COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
2620 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
2621 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
b42a214c 2622 if they are available. Remove clear_once_control.
339dbf0e
UD
2623 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
2624 futexes if they are available.
2625 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
2626 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
2627 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
2628 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
2629 * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
2630 Wake only when there are waiters.
2631 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
2632 support. Indicate that there are waiters. Remove unnecessary
b42a214c 2633 extra cancellation test.
339dbf0e
UD
2634 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise. Removed
2635 left-over duplication of __sem_wait_cleanup.
2636
26f56c1c
UD
26372007-06-07 Ulrich Drepper <drepper@redhat.com>
2638
2639 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
2640 parameter to lll_futex_wait, lll_futex_timed_wait, and
2641 lll_futex_wake. Change lll_futex_wait to call lll_futex_timed_wait.
2642 Add lll_private_futex_wait, lll_private_futex_timed_wait, and
2643 lll_private_futex_wake.
2644 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
2645 * allocatestack.c: Adjust use of lll_futex_* macros.
2646 * init.c: Likewise.
2647 * lowlevellock.h: Likewise.
2648 * pthread_barrier_wait.c: Likewise.
2649 * pthread_cond_broadcast.c: Likewise.
2650 * pthread_cond_destroy.c: Likewise.
2651 * pthread_cond_signal.c: Likewise.
2652 * pthread_cond_timedwait.c: Likewise.
2653 * pthread_cond_wait.c: Likewise.
2654 * pthread_create.c: Likewise.
2655 * pthread_mutex_lock.c: Likewise.
2656 * pthread_mutex_setprioceiling.c: Likewise.
2657 * pthread_mutex_timedlock.c: Likewise.
2658 * pthread_mutex_unlock.c: Likewise.
2659 * pthread_rwlock_timedrdlock.c: Likewise.
2660 * pthread_rwlock_timedwrlock.c: Likewise.
2661 * pthread_rwlock_unlock.c: Likewise.
2662 * sysdeps/alpha/tls.h: Likewise.
2663 * sysdeps/i386/tls.h: Likewise.
2664 * sysdeps/ia64/tls.h: Likewise.
2665 * sysdeps/powerpc/tls.h: Likewise.
2666 * sysdeps/pthread/aio_misc.h: Likewise.
2667 * sysdeps/pthread/gai_misc.h: Likewise.
2668 * sysdeps/s390/tls.h: Likewise.
2669 * sysdeps/sh/tls.h: Likewise.
2670 * sysdeps/sparc/tls.h: Likewise.
2671 * sysdeps/unix/sysv/linux/fork.c: Likewise.
2672 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
2673 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
2674 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
2675 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
2676 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
2677 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
2678 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
2679 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
2680 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
2681 Likewise.
2682 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
2683 * sysdeps/x86_64/tls.h: Likewise.
2684
ee5d5755
UD
26852007-05-29 Ulrich Drepper <drepper@redhat.com>
2686
b03b0c29
UD
2687 * pthread_getattr_np.c: No need to install a cancellation handler,
2688 this is no cancellation point.
2689 * pthread_getschedparam.c: Likewise.
2690 * pthread_setschedparam.c: Likewise.
2691 * pthread_setschedprio.c: Likewise.
2692 * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
2693 lll_unlock_wake_cb.
2694 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
2695 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
2696 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2697 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2698 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2699 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2700 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
2701 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
2702 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2703 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
2704 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
2705 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
fc3f0ccb 2706
0154658d
UD
2707 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
2708 whether there are more than one thread makes no sense here since
2709 we only call the slow path if the locks are taken.
2710 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
2711
ee5d5755
UD
2712 * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
2713 COND_NWAITERS_SHIFT.
2714 * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
2715 COND_CLOCK_BITS.
2716 * pthread_cond_init.c: Likewise.
2717 * pthread_cond_timedwait.c: Likewise.
2718 * pthread_cond_wait.c: Likewise.
2719 * pthread_condattr_getclock.c: Likewise.
2720 * pthread_condattr_setclock.c: Likewise.
2721 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
2722 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2723 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2724 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2725 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2726
991fa82b
UD
27272007-05-28 Jakub Jelinek <jakub@redhat.com>
2728
40f57573
UD
2729 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
2730 unistd.h.
2731
991fa82b
UD
2732 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
2733 insn suffix.
2734 (THREAD_GSCOPE_GET_FLAG): Remove.
2735 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
2736 * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
2737 changes.
2738 * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
2739 (THREAD_GSCOPE_GET_FLAG): Remove.
2740 (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
2741 instead of THREAD_GSCOPE_GET_FLAG.
2742 (THREAD_GSCOPE_SET_FLAG): Likewise. Add atomic_write_barrier after
2743 it.
2744 * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2745 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2746 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2747 THREAD_GSCOPE_WAIT): Define.
2748 * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2749 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2750 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2751 THREAD_GSCOPE_WAIT): Define.
2752 * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2753 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2754 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2755 THREAD_GSCOPE_WAIT): Define.
2756 * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2757 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2758 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2759 THREAD_GSCOPE_WAIT): Define.
2760
27612007-05-24 Richard Henderson <rth@redhat.com>
2762
2763 * descr.h (struct pthread): Add header.gscope_flag.
2764 * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2765 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2766 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2767 THREAD_GSCOPE_WAIT): Define.
2768
e59660bc
UD
27692007-05-27 Ulrich Drepper <drepper@redhat.com>
2770
2771 * init.c: Make it compile with older kernel headers.
2772
2773 * tst-initializers1.c: Show through exit code which test failed.
2774
2775 * pthread_rwlock_init.c: Also initialize __shared field.
2776 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
2777 element in rwlock structure into four byte elements. One of them is
2778 the new __shared element.
2779 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
2780 Likewise.
cd0dbd89 2781 [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
e59660bc
UD
2782 __shared, adjust names of other padding elements.
2783 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2784 * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
2785 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
2786 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
2787 FUTEX_PRIVATE_FLAG.
2788 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
2789 futex to use private operations if possible.
2790 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
2791 Likewise.
2792 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2793 Likewise.
2794 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
2795 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
50f1dec5
UD
2796 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2797 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2798 Likewise.
2799 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2800 Likewise.
2801 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2802 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
e59660bc 2803
d8ff3792
UD
28042007-05-26 Ulrich Drepper <drepper@redhat.com>
2805
546346b6
UD
2806 * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
2807 * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
2808 * pthread_rwlock_timedrdlock.c: Likewise.
2809 * pthread_rwlock_tryrdlock.c: Likewise.
2810
a2dd3360
UD
2811 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
2812 optimization.
2813
6df7ffad
UD
2814 * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
2815 * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
2816 duplication of __sem_wait_cleanup.
2817
2818 * allocatestack.c: Revert last change.
2819 * init.c: Likewise.
2820 * sysdeps/i386/tls.h: Likewise.
2821 * sysdeps/x86_64/tls.h: Likewise.
2822 * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
2823 header structure.
2824 * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
2825
d8ff3792
UD
2826 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
2827 Add private field.
2828 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
2829 * pthread_barrier_init.c: Set private flag if pshared and private
2830 futexes are supported.
2831 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
2832 private field in futex command setup.
2833 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
2834
3d2dd6ca
UD
28352007-05-25 Ulrich Drepper <drepper@redhat.com>
2836
42e6c665
UD
2837 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
2838 support.
2839 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2840 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2841 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
2842 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
2843 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
2844
3d2dd6ca
UD
2845 * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
2846 * sem_init.c (__new_sem_init): Rewrite to initialize all three
2847 fields in the structure.
2848 (__old_sem_init): New function.
2849 * sem_open.c: Initialize all fields of the structure.
2850 * sem_getvalue.c: Adjust for renamed element.
2851 * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
2852 (gen-as-const-headers): Add structsem.sym.
2853 * sysdeps/unix/sysv/linux/structsem.sym: New file.
2854 * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
2855 struct new_sem. Add struct old_sem.
2856 * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
2857 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
2858 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
2859 * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
2860 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2861 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
2862 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
2863 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2864 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
2865 * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
2866 * tst-sem10.c: New file.
2867 * tst-sem11.c: New file.
2868 * tst-sem12.c: New file.
2869 * tst-typesizes.c: Test struct new_sem and struct old_sem instead
2870 of struct sem.
2871
20a4d722
JJ
28722007-05-25 Ulrich Drepper <drepper@redhat.com>
2873 Jakub Jelinek <jakub@redhat.com>
2874
2875 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
2876 Move __pthread_enable_asynccancel right before futex syscall.
2877 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
2878 Likewise.
2879
28802007-05-24 Jakub Jelinek <jakub@redhat.com>
86acd596
UD
2881
2882 * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
2883 THREAD_COPY_PRIVATE_FUTEX): Define.
2884 * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
2885 THREAD_COPY_PRIVATE_FUTEX): Define.
2886 * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
2887 * init.c (__pthread_initialize_minimal_internal): Use
2888 THREAD_SET_PRIVATE_FUTEX.
0a54ab53
UD
2889
2890 * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
2891 (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
2892 THREAD_GSCOPE_FLAG_WAIT): Define.
2893 (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
2894 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
2895 * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
2896 PTR_DEMANGLE.
2897 (THREAD_GSCOPE_GET_FLAG): Define.
2898 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
2899 * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
2900 instead of ->header.gscope_flag directly.
2901
5a8075b1
UD
29022007-05-23 Ulrich Drepper <drepper@redhat.com>
2903
2904 * init.c (__pthread_initialize_minimal_internal): Check whether
2905 private futexes are available.
2906 * allocatestack.c (allocate_stack): Copy private_futex field from
2907 current thread into the new stack.
2908 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
2909 futexes if they are available.
2910 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
2911 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
2912 in libc-lowlevellock.S allow using private futexes.
2913 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2914 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
2915 FUTEX_PRIVATE_FLAG.
2916 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
2917 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
2918 if they are available.
2919 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
2920 * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
2921 * sysdeps/i386/tcb-offsets.sym: Likewise.
2922 * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
2923 * sysdeps/i386/tls.h (tcbhead_t): Likewise.
2924
6d59823c
UD
29252007-05-21 Ulrich Drepper <drepper@redhat.com>
2926
2927 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
2928 Remove ptr_wait_lookup_done again.
2929 * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
2930 (__pthread_initialize_minimal_internal): Initialize
2931 _dl_wait_lookup_done pointer in _rtld_global directly.
2932 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
2933 Remove code to code _dl_wait_lookup_done.
2934 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
2935 encrypted for now.
2936
2c9718f3
JJ
29372007-05-21 Jakub Jelinek <jakub@redhat.com>
2938
2939 * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
2940 pthread_mutex_init failed with ENOTSUP.
2941
df94b641
UD
29422007-05-19 Ulrich Drepper <drepper@redhat.com>
2943
2944 * allocatestack.c (__wait_lookup_done): New function.
2945 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
2946 Add ptr_wait_lookup_done.
2947 * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
2948 * pthreadP.h: Declare __wait_lookup_done.
2949 * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
2950 Define macros to implement reference handling of global scope.
2951 * sysdeps/x86_64/tls.h: Likewise.
2952 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
2953 Initialize GL(dl_wait_lookup_done).
2954
bec51a30
UD
29552007-05-17 Ulrich Drepper <drepper@redhat.com>
2956
113ad5fc
UD
2957 [BZ #4512]
2958 * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
2959 is detected.
2960 * pthread_mutex_timedlock.c: Likewise.
2961 * pthread_mutex_trylock.c: Likewise.
2962 Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
2963
2964 * Makefile (tests): Add tst-robust9 and tst-robustpi9.
2965 * tst-robust9.c: New file.
2966 * tst-robustpi9.c: New file.
2967
bec51a30
UD
2968 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
2969 unnecessary extra cancellation test.
2970
83d87915
UD
29712007-05-14 Ulrich Drepper <drepper@redhat.com>
2972
83d87915
UD
2973 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
2974 extra cancellation test.
2975 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
2976
3771196d
UD
29772007-05-10 Ulrich Drepper <drepper@redhat.com>
2978
341c566f
UD
2979 * descr.h (struct pthread): Rearrange members to fill hole in
2980 64-bit layout.
2981
3771196d
UD
2982 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2983 (__pthread_setaffinity_new): If syscall was successful and
2984 RESET_VGETCPU_CACHE is defined, use it before returning.
2985 * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
2986
7d29b542
JJ
29872007-05-10 Jakub Jelinek <jakub@redhat.com>
2988
2989 [BZ #4455]
2990 * tst-align2.c: Include stackinfo.h.
2991 * tst-getpid1.c: Likewise.
2992
16105fe0
UD
29932007-05-02 Carlos O'Donell <carlos@systemhalted.org>
2994
29c113f0
UD
2995 [BZ #4455]
2996 * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
2997 * tst-getpid1.c (do_test): Likewise.
2998
16105fe0
UD
2999 [BZ #4456]
3000 * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
3001 (allocate_stack): Likewise.
3002
6780bc44
UD
30032007-05-07 Ulrich Drepper <drepper@redhat.com>
3004
3005 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
3006 (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
3007 (__lll_robust_timedlock_wait): Likewise.
3008 Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
3009
aa75f64c
UD
30102007-05-06 Mike Frysinger <vapier@gentoo.org>
3011
15eca720 3012 [BZ #4465]
aa75f64c
UD
3013 * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
3014 * tst-cancel4.c (tf_fdatasync): New test.
3015
f672076e
UD
30162007-04-27 Ulrich Drepper <drepper@redhat.com>
3017
1bb5f5a1
UD
3018 [BZ #4392]
3019 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
3020 check mutexes like normal mutexes.
3021
f672076e
UD
3022 [BZ #4306]
3023 * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
3024 Initialize the whole sigevent structure to appease valgrind.
3025
bce20b9a
UD
30262007-04-25 Ulrich Drepper <drepper@redhat.com>
3027
3028 * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
3029 * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
3030
0c786eac
UD
30312007-04-06 Ulrich Drepper <drepper@redhat.com>
3032
3033 * tst-locale1.c: Avoid warnings.
3034 * tst-locale2.c: Likewise.
3035
e1f0c5bc
UD
30362007-03-19 Steven Munroe <sjmunroe@us.ibm.com>
3037
3038 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3039 (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
3040
965cba04
UD
30412007-03-16 Jakub Jelinek <jakub@redhat.com>
3042
3043 * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
3044 __extern_always_inline where appropriate.
3045 * sysdeps/pthread/pthread.h: Likewise.
3046
a5ea509b
RH
30472007-03-13 Richard Henderson <rth@redhat.com>
3048
3049 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
3050 separate cfi regions for the two subsections.
3051
00a1430e
UD
30522007-02-25 Ulrich Drepper <drepper@redhat.com>
3053
3054 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
3055 new thread, don't just decrement it.
3056 Patch by Suzuki K P <suzuki@in.ibm.com>.
3057
63a2f305
UD
30582007-02-21 Ulrich Drepper <drepper@redhat.com>
3059
3060 * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
3061 PTHFCT_CALL definition.
3062
2484468b
UD
30632007-02-18 Ulrich Drepper <drepper@redhat.com>
3064
3065 * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
3066 available, don't use it.
3067
5ed61e0f
UD
30682007-02-09 Jakub Jelinek <jakub@redhat.com>
3069
3070 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3071 (__lll_mutex_timedlock_wait): Use correct pointer when we don't
3072 call into the kernel to delay.
3073
10ccaa5c
UD
30742007-01-18 Ulrich Drepper <drepper@redhat.com>
3075
f8a17855
UD
3076 * tst-initializers1.c: We want to test the initializers as seen
3077 outside of libc, so undefined _LIBC.
3078
10ccaa5c
UD
3079 * pthread_join.c (cleanup): Avoid warning.
3080
ea1533e0
UD
30812007-01-17 Ulrich Drepper <drepper@redhat.com>
3082
1476bce6
UD
3083 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3084 (__lll_timedwait_tid): Add unwind info.
3085
ea1533e0
UD
3086 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
3087 function table, mangle the pointers.
3088 * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
3089 * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
3090 * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
3091 demangle pointers before use.
3092 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
3093 demangle pointer.
3094 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
3095 * sysdeps/pthread/setxid.h: Likewise.
3096
8980796b
UD
30972007-01-12 Ulrich Drepper <drepper@redhat.com>
3098
3099 * tst-rwlock7.c: Show some more information in case of correct
3100 behavior.
3101
a1d87b5d
UD
31022007-01-11 Ulrich Drepper <drepper@redhat.com>
3103
3104 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3105 (lll_futex_timed_wait): Undo part of last change, don't negate
3106 return value.
3107
11bf311e 31082007-01-10 Ulrich Drepper <drepper@redhat.com>
66193697 3109
11bf311e
UD
3110 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups. Define
3111 FUTEX_CMP_REQUEUE and lll_futex_requeue.
66193697 3112
11bf311e 31132006-12-28 David S. Miller <davem@davemloft.net>
14a31e35 3114
11bf311e 3115 * shlib-versions: Fix sparc64 linux target specification.
a744da90 3116
11bf311e 31172007-01-10 Jakub Jelinek <jakub@redhat.com>
a744da90 3118
11bf311e
UD
3119 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
3120 Adjust include path for pthread_barrier_wait.c move.
fc242bef 3121
11bf311e 31222006-12-21 Jakub Jelinek <jakub@redhat.com>
fc242bef 3123
11bf311e
UD
3124 * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
3125 tid isn't reread from pd->tid in between ESRCH test and the syscall.
a822d9f4 3126
11bf311e
UD
31272006-12-06 Jakub Jelinek <jakub@redhat.com>
3128
3129 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
3130 6 argument cancellable syscalls.
3131 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
3132 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
3133 6 argument cancellable syscalls.
3134 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
a822d9f4 3135
66f17705
UD
31362006-12-09 Ulrich Drepper <drepper@redhat.com>
3137
3138 * sysdeps/unix/sysv/linux/rtld-lowlevel.h
3139 (__rtld_mrlock_initialize): Add missing closing parenthesis.
3140
11bf311e
UD
31412006-10-30 Jakub Jelinek <jakub@redhat.com>
3142
3143 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
3144 __sync_lock_release instead of __sync_lock_release_si.
3145
536e40e2
UD
31462006-10-29 Jakub Jelinek <jakub@redhat.com>
3147
3148 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
3149 Define.
3150 (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
3151 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
3152 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
3153 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
3154 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
3155 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
3156 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
3157 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3158 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
3159 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
3160 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
3161
11bf311e
UD
31622006-10-27 Ulrich Drepper <drepper@redhat.com>
3163
3164 * sysdeps/pthread/pthread_barrier_wait.c: Move to...
3165 * pthread_barrier_wait.c: ...here.
3166 * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
3167 * pthread_cond_broadcast.c: ...here.
3168 * sysdeps/pthread/pthread_cond_signal.c: Move to...
3169 * pthread_cond_signal.c: ...here.
3170 * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
3171 * pthread_cond_timedwait.c: ...here.
3172 * sysdeps/pthread/pthread_cond_wait.c: Move to...
3173 * pthread_cond_wait.c: ...here.
3174 * sysdeps/pthread/pthread_once.c: Move to...
3175 * pthread_once.c: ...here.
3176 * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
3177 * pthread_rwlock_rdlock.c: ...here.
3178 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
3179 * pthread_rwlock_timedrdlock.c: ...here.
3180 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
3181 * pthread_rwlock_timedwrlock.c: ...here.
3182 * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
3183 * pthread_rwlock_unlock.c: ...here.
3184 * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
3185 * pthread_rwlock_wrlock.c: ...here.
3186 * sysdeps/pthread/pthread_spin_destroy.c: Move to...
3187 * pthread_spin_destroy.c: ...here.
3188 * sysdeps/pthread/pthread_spin_init.c: Move to...
3189 * pthread_spin_init.c: ...here.
3190 * sysdeps/pthread/pthread_spin_unlock.c: Move to...
3191 * pthread_spin_unlock.c: ...here.
3192 * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
3193 * pthread_getcpuclockid.c: ...here.
3194
3195 * init.c: USE_TLS support is now always enabled.
3196 * tst-tls5.h: Likewise.
3197 * sysdeps/alpha/tls.h: Likewise.
3198 * sysdeps/i386/tls.h: Likewise.
3199 * sysdeps/ia64/tls.h: Likewise.
3200 * sysdeps/powerpc/tls.h: Likewise.
3201 * sysdeps/s390/tls.h: Likewise.
3202 * sysdeps/sh/tls.h: Likewise.
3203 * sysdeps/sparc/tls.h: Likewise.
3204 * sysdeps/x86_64/tls.h: Likewise.
3205
006a8f6f 32062006-10-27 Jakub Jelinek <jakub@redhat.com>
c0a777e8
UD
3207
3208 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
3209 __rtld_mrlock_change): Update oldval if atomic compare and exchange
3210 failed.
3211
3212 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
3213 Define to THREAD_SELF->header.multiple_threads.
3214 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
3215 Likewise.
3216 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
3217 Likewise.
3218 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
3219 (SINGLE_THREAD_P): Likewise.
3220 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
3221 (SINGLE_THREAD_P): Likewise.
3222 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3223 (SINGLE_THREAD_P): Likewise.
3224 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
3225 (SINGLE_THREAD_P): Likewise.
3226 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
3227 Likewise.
3228 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
3229 (SINGLE_THREAD_P): Likewise.
3230 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
3231 (SINGLE_THREAD_P): Likewise.
3232 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
3233 Likewise.
3234
11bf311e 32352006-10-26 Jakub Jelinek <jakub@redhat.com>
32c075e1 3236
11bf311e
UD
3237 * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
3238 by default rather than 2_3_3.
32c075e1 3239
11bf311e 32402006-10-17 Jakub Jelinek <jakub@redhat.com>
32c075e1 3241
11bf311e
UD
3242 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
3243 __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
3244 atomic_* instead of catomic_* macros.
3245
32462006-10-12 Ulrich Drepper <drepper@redhat.com>
3247
3248 [BZ #3285]
3249 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
3250 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
3251 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
3252 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
3253 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
3254 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
3255 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
3256 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
3257 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
3258 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
3259 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
3260 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
3261 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
3262
32632006-10-11 Ulrich Drepper <drepper@redhat.com>
3264
3265 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
3266 cancelable syscalls with six parameters.
3267
3268 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
3269 operations instead of atomic_*.
32c075e1 3270
11bf311e 32712006-10-09 Ulrich Drepper <drepper@redhat.com>
32c075e1 3272
11bf311e 3273 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
32c075e1 3274
11bf311e 32752006-10-07 Ulrich Drepper <drepper@redhat.com>
32c075e1 3276
11bf311e
UD
3277 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
3278 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
3279 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
3280 New file.
3281 * pthread_attr_setstack.c: Allow overwriting the version number of the
3282 new symbol.
3283 * pthread_attr_setstacksize.c: Likewise.
3284 (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
3285 it.
3286 * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
3287 pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
fa279678 3288
457b559e
UD
32892006-09-24 Ulrich Drepper <drepper@redhat.com>
3290
3291 [BZ #3251]
3292 * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
3293 Patch by Petr Baudis.
3294
0466106e
UD
32952006-09-18 Jakub Jelinek <jakub@redhat.com>
3296
3297 * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
3298
3299 * tst-cancel2.c (tf): Loop as long as something was written.
3300
bd6d3b7d
UD
33012006-09-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3302
3303 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
3304 mutexes wake all mutexes.
3305 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
3306 WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
3307 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
3308
30aa5785
UD
33092006-09-12 Ulrich Drepper <drepper@redhat.com>
3310
3311 * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
3312 to guarantee the thread is always canceled.
3313
2b6a801e
UD
33142006-09-08 Jakub Jelinek <jakub@redhat.com>
3315
3316 * tst-cond22.c: Include pthread.h instead of pthreadP.h.
3317 Include stdlib.h.
3318 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
3319 increase FUTEX if increasing WAKEUP_SEQ. Fix comment typo.
3320 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3321 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3322 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
bd6d3b7d 3323
346e6ad4
UD
33242006-09-08 Ulrich Drepper <drepper@redhat.com>
3325
3326 [BZ #3123]
3327 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
3328 increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
2b6a801e
UD
3329 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3330 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3331 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
346e6ad4
UD
3332 * Makefile (tests): Add tst-cond22.
3333 * tst-cond22.c: New file.
3334
b051fc44
UD
33352006-09-05 Ulrich Drepper <drepper@redhat.com>
3336
3337 [BZ #3124]
3338 * descr.h (struct pthread): Add parent_cancelhandling.
3339 * sysdeps/pthread/createthread.c (create_thread): Pass parent
3340 cancelhandling value to child.
3341 * pthread_create.c (start_thread): If parent thread was canceled
3342 reset the SIGCANCEL mask.
3343 * Makefile (tests): Add tst-cancel25.
3344 * tst-cancel25.c: New file.
3345
d052233c 33462006-09-05 Jakub Jelinek <jakub@redhat.com>
b42a214c 3347 Ulrich Drepper <drepper@redhat.com>
d052233c
UD
3348
3349 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
3350 counterp if it is already zero.
3351 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
3352
cd248c3f 33532006-03-04 Jakub Jelinek <jakub@redhat.com>
b42a214c 3354 Roland McGrath <roland@redhat.com>
cd248c3f
UD
3355
3356 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
3357 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
3358 LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
3359 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
3360 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
3361 lll_robust_mutex_timedlock, lll_mutex_unlock,
3362 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
3363 Add _L_*_ symbols around the subsection.
3364 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
3365 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
3366
33672006-03-03 Jakub Jelinek <jakub@redhat.com>
b42a214c 3368 Roland McGrath <roland@redhat.com>
cd248c3f
UD
3369
3370 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3371 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
3372 LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
3373 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
3374 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
3375 lll_robust_mutex_timedlock, lll_mutex_unlock,
3376 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
3377 Add _L_*_ symbols around the subsection.
3378 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
3379 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
3380
b80770b2
UD
33812006-08-31 Ulrich Drepper <drepper@redhat.com>
3382
3383 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
3384 change because it can disturb too much existing code. If real hard
3385 reader preference is needed we'll introduce another type.
3386 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
3387 (pthread_rwlock_timedwrlock): Likewise.
3388 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
3389 Likewise.
3390
bee2df0b
UD
33912006-08-30 Ulrich Drepper <drepper@redhat.com>
3392
3393 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
3394 reader preference.
3395 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
3396 (pthread_rwlock_timedwrlock): Likewise.
3397 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
3398 Likewise.
3399
d678ebc1
UD
34002006-08-25 Jakub Jelinek <jakub@redhat.com>
3401
3402 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
3403 Only define ifdef SHARED.
3404
ba408f84
UD
34052006-08-23 Ulrich Drepper <drepper@redhat.com>
3406
3407 * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
3408 (free_stacks): ...here.
3409 (__free_stack_cache): New function.
3410 * pthreadP.h: Declare __free_stack_cache.
3411 * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
3412 ptr_freeres.
3413 * init.c (pthread_functions): Initialize ptr_freeres.
3414 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
3415 New freeres function.
3416
376e973a
UD
34172006-07-30 Joseph S. Myers <joseph@codesourcery.com>
3418
3419 [BZ #3018]
3420 * Makefile (extra-objs): Add modules to extra-test-objs instead.
3421
2b34af01
UD
34222006-08-20 Ulrich Drepper <drepper@redhat.com>
3423
3424 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
3425 _XOPEN_REALTIME_THREADS.
3426
89c85f87
UD
34272006-08-15 Jakub Jelinek <jakub@redhat.com>
3428
3429 * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
3430 HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
3431 HAVE_CLOCK_GETTIME_VSYSCALL.
3432 (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
3433
f17efcb4
UD
34342006-08-14 Jakub Jelinek <jakub@redhat.com>
3435
3436 * sysdeps/unix/sysv/linux/bits/posix_opt.h
3437 (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
3438 * descr.h (struct priority_protection_data): New type.
3439 (struct pthread): Add tpp field.
3440 * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
3441 PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
3442 PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
3443 * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
3444 TPP mutexes.
3445 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
3446 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
3447 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
3448 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
3449 * tpp.c: New file.
3450 * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
3451 boosted by TPP.
3452 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
3453 * pthread_mutexattr_getprioceiling.c
3454 (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
3455 in the SCHED_FIFO priority range.
3456 * pthread_mutexattr_setprioceiling.c
3457 (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
3458 * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
3459 if mutex is not TPP. Ceiling is now in __data.__lock.
3460 * pthread_mutex_setprioceiling.c: Include stdbool.h.
3461 (pthread_mutex_setprioceiling): Fix prioceiling validation. Ceiling
3462 is now in __data.__lock. Add locking.
3463 * pthread_create.c (__free_tcb): Free pd->tpp structure.
3464 * Makefile (libpthread-routines): Add tpp.
3465 (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
3466 * tst-tpp.h: New file.
3467 * tst-mutexpp1.c: New file.
3468 * tst-mutexpp6.c: New file.
3469 * tst-mutexpp10.c: New file.
3470 * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
3471 * tst-mutex6.c (TEST_FUNCTION): Likewise.
3472
22bb134c
UD
34732006-08-12 Ulrich Drepper <drepper@redhat.com>
3474
3475 [BZ #2843]
3476 * pthread_join.c (pthread_join): Account for self being canceled
3477 when checking for deadlocks.
3478 * tst-join5.c: Cleanups. Allow to be used in tst-join6.
3479 (tf1): Don't print anything after pthread_join returns, this would be
3480 another cancellation point.
3481 (tf2): Likewise.
3482 * tst-join6.c: New file.
3483 * Makefile (tests): Add tst-join6.
3484
f1762c0c
UD
34852006-08-03 Ulrich Drepper <drepper@redhat.com>
3486
9c06eb66
UD
3487 [BZ #2892]
3488 * pthread_setspecific.c (__pthread_setspecific): Check
3489 out-of-range index before checking for unused key.
3490
f1762c0c
UD
3491 * sysdeps/pthread/gai_misc.h: New file.
3492
7bb1b2c9
UD
34932006-08-01 Ulrich Drepper <drepper@redhat.com>
3494
3495 * sysdeps/unix/sysv/linux/i386/smp.h: New file. Old Linux-specific
3496 file. Don't use sysctl.
3497 * sysdeps/unix/sysv/linux/smp.h: Always assume SMP. Archs can
3498 overwrite the file if this is likely not true.
3499
b06e7e9a
UD
35002006-07-31 Daniel Jacobowitz <dan@codesourcery.com>
3501
3502 * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
3503 * Makefile (tests): Add tst-getpid3.
3504 * tst-getpid3.c: New file.
3505
b894c2ea
RM
35062006-07-30 Roland McGrath <roland@redhat.com>
3507
3508 * Makefile (libpthread-routines): Add ptw-sigsuspend.
3509
3510 * sysdeps/unix/sysv/linux/i386/not-cancel.h
3511 (pause_not_cancel): New macro.
3512 (nanosleep_not_cancel): New macro.
3513 (sigsuspend_not_cancel): New macro.
3514 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
3515 nanosleep_not_cancel macro from <not-cancel.h>.
3516 * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
3517 macro from <not-cancel.h>.
3518
df47504c
UD
35192006-07-28 Ulrich Drepper <drepper@redhat.com>
3520 Jakub Jelinek <jakub@redhat.com>
3521
3522 * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
3523 notification of PI mutex. Add ENQUEUE_MUTEX_PI.
3524 * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
3525 * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
3526 * pthread_mutex_init.c: Add support for priority inheritance mutex.
3527 * pthread_mutex_lock.c: Likewise.
3528 * pthread_mutex_timedlock.c: Likewise.
3529 * pthread_mutex_trylock.c: Likewise.
3530 * pthread_mutex_unlock.c: Likewise.
3531 * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
3532 all mutexes.
3533 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
3534 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
3535 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
3536 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
3537 pthread-pi-defines.sym.
3538 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
3539 FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
3540 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
d5ba53f9
UD
3541 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
3542 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3543 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3544 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3545 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
3546 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
df47504c
UD
3547 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
3548 _POSIX_THREAD_PRIO_INHERIT to 200112L.
3549 * tst-mutex1.c: Adjust to allow use in PI mutex test.
3550 * tst-mutex2.c: Likewise.
3551 * tst-mutex3.c: Likewise.
3552 * tst-mutex4.c: Likewise.
3553 * tst-mutex5.c: Likewise.
3554 * tst-mutex6.c: Likewise.
3555 * tst-mutex7.c: Likewise.
3556 * tst-mutex7a.c: Likewise.
3557 * tst-mutex8.c: Likewise.
3558 * tst-mutex9.c: Likewise.
3559 * tst-robust1.c: Likewise.
3560 * tst-robust7.c: Likewise.
3561 * tst-robust8.c: Likewise.
3562 * tst-mutexpi1.c: New file.
3563 * tst-mutexpi2.c: New file.
3564 * tst-mutexpi3.c: New file.
3565 * tst-mutexpi4.c: New file.
3566 * tst-mutexpi5.c: New file.
3567 * tst-mutexpi6.c: New file.
3568 * tst-mutexpi7.c: New file.
3569 * tst-mutexpi7a.c: New file.
3570 * tst-mutexpi8.c: New file.
3571 * tst-mutexpi9.c: New file.
3572 * tst-robust1.c: New file.
3573 * tst-robust2.c: New file.
3574 * tst-robust3.c: New file.
3575 * tst-robust4.c: New file.
3576 * tst-robust5.c: New file.
3577 * tst-robust6.c: New file.
3578 * tst-robust7.c: New file.
3579 * tst-robust8.c: New file.
3580 * Makefile (tests): Add the new tests.
3581
3582 * pthread_create.c (start_thread): Add some casts to avoid warnings.
3583 * pthread_mutex_destroy.c: Remove unneeded label.
3584
f3be81a9
UD
35852006-07-01 Ulrich Drepper <drepper@redhat.com>
3586
3587 * pthread_mutex_init.c (__pthread_mutex_init): Move some
3588 computations to compile time.
3589
c26ca5e1
UD
35902006-06-04 Ulrich Drepper <drepper@redhat.com>
3591
3592 * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
3593
6f8a7dff
UD
35942006-05-15 Ulrich Drepper <drepper@redhat.com>
3595
c26ca5e1 3596 * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
6f8a7dff 3597
3d237e42
UD
35982006-05-11 Ulrich Drepper <drepper@redhat.com>
3599
04974d63
UD
3600 * pthread_key_create.c (__pthread_key_create): Do away with
3601 __pthread_keys_lock.
3602
3603 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
3604 (__kernel_cpumask_size): Mark as hidden.
3605 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
3606
3d237e42
UD
3607 * sem_open.c (__sem_mappings_lock): Mark as hidden.
3608 * semaphoreP.h (__sem_mappings_lock): Likewise.
3609
790fc6e4
UD
36102006-05-10 Ulrich Drepper <drepper@redhat.com>
3611
3612 * pthread_atfork.c: Mark __dso_handle as hidden.
3613
be434a72
UD
36142006-05-09 Ulrich Drepper <drepper@redhat.com>
3615
3616 [BZ #2644]
3617 * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
3618 the reload problem. Change the one path in pthread_cancel_init
3619 which causes the problem. Force gcc to reload. Simplify callers.
3620 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
3621 (_Unwind_GetBSP): Undo last patch.
3622
3142b1ac
UD
36232006-05-07 Ulrich Drepper <drepper@redhat.com>
3624
bf3635d3
UD
3625 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
3626 function pointer is reloaded after pthread_cancel_init calls.
3142b1ac
UD
3627
3628 [BZ #2644]
3629 * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
3630 pointers are reloaded after pthread_cancel_init calls.
3631
27488789
UD
36322006-05-01 Ulrich Drepper <drepper@redhat.com>
3633
3634 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
3635 __always_inline.
3636
a6375d11
UD
36372006-04-27 Ulrich Drepper <drepper@redhat.com>
3638
3639 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
3640 Allocate new object which is passed to timer_sigev_thread so that
3641 the timer can be deleted before the new thread is scheduled.
3642
16a1d952
RM
36432006-04-26 Roland McGrath <roland@redhat.com>
3644
3645 * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
3646
7960f2a7
UD
36472006-04-08 Ulrich Drepper <drepper@redhat.com>
3648
ab9a9ff8
UD
3649 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
3650 suffix for conditional jumps.
3651 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
3652 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
3653 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
3654 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
3655 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
3656 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
3657
7960f2a7
UD
3658 * init.c (sigcancel_handler): Compare with correct PID even if the
3659 thread is in the middle of a fork call.
3660 (sighandler_setxid): Likewise.
3661 Reported by Suzuki K P <suzuki@in.ibm.com> .
3662
2035d91c
UD
36632006-04-07 Jakub Jelinek <jakub@redhat.com>
3664
3665 * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
3666
0292b0dd
UD
36672006-04-06 Ulrich Drepper <drepper@redhat.com>
3668
3669 * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
3670 fails [Coverity CID 105].
3671
6738b3c0
UD
36722006-04-05 Ulrich Drepper <drepper@redhat.com>
3673
3674 * sysdeps/pthread/pthread.h: Add nonnull attributes.
3675
359157a5
RM
36762006-04-03 Steven Munroe <sjmunroe@us.ibm.com>
3677
3678 [BZ #2505]
3679 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
3680 Define __lll_rel_instr using lwsync.
3681
cd277b2d
UD
36822006-03-27 Ulrich Drepper <drepper@redhat.com>
3683
3684 * allocatestack.c (allocate_stack): Always initialize robust_head.
3685 * descr.h: Define struct robust_list_head.
3686 (struct pthread): Use robust_list_head in robust mutex list definition.
3687 Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
3688 * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
3689 (__pthread_initialize_minimal_internal): Register robust_list with
3690 the kernel.
3691 * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
3692 Declare __set_robust_list_avail.
3693 * pthread_create.c (start_thread): Register robust_list of new thread.
3694 [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
3695 waiters.
3696 * pthread_mutex_destroy.c: For robust mutexes don't look at the
3697 number of users, it's unreliable.
3698 * pthread_mutex_init.c: Allow use of pshared robust mutexes if
3699 set_robust_list syscall is available.
3700 * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
3701 * pthread_mutex_lock.c: Simplify robust mutex code a bit.
3702 Set robust_head.list_op_pending before trying to lock a robust mutex.
3703 * pthread_mutex_timedlock.c: Likewise.
3704 * pthread_mutex_trylock.c: Likewise.
3705 * pthread_mutex_unlock.c: Likewise for unlocking.
3706 * Makefile (tests): Add tst-robust8.
3707 * tst-robust8.c: New file.
3708
facac085
UD
37092006-03-08 Andreas Schwab <schwab@suse.de>
3710
3711 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
3712 (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
3713
7ccbe1a1
RM
37142006-03-05 Roland McGrath <roland@redhat.com>
3715
3716 * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
3717 and $config_os doesn't match *linux*.
3718
043cee37
RM
37192006-03-05 David S. Miller <davem@sunset.davemloft.net>
3720
3721 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
3722 Use __syscall_error.
3723 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
3724 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
3725 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
3726 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
3727 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
3728 * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
3729
88bce79e
UD
37302006-03-02 Ulrich Drepper <drepper@redhat.com>
3731
3732 * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
3733
672ec465
UD
37342006-03-01 Ulrich Drepper <drepper@redhat.com>
3735
3736 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
3737 (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
3738 mutex.
3739 (__lll_robust_timedlock_wait): Likewise.
3740 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
3741 (__lll_robust_lock_wait): Likewise.
3742 (__lll_robust_timedlock_wait): Likewise.
3743 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
3744 (__lll_robust_lock_wait): Likewise.
3745 (__lll_robust_timedlock_wait): Likewise.
3746
c4a4875d
RM
37472006-03-01 Jakub Jelinek <jakub@redhat.com>
3748
3749 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
3750 lll_robust_mutex_trylock, lll_robust_mutex_lock,
3751 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
3752 lll_robust_mutex_unlock): Define.
3753 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
3754
3192fd8e
RM
37552006-02-28 H.J. Lu <hongjiu.lu@intel.com>
3756
3757 * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
3758 instead of <clone.S>.
3759
14d44b19
RM
37602006-02-27 Jakub Jelinek <jakub@redhat.com>
3761
3762 * Makefile (libpthread-routines): Add
3763 pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
3764 and pthread_mutex_[sg]etprioceiling.
3765 * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
3766 pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
3767 pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
3768 pthread_mutex_setprioceiling.
3769 * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
3770 PTHREAD_PRIO_PROTECT): New enum values.
3771 (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
3772 pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
3773 pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
3774 prototypes.
3775 * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
3776 PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
3777 (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
3778 Define.
3779 (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
3780 PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
3781 PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
3782 (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
3783 and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
3784 * pthread_mutex_init.c (__pthread_mutex_init): For the time being
3785 return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
3786 protocol mutexes.
3787 * pthread_mutex_getprioceiling.c: New file.
3788 * pthread_mutex_setprioceiling.c: New file.
3789 * pthread_mutexattr_getprioceiling.c: New file.
3790 * pthread_mutexattr_setprioceiling.c: New file.
3791 * pthread_mutexattr_getprotocol.c: New file.
3792 * pthread_mutexattr_setprotocol.c: New file.
3793
62f6b9b2
RM
37942006-02-27 Daniel Jacobowitz <dan@codesourcery.com>
3795
3796 * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
3797
e0a3ed4f
RM
37982006-02-27 Roland McGrath <roland@redhat.com>
3799
3800 * sysdeps/pthread/Subdirs: List nptl here too.
3801 * configure (libc_add_on_canonical): New variable.
3802
3803 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
3804
3805 * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
3806 self to get main source tree's file.
3807 * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
3808 * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
3809 * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
3810 * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
3811 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
3812 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
3813 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
3814 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
3815 * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
3816 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
3817 * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
3818 * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
3819 * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
3820
3821 * Makefile: Use $(sysdirs) in vpath directive.
3822
3823 * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
3824 (CPPFLAGS-timer_routines.c): Likewise.
3825
3826 * Makeconfig (includes): Variable removed.
3827
84cfa284
RM
38282006-02-26 Roland McGrath <roland@redhat.com>
3829
3830 * sysdeps/generic/pt-raise.c: Moved to ...
3831 * pt-raise.c: ... here.
3832 * sysdeps/generic/lowlevellock.h: Moved to ...
3833 * lowlevellock.h: ... here.
3834
c5132ca1
RM
38352006-02-23 Roland McGrath <roland@redhat.com>
3836
3837 * descr.h (struct pthread): Add final member `end_padding'.
3838 (PTHREAD_STRUCT_END_PADDING): Use it.
3839
38402006-02-20 Roland McGrath <roland@redhat.com>
3841
3842 * sysdeps/mips: Directory removed, saved in ports repository.
3843 * sysdeps/unix/sysv/linux/mips: Likewise.
3844
a93317a1
UD
38452006-02-18 Ulrich Drepper <drepper@redhat.com>
3846
3847 * tst-robust1.c: Add second mutex to check that the mutex list is
3848 handled correctly.
3849
f1740bc4
UD
38502006-02-17 Jakub Jelinek <jakub@redhat.com>
3851
3852 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
3853 lll_robust_mutex_trylock, lll_robust_mutex_lock,
3854 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
3855 lll_robust_mutex_unlock): New macros.
3856 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
3857 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3858 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3859 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3860 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
3861
a7245bf5
UD
38622006-02-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3863
3864 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
3865 definitions.
3866 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
3867
49bfc1fe
UD
38682006-02-17 Ulrich Drepper <drepper@redhat.com>
3869
3870 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3871 (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
3872 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
3873 (lll_robust_mutex_unlock): Likewise.
3874
56e987ac
UD
38752006-02-13 Jakub Jelinek <jakub@redhat.com>
3876
3877 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
3878 Set robust_list.__next rather than robust_list.
3879 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
3880 (__pthread_list_t): New typedef.
3881 (pthread_mutex_t): Replace __next and __prev fields with __list.
3882 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
3883 (__pthread_list_t): New typedef.
3884 (pthread_mutex_t): Replace __next and __prev fields with __list.
3885 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
3886 (__pthread_list_t, __pthread_slist_t): New typedefs.
3887 (pthread_mutex_t): Replace __next and __prev fields with __list.
3888 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
3889 (__pthread_list_t, __pthread_slist_t): New typedefs.
3890 (pthread_mutex_t): Replace __next and __prev fields with __list.
3891 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
3892 (__pthread_list_t, __pthread_slist_t): New typedefs.
3893 (pthread_mutex_t): Replace __next and __prev fields with __list.
3894 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
3895 (__pthread_slist_t): New typedef.
3896 (pthread_mutex_t): Replace __next field with __list.
3897
683040c3
UD
38982006-02-15 Ulrich Drepper <drepper@redhat.com>
3899
25bc77e6 3900 * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
683040c3
UD
3901 PTHREAD_MUTEX_OWNERDEAD.
3902 (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
3903 Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
3904 * Makefile (libpthread-routines): Add lowlevelrobustlock.
3905 * pthread_create.c (start_thread): Very much simplify robust_list loop.
3906 * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
3907 to PTHREAD_MUTEX_INCONSISTENT.
3908 * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
3909 * pthread_mutex_lock.c: Reimplement robust mutex handling.
3910 * pthread_mutex_trylock.c: Likewise.
3911 * pthread_mutex_timedlock.c: Likewise.
3912 * pthread_mutex_unlock.c: Likewise.
3913 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
3914 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
3915 lowlevelrobustlock.sym.
3916 * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
3917 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
3918 definitions.
3919 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3920 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
3921 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
3922 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
3923 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
3924
bbf209a4
UD
39252006-02-12 Ulrich Drepper <drepper@redhat.com>
3926
b007ce7c
UD
3927 * allocatestack.c (allocate_stack): Initialize robust_list.
3928 * init.c (__pthread_initialize_minimal_internal): Likewise.
3929 * descr.h (struct xid_command): Pretty printing.
3930 (struct pthread): Use __pthread_list_t or __pthread_slist_t for
3931 robust_list. Adjust macros.
3932 * pthread_create.c (start_thread): Adjust robust_list handling.
3933 * phtread_mutex_unlock.c: Don't allow unlocking from any thread
3934 but the owner for all robust mutex types.
3935 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
3936 __pthread_list_t and __pthread_slist_t. Use them in pthread_mutex_t.
0ca3379d 3937 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
b007ce7c
UD
3938 * sysdeps/pthread/pthread.h: Adjust mutex initializers.
3939
bbf209a4 3940 * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
b42a214c 3941 openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
bbf209a4 3942
b576fca1
UD
39432006-02-08 Jakub Jelinek <jakub@redhat.com>
3944
3945 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
3946 lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
3947
a6df7387
UD
39482006-01-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3949
3950 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
3951 Return status.
3952 (lll_futex_timed_wait): Define.
3953
7c65e900
UD
39542006-01-19 Ulrich Drepper <drepper@redhat.com>
3955
3956 * tst-cancel4.c: Test ppoll.
3957
5f9f21e8
AJ
39582006-01-18 Andreas Jaeger <aj@suse.de>
3959
cf407dfb 3960 [BZ #2167]
5f9f21e8
AJ
3961 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
3962 (pthread_mutex_t): Follow changes for other archs. Based on patch
3963 by Jim Gifford <patches@jg555.com>.
3964
251278c6
UD
39652006-01-13 Richard Henderson <rth@redhat.com>
3966
3967 * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
3968
de59a291
RM
39692006-01-10 Roland McGrath <roland@redhat.com>
3970
3971 * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
3972 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
3973 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
3974 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
3975 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
3976 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
3977 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
3978 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
3979 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
0ca13e14 3980 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
de59a291 3981
931786ee
RM
39822006-01-09 Roland McGrath <roland@redhat.com>
3983
5d42c8c3
RM
3984 * tst-initializers1-c89.c: New file.
3985 * tst-initializers1-c99.c: New file.
3986 * tst-initializers1-gnu89.c: New file.
3987 * tst-initializers1-gnu99.c: New file.
3988 * Makefile (tests): Add them.
3989 (CFLAGS-tst-initializers1-c89.c): New variable.
3990 (CFLAGS-tst-initializers1-c99.c): New variable.
3991 (CFLAGS-tst-initializers1-gnu89.c): New variable.
3992 (CFLAGS-tst-initializers1-gnu99.c): New variable.
3993
931786ee
RM
3994 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
3995 Use __extension__ on anonymous union definition.
3996 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3997 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
3998 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3999 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3c238452 4000 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
931786ee 4001
8dd18431
RM
40022006-01-08 Jakub Jelinek <jakub@redhat.com>
4003
4004 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
4005 Don't give the union a name because it changes the mangled name.
4006 Instead name the struct for __data.
4007 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
4008 Likewise.
4009 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
4010 Likewise.
4011
ae11e412
UD
40122006-01-09 Jakub Jelinek <jakub@redhat.com>
4013
4014 * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
4015 stack bias to mc_ftp field.
4016
c6885aa1
UD
40172006-01-07 Ulrich Drepper <drepper@redhat.com>
4018
4019 * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
6e741bc3 4020 being too clever and reloading the futex value where it shouldn't.
c6885aa1 4021
ae4ad00a
UD
40222006-01-06 Ulrich Drepper <drepper@redhat.com>
4023
4024 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
4025 correct type.
4026
ced368f7
UD
40272006-01-06 Jakub Jelinek <jakub@redhat.com>
4028
4029 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
4030 Add cfi directives.
4031
d804f5df
UD
40322006-01-06 Ulrich Drepper <drepper@redhat.com>
4033
cbbbb188 4034 * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
719046c1
UD
4035 * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
4036 rename in tcbhead_t.
4037
d804f5df
UD
4038 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
4039 Don't give the union a name because it changes the mangled name.
4040 Instead name the struct for __data.
4041 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4042 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4043 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4044 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4045 * pthread_create.c (start_thread): Adjust robust mutex free loop.
4046 * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
4047
679d83ba
UD
40482006-01-05 Ulrich Drepper <drepper@redhat.com>
4049
4050 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
4051 Return status.
4052 (lll_futex_timed_wait): Define.
4053 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4054 * sysdeps/pthread/aio_misc.h: New file.
4055
06dc5bf3
RM
40562006-01-03 Joseph S. Myers <joseph@codesourcery.com>
4057
4058 * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
4059
9759bbf1
UD
40602006-01-03 Steven Munroe <sjmunroe@us.ibm.com>
4061
4062 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
4063 (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
4064 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4065
db59b28b
UD
40662006-01-04 Ulrich Drepper <drepper@redhat.com>
4067
4068 * tst-cancel24.cc: Use C headers instead of C++ headers.
4069
b01fe5f7
UD
40702006-01-03 Jakub Jelinek <jakub@redhat.com>
4071
4072 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
4073 sparc-linux configured glibc.
4074 (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
4075 (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
4076 __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
4077 atomic_compare_and_exchange_val_24_acq instead of
4078 atomic_compare_and_exchange_val_acq.
4079 (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
4080 instead of atomic_exchange_rel.
4081 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
4082 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
4083 file.
4084 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
4085 file.
4086 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
4087 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
4088 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
4089 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
4090 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
4091 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
4092 New file.
4093 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
4094 New file.
4095 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
4096 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
4097 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
4098 file.
4099 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
4100 file.
4101 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
4102
35c2fd59
UD
41032006-01-03 Ulrich Drepper <drepper@redhat.com>
4104
4105 * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
4106 mutex initializers.
4107
305bb37e
UD
41082006-01-02 Jakub Jelinek <jakub@redhat.com>
4109
4110 * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
4111 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
4112 THREAD_COPY_POINTER_GUARD): Define.
4113 * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
4114 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
4115
cc792128
UD
41162006-01-01 Ulrich Drepper <drepper@redhat.com>
4117
4118 * version.c: Update copyright year.
4119
db0a00d3
UD
41202005-12-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4121
4122 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
4123 .eh_frame section, use cfi_* directives.
4124 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
4125
b36205c4
UD
41262005-12-30 Ulrich Drepper <drepper@redhat.com>
4127
4128 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
4129 now.
4130
8b4f1598
UD
41312005-12-29 Ulrich Drepper <drepper@redhat.com>
4132
4133 * sysdeps/pthread/sigaction.c: Removed.
4134 * sigaction.c: New file.
4135 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
4136
fec5592d
UD
41372005-12-28 Ulrich Drepper <drepper@redhat.com>
4138
4139 * Makefile (tests): Add tst-signal7.
4140 * tst-signal7.c: New file.
4141
db169ed5
RM
41422005-12-27 Roland McGrath <roland@redhat.com>
4143
4144 * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
4145 (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
4146 * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
4147 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
4148 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
4149 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
4150 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
4151 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
4152 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
4153 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
4154 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
4155
bfffffae
UD
41562005-12-27 Jakub Jelinek <jakub@redhat.com>
4157
4158 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
4159 and __prev field to pthread_mutex_t.
4160 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4161 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4162 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4163 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4164 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
4165 to pthread_mutex_t.
4166
1bcfb5a5
UD
41672005-12-26 Ulrich Drepper <drepper@redhat.com>
4168
4169 * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
4170 PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
4171 PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
4172 PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
4173 PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
4174 and PTHREAD_MUTEXATTR_FLAG_BITS.
4175 * descr.h (struct pthread): Add robust_list field and define
4176 ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
4177 * pthread_mutexattr_getrobust.c: New file.
4178 * pthread_mutexattr_setrobust.c: New file.
4179 * pthread_mutex_consistent.c: New file.
4180 * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
4181 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
4182 Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
4183 Adjust pthread_mutex_t initializers.
4184 * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
4185 field to pthread_mutex_t.
4186 * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
4187 and __prev field to pthread_mutex_t.
4188 * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
4189 pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
4190 * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
4191 and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
4192 * pthread_mutexattr_gettype.c: Likewise.
4193 * pthread_mutexattr_setpshared.c: Likewise.
4194 * pthread_mutexattr_settype.c: Likewise.
4195 * pthread_mutex_init.c: Reject robust+pshared attribute for now.
4196 Initialize mutex kind according to robust flag.
4197 * pthread_mutex_lock.c: Implement local robust mutex.
4198 * pthread_mutex_timedlock.c: Likewise.
4199 * pthread_mutex_trylock.c: Likewise.
4200 * pthread_mutex_unlock.c: Likewise.
4201 * pthread_create.c (start_thread): Mark robust mutexes which remained
4202 locked as dead.
4203 * tst-robust1.c: New file.
4204 * tst-robust2.c: New file.
4205 * tst-robust3.c: New file.
4206 * tst-robust4.c: New file.
4207 * tst-robust5.c: New file.
4208 * tst-robust6.c: New file.
4209 * tst-robust7.c: New file.
4210 * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
4211 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
4212 (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
4213 tst-robust5, tst-robust6, and tst-robust7.
4214
4215 * tst-typesizes.c: New file.
4216 * Makefile (tests): Add tst-typesizes.
4217
4218 * tst-once3.c: More debug output.
4219
9333ed0d
UD
42202005-12-24 Ulrich Drepper <drepper@redhat.com>
4221
d4d138a4
UD
4222 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
4223 missing after last change.
4224
bfffffae 4225 * version.c: Update copyright year.
9333ed0d 4226
dcc73a8d
UD
42272005-12-23 Ulrich Drepper <drepper@redhat.com>
4228
4229 * pthread_mutex_destroy.c: Set mutex type to an invalid value.
4230 * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
4231 * pthread_mutex_trylock.c: Likewise.
4232 * pthread_mutex_timedlock.c: Likewise.
4233 * pthread_mutex_unlock.c: Likewise.
4234
879f3ca6
RM
42352005-12-22 Roland McGrath <roland@redhat.com>
4236
4237 * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
4238 so that #include_next's search location is not reset to the -I..
4239 directory where <nptl/...> can be found.
4240
077a0da7
UD
42412005-12-22 Ulrich Drepper <drepper@redhat.com>
4242
4243 [BZ #1913]
4244 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
4245 Fix unwind info. Remove useless branch prediction prefix.
7735afa2
UD
4246 * tst-cancel24.cc: New file.
4247 * Makefile: Add rules to build and run tst-cancel24.
077a0da7 4248
8dea90aa
RM
42492005-12-21 Roland McGrath <roland@redhat.com>
4250
4251 * libc-cancellation.c: Use <> rather than "" #includes.
4252 * pt-cleanup.c: Likewise.
4253 * pthread_create.c: Likewise.
4254 * pthread_join.c: Likewise.
4255 * pthread_timedjoin.c: Likewise.
4256 * pthread_tryjoin.c: Likewise.
4257 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
4258 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
4259 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
4260 * unwind.c: Likewise.
4261
8da21f96
UD
42622005-12-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4263
4264 * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
4265 * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
4266 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
4267 THREAD_COPY_POINTER_GUARD): Define.
4268
00c2b3b9
UD
42692005-12-19 Jakub Jelinek <jakub@redhat.com>
4270
4271 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
4272 rather than one.
4273 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
4274 THREAD_COPY_POINTER_GUARD): Define.
4275 * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
4276 * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
4277 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
4278 THREAD_COPY_POINTER_GUARD): Define.
4279 * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
4280 * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
4281 THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
4282 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
4283 Use PTR_DEMANGLE for B0 if defined.
4284
827b7087
UD
42852005-12-17 Ulrich Drepper <drepper@redhat.com>
4286
4287 * pthread_create.c (__pthread_create_2_1): Use
4288 THREAD_COPY_POINTER_GUARD if available.
4289 * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
4290 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
4291 * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
4292 Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
4293 * sysdeps/x86_64/tls.h: Likewise.
4294
2826ac7e
RM
42952005-12-15 Roland McGrath <roland@redhat.com>
4296
4297 * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
4298
b6ab06ce
UD
42992005-12-13 Ulrich Drepper <drepper@redhat.com>
4300
4301 * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
4302 sysdeps/generic.
4303 * errno-loc.c: New file.
4304
f0d1a3b5
RM
43052005-12-12 Roland McGrath <roland@redhat.com>
4306
4307 * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
4308 adjustments before choosing stack size. Update minimum stack size
4309 calculation to match allocate_stack change.
4310
db13ddbc
UD
43112005-12-12 Ulrich Drepper <drepper@redhat.com>
4312
4313 * allocatestack.c (allocate_stack): Don't demand that there is an
4314 additional full page available on the stack beside guard, TLS, the
4315 minimum stack.
4316
088f460f
UD
43172005-11-24 Ulrich Drepper <drepper@redhat.com>
4318
4319 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
4320 (__cleanup_fct_attribute): Use __regparm__ not regparm.
4321
4322 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
4323 compiling 32-bit code we must define __cleanup_fct_attribute.
4324
16feadf2
UD
4325005-11-24 Jakub Jelinek <jakub@redhat.com>
4326
4327 [BZ #1920]
4328 * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
4329 __attribute__ instead of __attribute.
4330 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
4331 (__cleanup_fct_attribute): Likewise.
4332
e6e493bb
UD
43332005-11-17 Jakub Jelinek <jakub@redhat.com>
4334
4335 * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
4336 a write barrier before writing libgcc_s_getcfa.
4337
8e635611
UD
43382005-11-06 Ulrich Drepper <drepper@redhat.com>
4339
4340 * sysdeps/unix/sysv/linux/configure: Removed.
4341
ce33ee7c
UD
43422005-11-05 Ulrich Drepper <drepper@redhat.com>
4343
4344 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
4345 optional init_array/fini_array support.
4346
20d511e0
RM
43472005-10-24 Roland McGrath <roland@redhat.com>
4348
4349 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
4350 versioned_symbol use.
4351
fe60d146
RM
43522005-10-16 Roland McGrath <roland@redhat.com>
4353
4354 * init.c (__pthread_initialize_minimal_internal): Even when using a
4355 compile-time default stack size, apply the minimum that allocate_stack
4356 will require, and round up to page size.
4357
0faa1cf5
RM
43582005-10-10 Daniel Jacobowitz <dan@codesourcery.com>
4359
4360 * Makefile ($(test-modules)): Remove static pattern rule.
4361
f9126cc2 43622005-10-14 Jakub Jelinek <jakub@redhat.com>
b42a214c 4363 Ulrich Drepper <drepper@redhat.com>
f9126cc2
UD
4364
4365 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
4366 alignment in callback function.
4367 * Makefile: Add rules to build and run tst-align3.
4368 * tst-align3.c: New file.
4369
015a5d22
RM
43702005-10-03 Jakub Jelinek <jakub@redhat.com>
4371
4372 * allocatestack.c (setxid_signal_thread): Add
4373 INTERNAL_SYSCALL_DECL (err).
4374
b71ce910
UD
43752005-10-02 Jakub Jelinek <jakub@redhat.com>
4376
4377 * allocatestack.c (setxid_signal_thread): Need to use
4378 atomic_compare_and_exchange_bool_acq.
4379
dff9a7a1 43802005-10-01 Ulrich Drepper <drepper@redhat.com>
b42a214c 4381 Jakub Jelinek <jakub@redhat.com>
dff9a7a1
UD
4382
4383 * descr.h: Define SETXID_BIT and SETXID_BITMASK. Adjust
4384 CANCEL_RESTMASK.
4385 (struct pthread): Move specific_used field to avoid padding.
4386 Add setxid_futex field.
4387 * init.c (sighandler_setxid): Reset setxid flag and release the
4388 setxid futex.
4389 * allocatestack.c (setxid_signal_thread): New function. Broken
4390 out of the bodies of the two loops in __nptl_setxid. For undetached
4391 threads check whether they are exiting and if yes, don't send a signal.
4392 (__nptl_setxid): Simplify loops by using setxid_signal_thread.
4393 * pthread_create.c (start_thread): For undetached threads, check
4394 whether setxid bit is set. If yes, wait until signal has been
4395 processed.
4396
4397 * allocatestack.c (STACK_VARIABLES): Initialize them.
4398 * pthread_create.c (__pthread_create_2_1): Initialize pd.
4399
560b4709
UD
44002004-09-02 Jakub Jelinek <jakub@redhat.com>
4401
4402 * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
4403 waiters, awake all waiters on the associated mutex.
4404
5eac4760
RM
44052005-09-22 Roland McGrath <roland@redhat.com>
4406
4407 * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
4408 ../sysdeps/x86_64/hp-timing.h).
4409
a3615024
UD
44102005-08-29 Jakub Jelinek <jakub@redhat.com>
4411
4412 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
4413 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4414 (lll_futex_wake_unlock): Define.
4415 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
4416 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4417 (lll_futex_wake_unlock): Define.
4418 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
4419 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4420 (lll_futex_wake_unlock): Define.
4421 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
4422 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4423 (lll_futex_wake_unlock): Define.
4424 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
4425 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4426 (lll_futex_wake_unlock): Define.
4427 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
4428 lll_futex_wake_unlock.
4429 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
4430 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4431 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
4432 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
4433 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4434 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
4435
bf017034
UD
44362005-09-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4437
4438 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
4439 Fix typo in register name.
4440
fd4af664
UD
44412005-08-23 Ulrich Drepper <drepper@redhat.com>
4442
8558d715
UD
4443 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
4444 Use __sigfillset. Document that sigfillset does the right thing wrt
4445 to SIGSETXID.
fd4af664 4446
3fd1bc67
UD
44472005-07-11 Jakub Jelinek <jakub@redhat.com>
4448
44d75caf 4449 [BZ #1102]
3fd1bc67
UD
4450 * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
4451 PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
4452 PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
4453 PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
4454 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
4455 PTHREAD_COND_INITIALIZER): Supply zeros for all fields
4456 in the structure.
4457 * Makefile (tests): Add tst-initializers1.
4458 (CFLAGS-tst-initializers1.c): Set.
4459 * tst-initializers1.c: New test.
4460
553185e2
UD
44612005-07-11 Jakub Jelinek <jakub@redhat.com>
4462
4463 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
4464 Make sure __flags are located at offset 48 from the start of the
4465 structure.
4466
8df08cb2
RM
44672005-07-02 Roland McGrath <roland@redhat.com>
4468
4469 * Makeconfig: Comment fix.
4470
253eb3a0
UD
44712005-07-05 Jakub Jelinek <jakub@redhat.com>
4472
4473 * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
4474 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
4475 is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
4476 (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
4477 TLS_PRE_TCB_SIZE is sizeof (struct pthread).
4478 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4479 * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
4480 Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
4481 * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
4482 assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
4483
bb6e8ca3
UD
44842005-06-25 Jakub Jelinek <jakub@redhat.com>
4485
4486 * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
4487 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4488 * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
4489 fields.
4490 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4491 * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
4492 field. Put in sysinfo field unconditionally.
4493 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4494 * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
4495 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4496 * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
4497 fields.
4498 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4499 * pthread_create.c (__pthread_create_2_1): Use
4500 THREAD_COPY_STACK_GUARD macro.
4501 * Makefile: Add rules to build and run tst-stackguard1{,-static}
4502 tests.
4503 * tst-stackguard1.c: New file.
4504 * tst-stackguard1-static.c: New file.
4505
99c7f870
UD
45062005-06-14 Alan Modra <amodra@bigpond.net.au>
4507
4508 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
4509 Invoke CGOTSETUP and CGOTRESTORE.
4510 (CGOTSETUP, CGOTRESTORE): Define.
4511
8074c5c5
RM
45122005-05-29 Richard Henderson <rth@redhat.com>
4513
4514 * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
4515 (tf_write, tf_writev): Use it.
4516 (do_test): Use socketpair instead of pipe. Set SO_SNDBUF to
4517 the system minimum.
4518
c179df4e
UD
45192005-05-23 Jakub Jelinek <jakub@redhat.com>
4520
4521 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
4522 [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
4523 __librt_*_asynccancel@local.
4524
b0e196a4
UD
45252005-05-17 Alan Modra <amodra@bigpond.net.au>
4526
4527 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
4528 all occurrences of JUMPTARGET. Instead append @local to labels.
4529
f7d78e18
UD
45302005-05-20 Jakub Jelinek <jakub@redhat.com>
4531
4532 * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
4533 size/alignment of struct pthread rather than tcbhead_t.
4534 * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
4535 Likewise.
4536 * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
4537 Likewise.
4538 * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
4539 Likewise.
4540
363dd976
UD
45412005-05-19 Richard Henderson <rth@redhat.com>
4542
4543 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
4544 __sync_val_compare_and_swap, not explicit _si variant.
4545 * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
4546
1ad9da69
UD
45472005-05-03 Ulrich Drepper <drepper@redhat.com>
4548
4549 [BZ #915]
4550 * sysdeps/pthread/pthread.h: Avoid empty initializers.
4551
5085cd1f
UD
45522005-05-03 Jakub Jelinek <jakub@redhat.com>
4553
4554 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
4555 .eh_frame section, use cfi_* directives.
4556
ad529081
UD
45572005-04-27 Jakub Jelinek <jakub@redhat.com>
4558
4559 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
4560 of "" includes.
4561
dea99685
UD
45622005-04-27 Ulrich Drepper <drepper@redhat.com>
4563
c06aad09 4564 [BZ #1075]
dea99685
UD
4565 * tst-cancel17.c (do_test): Add arbitrary factor to make sure
4566 aio_write blocks.
4567
84060bad
RM
45682005-04-27 Roland McGrath <roland@redhat.com>
4569
5e2d8ac8
RM
4570 * Makefile (tests): Remove tst-clock2.
4571
84060bad
RM
4572 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
4573 CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
4574 translating to the kernel clockid_t for our own process/thread clock.
4575
4576 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
4577
4a035b9d
RM
45782005-04-15 Jakub Jelinek <jakub@redhat.com>
4579
4580 * old_pthread_cond_init.c: Include <errno.h>.
4581 (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
4582 process shared or uses clock other than CLOCK_REALTIME.
4583 * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
4584
edac0e8f
UD
45852005-04-13 David S. Miller <davem@davemloft.net>
4586
4587 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
4588 * sysdeps/sparc/sparc64/clone.S: New file.
4589
613d8d52
RM
45902005-04-05 Jakub Jelinek <jakub@redhat.com>
4591
44d75caf 4592 [BZ #1102]
613d8d52
RM
4593 * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
4594 __inline instead of inline.
4595 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
4596
ee618985
UD
45972005-03-31 Jakub Jelinek <jakub@redhat.com>
4598
4599 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
4600 functionally equivalent, but shorter instructions.
4601 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
4602 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
4603 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
4604 Likewise.
4605 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
4606 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
4607 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
4608 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
4609 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4610 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
4611 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
4612 Likewise.
4613 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
4614 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
4615 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4616 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
4617 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
4618
f850220b
AJ
46192005-03-28 Daniel Jacobowitz <dan@codesourcery.com>
4620
4621 * sysdeps/mips/Makefile: New file.
4622 * sysdeps/mips/nptl-sysdep.S: New file.
4623 * sysdeps/mips/tcb-offsets.sym: New file.
4624 * sysdeps/mips/pthread_spin_lock.S: New file.
4625 * sysdeps/mips/pthread_spin_trylock.S: New file.
4626 * sysdeps/mips/pthreaddef.h: New file.
4627 * sysdeps/mips/tls.h: New file.
4628 * sysdeps/mips/jmpbuf-unwind.h: New file.
4629 * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
4630 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
4631 * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
4632 * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
4633 * sysdeps/unix/sysv/linux/mips/fork.c: New file.
4634 * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
4635 * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
4636 * sysdeps/unix/sysv/linux/mips/clone.S: New file.
4637 * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
4638 * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
4639
1e6da2b0
UD
46402005-03-23 Ulrich Drepper <drepper@redhat.com>
4641
c06aad09 4642 [BZ #1112]
1e6da2b0
UD
4643 * pthread_create.c (__pthread_create_2_1): Rename syscall error
4644 variable to scerr.
4645
5233d576
RM
46462005-03-10 Jakub Jelinek <jakub@redhat.com>
4647
4648 * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
4649
3053ff11
RM
46502005-02-25 Roland McGrath <roland@redhat.com>
4651
4652 * alloca_cutoff.c: Correct license text.
4653 * tst-unload.c: Likewise.
4654 * sysdeps/pthread/allocalim.h: Likewise.
4655 * sysdeps/pthread/pt-initfini.c: Likewise.
4656 * sysdeps/pthread/bits/libc-lock.h: Likewise.
4657 * sysdeps/pthread/bits/sigthread.h: Likewise.
4658 * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
4659 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
4660
9cfe5381
RM
46612005-02-16 Roland McGrath <roland@redhat.com>
4662
4663 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
4664 Use unsigned int * for ptr_nthreads.
4665
7de00121
RM
46662005-02-14 Alan Modra <amodra@bigpond.net.au>
4667
20d511e0 4668 [BZ #721]
7de00121
RM
4669 * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
4670 gcc4.
4671
4bae262d
UD
46722005-02-07 Richard Henderson <rth@redhat.com>
4673
613d8d52 4674 [BZ #787]
4bae262d
UD
4675 * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
4676 argument.
4677
75df54b7
RM
46782004-11-03 Marcus Brinkmann <marcus@gnu.org>
4679
4680 * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
4681 order of arguments in invocation of atomic_add_zero.
4682
ea9c93cc
UD
46832005-01-26 Jakub Jelinek <jakub@redhat.com>
4684
9cfe5381 4685 [BZ #737]
ea9c93cc
UD
4686 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
4687 Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
4688 at least gotntpoff relocation and addition.
4689 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
4690 Likewise.
4691 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
4692 Likewise.
4693 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
4694 Likewise.
4695
9dcafc55
UD
46962005-01-06 Ulrich Drepper <drepper@redhat.com>
4697
4698 * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
4699 entry for static tls deallocation fix.
4700 * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
4701 also contains information whether the memory pointed to is static
4702 TLS or not.
4703 * sysdeps/i386/tls.h: Likewise.
4704 * sysdeps/ia64/tls.h: Likewise.
4705 * sysdeps/powerpc/tls.h: Likewise.
4706 * sysdeps/s390/tls.h: Likewise.
4707 * sysdeps/sh/tls.h: Likewise.
4708 * sysdeps/sparc/tls.h: Likewise.
4709 * sysdeps/x86_64/tls.h: Likewise.
4710
a71c152c
UD
47112004-12-27 Ulrich Drepper <drepper@redhat.com>
4712
4713 * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
4714
d143c49e
UD
47152004-12-21 Jakub Jelinek <jakub@redhat.com>
4716
4717 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
4718 %esp.
4719 * Makefile (tests): Add tst-align2.
4720 * tst-align2.c: New test.
4721 * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
4722 -mpreferred-stack-boundary=4.
4723
50130ded
RM
47242004-12-18 Roland McGrath <roland@redhat.com>
4725
4726 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
4727 New file removed withdrawn for the moment.
4728
cbc53df0
RH
47292004-12-17 Richard Henderson <rth@redhat.com>
4730
4731 * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
4732 * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
50130ded 4733
fb9d5c73
UD
47342004-12-16 Ulrich Drepper <drepper@redhat.com>
4735
03332aa6
UD
4736 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
4737 Increased PTHREAD_STACK_MIN.
4738
fb9d5c73
UD
4739 * tst-context1.c (stacks): Use bigger stack size.
4740
e853ea00
UD
47412004-12-16 Jakub Jelinek <jakub@redhat.com>
4742
4743 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
4744 * sysdeps/sparc/tcb-offsets.sym: Add TID.
4745
f23673fc
UD
47462004-12-15 Jakub Jelinek <jakub@redhat.com>
4747
4748 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
4749 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
4750 * sysdeps/s390/tcb-offsets.sym (TID): Add.
4751
917fbe70
UD
47522004-12-15 Ulrich Drepper <drepper@redhat.com>
4753
4754 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
4755
1f9d7c27
UD
47562004-12-14 Ulrich Drepper <drepper@redhat.com>
4757
4758 * sysdeps/powerpc/tcb-offsets.sym: Add TID.
4759 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
4760
4761 * tst-getpid1.c: If child crashes, report this first. Print which
4762 signal.
4763
bf7c04cd
UD
47642004-12-09 Ulrich Drepper <drepper@redhat.com>
4765
4766 * init.c (__pthread_initialize_minimal_internal): Also unblock
4767 SIGSETXID.
4768
47692004-12-01 Jakub Jelinek <jakub@redhat.com>
4770
4771 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
4772 _POSIX_THREAD_CPUTIME): Define to 0.
4773 * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
4774 handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
4775 * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
4776 __timer_signal_thread_tclk): Remove.
4777 (init_module): Remove their initialization.
4778 (thread_cleanup): Remove their cleanup assertions.
4779 * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
4780 __timer_signal_thread_tclk): Remove.
4781 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
75df54b7 4782 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
bf7c04cd
UD
4783 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
4784
484cc801
UD
47852004-12-07 Jakub Jelinek <jakub@redhat.com>
4786
4787 * sysdeps/ia64/tcb-offsets.sym (TID): Add.
4788 * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
4789
4790 * Makefile (tests): Add tst-getpid2.
4791 * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
4792 (do_test): Use it. Use __clone2 instead of clone on ia64.
4793 * tst-getpid2.c: New test.
4794
2da9a6a1
UD
47952004-12-07 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4796
4797 * sysdeps/unix/sysv/linux/sh/clone.S: New file.
4798
1ff241b8
UD
47992004-12-04 Ulrich Drepper <drepper@redhat.com>
4800
4801 * Makefile (tests): Add tst-getpid1.
4802 * tst-getpid1.c: New file.
4803 * sysdeps/unix/sysv/linux/i386/clone.S: New file.
4804 * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
4805
3f488b9c
RM
48062004-12-02 Roland McGrath <roland@redhat.com>
4807
4808 * Makefile (libpthread-nonshared): Variable removed.
4809 ($(objpfx)libpthread_nonshared.a): Target removed.
4810 ($(inst_libdir)/libpthread_nonshared.a): Likewise.
4811 These are now handled by generic magic from
4812 libpthread-static-only-routines being set.
4813
597ce09c
UD
48142004-11-27 Ulrich Drepper <drepper@redhat.com>
4815
4816 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
4817 _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
4818 _POSIX_THREAD_PRIO_PROTECT): Define.
4819 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4820 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
4821 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
4822
60e4523a
UD
48232004-11-26 Jakub Jelinek <jakub@redhat.com>
4824
4825 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
4826 _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
4827 _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
4828 _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
4829 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4830 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
4831 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
4832
f1f2cafc
UD
48332004-11-24 Ulrich Drepper <drepper@redhat.com>
4834
bca2d208
UD
4835 * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
4836
f1f2cafc
UD
4837 * Makefile (libpthread-routines): Add pthread_setschedprio.
4838 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
4839 * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
4840 * pthread_setschedprio.c: New file.
4841
b639d0c9
UD
48422004-11-20 Jakub Jelinek <jakub@redhat.com>
4843
ef2bb413
UD
4844 * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
4845 * pthread_cancel.c (pthread_create): Likewise.
4846
b639d0c9
UD
4847 * Makefile (libpthread-routines): Add vars.
4848 * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
4849 * init.c (__default_stacksize, __is_smp): Remove.
4850 * vars.c: New file.
4851 * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
4852 and define a wrapper macro.
4853 (PTHREAD_STATIC_FN_REQUIRE): Define.
4854 * allocatestack.c (__find_thread_by_id): Undefine.
4855 * pthread_create (__pthread_keys): Remove.
4856 (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
4857 pthread_key_create, pthread_setspecific, pthread_getspecific): Add
4858 PTHREAD_STATIC_FN_REQUIRE.
4859
3defcff3
UD
48602004-11-18 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4861
4862 * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
4863 parameter to REGISTER macro.
4864
ec188f92
RM
48652004-11-17 Roland McGrath <roland@redhat.com>
4866
4867 * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
4868 Make sure SIGCANCEL is blocked as well.
4869
ccd8de9a
UD
48702004-11-10 Jakub Jelinek <jakub@redhat.com>
4871
4872 * sysdeps/pthread/setxid.h: New file.
4873 * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
4874 (struct xid_command): Add forward decl.
4875 (struct pthread_functions): Change return type of __nptl_setxid hook
4876 to int.
4877 * pthreadP.h (__nptl_setxid): Change return type to int.
4878 * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
4879 calling thread, return its return value and set errno on failure.
4880 * descr.h (struct xid_command): Change id type to long array.
4881
4882 * Makefile: Add rules to build and test tst-setuid1 and
4883 tst-setuid1-static.
4884 * tst-setuid1.c: New test.
4885 * tst-setuid1-static.c: New test.
4886
ed2ced8a
UD
48872004-11-10 Jakub Jelinek <jakub@redhat.com>
4888
4889 * Makefile (tests): Add tst-exit3.
4890 * tst-exit3.c: New test.
4891
948603ee
UD
48922004-11-09 Ulrich Drepper <drepper@redhat.com>
4893
4894 * Makefile (tests): Add tst-exit2.
4895 * tst-exit2.c: New file.
4896
ba5ffd2a
RM
48972004-11-09 Roland McGrath <roland@redhat.com>
4898
4899 [BZ #530]
4900 * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
4901 here, before calling clone.
4902 * pthread_create.c (start_thread): Don't do it here.
4903
c4d7bd39
RM
49042004-11-02 Jakub Jelinek <jakub@redhat.com>
4905
4906 * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
4907
543fb0c8
UD
49082004-10-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4909
4910 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
4911 Set ETIMEDOUT to errno when time is up. Tweak to avoid
4912 assembler warning.
4913
a1fbd858
UD
49142004-10-28 Jakub Jelinek <jakub@redhat.com>
4915
4916 * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
4917 if sched_priority is not between minprio and maxprio.
4918
c2a4357a
UD
49192004-10-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4920
4921 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4922 (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
4923
4924 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
4925 (__lll_mutex_timedlock_wait): Fix a bad branch condition.
4926
78d8d211
UD
49272004-10-24 Ulrich Drepper <drepper@redhat.com>
4928
4929 * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
4930 not-cancelable I/O functions.
4931
dd28590f
UD
49322004-10-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4933
4934 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
4935 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
4936 make sure 2 is stored in the futex and we looked at the old value.
4937 Fix a few other problems to return the correct value.
4938
f8c97af7
RH
49392004-10-14 Richard Henderson <rth@redhat.com>
4940
4941 * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
4942 make gcc4 happy.
4943
3feb8efa
UD
49442004-10-06 Jakub Jelinek <jakub@redhat.com>
4945
4946 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
4947 of pthread-functions.h and pthreaddef.h.
4948 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
4949
4950 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4951 Change __data.__nwaiters from int to unsigned int.
4952
4953 * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
4954 sysconf (_SC_THREAD_CPUTIME) returns negative value.
4955
4956 * allocatestack.c (__find_thread_by_id): Move attribute_hidden
4957 before return type.
4958
4959 * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
4960 (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
4961
67060ef5
UD
49622004-10-06 Ulrich Drepper <drepper@redhat.com>
4963
4964 * tst-cancel4.c (tf_msgrcv): Check for failure in msgget. If the
4965 test fails, remove message queue.
4966 (tf_msgsnd): Likewise.
4967
f38a3086
UD
49682004-10-05 Jakub Jelinek <jakub@redhat.com>
4969
4970 * tst-clock1.c: Change #ifdef to #if defined.
4971 * tst-clock2.c: Likewise.
4972 * tst-cond11.c: Likewise.
4973
2c03b6db
UD
4974 * sysdeps/pthread/timer_create.c (timer_create): Use
4975 defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
4976 defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
4977 THREAD_CPUTIME.
4978
6ab5f50d
UD
49792004-10-05 Jakub Jelinek <jakub@redhat.com>
4980
4981 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
4982 _POSIX_THREAD_CPUTIME): Define to 0.
4983
e4bb4853
UD
49842004-10-04 Ulrich Drepper <drepper@redhat.com>
4985
4986 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
4987 and _POSIX_THREAD_CPUTIME to zero.
4988 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
4989 * tst-barrier2.c: Fix testing for POSIX feature.
4990 * tst-clock1.c: Likewise.
4991 * tst-clock2.c: Likewise.
4992 * tst-cond11.c: Likewise.
4993 * tst-cond4.c: Likewise.
4994 * tst-cond6.c: Likewise.
4995 * tst-flock2.c: Likewise.
4996 * tst-mutex4.c: Likewise.
4997 * tst-mutex9.c: Likewise.
4998 * tst-rwlock12.c: Likewise.
4999 * tst-rwlock4.c: Likewise.
5000 * tst-signal1.c: Likewise.
5001 * tst-spin2.c: Likewise.
5002 * sysdeps/pthread/posix-timer.h: Likewise.
5003 * sysdeps/pthread/timer_create.c: Likewise.
5004 * sysdeps/pthread/timer_routines.c: Likewise.
5005
c1b48791
UD
50062004-10-01 Ulrich Drepper <drepper@redhat.com>
5007
927f0673
UD
5008 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5009 (__lll_mutex_timedlock_wait): Address futex correctly.
5010
c1b48791 5011 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
b610fa2d 5012 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
c1b48791
UD
5013 make sure 2 is stored in the futex and we looked at the old value.
5014 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5015 (__lll_mutex_timedlock_wait): Likewise. Fix a few other problems
5016 which might very well made the code not working at all before.
7b87aca6 5017 [BZ #417]
c1b48791 5018
e9f4e844
UD
50192004-09-28 Ulrich Drepper <drepper@redhat.com>
5020
4f21c95d
UD
5021 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
5022 allow SIGSETXID to be sent.
5023 * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
5024 for SIGSETXID to be defined.
5025 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
5026 SIGSETXID cannot be blocked.
5027
e9f4e844
UD
5028 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
5029 Add __extension__ to long long types.
5030 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5031 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5032 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5033 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5034 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
5035 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5036 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5037
5f66b766
UD
50382004-09-25 Ulrich Drepper <drepper@redhat.com>
5039
5040 * descr.h (struct pthread): Add stopped_start field.
5041 * sysdeps/pthread/createthread.c (create_thread): Set
5042 start_stopped flag in descriptor for new thread appropriately.
5043 * pthread_create.c (start_thread): Only take lock to be stopped on
5044 startup if stopped_start flag says so.
5045
362038b0
UD
50462004-09-24 Ulrich Drepper <drepper@redhat.com>
5047
3f80a99b
UD
5048 * pthread_create.c (__pthread_create_2_1): Remember whether thread
5049 is created detached and if yes, do not try to free the stack in case
5050 the thread creation failed.
5051 * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
5052 call fails. Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
5053 case there has been no error. [BZ #405]
5054
362038b0
UD
5055 * pthread_create.c (start_thread): Don't wait for scheduler data
5056 etc to be set at the beginning of the function. The cancellation
5057 infrastructure must have been set up. And enable async
5058 cancellation before potentially going to sleep. [BZ #401]
5059
65f0beb9
UD
50602004-09-20 Ulrich Drepper <drepper@redhat.com>
5061
3c12b91a 5062 * Versions: Remove exports for pthread_set*id_np functions.
65f0beb9
UD
5063 * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
5064 for now.
5065 * Makefile: Don't build pthread_set*id code for now.
5066
2edb61e3
UD
50672004-09-19 Ulrich Drepper <drepper@redhat.com>
5068
5069 * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
5070 internal use.
5071 * allocatestack.c (__nptl_setxid): New function.
5072 * descr.h (struct xid_command): Define type.
5073 * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
5074 (sighandler_setxid): New function.
5075 (__pthread_initialize_minimal): Register sighandler_setxid for
5076 SIGCANCEL.
5077 * pt-allocrtsig.c: Update comment.
5078 * pthreadP.h: Define SIGSETXID. Declare __xidcmd variable.
5079 Declare __nptl_setxid.
5080 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
5081 * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
5082 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
5083 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
5084 and pthread_setresuid_np.
5085 * pthread_setgid_np.c: New file.
5086 * pthread_setuid_np.c: New file.
5087 * pthread_setegid_np.c: New file.
5088 * pthread_seteuid_np.c: New file.
5089 * pthread_setregid_np.c: New file.
5090 * pthread_setreuid_np.c: New file.
5091 * pthread_setresgid_np.c: New file.
5092 * pthread_setresuid_np.c: New file.
5093 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
5094 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
5095 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
5096 and pthread_setresuid_np.
5097 * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
5098 pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
5099 pthread_setregid, and pthread_setresgid.
5100
1ab1fa6f
UD
51012004-09-18 Ulrich Drepper <drepper@redhat.com>
5102
5103 * allocatestack.c (allocate_stack): Return EAGAIN instead of
5104 ENOMEM when out of memory.
5105
ae9e6b36
RM
51062004-09-10 Roland McGrath <roland@redhat.com>
5107
5108 [BZ #379]
5109 * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
5110 code, since we don't try to use the broken CLONE_STOPPED any more.
5111 * pthread_create.c (start_thread): Likewise.
5112
424bd2f8
RH
51132004-09-15 Richard Henderson <rth@redhat.com>
5114
5115 * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
5116
17b8a52d
UD
51172004-09-01 David Mosberger <davidm@hpl.hp.com>
5118
5119 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
5120 (__libc_unwind_longjmp): Delete macro and declare as function.
5121 * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
5122 __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
5123 nptl directory.
5124 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
5125 * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
5126 * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
5127
ccc63b07
UD
51282004-09-12 Ulrich Drepper <drepper@redhat.com>
5129
5130 * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
5131 for __USE_XOPEN2K.
5132 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
5133 types also for __USE_XOPEN2K.
5134 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5135 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5136 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5137 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5138 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5139 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5140 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5141 [BZ #320]
5142
31f93b3b
UD
51432004-09-08 Ulrich Drepper <drepper@redhat.com>
5144
5145 * sysdeps/pthread/pthread.h
5146 (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
5147 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
5148 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
5149 (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
5150 [BZ #375]
5151
e0329987
UD
51522004-09-07 Ulrich Drepper <drepper@redhat.com>
5153
590b40f7
UD
5154 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
5155 PSEUDO to be used with . prefix.
5156
67254a97
UD
5157 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
5158 Use atomic_increment instead of atomic_exchange_and_add.
5159 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
5160 Likewise.
5161 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
5162 Likewise.
5163 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
5164 Likewise.
5165
5166 * allocatestack.c (allocate_stack): Use atomic_increment_val
5167 instead of atomic_exchange_and_add.
5168 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
5169 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
5170 Likewise.
5171 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5172 Likewise.
5173
e0329987
UD
5174 * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
5175 the initialization function might throw.
5176
42d86dd6 51772005-09-05 Richard Henderson <rth@redhat.com>
e0329987 5178
42d86dd6
RH
5179 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
5180 Move definition inside libpthread, libc, librt check. Provide
5181 definition for rtld.
5182
73f7c32c
UD
51832004-09-02 Ulrich Drepper <drepper@redhat.com>
5184
f76c8499
UD
5185 * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
5186 * sysdeps/i386/jmpbuf-unwind.h: Likewise
5187 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
5188 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
5189 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
5190 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
5191 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
5192 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
5193 * unwind.c: Use it.
5194
73f7c32c
UD
5195 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
5196 Rename __data.__clock to __data.__nwaiters, make it unsigned int.
5197 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
5198 Likewise.
5199 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
5200 Decrement __nwaiters. If pthread_cond_destroy has been called and
5201 this is the last waiter, signal pthread_cond_destroy caller and
5202 avoid using the pthread_cond_t structure after unlock.
5203 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5204 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5205 Read clock type from the least significant bits of __nwaiters instead
5206 of __clock.
5207 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5208 * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
5209
52102004-08-31 Jakub Jelinek <jakub@redhat.com>
5211
5212 [BZ #342]
5213 * Makefile (tests): Add tst-cond20 and tst-cond21.
5214 * tst-cond20.c: New test.
5215 * tst-cond21.c: New test.
5216 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
5217 (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
5218 it unsigned int.
5219 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
5220 Likewise.
5221 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
5222 (pthread_cond_t): Likewise.
5223 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
5224 Likewise.
5225 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
5226 Likewise.
5227 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
5228 Likewise.
5229 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
5230 (cond_nwaiters): New.
5231 (clock_bits): New.
5232 * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
5233 if there are waiters not signalled yet.
5234 Wait until all already signalled waiters wake up.
5235 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
5236 __nwaiters. If pthread_cond_destroy has been called and this is the
5237 last waiter, signal pthread_cond_destroy caller and avoid using
5238 the pthread_cond_t structure after unlock.
5239 (__pthread_cond_wait): Increment __nwaiters in the beginning,
5240 decrement it when leaving. If pthread_cond_destroy has been called
5241 and this is the last waiter, signal pthread_cond_destroy caller.
5242 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5243 Likewise. Read clock type from the least significant bits of
5244 __nwaiters instead of __clock.
5245 * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
5246 whether clock ID can be encoded in COND_CLOCK_BITS bits.
5247 * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
5248 clock type just from the last COND_CLOCK_BITS bits of value.
5249 * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
5250 instead of __clock, just from second bit of condattr's value.
5251
409f7493
UD
52522004-08-30 Jakub Jelinek <jakub@redhat.com>
5253
5254 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
5255 bits/wordsize.h. Make the header match i386 header when __WORDSIZE
5256 != 64.
5257 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
5258
92c6ccd1
RM
52592004-08-15 Roland McGrath <roland@frob.com>
5260
5261 * pthread_atfork.c: Update copyright terms including special exception
5262 for these trivial files, which are statically linked into executables
5263 that use dynamic linking for the significant library code.
5264
4d004cfb
UD
52652004-08-09 Jakub Jelinek <jakub@redhat.com>
5266
5267 * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
5268 pthread_rwlock_rdlock.
5269 * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
5270 Decrease __nr_readers_queued after reacquiring lock.
5271 * sysdeps/pthread/pthread_rwlock_timedrdlock
5272 (pthread_rwlock_timedrdlock): Likewise.
5273 Reported by Bob Cook <bobcook47@hotmail.com>.
5274
90595fb6
RM
52752004-08-11 Jakub Jelinek <jakub@redhat.com>
5276
5277 * tst-rwlock14.c (tf): Read main thread handle from *ARG
5278 before pthread_barrier_wait.
5279
fa46f7ab
UD
52802004-08-07 Ulrich Drepper <drepper@redhat.com>
5281
5282 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
5283 Remove unnecessary exception handling data.
5284
15ef4b55
UD
52852004-07-23 Jakub Jelinek <jakub@redhat.com>
5286
5287 [BZ #284]
5288 * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
5289 instead of clockid_t.
5290
4fb907b7
RM
52912004-07-21 Roland McGrath <roland@redhat.com>
5292
5293 * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
5294
52952004-07-19 Roland McGrath <roland@redhat.com>
5296
5297 * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
5298
8f73811b
RM
52992004-07-02 Roland McGrath <roland@redhat.com>
5300
5301 * configure: Don't exit.
5302
290639c3
UD
53032004-07-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5304
5305 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
5306 (__pthread_cond_timedwait): Check for invalid nanosecond in
5307 timeout value.
5308
8e5aaad9
UD
53092004-07-07 Ulrich Drepper <drepper@redhat.com>
5310
5311 * Makefile: Add rules to build and run tst-fini1.
5312 * tst-fini1.c: New file.
5313 * tst-fini1mod.c: New file.
5314
ce6e047f
UD
53152004-07-05 Ulrich Drepper <drepper@redhat.com>
5316
5317 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
5318 if no cancellation support is needed.
5319 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
5320 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
5321 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
5322 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
5323 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
5324 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
5325 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
5326 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
5327 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
5328
5329 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
5330 only if not already defined.
5331
9b9ef823
UD
53322004-07-05 Jakub Jelinek <jakub@redhat.com>
5333
2dd18ce2
UD
5334 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
5335 constraint "m" instead of "0" for futex.
5336
9b9ef823
UD
5337 * shlib-versions: Add powerpc64-.*-linux.*.
5338
38205402
UD
53392004-07-04 Jakub Jelinek <jakub@redhat.com>
5340
5341 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
5342 (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
5343 for valid tv_nsec.
5344 * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
5345 1 billion and 64-bit tv_nsec which is valid when truncated to 32
5346 bits.
5347
78a9c837
RM
53482004-06-29 Roland McGrath <roland@redhat.com>
5349
5350 * Banner: NPTL no longer has its own version number.
5351 * Makefile (nptl-version): Variable removed.
5352 * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
5353 using $(version), the glibc version number.
5354
d3d35527
UD
53552004-06-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5356
5357 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
5358 Fix branch offset for a PLT entry.
5359 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
5360 Likewise.
5361 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
5362 Likewise.
5363 * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
5364 Likewise.
5365 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
5366 Likewise.
5367
346f18ae
UD
53682004-06-28 Jakub Jelinek <jakub@redhat.com>
5369
5370 * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
5371 unconditionally.
5372
f3a19754
UD
53732004-06-28 Jakub Jelinek <jakub@redhat.com>
5374
5375 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
5376 (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
5377 instead of tv_sec.
5378 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
5379 (pthread_rwlock_timedrdlock): Likewise.
5380
539842a4
UD
53812004-06-22 Jakub Jelinek <jakub@redhat.com>
5382
5383 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
5384 Set __r7 to val, not mutex.
5385
46f4c578
UD
53862004-06-27 Ulrich Drepper <drepper@redhat.com>
5387
5388 * Makefile: Add rules to build tst-rwlock14.
5389 * tst-rwlock14.c: New file.
5390
53912004-06-24 Boris Hu <boris.hu@intel.com>
5392
5393 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
5394 check.
5395 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
5396
9898e99c
AJ
53972004-06-19 Andreas Jaeger <aj@suse.de>
5398
5399 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
5400 assembler in last patch.
5401
7c3164bc
UD
54022004-06-17 Ulrich Drepper <drepper@redhat.com>
5403
5404 * sysdeps/pthread/pthread_cond_timedwait.c
5405 (__pthread_cond_timedwait): Also check for negativ nanoseconds.
5406 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5407 (__pthread_cond_timedwait): Check for invalid nanosecond in
5408 timeout value.
5409 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5410 * tst-cond19.c: New file.
5411 * Makefile: Add rules to build and run tst-cond19.
5412
72e61500
UD
54132004-06-15 Steven Munroe <sjmunroe@us.ibm.com>
5414
5415 * tst-context1.c (GUARD_PATTERN): Defined.
5416 (tst_context_t): Define struct containing ucontext_t & guard words.
5417 (ctx): Declare as an array of tst_context_t.
5418 (fct): Verify uc_link & guard words are still valid.
5419 (tf): Initialize guard words in ctx. Adjust ctx refs for new struct.
5420
7c370086
UD
54212004-06-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5422
5423 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
5424 Add __data.__futex field, reshuffle __data.__clock.
5425 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
5426 (__pthread_cond_signal): Increment __futex at the same time as
5427 __wakeup_seq or __total_seq. Pass address of __futex instead of
5428 address of low 32-bits of __wakeup_seq to futex syscall.
5429 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
5430 (__pthread_cond_wait): Likewise. Pass __futex value from before
5431 releasing internal lock to FUTEX_WAIT.
5432 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
5433 (__pthread_cond_timedwait): Likewise.
5434 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
5435 (FUTEX_CMP_REQUEUE): Define.
5436 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
5437 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
5438 Pass __futex value from before the unlock and __futex address instead
5439 of address of low 32-bits of __wakeup_seq to futex syscall.
5440 Fallback to FUTEX_WAKE all on any errors.
5441
a9e526e7
RM
54422004-06-08 Jakub Jelinek <jakub@redhat.com>
5443
5444 * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
5445 comment typo.
5446 * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
5447 * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
5448 * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
5449 * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
5450 Likewise. Reported by Bob Cook <bobcook47@hotmail.com>.
5451
f1847a84
RM
54522004-06-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
5453
5454 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
5455 Add memory clobber to inline assembly.
5456 (__lll_mutex_trylock): Likewise.
5457 (__lll_mutex_cond_trylock): Likewise.
5458
f7c81e1a
UD
54592004-06-07 Martin Schwidefsky <schwidefsky@de.ibm.com>
5460
5461 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
5462 Pass val argument as 6th system call argument in %r7.
5463
75fccede
UD
54642004-05-21 Jakub Jelinek <jakub@redhat.com>
5465
5466 * Makefile (tests): Add tst-cond16.
5467 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
5468 * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
5469 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
5470 Add __data.__futex field, reshuffle __data.__clock.
5471 * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
5472 (__pthread_cond_signal): Increment __futex at the same time as
5473 __wakeup_seq or __total_seq. Pass address of __futex instead of
5474 address of low 32-bits of __wakeup_seq to futex syscall.
5475 * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
5476 (__pthread_cond_wait): Likewise. Pass __futex value from before
5477 releasing internal lock to FUTEX_WAIT.
5478 * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
5479 (__pthread_cond_timedwait): Likewise.
5480 * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
5481 (FUTEX_CMP_REQUEUE): Define.
5482 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
5483 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
5484 Pass __futex value from before the unlock and __futex address instead
5485 of address of low 32-bits of __wakeup_seq to futex syscall.
5486 Fallback to FUTEX_WAKE all on any errors.
5487 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
5488 Define.
5489 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
5490 internally. Return non-zero if error, zero if success.
5491 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
5492 Add __data.__futex field, reshuffle __data.__clock.
5493 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
5494 Define.
5495 (lll_futex_requeue): Add val argument, return 1 unconditionally
5496 for the time being.
5497 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
5498 Add __data.__futex field, reshuffle __data.__clock.
5499 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
5500 Define.
5501 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
5502 internally. Return non-zero if error, zero if success.
5503 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
5504 (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
5505 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
5506 Define.
5507 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
5508 internally. Return non-zero if error, zero if success.
5509 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
5510 Add __data.__futex field, reshuffle __data.__clock.
5511 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
5512 Define.
5513 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
5514 internally. Return non-zero if error, zero if success.
5515 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
5516 Add __data.__futex field, reshuffle __data.__clock.
5517 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
5518 Add __data.__futex field, reshuffle __data.__clock.
5519 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
5520 Increment __futex at the same time as __wakeup_seq or __total_seq.
5521 Pass address of __futex instead of address of low 32-bits of
5522 __wakeup_seq to futex syscall.
5523 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
5524 Pass __futex value from before releasing internal lock
5525 to FUTEX_WAIT.
5526 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5527 Likewise. Avoid unnecessary shadowing of variables.
5528 * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
5529 Set __futex to 2 * __total_seq. Pass __futex value from before the
5530 unlock and __futex address instead of address of low 32-bits of
5531 __wakeup_seq to futex_requeue macro, adjust for new return value
5532 meaning.
5533 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
5534 (__pthread_cond_signal): Increment __futex at the same time as
5535 __wakeup_seq or __total_seq. Pass address of __futex instead of
5536 address of low 32-bits of __wakeup_seq to futex syscall.
5537 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
5538 (__pthread_cond_wait): Likewise. Pass __futex value from before
5539 releasing internal lock to FUTEX_WAIT.
5540 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5541 (__pthread_cond_timedwait): Likewise.
5542 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
5543 (FUTEX_CMP_REQUEUE): Define.
5544 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
5545 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
5546 Pass __futex value from before the unlock and __futex address instead
5547 of address of low 32-bits of __wakeup_seq to futex syscall.
5548 Fallback to FUTEX_WAKE all on any errors.
5549
55502004-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5551
5552 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
5553 Add nop to align the end of critical section.
5554 (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
5555
fbf86dda
UD
55562004-06-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5557
5558 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
5559 Add __broadcast_seq field.
5560 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
5561 all waiters as woken with woken_seq and bump broadcast counter.
5562 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
5563 __broadcast_seq. Increment __woken_seq correctly when cleanuped.
5564 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5565 Comment typo fixes. Avoid returning -ETIMEDOUT.
5566
55672004-06-01 Ulrich Drepper <drepper@redhat.com>
5568
5569 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5570 (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
5571 Reported by Kaz Kojima.
5572
ffdd5e50
UD
55732004-05-25 Jakub Jelinek <jakub@redhat.com>
5574
5575 * sysdeps/unix/sysv/linux/aio_misc.h: New file.
5576
3abc82c8
UD
55772004-05-21 Jakub Jelinek <jakub@redhat.com>
5578
5579 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
5580 __broadcast_seq with bc_seq after acquiring internal lock instead of
5581 before it.
5582
893a3511
UD
55832004-05-18 Jakub Jelinek <jakub@redhat.com>
5584
5585 * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
5586 compilation.
5587 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5588 (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
5589 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
5590 (pthread_cond_t): Add __data.__broadcast_seq field.
5591 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5592 (FRAME_SIZE): Define.
5593 (__pthread_cond_timedwait): Use it. Store/check broadcast_seq.
5594 Comment typo fixes.
5595 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
5596 Define.
5597 (__pthread_cond_wait): Use it. Store/check broadcast_seq. Comment
5598 typo fixes.
5599 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
5600 (__pthread_cond_broadcast): Increment broadcast_seq. Comment typo
5601 fixes.
5602
56032004-05-18 Ulrich Drepper <drepper@redhat.com>
5604
5605 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
5606 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
5607 Add __broadcast_seq field.
5608 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5609 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5610 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5611 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5612 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5613 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
5614 all waiters as woken with woken_seq and bump broadcast counter.
5615 * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
5616 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
5617 __broadcast_seq field.
5618 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5619 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
5620 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
5621 * pthread_cond_init.c: Initialize __broadcast_seq field.
5622 * Makefile (tests): Add tst-cond17 and tst-cond18.
5623 Add .NOTPARALLEL goal.
5624 * tst-cond16.c: New file. From Jakub.
5625 * tst-cond17.c: New file. From Jakub.
5626 * tst-cond18.c: New file. From Jakub.
5627
4123718e
UD
56282004-05-16 Ulrich Drepper <drepper@redhat.com>
5629
5630 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
5631 unwind info.
5632
5633 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
5634 Parametrize frame size. Correct some unwind info.
5635 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5636
2d7ae210
UD
56372004-05-04 Jakub Jelinek <jakub@redhat.com>
5638
5639 * tst-stack3.c: Note testing functionality beyond POSIX.
5640
50c2b6d7
UD
56412004-05-04 Jakub Jelinek <jakub@redhat.com>
5642
5643 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
5644 Change conditional from ifdef to if.
5645
27b02589
UD
56462004-04-23 Jakub Jelinek <jakub@redhat.com>
5647
5648 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
5649 SYSDEP_CANCEL_ERROR): Define.
5650 (PSEUDO): Use it.
5651
4bb8fc33
UD
56522004-05-01 Jakub Jelinek <jakub@redhat.com>
5653
5654 * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
5655
f9a06dc1
UD
56562004-04-20 Jakub Jelinek <jakub@redhat.com>
5657
5658 * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
5659
d3b52028
UD
56602004-04-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5661
5662 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
5663 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
5664 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
5665 info. Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
5666
a5dd0a6c
UD
56672004-04-19 Ulrich Drepper <drepper@redhat.com>
5668
5669 * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
5670 thread has all signals blocked.
5671
620c3354
AJ
56722004-04-18 Andreas Jaeger <aj@suse.de>
5673
5674 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
5675 (SEM_VALUE_MAX): Add missing brace.
5676
1683daeb
UD
56772004-04-17 Jakub Jelinek <jakub@redhat.com>
5678
5679 * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
5680 in rt subdir.
5681 (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
5682 * sysdeps/pthread/tst-mqueue8x.c: New test.
5683 * tst-cancel4.c: Update comment about message queues.
5684
5685 * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
5686 return it_value { 0, 0 }.
5687 * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
5688 like SIGEV_SIGNAL.
5689 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
5690 assertion for SIGEV_NONE.
5691 (thread_attr_compare): Compare all attributes, not just a partial
5692 subset.
5693
56942004-04-17 Jakub Jelinek <jakub@redhat.com>
5695
5696 * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
5697
f532641d
UD
56982004-04-17 Ulrich Drepper <drepper@redhat.com>
5699
5700 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
5701 Just use a plain number.
5702 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
5703 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
5704 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
5705 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
5706 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
5707 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
5708 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
5709
7eb7fdda
UD
57102004-04-16 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5711
53392906
UD
5712 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
5713 frame info.
5714 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7eb7fdda 5715
d7ba1313
UD
57162004-04-15 Jakub Jelinek <jakub@redhat.com>
5717
5718 * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
5719 (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
5720 of calling sigwaitinfo.
5721
5adac0e4
UD
57222004-04-16 Ulrich Drepper <drepper@redhat.com>
5723
5724 * allocatestack.c (allocate_stack): Set reported_guardsize
5725 unconditionally.
5726 * pthread_getattr_np.c (pthread_getattr_np): Use
5727 reported_guardsize instead of guardsize.
5728 * descr.h (struct pthread): Add reported_guardsize field.
5729
f93fa7d4
UD
57302004-04-13 Jakub Jelinek <jakub@redhat.com>
5731
5732 * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
5733
1b82c6c7
UD
57342004-04-12 Ulrich Drepper <drepper@redhat.com>
5735
5736 * sysdeps/unix/sysv/linux/mq-notify.c: New file.
5737
57382004-04-08 Jakub Jelinek <jakub@redhat.com>
5739
5740 * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
5741 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
5742 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
5743 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
5744 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
5745 Define.
5746 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
5747 (_POSIX_MESSAGE_PASSING): Define.
5748 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
5749 (_POSIX_MESSAGE_PASSING): Define.
5750 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
5751 (_POSIX_MESSAGE_PASSING): Define.
5752
e6eb894e
UD
57532004-04-04 Ulrich Drepper <drepper@redhat.com>
5754
5755 * tst-context1.c (fct): Check whether correct stack is used.
5756
1e084487
UD
57572004-04-03 Ulrich Drepper <drepper@redhat.com>
5758
4e73e115
UD
5759 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
5760 matching constraints for asm mem parameters.
5761
1e084487
UD
5762 * tst-clock2.c (tf): Don't define unless needed.
5763
feca5e0b
UD
57642004-03-30 H.J. Lu <hongjiu.lu@intel.com>
5765
5766 * Makefile (link-libc-static): Use $(static-gnulib) instead of
5767 $(gnulib).
5768
3fa21fd8
UD
57692004-03-30 Ulrich Drepper <drepper@redhat.com>
5770
5771 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
5772 * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
5773 * pthreadP.h: Declare __nptl_deallocate_tsd.
5774 * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
5775 Adjust caller.
5776
5777 * Makefile (tests): Add tst-tsd5.
5778 * tst-tsd5.c: New file.
5779
8e32efa6
UD
57802004-03-29 Ulrich Drepper <drepper@redhat.com>
5781
5782 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
5783 (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
5784 is SHLIB_COMPAT check.
5785 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
5786 (__pthread_attr_getaffinity_old): Likewise.
5787 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5788 (__pthread_getaffinity_old): Likewise.
5789 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
5790 (__pthread_setaffinity_old): Likewise.
5791
eec8b6ca
UD
57922004-03-26 Ulrich Drepper <drepper@redhat.com>
5793
5794 * allocatestack.c (_make_stacks_executable): Call
5795 _dl_make_stack_executable first.
5796
db2f05ba
RM
57972004-03-24 Roland McGrath <roland@redhat.com>
5798
5799 * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
5800 constraint instead of "0".
5801
6abbc501
UD
58022004-03-24 Ulrich Drepper <drepper@redhat.com>
5803
68dc4dcb
UD
5804 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
5805 (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
5806
6abbc501
UD
5807 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
5808 code to avoid warning.
5809
865e14d9
AJ
58102004-03-24 Andreas Jaeger <aj@suse.de>
5811
5812 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
5813 (__pthread_attr_setaffinity_old): Remove const.
5814
16b06b70
UD
58152004-03-23 Ulrich Drepper <drepper@redhat.com>
5816
2c0b891a
UD
5817 * sysdeps/unix/sysv/linux/smp.h: New file.
5818 * sysdeps/unix/sysv/linux/sh/smp.h: New file.
5819 * init.c: Define __is_smp.
5820 (__pthread_initialize_minimal_internal): Call is_smp_system to
5821 initialize __is_smp.
5822 * pthreadP.h: Declare __is_smp.
5823 Define MAX_ADAPTIVE_COUNT is necessary.
5824 * pthread_mutex_init.c: Add comment regarding __spins field.
5825 * pthread_mutex_lock.c: Implement adaptive mutex type.
5826 * pthread_mutex_timedlock.c: Likewise.
5827 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
5828 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
5829 Add __spins field.
5830 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5831 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5832 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5833 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5834 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5835 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5836 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5837 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
5838 lll_mutex_cond_trylock.
5839 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5840 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5841 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5842 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5843 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5844 Define BUSY_WAIT_NOP.
5845 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5846 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5847
5848 * tst-mutex5.c: Add support for testing adaptive mutexes.
5849 * tst-mutex7.c: Likewise.
5850 * tst-mutex5a.c: New file.
5851 * tst-mutex7a.c: New file.
5852 * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
5853
565699e4
UD
5854 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5855 (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
6abbc501 5856 vgettimeofday call might destroy the content.
565699e4 5857
7fe1586f
UD
5858 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
5859 @pause in the loop.
5860
e408880b
UD
5861 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
5862 No need to restrict type of ret. Make it int. Add comment.
5863
16b06b70
UD
5864 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
5865 Remove unnecessary setne instruction.
5866
61645263
UD
58672004-03-22 Jakub Jelinek <jakub@redhat.com>
5868
5869 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5870 (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
5871 * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
5872 If realloc fails, break out of the loop.
5873
e3d4c585
AJ
58742004-03-20 Andreas Jaeger <aj@suse.de>
5875
5876 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
5877 (__pthread_setaffinity_old): Fix interface.
5878 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5879 (__pthread_getaffinity_old): Likewise.
5880
5881 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
5882 (__pthread_setaffinity_new): Remove duplicate declaration.
5883
3abb1ff7
UD
58842004-03-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5885
5886 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
5887 the return value to a safe register.
5888 (CDISABLE): Set the function argument correctly.
5889
07bd2a3f
UD
58902004-03-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5891
5892 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
5893 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
5894 Rewrite so that only one locked memory operation per round is needed.
5895 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
5896 (pthread_barrier_wait): After wakeup, release lock only when the
5897 last thread stopped using the barrier object.
5898 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
5899 (__pthread_cond_wait): Don't store mutex address if the current
5900 value is ~0l. Add correct cleanup support and unwind info.
5901 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5902 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
5903 (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
5904 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
5905 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
5906 Add correct cleanup support and unwind info.
5907 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
5908 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
5909 information for syscall wrappers.
5910
14c35863
UD
59112004-03-18 Ulrich Drepper <drepper@redhat.com>
5912
5913 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
5914 cpusetsize field, remove next.
5915 * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
5916 parameter for size of the CPU set.
5917 (pthread_setaffinity_np): Likewise.
5918 (pthread_attr_getaffinity_np): Likewise.
5919 (pthread_attr_setaffinity_np): Likewise.
5920 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
5921 interface change, keep compatibility code.
5922 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
5923 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
5924 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
5925 * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np. Declare
5926 __pthread_getaffinity_np.
5927 * Versions: Add version for changed interfaces.
5928 * tst-attr3.c: Adjust test for interface change.
5929 * pthread_getattr_np.c: Query the kernel about the affinity mask with
5930 increasing buffer sizes.
5931 * pthread_attr_destroy.c: Remove unused list handling.
5932 * pthread_attr_init.c: Likewise.
5933
8e115d80
RM
59342004-03-17 Roland McGrath <roland@redhat.com>
5935
5936 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
5937 first argument to clock_getres so we ever enable kernel timers.
5938
e3b22ad3
UD
59392004-03-15 Ulrich Weigand <uweigand@de.ibm.com>
5940
5941 * init.c (nptl_version): Add __attribute_used__ to nptl_version.
5942
841153fa
RH
59432004-03-12 Richard Henderson <rth@redhat.com>
5944
e3b22ad3
UD
5945 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
5946 oldvalue from CENABLE to CDISABLE.
841153fa 5947
932dfea7
UD
59482004-03-12 Ulrich Drepper <drepper@redhat.com>
5949
5950 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
5951 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
5952 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
5953 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
5954
9852f6dc
RH
59552004-03-11 Richard Henderson <rth@redhat.com>
5956
5957 * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
5958 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
5959 * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
5960
43513fb7
UD
59612004-03-11 Jakub Jelinek <jakub@redhat.com>
5962
5963 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
5964 instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
5965 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
5966
59672004-03-11 Jakub Jelinek <jakub@redhat.com>
5968
5969 * forward.c (__pthread_cond_broadcast_2_0,
5970 __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
5971 __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
5972 __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
5973
8a3e10e0
UD
59742004-03-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5975
5976 * sysdeps/sh/tcb-offsets.sym: Add PID.
5977 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
5978 * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
5979
6d3a2bec
UD
59802004-03-10 Ulrich Drepper <drepper@redhat.com>
5981
5982 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
5983 include <sysdep-cancel.h>, vfork is no cancellation point.
5984 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
5985 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
5986 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
5987
d3a4a571
UD
59882004-03-10 Jakub Jelinek <jakub@redhat.com>
5989
73b4ce64
UD
5990 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
5991 libc_hidden_def.
5992 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
5993 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
5994 Likewise.
5995 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
5996 Likewise.
5997 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
5998 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
5999 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
6000 * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
6001 of DO_CALL_VIA_BREAK. Work around a gas problem.
6002
d682a515
UD
6003 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
6004 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
6005 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
6006 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
6007 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
6008 * sysdeps/powerpc/tcb-offsets.sym: Add PID.
6009
6010 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
6011 a local register for saving old PID. Negate PID in parent upon exit.
6012
d3a4a571
UD
6013 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
6014 tcb-offsets.h.
6015 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
6016 before syscall, set to the old value in the parent afterwards.
6017 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
6018 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
6019 tcb-offsets.h.
6020 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
6021 before syscall, set to the old value in the parent afterwards.
6022 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
6023 * sysdeps/s390/tcb-offsets.sym: Add PID.
6024
6025 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
6026 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
6027 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
6028 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
6029 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
6030 * sysdeps/sparc/tcb-offsets.sym: Add PID.
6031
60322004-03-10 Andreas Schwab <schwab@suse.de>
6033
6034 * sysdeps/ia64/tcb-offsets.sym: Add PID.
6035 * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
6036 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
6037
3f2fb223 60382004-03-09 Jakub Jelinek <jakub@redhat.com>
f4c024d1 6039
3f2fb223
UD
6040 * tst-cancel20.c (do_one_test): Clear in_sh_body first.
6041 * tst-cancel21.c (do_one_test): Likewise.
6042 Reported by Gordon Jin <gordon.jin@intel.com>.
f4c024d1 6043
8b9d6054
UD
60442004-02-09 Jakub Jelinek <jakub@redhat.com>
6045
6046 * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
6047 if non-zero and set to INT_MIN if zero.
6048 * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
6049 * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
6050 (SAVE_PID, RESTORE_PID): Define.
6051 (__vfork): Use it.
6052 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
6053 Use relative path to avoid including NPTL i386/vfork.S.
6054 (SAVE_PID, RESTORE_PID): Define.
6055 * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
6056 (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
6057 * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
6058 tst-vfork2x.
6059 (tests-reverse): Add tst-vfork1x and tst-vfork2x.
6060 * tst-vfork1.c: New test.
6061 * tst-vfork2.c: New test.
6062 * tst-vfork1x.c: New test.
6063 * tst-vfork2x.c: New test.
6064
02287d05
UD
60652004-03-08 Ulrich Drepper <drepper@redhat.com>
6066
c072ef6d 6067 * sysdeps/i386/tcb-offsets.sym: Add PID.
6fadea9f 6068 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
c072ef6d 6069 * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
6fadea9f 6070 * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
02287d05 6071
d4acd24b
UD
60722004-03-08 Steven Munroe <sjmunroe@us.ibm.com>
6073
6074 * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
6075
8acb4b81
UD
60762004-03-08 H.J. Lu <hongjiu.lu@intel.com>
6077
6078 * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
6079 _rtld_global_ro.
6080
4d1a02ef
UD
60812004-03-07 Ulrich Drepper <drepper@redhat.com>
6082
001836c8 6083 * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
8acb4b81 6084 _rtld_global_ro.
001836c8 6085
4d1a02ef
UD
6086 * tst-once4.c: Remove unnecessary macro definition.
6087
6088 * tst-mutex7.c (do_test): Limit thread stack size.
6089 * tst-once2.c (do_test): Likewise.
6090 * tst-tls3.c (do_test): Likewise.
6091 * tst-tls1.c (do_test): Likewise.
6092 * tst-signal3.c (do_test): Likewise.
6093 * tst-kill6.c (do_test): Likewise.
6094 * tst-key4.c (do_test): Likewise.
6095 * tst-join4.c (do_test): Likewise.
6096 * tst-fork1.c (do_test): Likewise.
6097 * tst-context1.c (do_test): Likewise.
6098 * tst-cond2.c (do_test): Likewise.
6099 * tst-cond10.c (do_test): Likewise.
6100 * tst-clock2.c (do_test): Likewise.
6101 * tst-cancel10.c (do_test): Likewise.
6102 * tst-basic2.c (do_test): Likewise.
6103 * tst-barrier4.c (do_test): Likewise.
6104
aa420660
UD
61052004-03-05 Ulrich Drepper <drepper@redhat.com>
6106
6107 * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
6108
cff08c81
UD
61092004-03-01 Ulrich Drepper <drepper@redhat.com>
6110
6111 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6112 (__pthread_cond_timedwait): Optimize wakeup test.
6113 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
6114 (__pthread_cond_wait): Likewise.
6115 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
6116 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6117 Likewise.
6118
b7fe377c
UD
61192004-02-29 Ulrich Drepper <drepper@redhat.com>
6120
6121 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6122 (__lll_mutex_lock_wait): Optimize a bit more. Just one copy of
6123 the atomic instruction needed.
6124 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6125 (__lll_mutex_lock_wait): Likewise.
6126
4c771a3b
UD
61272004-02-28 Ulrich Drepper <drepper@redhat.com>
6128
6129 * Makefile (tests): Add tst-cond14 and tst-cond15.
6130 * tst-cond14.c: New file.
6131 * tst-cond15.c: New file.
6132
a2c33d5a
UD
61332004-02-27 Ulrich Drepper <drepper@redhat.com>
6134
6135 * sysdeps/pthread/createthread.c (create_thread): Remove use of
6136 CLONE_STOPPED. We cannot use SIGCONT which means CLONE_STOPPED
6137 needs to be implemented differently to be useful.
6138
261eada2
UD
61392004-02-26 Ulrich Drepper <drepper@redhat.com>
6140
14ffbc83
UD
6141 * pthread_attr_setschedparam.c: Don't test priority against limits
6142 here. Set ATTR_FLAG_SCHED_SET flag.
6143 * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
6144 * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
6145 from parent thread to child. If attribute is used and scheduling
6146 parameters are not inherited, copy parameters from attribute or
6147 compute them. Check priority value.
6148 * pthread_getschedparam.c: If the parameters aren't known yet get
6149 them from the kernel.
6150 * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
6151 ATTR_FLAG_POLICY_SET flag for thread.
6152 * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
6153 and ATTR_FLAG_POLICY_SET.
6154
6155 * sysdeps/pthread/createthread.c: Use tgkill if possible.
6156
261eada2
UD
6157 * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
6158 fail if stack address hasn't been set. Just return 0.
6159
701d185c
UD
61602004-02-25 Ulrich Drepper <drepper@redhat.com>
6161
25b8e63c
UD
6162 * Makefile (tests-nolibpthread): Add tst-unload. Don't link with
6163 libpthread for the files in this list.
6164 (CFLAGS-tst-unload): Removed.
6165 * tst-unload.c (do_test): Don't use complete path for
6166 LIBPHREAD_SO.
6167
701d185c
UD
6168 * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
6169 tst-_res1mod2.
6170
a8fd5a02
UD
61712004-02-22 Ulrich Drepper <drepper@redhat.com>
6172
6173 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6174 (__lll_mutex_lock_wait): Rewrite so that only one locked memory
6175 operation per round is needed.
6176 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6177 (__lll_mutex_lock_wait): Likewise.
6178
dd0b7b19
UD
61792004-02-20 Ulrich Drepper <drepper@redhat.com>
6180
6181 * tst-cancel9.c (cleanup): Don't print to stderr.
6182
5990e1fe
UD
61832004-02-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6184
6185 * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
6186
33ab3b66
UD
61872004-02-20 Jakub Jelinek <jakub@redhat.com>
6188
1be3130e
UD
6189 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
6190 (__syscall_error_handler2): Call CDISABLE.
6191 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
6192 (__syscall_error_handler2): Call CDISABLE.
6193
8ba5025a
UD
6194 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
6195 Release lock before the loop, don't reacquire it.
8ba5025a 6196
33ab3b66
UD
6197 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
6198
11986c68
UD
61992004-02-19 Andreas Schwab <schwab@suse.de>
6200
6201 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
6202 Fix last change.
6203
dc391246
UD
62042004-02-18 Ulrich Drepper <drepper@redhat.com>
6205
37c054c7
UD
6206 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
6207 (pthread_barrier_wait): After wakeup, release lock only when the
6208 last thread stopped using the barrier object.
6209 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
6210 (pthread_barrier_wait): Likewise.
6211 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
6212 Likewise.
6213 * Makefile (tests): Add tst-barrier4.
6214 * tst-barrier4.c: New file.
dc391246
UD
6215
6216 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6217 (__pthread_cond_timedwait): Perform timeout test while holding
6218 internal lock to prevent wakeup race.
6219 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
6220 * sysdeps/pthread/pthread_cond_timedwait.c
6221 (__pthread_cond_timedwait): Likewise.
6222 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6223 (__pthread_cond_timedwait): Likewise.
6224
4a08113c
UD
62252004-02-18 Jakub Jelinek <jakub@redhat.com>
6226
6227 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
6228 (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
6229 * Makefile (tests): Add tst-rwlock13.
6230 * tst-rwlock13.c: New test.
6231
71b1675e
UD
62322004-02-16 Ulrich Drepper <drepper@redhat.com>
6233
6234 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6235 (__condvar_tw_cleanup): Little optimization.
6236 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
6237
cd9fdc72
UD
62382004-02-16 Steven Munroe <sjmunroe@us.ibm.com>
6239
6240 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
6241 libpthread as "lib" parameter to SHLIB_COMPAT.
6242 (__novmx_siglongjmp): Fix typo in function name.
6243 (__novmx_longjmp): Fix typo in function name.
6244
82038750
UD
62452004-02-13 Ulrich Drepper <drepper@redhat.com>
6246
b078c591
UD
6247 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
6248 __builtin_expect.
6249
82038750
UD
6250 * sysdeps/generic/pt-longjmp.c: Moved to...
6251 * sysdeps/pthread/pt-longjmp.c: ...here. New file.
6252
e2982bf0
UD
62532004-01-29 Steven Munroe <sjmunroe@us.ibm.com>
6254
6255 * Makefile (libpthread-routines): Add pt-cleanup.
6256 * pt-longjmp.c: Removed.
6257 * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
6258 * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
6259 * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
6260 Version longjmp, siglongjmp for GLIBC_2.3.4.
6261 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
6262
3730d95c
UD
62632004-02-13 Ulrich Drepper <drepper@redhat.com>
6264
219304ec
UD
6265 * sysdeps/pthread/pthread_cond_timedwait.c
6266 (__pthread_cond_timedwait): Optimize. Drop internal lock earlier.
6267 Reuse code. Add __builtin_expects.
6268
3730d95c
UD
6269 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6270 (__pthread_cond_timedwait): Get internal lock in case timeout has
6271 passed before the futex syscall.
6272 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6273
5673ccc1
UD
62742004-01-20 Ulrich Drepper <drepper@redhat.com>
6275
debddf64
UD
6276 * allocatestack.c: Pretty printing.
6277
5673ccc1
UD
6278 * sysdeps/pthread/createthread.c (create_thread): Don't add
6279 CLONE_DETACHED bit if it is not necessary.
6280
6bae8725
UD
62812004-01-16 Ulrich Drepper <drepper@redhat.com>
6282
6283 * pthread_getattr_np.c: Include ldsodefs.h.
6284
ff151400
RH
62852004-01-16 Richard Henderson <rth@redhat.com>
6286
6bae8725
UD
6287 * allocatestack.c: Don't declare __libc_stack_end.
6288 * init.c (__pthread_initialize_minimal_internal): Likewise.
6289 * pthread_getattr_np.c (pthread_getattr_np): Likewise.
ff151400 6290
ba683832
RH
62912004-01-15 Richard Henderson <rth@redhat.com>
6292
6293 * sysdeps/alpha/tls.h (tcbhead_t): Add private.
6294 (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
6295 TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
6296 GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
6297 (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
6298 (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
6299 (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
6300 * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
6301
630d93a7
UD
63022004-01-14 Ulrich Drepper <drepper@redhat.com>
6303
219304ec 6304 * init.c (pthread_functions): Make array const.
630d93a7 6305
d1fc817e
UD
63062004-01-13 Ulrich Drepper <drepper@redhat.com>
6307
6308 * allocatestack.c (__make_stacks_executable): Change interface.
6309 Check parameters. Pass parameter on to libc counterpart.
6310 * pthreadP.h: Change declaration.
6311
dc927809
RH
63122004-01-13 Richard Henderson <rth@redhat.com>
6313
10677727
UD
6314 * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
6315 prototype form.
6316 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
6317 Likewise.
6318
d1fc817e
UD
6319 * sysdeps/alpha/Makefile: New file.
6320 * sysdeps/alpha/tcb-offsets.sym: New file.
6321 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
6322 Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
dc927809 6323
d1fc817e
UD
6324 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
6325 on powerpc version.
dc927809 6326
249a3d0c
UD
63272004-01-08 Jakub Jelinek <jakub@redhat.com>
6328
6329 * Makefile (tests): Add tst-backtrace1.
6330 * tst-backtrace1.c: New test.
6331
763c0490
RM
63322003-12-11 Ulrich Weigand <uweigand@de.ibm.com>
6333
6334 * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
6335 register as second parameter to the REGISTER macro.
6336 * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
6337 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
6338 * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
6339 * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
6340 * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
6341 of thread register as second parameter to REGISTER macro in 64 case.
6342
c7baafd5
UD
63432004-01-03 Ulrich Drepper <drepper@redhat.com>
6344
6345 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
6346 (CFLAGS-getpid.o): Defined.
6347 (CFLAGS-getpid.os): Defined.
6348
25ac0258
UD
63492003-12-31 Ulrich Drepper <drepper@redhat.com>
6350
6351 * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
6352 returned for main thread does not overlap with any other VMA.
6353 Patch by Jakub Jelinek.
6354
795985e4
UD
63552003-12-29 Jakub Jelinek <jakub@redhat.com>
6356
6357 * tst-raise1.c: Include stdio.h.
6358
cb5b9388
UD
63592003-12-23 Jakub Jelinek <jakub@redhat.com>
6360
6361 * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
6362 setting with __ASSUME_TGKILL || defined __NR_tgkill.
6363 If pid is 0, set it to selftid.
6364 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
6365 Don't set self->pid but self->tid. If self->pid == 0 and self->tid
6366 != 0, return self->tid without doing a syscall.
6367 * descr.h (struct pthread): Move pid field after tid.
6368
6369 * Makefile (tests): Add tst-raise1.
6370 * tst-raise1.c: New file.
6371
432aaf5b
RM
63722003-12-23 Roland McGrath <roland@redhat.com>
6373
6374 * tst-oddstacklimit.c: New file.
6375 * Makefile (tests): Add it.
6376 (tst-oddstacklimit-ENV): New variable.
6377
6378 * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
6379 value up to page size for __default_stacksize.
6380
33ebea17
UD
63812003-12-21 Ulrich Drepper <drepper@redhat.com>
6382
6383 * Makefile (tests): Add tst-eintr5.
6384 * tst-eintr5.c: New file.
6385
6386 * eintr.c (eintr_source): Prevent sending signal to self.
6387
6388 * tst-eintr2.c (tf1): Improve error message.
6389
bbe35eb5
UD
63902003-12-20 Ulrich Drepper <drepper@redhat.com>
6391
6392 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
6393 * sysdeps/unix/sysv/linux/getpid.c: New file.
c0ecb80a
UD
6394 * pthread_cancel.c: Add comment explaining use of PID field.
6395 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
6396 * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
6397 * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
6398 temporarily to signal the field must not be relied on and updated
6399 by getpid().
6400 * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
6401 temporarily negative.
6402 * sysdeps/unix/sysv/linux/raise.c: Likewise.
bbe35eb5 6403
4efdd8d3
UD
64042003-12-19 Ulrich Drepper <drepper@redhat.com>
6405
6406 * eintr.c (setup_eintr): Add new parameter. Pass to thread function.
6407 (eintr_source): If ARG != NULL, use pthread_kill.
6408 * tst-eintr1.c: Adjust for this change.
6409 * tst-eintr2.c: Likewise.
6410 * Makefile (tests): Add tst-eintr3 and tst-eintr4.
6411 * tst-eintr3.c: New file.
6412 * tst-eintr4.c: New file.
6413
64142003-12-19 Jakub Jelinek <jakub@redhat.com>
6415
6416 * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
6417 if CANCELSTATE_BITMASK is set.
6418 * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
6419 Likewise.
6420
6421 * Makefile (tests): Add tst-cancel22 and tst-cancel23.
6422 (tests-reverse): Add tst-cancel23.
6423 * tst-cancel22.c: New test.
6424 * tst-cancel23.c: New test.
6425
675620f7
UD
64262003-12-18 Ulrich Drepper <drepper@redhat.com>
6427
6428 * tst-eintr1.c: Better error messages.
6429
6430 * Makefile (tests): Add tst-eintr2.
6431 * tst-eintr2.c: New file.
6432
64332003-12-18 Jakub Jelinek <jakub@redhat.com>
6434
6435 * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
6436 (CFLAGS-tst-cancelx21.c): Set.
6437 * tst-cancel21.c: New test.
6438 * tst-cancelx21.c: New test.
6439
6440 * unwind.c (FRAME_LEFT): Add adj argument. Subtract it from each
6441 comparison operand.
6442 (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
6443 _JMPBUF_CFA_UNWINDS. Adjust FRAME_LEFT invocations.
6444 * pt-longjmp.c: Include jmpbuf-unwind.h.
6445 (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
6446 _JMPBUF_UNWINDS. Adjust compared pointers.
6447 * init.c (__pthread_initialize_minimal_internal): Initialize
6448 pd->stackblock_size.
6449 * sysdeps/pthread/jmpbuf-unwind.h: Removed.
6450 * sysdeps/alpha/jmpbuf-unwind.h: New file.
6451 * sysdeps/i386/jmpbuf-unwind.h: New file.
6452 * sysdeps/powerpc/jmpbuf-unwind.h: New file.
6453 * sysdeps/s390/jmpbuf-unwind.h: New file.
6454 * sysdeps/sh/jmpbuf-unwind.h: New file.
6455 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
6456 * sysdeps/x86_64/jmpbuf-unwind.h: New file.
2e5e031d 6457 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
675620f7
UD
6458 (_JMPBUF_CFA_UNWINDS): Remove.
6459 (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
6460
64612003-12-12 Jakub Jelinek <jakub@redhat.com>
6462
6463 * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
6464 (CFLAGS-tst-cancelx20.c): Set.
6465 * tst-cancel20.c: New test.
6466 * tst-cancelx20.c: New test.
6467
2d951ab6
UD
64682003-12-17 Ulrich Drepper <drepper@redhat.com>
6469
6470 * init.c (__pthread_initialize_minimal_internal): Don't treat
6471 architectures with separate register stack special here when
6472 computing default stack size.
6473
f8a3a2e7
RM
64742003-12-17 Roland McGrath <roland@redhat.com>
6475
6476 * Makefile (tst-cancelx7-ARGS): New variable.
6477 Reportd by Greg Schafer <gschafer@zip.com.au>.
6478
e796f92f
UD
64792003-12-17 Jakub Jelinek <jakub@redhat.com>
6480
6481 * Makefile (tests): Add tst-stack3. Depend on $(objpfx)tst-stack3-mem.
6482 (generated): Add tst-stack3.mtrace and tst-stack3-mem.
6483 (tst-stack3-ENV): Set.
6484 ($(objpfx)tst-stack3-mem): New.
6485 * tst-stack3.c: New test.
6486
092eb73c
UD
64872003-12-10 David Mosberger <davidm@hpl.hp.com>
6488
6489 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
6490 Add unwind directives. Drop unused .regstk directive.
6491 (_fini_EPILOG_BEGINS): Add unwind directives.
6492
ff48874d
UD
64932003-12-11 Ulrich Drepper <drepper@redhat.com>
6494
6495 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
6496 Assume parameter is a pointer.
6497 (lll_futex_wake): Likewise.
20945457
UD
6498 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
6499 Likewise.
6500 (lll_futex_wake): Likewise.
ff48874d
UD
6501 Reported by Boris Hu.
6502 * sysdeps/unix/sysv/linux/unregister-atfork.c
6503 (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
6504
6505 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
6506
1d9d0b80
UD
65072003-12-10 Ulrich Drepper <drepper@redhat.com>
6508
6509 * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
6510 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
6511 __rtld_lock_initialize for ld.so lock.
6512 Patch in part by Adam Li <adam.li@intel.com>.
6513
c776b3d7
UD
65142003-12-02 David Mosberger <davidm@hpl.hp.com>
6515
6516 * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
6517 in $(gnulib). Also, remove stale comment.
6518
65192003-11-12 David Mosberger <davidm@hpl.hp.com>
6520
6521 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
6522 advantage of new syscall stub and optimize accordingly.
6523
6524 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
6525 from SYS_futex, to match expectations of
6526 sysdep.h:DO_INLINE_SYSCALL.
6527 (lll_futex_clobbers): Remove.
6528 (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
6529 (lll_futex_wake): Likewise.
6530 (lll_futex_requeue): Likewise.
6531 (__lll_mutex_trylock): Rewrite to a macro, so we can include this
6532 file before DO_INLINE_SYSCALL is defined (proposed by Jakub
6533 Jelinek).
6534 (__lll_mutex_lock): Likewise.
6535 (__lll_mutex_cond_lock): Likewise.
6536 (__lll_mutex_timed_lock): Likewise.
6537 (__lll_mutex_unlock): Likewise.
6538 (__lll_mutex_unlock_force): Likewise.
6539
6540 * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
6541 comes before the include of <sysdep.h>.
6542 (THREAD_SELF_SYSINFO): New macro.
6543 (THREAD_SYSINFO): Likewise.
6544 (INIT_SYSINFO): New macro.
6545 (TLS_INIT_TP): Call INIT_SYSINFO.
6546
6547 * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
6548
6549 * sysdeps/pthread/createthread.c (create_thread): Use
6550 THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
6551 * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
6552 THREAD_SELF_SYSINFO instead of open code.
6553 * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
6554 (THREAD_SYSINFO): Likewise.
6555
6556 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
6557
6558 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
6559
57d20ee7
UD
65602003-12-06 Ulrich Drepper <drepper@redhat.com>
6561
6562 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
6563 instead of .init. Patch by David Mosberger.
6564
67aeab2a
AJ
65652003-11-30 Thorsten Kukuk <kukuk@suse.de>
6566
6567 * sysdeps/pthread/configure.in: Remove broken declaration in C
6568 cleanup handling check.
6569
8ca203e6
AJ
65702003-11-30 Andreas Jaeger <aj@suse.de>
6571
6572 * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
6573 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
6574 Likewise.
6575
46bf9de7
UD
65762003-11-27 Jakub Jelinek <jakub@redhat.com>
6577
6578 * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
6579 * pthread_attr_destroy.c: Include shlib-compat.h.
6580 (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
6581 is set in iattr->flags.
6582 * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
6583
1d9b73ab
UD
65842003-11-21 Jakub Jelinek <jakub@redhat.com>
6585
6586 * Makefile (distribute): Add tst-cleanup4aux.c.
6587
6588 * tst-cond12.c (prepare): Add prototype. Move after test-skeleton.c
6589 include.
6590
53f9084e
UD
65912003-11-21 Ulrich Drepper <drepper@redhat.com>
6592
1d9b73ab
UD
6593 * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
6594 pthread_cond_signal.
6595
e42a990e
UD
6596 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
6597 store mutex address if the current value is ~0l.
6598 * sysdeps/pthread/pthread_cond_timedwait.c
6599 (__pthread_cond_timedwait): Likewise.
6600 * sysdeps/pthread/pthread_cond_broadcast.c
6601 (__pthread_cond_broadcast): Don't use requeue for pshared
6602 condvars.
6603
6604 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
6605 (__pthread_cond_wait): Don't store mutex address if the current
6606 value is ~0l.
6607 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6608 (__pthread_cond_timedwait): Likewise.
6609 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
6610 (__pthread_cond_broadcast): Don't use requeue for pshared
6611 condvars.
6612
6613 * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
6614 element with ~0l for pshared condvars, with NULL otherwise.
6615
6616 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
6617 (__pthread_cond_wait): Don't store mutex address if the current
6618 value is ~0l.
6619 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6620 (__pthread_cond_timedwait): Likewise.
6621 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
6622 (__pthread_cond_broadcast): Don't use requeue for pshared
6623 condvars.
6624
bf68b236 6625 * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
53f9084e 6626 * tst-cond12.c: New file.
bf68b236 6627 * tst-cond13.c: New file.
53f9084e 6628
9780c971
UD
66292003-11-17 Ulrich Drepper <drepper@redhat.com>
6630
6631 * sysdeps/pthread/configure.in: Make missing forced unwind support
6632 fatal.
6633
74e12fbc
UD
66342003-11-11 Ulrich Drepper <drepper@redhat.com>
6635
6636 * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
6637
c685b2b0
UD
66382003-11-06 Ulrich Drepper <drepper@redhat.com>
6639
6640 * Makefile: Add magic to clean up correctly.
6641
44e94149
UD
66422003-11-05 Jakub Jelinek <jakub@redhat.com>
6643
6644 * unwind.c (FRAME_LEFT): Define.
6645 (unwind_stop): Handle old style cleanups here.
6646 (__pthread_unwind): Handle old style cleanups only if
6647 !HAVE_FORCED_UNWIND.
6648 * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
6649 (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
6650 ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
6651 ($(objpfx)tst-cleanupx4): Likewise.
6652 * tst-cleanup4.c: New test.
6653 * tst-cleanup4aux.c: New.
6654 * tst-cleanupx4.c: New test.
6655
c28422b5
UD
66562003-11-04 Ulrich Drepper <drepper@redhat.com>
6657
6658 * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
6659 lll_mutex_*lock macros to skip atomic operations on some archs.
6660
27176677
UD
66612003-11-03 Ulrich Drepper <drepper@redhat.com>
6662
6663 * sysdeps/pthread/tst-timer.c (main): Initialize
6664 sigev2.sigev_value as well.
6665
026395a2
RM
66662003-10-15 Roland McGrath <roland@redhat.com>
6667
6668 * sysdeps/pthread/configure.in: Barf if visibility attribute support
6669 is missing.
6670 * sysdeps/pthread/configure: Regenerated.
6671
fa3cbe3d
UD
66722003-10-09 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6673
6674 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
6675 locking macros. No distinction between normal and mutex locking
6676 anymore.
6677 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
6678 Merge bits from lowlevelmutex.S we still need.
6679 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
6680 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
6681 * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
6682 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
6683 new mutex implementation.
6684 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
6685 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
6686 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6687 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
6688 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
6689 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
6690 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
6691 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
6692 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6693 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
6694 symbol for entry point to avoid cancellation.
6695
e700a908
UD
66962003-10-07 Jakub Jelinek <jakub@redhat.com>
6697
6698 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
6699 changes.
6700 (SAVE_OLDTYPE_0): Fix a typo.
6701
c70a86b6
UD
67022003-10-03 Ulrich Drepper <drepper@redhat.com>
6703
6704 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
6705 Check __sigsetjmp return value. Reported by Daniel Jacobowitz.
6706
134abcb5
UD
67072003-10-02 Ulrich Drepper <drepper@redhat.com>
6708
6709 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
6710 correct offset.
6711
b77ca0e8
UD
67122003-10-02 Jakub Jelinek <jakub@redhat.com>
6713
6714 * Makefile (tests): Add tst-cancel19.
6715 * tst-cancel19.c: New test.
6716
4d961dc7
UD
67172003-10-02 Ulrich Drepper <drepper@redhat.com>
6718
6719 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
6720 restoring of the old cancellation type.
6721
1d5b20ad 67222003-09-30 Jakub Jelinek <jakub@redhat.com>
94ae6d75 6723
1d5b20ad
UD
6724 * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
6725
4106a403
RM
67262003-09-27 Wolfram Gloger <wg@malloc.de>
6727
4d961dc7 6728 * sysdeps/pthread/malloc-machine.h: New file
94ae6d75 6729
fca9d8e4
RM
67302003-09-24 Roland McGrath <roland@redhat.com>
6731
6732 * allocatestack.c (__make_stacks_executable): Don't ignore return
6733 value from _dl_make_stack_executable.
6734
c9c60884
UD
67352003-09-24 Ulrich Drepper <drepper@redhat.com>
6736
69c9fa04
UD
6737 * allocatestack.c (__make_stacks_executable): Also change
6738 permission of the currently unused stacks.
6739
279f1143
UD
6740 * allocatestack.c (change_stack_perm): Split out from
6741 __make_stacks_executable.
6742 (allocate_stack): If the required permission changed between the time
6743 we started preparing the stack and queueing it, change the permission.
6744 (__make_stacks_executable): Call change_stack_perm.
6745
c9c60884
UD
6746 * Makefile: Build tst-execstack-mod locally.
6747 * tst-execstack-mod.c: New file.
6748
54ee14b3
UD
67492003-09-23 Jakub Jelinek <jakub@redhat.com>
6750
6751 * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
6752
67532003-09-23 Roland McGrath <roland@redhat.com>
6754
6755 * tst-execstack.c: New file.
6756 * Makefile (tests): Add it.
6757 ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
6758 (LDFLAGS-tst-execstack): New variable.
6759
6760 * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
6761 whether to use PROT_EXEC for stack mmap.
6762 (__make_stacks_executable): New function.
6763 * pthreadP.h: Declare it.
6764 * init.c (__pthread_initialize_minimal_internal): Set
6765 GL(dl_make_stack_executable_hook) to that.
6766
365b1602
UD
67672003-09-22 Ulrich Drepper <drepper@redhat.com>
6768
6769 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
6770 recommendation from AMD re avoidance of lock prefix.
6771
39358e8b
UD
67722003-09-22 Jakub Jelinek <jakub@redhat.com>
6773
6774 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
6775 lll_futex_timed_wait instead of lll_futex_wait.
6776 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
6777 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
6778 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
6779 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
6780 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
6781 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
6782 * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
6783 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
6784 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
6785 Completely revamp the locking macros. No distinction between
6786 normal and mutex locking anymore.
6787 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
6788 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
6789 __lll_lock_timedwait): Fix prototypes.
6790 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
6791 __lll_lock_timedwait): Likewise.
6792 (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
6793 macros, add __builtin_expect.
6794 (lll_mutex_timedlock): Likewise. Fix return value.
6795 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
6796 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
6797 * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
6798 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
6799 * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
6800 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
6801 * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
6802 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
6803
9d08fbbb
UD
68042003-09-22 Ulrich Drepper <drepper@redhat.com>
6805
c0df57e1
UD
6806 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6807 (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
6808 operation if possible.
6809
9d08fbbb
UD
6810 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
6811 like jumping over the lock prefix.
6812
71451de2
UD
68132003-09-21 Ulrich Drepper <drepper@redhat.com>
6814
6815 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
6816 locking macros. No distinction between normal and mutex locking
6817 anymore.
3a226d33 6818 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
bc1989aa
UD
6819 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
6820 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
71451de2
UD
6821 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
6822 locking. Merge bits from lowlevelmutex.S we still need.
3a226d33 6823 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
bc1989aa 6824 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
71451de2 6825 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
3a226d33 6826 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
71451de2
UD
6827 * Makefile (routines): Remove libc-lowlevelmutex.
6828 (libpthread-rountines): Remove lowlevelmutex.
3a226d33
UD
6829 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
6830 for new mutex implementation.
6831 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
6832 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6833 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6834 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
6835 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6836 Likewise.
6837 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6838 Likewise.
6839 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
6840 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6841 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
6842 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
6843 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6844 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6845 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
6846 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
6847 Likewise.
6848 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
6849 Likewise.
6850 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
6851 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
6852 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
6853 Don't use requeue.
6854 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
bc1989aa 6855 * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
71451de2 6856
8f31c0ef
UD
68572003-09-20 Ulrich Drepper <drepper@redhat.com>
6858
56a4aa98
UD
6859 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
6860 in parameters of asm with output parameters.
6861
8f31c0ef
UD
6862 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
6863 type of DECR parameter to int.
6864 * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
6865
8b8074da
UD
68662003-09-18 Jakub Jelinek <jakub@redhat.com>
6867
6868 * tst-attr3.c (tf, do_test): Print stack start/end/size and
6869 guardsize for each thread.
6870
65af7e61
UD
68712003-09-17 Jakub Jelinek <jakub@redhat.com>
6872
9ba96eda
UD
6873 * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
6874 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
6875 (pthread_attr_setaffinity_np): Handle cpuset == NULL.
6876
06f6ca90
UD
6877 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
6878 (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
6879 NULL.
6880 * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
6881 * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
6882 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6883 (pthread_getaffinity_np): Add hidden_def.
6884
6885 * Makefile (tests): Add tst-attr3.
6886 * tst-attr3.c: New test.
6887
65af7e61
UD
6888 * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
6889
3402852c
UD
68902003-09-15 Jakub Jelinek <jakub@redhat.com>
6891
6892 * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
6893 CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
6894
a4db3439
UD
68952003-09-17 Jakub Jelinek <jakub@redhat.com>
6896
6897 * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
6898 * tst-align.c: Include tst-stack-align.h.
6899 (tf, do_test): Use TEST_STACK_ALIGN macro.
6900
69012003-09-17 Ulrich Drepper <drepper@redhat.com>
6902
6903 * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
6904 variable.
6905
92ce4676
UD
69062003-09-16 Ulrich Drepper <drepper@redhat.com>
6907
6908 * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
6909 stack-related values for the initial thread.
6910
e07bb02a
UD
69112003-09-15 Jakub Jelinek <jakub@redhat.com>
6912
6913 * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
6914
d087b5dc
UD
69152003-09-11 Ulrich Drepper <drepper@redhat.com>
6916
6917 * pthread_mutex_lock.c: Minor code rearrangements.
6918
7f08f55a
RM
69192003-09-05 Roland McGrath <roland@redhat.com>
6920
6921 * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
6922 Instead, include ../nptl_db/db_info.c to do its magic.
6923 * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
6924 (__pthread_pthread_key_2ndlevel_size): Likewise.
6925 * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
6926 * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
6927 * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
6928 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
6929 * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
6930 * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
6931 * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
6932 * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
6933 * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
6934 * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
6935 * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
6936 * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
6937 * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
6938 * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
6939 * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
6940 * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
6941 * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
6942
806e4a4a
UD
69432003-09-08 Ulrich Drepper <drepper@redhat.com>
6944
6945 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
6946 of pthread_t to be compatible with LT.
6947 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6948 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6949 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6950 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6951 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
6952 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6953 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6954
17f83e56
UD
69552003-09-04 Ulrich Drepper <drepper@redhat.com>
6956
6957 * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
6958
58e8ec84
UD
69592003-09-04 Jakub Jelinek <jakub@redhat.com>
6960
6961 * unwind-forcedunwind.c: Move to...
6962 * sysdeps/pthread/unwind-forcedunwind.c: ...here.
6963 (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
6964 * sysdeps/pthread/jmpbuf-unwind.h: New file.
6965 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
6966 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
6967 * unwind.c: Include jmpbuf-unwind.h.
6968 (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
6969
abf1cf21
JJ
69702003-09-02 Jakub Jelinek <jakub@redhat.com>
6971
4a244f0d
UD
6972 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
6973 * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
6974 pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
6975 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
6976 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
6977 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
6978 * sysdeps/unix/sysv/linux/sparc/Versions: New file.
6979 * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
6980 (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
6981 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
6982 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
6983 function.
6984 (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
6985 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
6986 * Makefile (tests): Add tst-stack2.
6987 * tst-stack2.c: New test.
6988 * tst-stack1.c: Include limits.h and sys/param.h.
6989 (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
6990
e29ef647
UD
6991 * pthread_condattr_setpshared.c: Include errno.h.
6992 (pthread_condattr_setpshared): Return EINVAL if pshared
6993 is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
6994
5777d565
UD
6995 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
6996 defined symbol for entry point to avoid cancellation.
6997 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
6998 Likewise.
6999 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
7000 Likewise.
7001 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
7002 Likewise.
7003 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
7004 Likewise.
7005 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
7006 Likewise.
7007 * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
7008 __close_nocancel, __read_nocancel, __write_nocancel,
7009 __waitpid_nocancel): Add attribute_hidden. If not in libc.so,
7010 libpthread.so or librt.so, define to corresponding function
7011 without _nocancel suffix.
7012 * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
7013 * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
7014 * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
7015
abf1cf21
JJ
7016 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
7017
8348dcc8
UD
70182003-09-02 Ulrich Drepper <drepper@redhat.com>
7019
7020 * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
1e03e0af 7021 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
8348dcc8
UD
7022
7023 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
7024 in subsections has a symbol associated with it.
7025
7026 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
7027 defined symbol for entry point to avoid cancellation.
7028 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
7029
c874a32e
UD
70302003-09-01 Jakub Jelinek <jakub@redhat.com>
7031
7032 * Makefile (tests): Add tst-tls5.
7033 (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
7034 ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
7035 ($(objpfx)tst-tls5): New.
7036 ($(objpfx)tst-tls6.out): Likewise.
7037 (tests): Depend on $(objpfx)tst-tls6.out.
7038 * tst-tls3.c: Include stdint.h and pthreaddef.h.
7039 (do_test): Check pthread_self () return value alignment.
7040 * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
7041 (tf): Check pthread_self () return value alignment.
7042 * tst-tls5.c: New test.
7043 * tst-tls5.h: New.
7044 * tst-tls5mod.c: New.
7045 * tst-tls5moda.c: New.
7046 * tst-tls5modb.c: New.
7047 * tst-tls5modc.c: New.
7048 * tst-tls5modd.c: New.
7049 * tst-tls5mode.c: New.
7050 * tst-tls5modf.c: New.
7051 * tst-tls6.sh: New test.
7052
c503d3dc
UD
7053 * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
7054 ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
7055 * init.c (pthread_functions): Initialize them.
7056 * forward.c (pthread_cond_timedwait@GLIBC_2.0,
7057 pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
7058 * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
7059 pthread_cond_timedwait@@GLIBC_2.3.2.
7060
48614753
JJ
70612003-09-01 Jakub Jelinek <jakub@redhat.com>
7062
56a1b877
JJ
7063 * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
7064 * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
7065 * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
7066 * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
7067 * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
7068 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
7069
7070 * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
7071
48614753
JJ
7072 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
7073 _POSIX_THREAD_PRIORITY_SCHEDULING.
7074 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
7075
28c97261
UD
70762003-08-31 Ulrich Drepper <drepper@redhat.com>
7077
eef80cf8
UD
7078 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
7079 nested function, use static inline function from libio.h.
7080 Code by Richard Henderson.
7081
28c97261
UD
7082 * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
7083 weak.
7084
cd2fbe58
UD
70852003-08-30 Jakub Jelinek <jakub@redhat.com>
7086
7087 * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
7088 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
7089 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
7090 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
7091 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
7092 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
7093 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
7094 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
7095 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
7096 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
7097 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
7098 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
7099 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
7100 * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
7101 * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
7102 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
7103 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
7104 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
7105 * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
7106 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
7107 * sysdeps/sparc/sparc32/pthreaddef.h: New file.
7108 * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
7109 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
7110 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
7111 * sysdeps/sparc/sparc64/pthreaddef.h: New file.
7112 * sysdeps/sparc/tls.h: New file.
7113 * sysdeps/sparc/tcb-offsets.sym: New file.
7114 * sysdeps/sparc/Makefile: New file.
7115 * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
7116 * init.c [__sparc__] (__NR_set_tid_address): Define.
7117
feda52c0
UD
71182003-08-29 Jakub Jelinek <jakub@redhat.com>
7119
7120 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
7121 _IO_release_lock): Define.
7122
7c868816
JJ
71232003-08-29 Jakub Jelinek <jakuB@redhat.com>
7124
0261d33f 7125 * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
7c868816
JJ
7126 sigemptyset before sigaddset. Reported by jreiser@BitWagon.com.
7127
68b9e1ae
UD
71282003-08-27 Ulrich Drepper <drepper@redhat.com>
7129
7130 * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
7131 (__pthread_cleanup_class): Add missing return types of member
7132 functions.
7133
13b3edfc
UD
71342003-08-26 Steven Munroe <sjmunroe@us.ibm.com>
7135
7136 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
7137 (lll_mutex_unlock_force): Add memory barrier between store and futex
7138 syscall.
7139
bb606fbe
UD
71402003-08-25 Ulrich Drepper <drepper@redhat.com>
7141
7142 * tst-cancel4.c (do_test): Also unlink tempfname and remove
7143 tempmsg in first loop.
7144
ee4e5a3d
UD
71452003-08-18 Ulrich Drepper <drepper@redhat.com>
7146
7147 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
7148 _POSIX_THREAD_PRIORITY_SCHEDULING.
7149 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
7150
334fcf2a
UD
71512003-08-07 Jakub Jelinek <jakub@redhat.com>
7152
7153 * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
7154 (__rtld_lock_default_lock_recursive,
7155 __rtld_lock_default_unlock_recursive): Define.
7156 [_LIBC && SHARED] (__rtld_lock_lock_recursive,
7157 __rtld_lock_unlock_recursive): Define using
7158 GL(_dl_rtld_*lock_recursive).
7159 * init.c (__pthread_initialize_minimal_internal): Initialize
7160 _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
7161 Lock GL(_dl_load_lock) the same number of times as
7162 GL(_dl_load_lock) using non-mt implementation was nested.
7163
7164 * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
7165 * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
7166
a30fb2df
UD
71672003-08-06 Jakub Jelinek <jakub@redhat.com>
7168
7169 * tst-cancel17.c (do_test): Make len2 maximum of page size and
7170 PIPE_BUF.
7171
ce0d30a0
JJ
71722003-08-07 Jakub Jelinek <jakub@redhat.com>
7173
7174 * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
7175
9c988b83
UD
71762003-08-03 Jakub Jelinek <jakub@redhat.com>
7177
7178 * sysdeps/pthread/createthread.c (do_clone): Move error handling
7179 to first syscall error check. Move syscall error check for tkill
7180 into __ASSUME_CLONE_STOPPED #ifdef.
7181
5c5252bd
UD
71822003-08-02 Ulrich Drepper <drepper@redhat.com>
7183
f1205aa7
UD
7184 * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
7185 is not defined, do explicit synchronization.
7186 (create_thread): Do not lock pd->lock here. If __ASSUME_CLONE_STOPPED
7187 is not defined also unlock pd->lock for non-debugging case in case
7188 it is necessary.
7189 * pthread_create.c (start_thread): Always get and release pd->lock
7190 if __ASSUME_CLONE_STOPPED is not defined.
7191 (start_thread_debug): Removed. Adjust users.
7192 * allocatestack.c (allocate_stack): Always initialize lock if
7193 __ASSUME_CLONE_STOPPED is not defined.
7194 * Makefile (tests): Add tst-sched1.
7195 * tst-sched1.c: New file.
7196
5c5252bd
UD
7197 * sysdeps/pthread/createthread.c (do_clone): Only use
7198 sched_setschduler and pass correct parameters.
7199
973d66e4
UD
72002003-07-31 Jakub Jelinek <jakub@redhat.com>
7201
7202 * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
7203 pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
7204 PTHREAD_STACK_MIN in comments.
7205
d347a4ab
UD
72062003-07-31 Jakub Jelinek <jakub@redhat.com>
7207
7208 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
7209 Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
7210 argument.
7211 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
7212 * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
7213 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
7214 (__pthread_cleanup_upto): Fix prototype.
7215 (_longjmp_unwind): Adjust caller.
7216 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
7217 Change second argument to const struct pointer.
7218 * tst-sem8.c (main): Remove unused s2 and s3 variables.
7219 * tst-sem9.c (main): Likewise.
7220 * unwind.c: Include string.h for strlen prototype.
7221
1b26e9a5
UD
72222003-07-31 Ulrich Drepper <drepper@redhat.com>
7223
7224 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7225 (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
7226 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
7227 Define HAVE_CMOV.
7228 Patch by Nicholas Miell <nmiell@attbi.com>.
7229
adc12574
UD
72302003-07-30 Jakub Jelinek <jakub@redhat.com>
7231
7232 * init.c (__pthread_initialize_minimal_internal): Initialize
7233 GL(dl_init_static_tls).
7234 * pthreadP.h (__pthread_init_static_tls): New prototype.
7235 * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
7236 New functions.
7237 * Makefile (tests): Add tst-tls4.
7238 (modules-names): Add tst-tls4moda and tst-tls4modb.
7239 ($(objpfx)tst-tls4): Link against libdl and libpthread.
7240 ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
7241 tst-tls4modb.so.
7242 * tst-tls4.c: New file.
7243 * tst-tls4moda.c: New file.
7244 * tst-tls4modb.c: New file.
7245
a7f6c66e
RM
72462003-06-19 Daniel Jacobowitz <drow@mvista.com>
7247
7248 * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
7249 before __timer_dealloc.
7250 * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
7251 Don't call list_unlink.
7252
172ce013
RM
72532003-07-29 Roland McGrath <roland@redhat.com>
7254
7255 * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
7256
7b787f85
UD
72572003-07-25 Jakub Jelinek <jakub@redhat.com>
7258
7259 * tst-cancel17.c (do_test): Check if aio_cancel failed.
7260 Don't reuse struct aiocb A if it failed.
7261 Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
7262 not just one byte, as that does not block.
7263
0e9d6240
UD
72642003-07-22 Jakub Jelinek <jakub@redhat.com>
7265
9d79e037
UD
7266 * sysdeps/pthread/unwind-resume.c: New file.
7267 * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
7268 unwind-resume in csu subdir.
7269 (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
7270 exceptions.
7271 (librt-sysdep_routines, librt-shared-only-routines): Add
7272 rt-unwind-resume.
7273 * sysdeps/pthread/rt-unwind-resume.c: New file.
7274 * unwind-forcedunwind.c: New file.
7275 * Makefile (libpthread-routines): Add unwind-forcedunwind.
7276 (libpthread-shared-only-routines): Likewise.
7277 (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
7278 * pthreadP.h (pthread_cancel_init): New prototype.
7279 * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
7280
7281 * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
7282 attr argument const struct pthread_attr *.
7283
0e9d6240
UD
7284 * res.c (__res_state): Return __resp.
7285 * descr.h: Include resolv.h.
7286 (struct pthread): Add res field.
7287 * pthread_create.c: Include resolv.h.
7288 (start_thread): Initialize __resp.
7289 * Makefile (tests): Add tst-_res1.
7290 (module-names): Add tst-_res1mod1, tst-_res1mod2.
7291 ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
7292 ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
7293 libpthread.
7294 * tst-_res1.c: New file.
7295 * tst-_res1mod1.c: New file.
7296 * tst-_res1mod2.c: New file.
7297
1a379ea0
UD
72982003-07-21 Ulrich Drepper <drepper@redhat.com>
7299
7e939b21
UD
7300 * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
7301
1a379ea0
UD
7302 * Makefile: Define various *-no-z-defs variables for test DSOs
7303 which has undefined symbols.
7304
ca86a763
UD
73052003-07-21 Steven Munroe <sjmunroe@us.ibm.com>
7306
7307 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
7308 Retry if the stwcx fails to store once_control.
7309
80f536db
UD
73102003-07-20 Ulrich Drepper <drepper@redhat.com>
7311
7312 * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
7313 pthread_attr_setaffinity.
7314 * Versions [libpthread] (GLIBC_2.3.3): Likewise.
7315 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
7316 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
7317 * pthread_attr_destroy.c: Free cpuset element if allocated.
7318 * pthread_create.c: Pass iattr as additional parameter to
7319 create_thread.
7320 * sysdeps/pthread/createthread.c: If attribute is provided and
7321 a new thread is created with affinity set or scheduling parameters,
7322 start thread with CLONE_STOPPED.
7323 * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
7324 pthread_attr_setaffinity.
7325 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
7326 cpuset element.
7327
73299943
UD
73282003-07-15 Ulrich Drepper <drepper@redhat.com>
7329
7330 * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
7331
da35d15e
UD
73322003-07-14 Ulrich Drepper <drepper@redhat.com>
7333
7334 * sysdeps/pthread/configure.in: Require CFI directives also for
7335 ppc and s390.
7336
75540d8a
UD
73372003-07-15 Jakub Jelinek <jakub@redhat.com>
7338
7339 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
7340 Add cfi directives.
7341
4a17085f
UD
73422003-07-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7343
7344 * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
7345 CLEANUP_JMP_BUF.
7346 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
7347 registers as variables. Call __pthread_mutex_unlock_usercnt.
7348 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7349 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
7350 not self pointer in __writer. Compare with TID to determine
7351 deadlocks.
7352 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7353 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
7354 Likewise.
7355 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
7356 Likewise.
7357 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
7358 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
7359 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
7360 macros also when compiling librt.
7361
6080ecdf
UD
73622003-07-11 Jakub Jelinek <jakub@redhat.com>
7363
7364 * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
7365 -fasynchronous-unwind-tables.
7366 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
7367 (PSEUDO): Add cfi directives.
7368 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
7369 Likewise.
7370 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
7371 Likewise.
7372
da0c02ee
UD
73732003-07-08 Jakub Jelinek <jakub@redhat.com>
7374
7375 * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
7376 __pthread_unregister_cancel): Add prototypes and hidden_proto.
7377 * unwind.c (__pthread_unwind_next): Add hidden_def.
7378 * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
7379 Likewise.
7380 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
7381 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
7382 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
7383 Likewise.
7384 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
7385 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
7386 Likewise.
7387 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
7388 HIDDEN_JUMPTARGET to call __pthread_register_cancel,
7389 __pthread_unregister_cancel and __pthread_unwind_next.
7390
57a5ea02
UD
73912003-07-04 Jakub Jelinek <jakub@redhat.com>
7392
7393 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
7394 different symbol for the cancellation syscall wrapper and
7395 non-cancellation syscall wrapper.
7396 (PSEUDO_END): Define.
7397
d810b358
UD
73982003-07-05 Richard Henderson <rth@redhat.com>
7399
7400 * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
7401 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
42d86dd6
RH
7402 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
7403 return actual return value from the syscall, not 0.
d810b358 7404
db54f488
UD
74052003-07-07 Ulrich Drepper <drepper@redhat.com>
7406
7407 * descr.h (struct pthread): Add pid field.
7408 * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
7409 (__reclaim_stacks): Likewise.
7410 * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
7411 also check for PID of the signal source.
7412 (__pthread_initialize_minimal_internal): Also initialize pid field
7413 of initial thread's descriptor.
7414 * pthread_cancel.c: Use tgkill instead of tkill if possible.
7415 * sysdeps/unix/sysv/linux/fork.c: Likewise.
7416 * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
7417 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
7418 * sysdeps/unix/sysv/linux/raise.c: Likewise.
7419
5e497a41
UD
74202003-07-05 Ulrich Drepper <drepper@redhat.com>
7421
7422 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
7423 Fix use of parameter.
7424 (__libc_cleanup_pop): Likewise.
7425
86a0c4fa
UD
74262003-07-04 Ulrich Drepper <drepper@redhat.com>
7427
7428 * init.c (sigcancel_handler): Change parameters to match handler
7429 for SA_SIGACTION. Check signal number and code to recognize
7430 invalid invocations.
7431
bdbecaa3
RM
74322003-07-03 Roland McGrath <roland@redhat.com>
7433
7434 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
7435 Apply sizeof (struct pthread) bias to r13 value.
7436
56421b23
UD
74372003-07-03 Ulrich Drepper <drepper@redhat.com>
7438
fbd90f6c
UD
7439 * sysdeps/pthread/configure.in: Require CFI directives.
7440
56421b23
UD
7441 * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
7442 definition.
7443 * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
7444 libpthread compilation.
7445 * unwind.c (__pthread_unwind): Add hidden_def.
7446 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
7447
ca2b4cd7
UD
74482003-07-01 Ulrich Drepper <drepper@redhat.com>
7449
7450 * libc-cancellation.c (__libc_cleanup_routine): Define.
7451 * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
7452 (__pthread_cleanup_pop): Define.
7453
f036e569
UD
74542003-07-01 Richard Henderson <rth@redhat.com>
7455
7456 * sysdeps/alpha/elf/pt-initfini.c: New file.
7457 * sysdeps/alpha/pthread_spin_lock.S: New file.
7458 * sysdeps/alpha/pthread_spin_trylock.S: New file.
7459 * sysdeps/alpha/pthreaddef.h: New file.
7460 * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
7461 * sysdeps/alpha/tls.h: New file.
7462 * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
7463 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
7464 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
7465 * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
7466 * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
7467 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
7468 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
7469 * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
7470 * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
7471 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
7472
3b985826
UD
74732003-07-01 Ulrich Drepper <drepper@redhat.com>
7474
7475 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
7476 cleanup support and unwind info.
7477
3a4d1e1e
UD
74782003-06-30 Ulrich Drepper <drepper@redhat.com>
7479
7480 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
7481 Use correct cleanup handler registration. Add unwind info.
96c814d3
UD
7482 * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
7483 * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
3a4d1e1e
UD
7484 * tst-once3.c: Add cleanup handler and check it is called.
7485 * tst-once4.c: Likewise.
7486 * tst-oncex3.c: New file.
7487 * tst-oncex4.c: New file.
7488 * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
7489
e479cc8e
UD
74902003-06-29 Ulrich Drepper <drepper@redhat.com>
7491
7492 * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
7493
7d7ff54c
UD
74942003-06-27 Ulrich Drepper <drepper@redhat.com>
7495
483e95d0
UD
7496 * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
7497 (tf_msgsnd): Likewise.
7498
7d7ff54c
UD
7499 * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
7500 premature returns a bit more.
7501
7539c7ec
UD
75022003-06-26 Ulrich Drepper <drepper@redhat.com>
7503
7504 * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
7505 definition to the front.
7506
7507 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
7508 the cleanup functions to make the names unique. Fix dwarf opcode
7509 un unwind table.
7510 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
7511 functions to make the names unique. Fix CFA offset for two blocks.
7512
0af6a1d9
UD
75132003-06-25 Ulrich Drepper <drepper@redhat.com>
7514
7515 * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
7516 missing closing braces.
7517 Patch by Christophe Saout <christophe@saout.de>.
7518
eef4a9f3
RM
75192003-06-24 Roland McGrath <roland@redhat.com>
7520
7521 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
7522
4165d44d
UD
75232003-06-24 Ulrich Drepper <drepper@redhat.com>
7524
7f8f7b9d
UD
7525 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
7526 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
7527
4165d44d
UD
7528 * pthreadP.h: Declare __find_thread_by_id.
7529 * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
7530 * pthread_clock_gettime.c: Allow using other thread's clock.
7531 * pthread_clock_settime.c: Likewise.
7532 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
7533 * Makefile: Add rules to build and run tst-clock2.
7534 * tst-clock2.c: New file.
7535
67b78ef9
UD
75362003-06-23 Ulrich Drepper <drepper@redhat.com>
7537
7538 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
7539 to use exception-based cleanup handler.
7540 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7541
7542 * tst-cond8.c (ch): Announce that we are done.
7543
7544 * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
7545
7546 * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
7547 Also test aio_suspend with timeout value.
7548
61623643
UD
75492003-06-22 Ulrich Drepper <drepper@redhat.com>
7550
3a4f2043
UD
7551 * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
7552 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
7553 attribute_hidden.
7554
61623643
UD
7555 * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
7556 (__pthread_mutex_lock_internal): Likewise.
7557 (__pthread_mutex_unlock_internal): Likewise.
7558 (__pthread_mutex_unlock_usercnt): Declare.
7559 * pthread_mutex_destroy.c: Always fail if used in any way.
7560 * pthread_mutex_init.c: Update comment.
7561 * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
7562 * pthread_mutex_timedlock.c: Adjust __nusers.
7563 * pthread_mutex_trylock.c: Adjust __nusers.
7564 * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
7565 and public interfaces are wrapper with pass additional parameter.
7566 __pthread_mutex_unlock_usercnt does not adjust __nusers if second
7567 parameter zero.
7568 * tst-mutex8.c: New file.
7569 * Makefile (tests): Add tst-mutex8.
7570 * sysdeps/pthread/pthread_cond_timedwait.c: Call
7571 __pthread_mutex_unlock_usercnt.
7572 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
7573 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7574 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7575 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7576 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7577 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
7578 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
7579 Add __nusers.
7580 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7581 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7582 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7583 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7584 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7585
7586 * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
7587 * pthread_mutex_timedlock.c: Likewise.
7588 * pthread_mutex_trylock.c: Adjust __nusers.
7589 * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
7590 * tst-mutex9.c: New file.
7591 * Makefile (tests): Add tst-mutex9.
7592 * sysdeps/i386/tls.h: Remove THREAD_ID definition.
7593 * sysdeps/ia64/tls.h: Likewise.
7594 * sysdeps/powerpc/tls.h: Likewise.
7595 * sysdeps/s390/tls.h: Likewise.
7596 * sysdeps/sh/tls.h: Likewise.
7597 * sysdeps/x86_64/tls.h: Likewise.
7598 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
7599 Change type of __owner.
7600 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7601 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7602 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7603 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7604 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7605
9bdabb94
UD
76062003-06-19 Jakub Jelinek <jakub@redhat.com>
7607
7608 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
7609 * sysdeps/unix/sysv/linux/sem_post.c: ...here.
7610
7611 * sysdeps/unix/sysv/linux/sem_post.c: Move to...
7612 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here. Pass nr + 1
7613 instead of nr to lll_futex_wake. Only set errno and return -1
7614 if err < 0.
7615
7616 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
7617 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
7618 return actual return value from the syscall, not 0.
7619
f6c93bd9
UD
76202003-06-18 Ulrich Drepper <drepper@redhat.com>
7621
ca343e73
UD
7622 * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
7623 find a random value.
7624 (tf_msgrcv): Likewise. Also don't report msgrcv returns if
7625 errno==EIDRM.
7626
50441a98
UD
7627 * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
7628 compat_timer_settime.
7629 * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
7630 compat_timer_gettime.
7631 * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
9bdabb94 7632 compat_timer_getoverrun.
50441a98
UD
7633 * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
7634 compat_timer_delete.
7635
f6c93bd9
UD
7636 * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
7637 error-checking mutex detect busy mutexes.
7638
047aec8f
UD
76392003-06-17 Ulrich Drepper <drepper@redhat.com>
7640
1d53508d
UD
7641 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
7642 Add ax to clobber list.
7643 (lll_mutex_cond_lock): Likewise.
7644 (lll_mutex_unlock): Likewise.
7645 (lll_lock): Likewise.
7646 (lll_unlock): Likewise.
7647
f23b30e2
UD
7648 * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
7649 * tst-cancel18.c: New file.
7650 * tst-cancelx18.c: New file.
7651
7652 * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
7653 and tcdrain.
7654
7655 * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
7656 * tst-cancel17.c: New file.
7657 * tst-cancelx17.c: New file.
7658
7659 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
7660 * sysdeps/unix/sysv/linux/sigwait.c: New file.
7661 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
7662
047aec8f
UD
7663 * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
7664
bbde8527
UD
76652003-06-16 Jakub Jelinek <jakub@redhat.com>
7666
7667 * sysdeps/pthread/createthread.c (create_thread): Set
7668 header.multiple_threads unconditionally.
7669 * allocatestack.c (allocate_stack): Likewise.
7670 * descr.h (struct pthread): Add header.multiple_threads
7671 unconditionally.
7672 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
7673 Define for librt. #error if neither libpthread, libc nor librt.
7674 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
7675 Likewise.
7676 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
7677 CDISABLE): Likewise.
7678 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
7679 CDISABLE): Likewise.
7680 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
7681 CDISABLE): Likewise.
7682 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
7683 CDISABLE): Likewise. Access header.multiple_threads outside of
7684 libc and libpthread.
7685 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
7686 Likewise.
7687 * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
7688 * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
7689
26676450
UD
76902003-06-17 Ulrich Drepper <drepper@redhat.com>
7691
7692 * tst-cancel4.c: Add tests for the socket and signal functions, pause.
7693 Also test early cancellation before the thread reaches the cancellation
7694 point.
7695
7696 * Makefile: Compile forward.c with exceptions.
7697
7698 * sysdeps/unix/sysv/linux/sleep.c: New file.
7699
301a6724
UD
77002003-06-16 Ulrich Drepper <drepper@redhat.com>
7701
0e0deb03
UD
7702 * Makefile: Add CFLAGS definition to compile function wrappers
7703 duplicated from libc with exceptions.
7704 * tst-cancel4.c: Also check cancellation handlers.
7705
301a6724
UD
7706 * Makefile: Add rules to build and run tst-cancel16 and
7707 tst-cancelx16. Add missing CFLAGS definitions.
7708 * tst-cancel16.c: New file.
7709 * tst-cancelx16.c: New file.
7710
7a114794
UD
77112003-06-15 Ulrich Drepper <drepper@redhat.com>
7712
452aea84
UD
7713 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
7714 (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
7715 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
7716 (DL_SYSINFO_IMPLEMENTATION): Likewise.
7717
7a114794
UD
7718 * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
7719 (LIBC_CANCEL_RESET): Likewise.
7720 Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
7721 * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
7722 librt-cancellation.
7723 (CFLAGS-libcrt-cancellation.c): Define.
7724 * sysdeps/pthread/librt-cancellation.c: New file.
7725 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
7726 macros also when compiling librt.
7727 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
7728 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
7729 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
7730 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
7731 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
7732 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
7733 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
7734
7735 * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
7736 compat_timer_create.
7737
8ba1d429
UD
77382003-06-14 Ulrich Drepper <drepper@redhat.com>
7739
cc8fb6f3
UD
7740 * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
7741
8ba1d429
UD
7742 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
7743 __register_atfork.
7744 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
7745 Add libc_hidden_def.
7746
d4f100e2
RM
77472003-06-13 Roland McGrath <roland@redhat.com>
7748
7749 * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
7750 constant from <sys/reg.h> to ps_get_thread_area, not register contents.
7751
dd9423a6
UD
77522003-06-11 Ulrich Drepper <drepper@redhat.com>
7753
7754 * allocatestack.c (queue_stack): Always inline.
7755 * ptreadhP.h (__do_cancel): Likewise.
7756
ed24330d
JJ
77572003-06-10 Jakub Jelinek <jakub@redhat.com>
7758
7759 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
7760 a typo.
7761
06120d79
UD
77622003-06-10 Ulrich Drepper <drepper@redhat.com>
7763
7764 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
7765 (__pthread_cond_signal): Remove incorrect second addition for
7766 cond_lock!=0.
7767
b1720346
UD
77682003-06-09 Ulrich Drepper <drepper@redhat.com>
7769
5b318f85
UD
7770 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
7771 (__pthread_cond_signal): Use correct futex pointer in
7772 __lll_mutex_lock_wait call.
7773
b1720346
UD
7774 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
7775 (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
7776
3e36c37d
UD
77772003-06-08 Ulrich Drepper <drepper@redhat.com>
7778
ecf7955d
UD
7779 * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
7780 cancelable.
ed24330d 7781 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
ecf7955d
UD
7782 Likewise.
7783
3e36c37d
UD
7784 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
7785 hand-written CFI generation code. Since ENTRY/END also initiated
7786 CFI frames this caused two CFI sets to be generated.
7787
7726edc2
UD
77882003-06-07 Ulrich Drepper <drepper@redhat.com>
7789
7790 * cleanup_routine.c: New file.
7791 * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
7792 * sysdeps/pthread/pthread.h: Add support for fully exception-based
7793 cleanup handling.
7794 * Makefile (libpthread-routines): Add cleanup_routine.
7795 Add more CFLAGS variables to compile with exceptions. Add comments
7796 why which file needs unwind tables.
7797 (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
7798 tests.
7799 * tst-cancelx1.c: New file.
7800 * tst-cancelx2.c: New file.
7801 * tst-cancelx3.c: New file.
7802 * tst-cancelx4.c: New file.
7803 * tst-cancelx5.c: New file.
7804 * tst-cancelx6.c: New file.
7805 * tst-cancelx7.c: New file.
7806 * tst-cancelx8.c: New file.
7807 * tst-cancelx9.c: New file.
7808 * tst-cancelx10.c: New file.
7809 * tst-cancelx11.c: New file.
7810 * tst-cancelx12.c: New file.
7811 * tst-cancelx13.c: New file.
7812 * tst-cancelx14.c: New file.
7813 * tst-cancelx15.c: New file.
7814 * tst-cleanupx0.c: New file.
7815 * tst-cleanupx0.expect: New file.
7816 * tst-cleanupx1.c: New file.
7817 * tst-cleanupx2.c: New file.
7818 * tst-cleanupx3.c: New file.
7819
7820 * tst-cleanup0.c: Make standard compliant.
7821 * tst-cleanup1.c: Likewise.
7822
7823 * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
7824 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
7825 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
7826 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
7827 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
7828 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7829 * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
7830 CLEANUP_JMP_BUF.
7831 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
7832 * tst-cancel12.c: New file.
7833 * tst-cancel13.c: New file.
7834 * tst-cancel14.c: New file.
7835 * tst-cancel15.c: New file.
7836 * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
7837 and tst-cancel15.
7838
7839 * tst-cancel1.c: Add some comments.
7840
7841 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
7842 timeout correctly.
7843
7a8a8e21
UD
78442003-06-06 Ulrich Drepper <drepper@redhat.com>
7845
7846 * Makefile (CFLAGS-pthread_cancel.c): Define.
7847
4ad0bbf4
UD
78482003-06-05 Ulrich Drepper <drepper@redhat.com>
7849
7850 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
7851 Change type of __writer element to int.
7852 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7853 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7854 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7855 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7856 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7857 * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
7858 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
7859 * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
7860 Compare with TID to determine deadlocks.
7861 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
7862 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
7863 * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
7864 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
7865 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
7866 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7867 Likewise.
7868 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7869 Likewise.
7870 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7871 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
7872 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
7873 Likewise.
7874 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
7875 Likewise.
7876 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
7877 * Makefile (tests): Add tst-rwlock12.
7878 * tst-rwlock12.c: New file.
7879
332faa96
JJ
78802003-06-05 Jakub Jelinek <jakub@redhat.com>
7881
7882 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
7883 __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
7884 Remove bogus hidden_proto.
7885 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
7886 Likewise.
7887 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
7888 lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
7889 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
7890 ___lll_mutex_timedlock): Likewise.
7891
29d9e2fd
UD
78922003-06-04 Ulrich Drepper <drepper@redhat.com>
7893
7894 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
7895 (__pthread_cond_signal): Add some code to eventually handle
7896 cond_lock!=0.
7897
6f1acb30
UD
78982003-06-01 Ulrich Drepper <drepper@redhat.com>
7899
7900 * Makefile (tests): Add tst-exec4.
7901 (tst-exec4-ARGS): Define.
7902 * tst-exec4.c: New file.
7903
49b65043
UD
79042003-05-31 Ulrich Drepper <drepper@redhat.com>
7905
31195be2
UD
7906 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
7907 Also fail if tv_nsec < 0.
7908 (__lll_timedwait_tid): Likewise.
7909 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
7910 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
7911 Likewise.
7912 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
7913 Likewise.
7914 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
7915 Likewise.
7916 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
7917 Likewise.
80b54217
UD
7918 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
7919 Likewise.
7920 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
7921 Likewise.
31195be2 7922
dcfc8224
UD
7923 * Makefile (tests): Add tst-sem8 and tst-sem9.
7924 * tst-sem8.c: New file.
7925 * tst-sem9.c: New file.
7926 * sem_open.c: Fix creation of in_use record if the file exists but
7927 no internal record.
7928
49b65043
UD
7929 * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
7930 definitions.
7931
7932 * sysdeps/pthread/timer_create.c (timer_create): In case
7933 evp==NULL, assign timer ID to sival_ptr.
7934
7935 * descr.h (struct pthread_unwind_buf): Change type of prev element to
7936 struct pthread_unwind_buf *.
7937 (struct pthread): Likewise for cleanup_jmp_buf element.
7938
7939 * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
7940 * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
7941 * unwind.c (__pthread_unwind_next): Likewise.
7942
50794a45
UD
79432003-05-30 Ulrich Drepper <drepper@redhat.com>
7944
5d4f57bd
UD
7945 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7946 (lll_futex_timed_wait): Use int for futex value parameter.
7947 (lll_futex_wake): Likewise.
7948 (lll_futex_requeue): Likewise.
7949
7950 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
7951 Replace one memory operation with one register operation.
7952
7953 * tst-join4.c (do_test): Fix error message.
7954
7ab7ea33
UD
7955 * tst-rwlock6.c (do_test): Use correct format specifier.
7956
7957 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
7958 (__lll_mutex_lock_wait): Replace one memory operation with one
7959 register operation.
7960 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
7961 (__lll_mutex_lock_wait): Likewise.
7962
50794a45
UD
7963 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7964 (__lll_mutex_cond_lock): Add one to value parameter of
7965 __lll_lock_wait to reflect reality in the futex syscall.
7966 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
7967 (lll_mutex_cond_lock): Likewise.
7968
5a70784e
JJ
79692003-05-30 Jakub Jelinek <jakub@redhat.com>
7970
7971 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
7972 New function.
7973 (lll_mutex_cond_lock): Define.
7974
e7c5ac68
UD
79752003-05-29 Ulrich Drepper <drepper@redhat.com>
7976
586d1748
UD
7977 * Makefile (tests): Add tst-signal6.
7978 * tst-signal6.c: New file.
7979
b8ba4a27
UD
7980 * sysdeps/unix/sysv/linux/s390/lowlevellock.h
7981 (__lll_mutex_unlock_force): New function
7982 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
7983
65d46efe
UD
7984 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7985 (__lll_mutex_unlock_force): New function.
7986 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
7987
7988 * tst-rwlock7.c (do_test): Use correct format specifier.
7989
e7c5ac68
UD
7990 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
7991 Find break parameter in correct asm argument.
7992
284bdc42
UD
79932003-05-27 Jakub Jelinek <jakub@redhat.com>
7994
7995 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
7996 Remove out4.
7997 (lll_futex_requeue): Fix __o3 constraint, return negative errno if
7998 error occured.
7999 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
8000 Add __mutex.
8001 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
8002 lll_futex_requeue, lll_mutex_unlock_force): Define.
8003
e7c5ac68
UD
80042003-05-30 Jakub Jelinek <jakub@redhat.com>
8005
8006 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
8007 (pthread_cond_t): Add __mutex.
8008 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
8009 lll_futex_requeue, lll_mutex_unlock_force): Define.
8010
ea2630c6
UD
80112003-05-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
8012
8013 * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
8014 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
42d86dd6 8015 Add __mutex field.
ea2630c6
UD
8016 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
8017 Define.
8018 (lll_futex_wait, lll_futex_wake): Define.
8019 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
8020 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
8021 FUTEX_REQUEUE instead of FUTEX_WAIT.
8022 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
8023 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
8024 mutex which was used in condvar structure. Call
8025 __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
8026 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
8027
8028 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
8029 include tcb-offsets.h. Read wakeup value in locked region.
8030 Use the value of gbr register as THREAD_ID.
8031 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8032 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
8033 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
8034
8035 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
8036 macros.
8037
5a77f150
UD
80382003-05-28 Ulrich Drepper <drepper@redhat.com>
8039
8040 * sysdeps/pthread/pthread_cond_broadcast.c
8041 (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
8042
7661d9f7
UD
80432003-05-26 Ulrich Drepper <drepper@redhat.com>
8044
8045 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
8046 typo in register name.
8047 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
8048 correctly. Actually use requeue. Little optimization.
8049 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
8050 mutex address early. Handle cancellation state as 32-bit value.
8051 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8052 Remove unnecessary label.
8053
69431c9a
UD
80542003-05-25 Ulrich Drepper <drepper@redhat.com>
8055
8056 * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
8057 instead of FUTEX_WAIT.
8058 * sysdeps/pthread/pthread_cond_signal.c: Likewise.
8059 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8060 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8061 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
8062 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
8063 * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
8064 used in condvar structure. Call __pthread_mutex_cond_lock instead
8065 of __pthread_mutex_lock_internal.
8066 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8067 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8068 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
8069 (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
8070 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8071 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8072 * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
8073 Add pthread_mutex_cond_lock.
8074 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
8075 * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
8076 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
8077 lll_mutex_cond_lock.
8078 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
8079 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
248a3490 8080 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
69431c9a 8081 Add __mutex field.
248a3490 8082 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
69431c9a
UD
8083 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8084
8085 * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
8086 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
8087
8088 * pthreadP.h: Declare __pthread_mutex_cond_lock.
8089 * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
8090 Use it instead of lll_mutex_lock. If __pthread_mutex_lock is a
8091 macro don't define aliases.
8092
8093 * cancellation.c: Remove __pthread_enable_asynccancel_2.
8094 * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
8095 * sysdeps/pthread/pthread_cond_timedwait.c: Use
8096 __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
8097 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8098 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8099 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
8100 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8101 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8102
fddfebbd
UD
81032003-05-17 Ulrich Drepper <drepper@redhat.com>
8104
8105 * sem_open.c: Fix one endless loop. Implement correct semantics
8106 wrt opening the same semaphore more then once.
8107 * sem_close.c: Adjust for sem_open change.
8108 * semaphoreP.h: Include <semaphore.h>. Define struct inuse_sem.
8109 Declare __sem_mappings, __sem_mappings_lock, __sem_search.
8110 * Makefile (tests): Add tst-sem7.
8111 * tst-sem7.c: New file.
8112
1eefffb0
RM
81132003-05-16 Roland McGrath <roland@redhat.com>
8114
8115 * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
8116 uninitialized variable braino.
8117
6e66dc78
UD
81182003-05-16 Ulrich Drepper <drepper@redhat.com>
8119
23ae6451
UD
8120 * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
8121 test for syscall availability.
8122
8123 * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
8124 __no_posix_timers to -1 if the syscalls don't exist.
8125
7ac5b8e2
UD
8126 * pthread_join.c (pthread_join): Set tid field of the joined
8127 thread to -1. This isn't necessary but helps to recognize some
8128 error conditions with almost no cost.
8129
8130 * allocatestack.c (FREE_P): Also negative values indicate an
8131 unused stack.
8132
6e66dc78
UD
8133 * unwind.c: Include <unistd.h>.
8134
855dba3c
UD
81352003-05-14 Ulrich Drepper <drepper@redhat.com>
8136
8137 * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
8138
81f3ac4c
UD
81392003-05-14 Jakub Jelinek <jakub@redhat.com>
8140
8141 * Makefile (crti-objs, crtn-objs): New variables.
8142 (omit-deps, extra-objs): Add crtn.
8143 ($(objpfx)libpthread.so): Depend on both crti and crtn
8144 and links to them in multidir.
8145 ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
8146
7158eae4
UD
81472003-05-12 Steven Munroe <sjmunroe@us.ibm.com>
8148
8149 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
8150 (lll_mutex_unlock): Use atomic_exchange_rel.
8151
edf205d5
UD
81522003-05-11 Ulrich Drepper <drepper@redhat.com>
8153
8154 * cond-perf.c (cons): Add missing locking around setting of alldone.
8155
a3f979a7
UD
81562003-05-10 Ulrich Drepper <drepper@redhat.com>
8157
8158 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
8159 related macros.
8160 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8161
880867a4
UD
81622003-05-09 Ulrich Drepper <drepper@redhat.com>
8163
949ec764
UD
8164 * tst-sem6.c: New file.
8165 * Makefile (tests): Add tst-sem6.
8166
8167 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
8168 Use atomic_exchange_rel instead of atomic_exchange.
8169 * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
8170 Likewise.
8171
8172 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
8173 code for lll_futex_wait and lll_futex_wake in static apps. Use
8174 vsyscall is possible.
8175
8176 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
8177 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
8178 * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
8179 pthread_setaffinity_np.
8180 * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
8181 and pthread_setaffinity_np.
8182 * Makefile (libpthread-routines): Add pthread_getaffinity and
8183 pthread_setaffinity.
8184
880867a4
UD
8185 * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
8186 use it in case mmap to allocate the stack fails.
8187 * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
8188 ARCH_MAP_FLAGS here.
8189 * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
8190 ARCH_RETRY_MMAP.
8191
92d83c72
UD
81922003-05-08 Ulrich Drepper <drepper@redhat.com>
8193
8194 * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
8195 handler implementation. It is now lockless in fork().
8196 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
8197 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
8198 * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>. Don't
8199 declare the __fork_*_lists.
8200 (struct fork_handler): Include pointers to all three functions.
8201 Add next, refcntr and need_signal elements.
8202 (__fork_handlers): New declaration.
8203 (__register_atfork_malloc): Remove declaration.
8204 (HAVE_register_atfork_malloc): Remove definition.
8205 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
8206 __pthread_child_handler variable.
8207 (__libc_pthread_init): Use __register_atfork instead of explicitly
8208 adding to the list.
8209 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
8210 and lll_futex_wake.
8211 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
8212
8213 * unwind.c (unwind_cleanup): Print error message and then abort. This
8214 function must never be reached.
8215
8216 * cond-perf.c: New file.
8217
be4d8038
UD
82182003-05-05 Ulrich Drepper <drepper@redhat.com>
8219
8220 * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
8221
c6696b79
RM
82222003-05-04 Roland McGrath <roland@redhat.com>
8223
8224 * Makefile ($(objpfx)../libc.so): New target.
8225
7da168bf
UD
82262003-05-02 Ulrich Drepper <drepper@redhat.com>
8227
8228 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
8229 (pthread_condattr_t): Size is only an int, don't use long for
8230 alignment.
8231 (pthread_mutexattr_t): Likewise.
7da168bf
UD
8232 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8233 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8234 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8235
9a7178d6
UD
82362003-05-01 Ulrich Drepper <drepper@redhat.com>
8237
8238 * sysdeps/i386/tls.h: Define THREAD_ID.
8239 * sysdeps/ia64/tls.h: Likewise.
8240 * sysdeps/powerpc/tls.h: Likewise.
8241 * sysdeps/s390/tls.h: Likewise.
8242 * sysdeps/sh/tls.h: Likewise.
8243 * sysdeps/x86_64/tls.h: Likewise.
8244 * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
8245 record ownership.
8246 * pthread_mutex_timedlock.c: Likewise.
8247 * pthread_mutex_trylock.c: Likewise.
8248 * pthread_mutex_unlock.c: Likewise.
8249 * pthread_rwlock_trywrlock.c: Likewise.
8250 * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
8251 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
8252 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
8253 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
8254
8255 * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
8256 flag.
8257
a234e27d
UD
82582003-04-29 Jakub Jelinek <jakub@redhat.com>
8259
8260 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
8261 (__SIZEOF_PTHREAD_COND_T): Define to 48.
8262 (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
8263 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
8264 Make __align long long instead of long.
8265 (pthread_rwlock_t): Formatting.
8266 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
8267 (pthread_rwlock_t): Formatting.
8268 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
8269 (pthread_cond_t): Make __align long long instead of long.
8270 (pthread_rwlock_t): Move __flags field to the same position as in
8271 linuxthreads.
8272
f025c136
UD
82732003-04-30 Ulrich Drepper <drepper@redhat.com>
8274
8275 * tst-rwlock6.c (do_test): Use correct printf format specifiers.
8276 * tst-rwlock7.c (do_test): Likewise.
8277
7531ab9e
RM
82782003-04-26 Roland McGrath <roland@redhat.com>
8279
8280 * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
8281
299601a1
UD
82822003-04-22 Jakub Jelinek <jakub@redhat.com>
8283
299601a1
UD
8284 * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
8285 sizeof (struct pthread).
8286 (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
468777e1 8287 1 struct pthread.
299601a1
UD
8288 * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
8289 to 0.
8290 (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
8291 struct pthread.
8292 (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
8293 to 32-bit bytes.
8294 (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
8295 tcbp.
8296 (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
8297 unneccessarily.
8298 (NO_TLS_OFFSET): Define.
299601a1
UD
8299 * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
8300 add TLS_TCB_SIZE unnecessarily.
299601a1 8301
950094f8
RM
83022003-04-22 Roland McGrath <roland@redhat.com>
8303
8304 * Makeconfig (shared-thread-library): Reverse link order to work
8305 around linker bug.
8306
dc2f6455
UD
83072003-04-22 Ulrich Drepper <drepper@redhat.com>
8308
8309 * semaphore.h: Fix typo in comment.
8310
e7608d77
UD
83112003-04-21 Ulrich Drepper <drepper@redhat.com>
8312
6a87ee19
UD
8313 * sysdeps/pthread/sigfillset.c: New file.
8314
e7608d77
UD
8315 * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
8316 * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
8317 * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
8318 * sysdeps/pthread/sigaction.c: Likewise.
8319 * sysdeps/pthread/sigprocmask.c: New file.
8320 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
8321 __SIGRTMIN+1.
8322 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
8323 Block SIGTIMER. Also handle SI_TKILL events and terminate thread
8324 in this case.
8325
0b3df49e
UD
83262003-04-19 Ulrich Drepper <drepper@redhat.com>
8327
58a7a325
UD
8328 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
8329 (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
8330
0b3df49e
UD
8331 * sysdeps/unix/sysv/linux/unregister-atfork.c
8332 (__unregister_atfork): Don't free memory not allocated dynamically.
8333
8334 * semaphore.h: Remove __THROW marker from cancellation points.
8335 * nptl/sysdeps/pthread/pthread.h: Likewise.
8336
7d74651e
UD
83372003-04-18 Ulrich Drepper <drepper@redhat.com>
8338
76a67697
UD
8339 * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
8340 pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
7d74651e
UD
8341 __THROW.
8342
dd9d6538
JJ
83432003-04-16 Jakub Jelinek <jakub@redhat.com>
8344
8345 * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
8346
4ab6f47c
RM
83472003-04-15 Roland McGrath <roland@redhat.com>
8348
8349 * forward.c (__pthread_unwind): Tweak to avoid warning.
8350
162434a6
UD
83512003-04-15 Ulrich Drepper <drepper@redhat.com>
8352
8353 * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
8354
35909161
UD
83552003-04-14 Ulrich Drepper <drepper@redhat.com>
8356
18ddd3aa 8357 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
35909161
UD
8358 overflow CFA advance instructions.
8359 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8360
18a8e730
UD
83612003-04-14 Jakub Jelinek <jakub@redhat.com>
8362
bd4f43b4
UD
8363 * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
8364 * sysdeps/i386/pthread_spin_lock.c: Likewise.
8365 * sysdeps/x86_64/tls.h: Likewise. Define LOCK_PREFIX if not already
8366 defined.
8367
18a8e730
UD
8368 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
8369 DW_CFA_advance_loc2 for .Laddl-.Lsubl.
8370 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
8371 DW_CFA_advance_loc for .Laddl-.Lsubl.
8372
08c765fa
UD
83732003-04-13 Ulrich Drepper <drepper@redhat.com>
8374
18a8e730
UD
8375 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
8376 position-independent unwind data for static libraries.
8377 Add missing unwind info. Add comments.
8378
ad2be852
UD
8379 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
8380 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8381 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
08c765fa
UD
8382 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8383
177d1ad3
UD
83842003-04-12 Ulrich Drepper <drepper@redhat.com>
8385
08c765fa
UD
8386 * Makefile: Make sure all cancellation points are compiled with
8387 exception and asynchronous unwind tables.
8388
177d1ad3
UD
8389 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
8390 which mishandles loading of global object addresses in PIC.
8391 (THREAD_SETMEM_NC): Likewise.
8392
09d65ff3
UD
83932003-04-11 Ulrich Drepper <drepper@redhat.com>
8394
8395 * pthread.h: Define new data structure for cleanup buffer. Declare
8396 new cleanup handler interfaces.
8397 * descr.h: Include <unwind.h> if necessary. Define pthread_unwind_buf.
8398 (struct pthread): Add cleanup_jmp_buf pointer. Define
8399 HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
8400 * pthreadP.h: Declare __pthread_unwind. Define __do_cancel to use
8401 it. Declare old cleanup handler installation functions.
8402 * cleanup.c: Rewrite. Install handler for unwind-based cleanup
8403 handling.
8404 * cleanup_defer.c: Likewise.
8405 * cleanup_compat.c: New file. Old cleanup code.
8406 * cleanup_def_compat.c: New file. Old cleanup code.
8407 * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
8408 if own thread descriptor.
8409 * unwind.c: New file.
8410 * forward.c: Add __pthread_unwind.
8411 * init.c (pthread_functions): Add __pthread_unwind.
8412 * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
8413 Add ptr___pthread_unwind.
8414 * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
8415 and unwind function.
8416 * Makefile (libpthread-routines): Add cleanup_compat,
8417 cleanup_def_compat, and unwind. Define CFLAGS to enable unwind
8418 table generation if necessary.
8419 * version.c: Record whether unwind support is compiled in.
8420 * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
8421 * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
8422 handler interfaces.
8423 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
8424 complication to generate unwind information for syscall wrappers.
68107ec0 8425 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
09d65ff3
UD
8426 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
8427 __cleanup_fct_attribute.
8428
8429 * Makefile: Add rules to build and run tst-cleanup0.
8430 * tst-cleanup0.c: New file.
8431 * tst-cleanup0.expect: New file.
8432
8433 * pthread_create.c (deallocate_tsd): Don't take parameter. Adjust
8434 caller. Optimize to avoid often unecessary local variable.
8435
0dc44b51
RM
84362003-04-11 Roland McGrath <roland@redhat.com>
8437
8438 * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
8439 sets variable `multidir'; include that.
8440 (generated): Add it.
8441 ($(objpfx)$(multidir)/crti.o): New target.
8442 [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
8443
84a80719
UD
84442003-04-11 Ulrich Drepper <drepper@redhat.com>
8445
8446 * tst-attr2.c (do_test): Add cast to avoid warning.
8447 * tst-mutex4.c (do_test): Likewise.
8448
88ff4759
UD
84492003-04-10 Ulrich Drepper <drepper@redhat.com>
8450
8451 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
8452 in child.
8453
b2041097
UD
84542003-04-09 Ulrich Drepper <drepper@redhat.com>
8455
8456 * Makefile (tests): Add tst-detach1.
8457 * tst-detach1.c: New file.
8458
f9657e88
UD
84592003-04-08 Ulrich Drepper <drepper@redhat.com>
8460
9afe4964
UD
8461 * sysdeps/pthread/pthread.h: Remove duplicate
8462 pthread_cleanup_{push,pop} definitions.
8463
f9657e88
UD
8464 * tst-barrier2.c: Eliminate warnings.
8465 * tst-cancel4.c: Likewise.
8466 * tst-cond4.c: Likewise.
8467 * tst-cond6.c: Likewise.
8468 * tst-detach1.c: Likewise.
8469 * tst-rwlock4.c: Likewise.
8470 * tst-rwlock6.c: Likewise.
8471 * tst-rwlock7.c: Likewise.
8472 * tst-sem3.c: Likewise.
8473 * tst-spin2.c: Likewise.
8474 * tst-umask1.c: Likewise.
8475
69b35e86
UD
84762003-04-07 Ulrich Drepper <drepper@redhat.com>
8477
8478 * pthread_detach.c (pthread_detach): Fix test for invalid TID.
8479
c70ad7d7
UD
84802003-04-06 Ulrich Drepper <drepper@redhat.com>
8481
8482 * descr.h (struct pthread): Move cancelhandling member to the front.
8483
54e0138f
UD
84842003-04-05 Ulrich Drepper <drepper@redhat.com>
8485
8486 * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
8487 malloc_parent, and malloc_child statically.
8488 (__register_atfork_malloc): New function.
8489 (free_mem): Don't free any of the malloc_* variables on the list.
8490 * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
8491 Define HAVE_register_atfork_malloc.
8492
b22d701b
UD
84932003-04-04 Ulrich Drepper <drepper@redhat.com>
8494
8495 * sysdeps/pthread/createthread.c (create_thread): Add some more
8496 comments explaining when to set multiple_threads and when not.
8497
8498 * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
8499 THREAD_ATOMIC_BIT_SET if not already defined.
8500 * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
8501 THREAD_ATOMIC_BIT_SET:
8502 * sysdeps/x86_64/tls.h: Likewise.
8503 * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
8504 THREAD_ATOMIC_CMPXCHG_VAL.
8505 (_pthread_cleanup_pop_restore): Likewise.
8506 * cancellation.c (__pthread_enable_asynccancel): Likewise.
8507 (__pthread_enable_asynccancel_2): Likewise.
8508 (__pthread_disable_asynccancel): Likewise.
8509 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
8510 (__libc_disable_asynccancel): Likewise.
8511 * init.c (sigcancel_handler): Likewise.
8512 * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
8513 * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
8514
86246935
UD
85152003-04-03 Ulrich Drepper <drepper@redhat.com>
8516
8517 * init.c (sigcancel_handler): Don't set EXITING_BIT here.
8518 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
8519 * pthreadP.h (__do_cancel): Set EXITING_BIT here.
8520 * Makefile (tests): Add tst-cancel11.
8521 * tst-cancel11.c: New file.
8522
6b4686a5
UD
85232003-04-01 Ulrich Drepper <drepper@redhat.com>
8524
8525 * pthread_create.c (deallocate_tsd): Clear/free memory after the last
8526 round, not the first. Use specific_used flag instead of local
8527 found_nonzero variable. Use THREAD_[SG]ETMEM where possible.
8528 (__free_tcb): Don't call deallocate_tsd here.
8529 (start_thread): Call deallocate_tsd here.
8530 * pthread_setspecific.c: Set specific_used flag really only when
8531 needed.
0d73a73b 8532 * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
6b4686a5 8533 * tst-tsd3.c: New file.
0d73a73b 8534 * tst-tsd4.c: New file.
6b4686a5 8535
42b2395d
UD
85362003-03-31 Ulrich Drepper <drepper@redhat.com>
8537
211d90c5
UD
8538 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
8539 Use atomic_exchange_and_add instead of __lll_add.
8540 (__lll_mutex_timedlock): Likewise.
8541 Patch by Ian Wienand.
8542
85432003-03-24 Steven Munroe <sjmunroe@us.ibm.com>
8544
8545 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
8546 (SINGLE_THREAD_P): Fix typo.
8547 * tst-cancel-wrappers.sh: Handle '.'ed symbols.
8548
85492003-03-31 Ulrich Drepper <drepper@redhat.com>
8550
8551 * Makefile (tests): Add tst-align.
8552 * tst-align.c: New file.
8553 * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
211d90c5 8554
42b2395d
UD
8555 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
8556 function correctly.
8557
211d90c5
UD
8558 * tst-tsd2.c: Add casts to avoid warnings.
8559
163b180f
UD
85602003-03-30 Ulrich Drepper <drepper@redhat.com>
8561
8562 * descr.h (struct pthread): Move most often used elements to the front.
8563
ea473bad
UD
85642003-03-29 Ulrich Drepper <drepper@redhat.com>
8565
8566 * Makefile (libpthread-routines): Add pthread_atfork.
8567 (libpthread-static-only-routines): Add pthread_atfork.
8568
dd731d53
UD
85692003-03-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
8570
8571 * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
8572 of TLS_DTV_AT_TP.
8573 (INSTALL_DTV): Add parens.
8574 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
8575 Use passed descr instead of THREAD_SELF.
8576 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
8577 (__lll_mutex_timedlock_wait): Correct expected value after
8578 spurious wakeup.
8579 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
8580 Release lock before waking up the waiters.
8581 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
8582 criteria. Reorderstruct passed to cleanup handler. Fix
8583 handling of cancellation and failung pthread_mutex_unlock call.
8584 Use __pthread_enable_asynccancel_2 instead of
8585 __pthread_enable_asynccancel.
8586 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
8587 Return result of lock re-get if it fails.
8588 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
8589 for __pthread_cleanup_push.
8590 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
8591 completely broken rwlock implementation.
8592 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8593 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
8594 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
8595 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
8596 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8597 * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value. Use
8598 versioned_symbol macro.
8599 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
8600 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
8601
c75d02f0
UD
86022003-03-27 Ulrich Drepper <drepper@redhat.com>
8603
5f5004df
UD
8604 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
8605 __timer_helper_thread. Declare __start_helper_thread, __helper_once,
8606 and __helper_tid.
8607 (struct timer): Remove th and bar field.
8608 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
8609 debugging code. Create only one helper thread.
8610 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
8611 helper thread.
8612 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
8613 Renamed. Define statically. Use thread info from siginfo.
8614 (__helper_once): New variable.
8615 (__helper_tid): New variable.
8616 (__reset_helper_control): New function.
8617 (__start_helper_thread): New function.
8618
18d009ca
UD
8619 * pthread_create.c (start_thread): Don't use setjmp inside
8620 __builtin_expect to work around gcc bug.
8621
c75d02f0
UD
8622 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
8623 timer_delete syscall fails, but not with ENOSYS, set
8624 __no_posix_timers.
8625
8626 * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
8627 (timer_settime): Fix typo.
28cf3058
UD
8628 * sysdeps/unix/sysv/linux/timer_getoverr.c
8629 [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
c75d02f0 8630
049ac259
JJ
86312003-03-27 Jakub Jelinek <jakub@redhat.com>
8632
8633 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
8634 offset of cleanupbuf.__prev.
8635
f93d39dd
JJ
86362003-03-26 Jakub Jelinek <jakub@redhat.com>
8637
8638 * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
8639 of included file.
8640
f064e4c5
UD
86412003-03-26 Ulrich Drepper <drepper@redhat.com>
8642
8643 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
8644 NULL provide default definition to syscall.
8645
83e886a3
RM
86462003-03-25 Roland McGrath <roland@redhat.com>
8647
8648 * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
8649 (timer_id2ptr): Fix typo.
8650
09402f5b
UD
86512003-03-25 Ulrich Drepper <drepper@redhat.com>
8652
8653 * pthreadP.h: Define SIGCANCEL and SIGTIMER.
8654 * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
8655 * sysdeps/ia64/pthreaddef.h: Likewise.
8656 * sysdeps/powerpc/pthreaddef.h: Likewise.
8657 * sysdeps/s390/pthreaddef.h: Likewise.
8658 * sysdeps/sh/pthreaddef.h: Likewise.
8659 * sysdeps/x86_64/pthreaddef.h: Likewise.
8660 * init.c (__pthread_initialize_minimal): Block SIGTIMER.
8661 * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
8662 being changed.
8663 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
8664 SIGTIMER is not unblocked.
8665 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
8666 RT signal taken.
8667 * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
8668 be send.
8669 * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
8670 pass pointer through as ID.
8671 * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
8672 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
8673 * sysdeps/unix/sysv/linux/timer_create.c: New file.
8674 * sysdeps/unix/sysv/linux/timer_delete.c: New file.
8675 * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
8676 * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
8677 * sysdeps/unix/sysv/linux/timer_routines.c: New file.
8678 * sysdeps/unix/sysv/linux/timer_settime.c: New file.
8679 * sysdeps/unix/sysv/linux/ia64/Versions: New file.
8680 * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
8681 * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
8682 * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
8683 * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
8684 * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
8685 * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
8686 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
8687 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
8688 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
8689 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
8690 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
8691 * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
8692 * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
8693 * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
8694 * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
8695 * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
8696 * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
8697 * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
8698 * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
8699 * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
8700 * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
8701 * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
8702 * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
8703 * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
8704
8705 * pthreadP.h: Remove FRAME_LEFT definition.
8706 * cleanup.c (_pthread_cleanup_push): Don't check for reference to
8707 already left frame. Programs which have this problem are not POSIX
8708 compliant.
8709 * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
8710
5e826ab5
UD
87112003-03-24 Ulrich Drepper <drepper@redhat.com>
8712
8713 * sysdeps/pthread/tst-timer.c: Check return values of the
8714 functions we test.
8715
b910f788
RM
87162003-03-23 Roland McGrath <roland@redhat.com>
8717
3045a1fe
RM
8718 * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
8719 * tst-tls3mod.c: Likewise.
8720 * tst-tls1.c: Likewise.
8721 * tst-tls2.c: Likewise.
8722
85047fe3
RM
8723 * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
8724 undefined behavior.
8725
b910f788
RM
8726 * tst-join5.c (tf1, tf2): Add a cast.
8727
8728 * Makeconfig (includes): Append -I$(..)nptl to this variable.
8729
8730 * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
8731 Don't test anything.
8732 * tst-cond4.c: Likewise.
8733 * tst-cond6.c: Likewise.
8734 * tst-flock2.c: Likewise.
8735 * tst-mutex4.c: Likewise.
8736 * tst-rwlock4.c: Likewise.
8737 * tst-signal1.c: Likewise.
8738 * tst-spin2.c: Likewise.
8739 * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
8740
8741 * tst-mutex4.c: Use test-skeleton.c.
8742 * tst-spin2.c: Likewise.
8743 * tst-sysconf.c: Likewise.
8744 * tst-barrier2.c: Likewise.
8745 * tst-cond4.c: Likewise.
8746 * tst-cond6.c: Likewise.
8747 * tst-rwlock4.c: Likewise.
8748 * tst-unload.c: Likewise.
8749 * tst-flock2.c (do_test): Use return instead of exit.
8750
4baa087a
RM
87512003-03-22 Jakub Jelinek <jakub@redhat.com>
8752
8753 * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
8754
5a3ab2fc
UD
87552003-03-21 Ulrich Drepper <drepper@redhat.com>
8756
9f07eae2
UD
8757 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8758 (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
8759 instead of __lll_compare_and_swap.
8760 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
8761 Likewise.
8762 Removed definition if __lll_compare_and_swap.
8763
5a3ab2fc
UD
8764 * cancellation.c: Adjust for new form of compare&exchange macros.
8765 * cleanup_defer.c: Likewise.
8766 * init.c: Likewise.
8767 * libc-cancellation.c: Likewise.
8768 * old_pthread_cond_broadcast.c: Likewise.
8769 * old_pthread_cond_signal.c: Likewise.
8770 * old_pthread_cond_timedwait.c: Likewise.
8771 * old_pthread_cond_wait.c: Likewise.
8772 * pthread_cancel.c: Likewise.
8773 * pthread_create.c: Likewise.
8774 * pthread_detach.c: Likewise.
8775 * pthread_join.c: Likewise.
8776 * pthread_key_delete.c: Likewise.
8777 * pthread_setcancelstate.c: Likewise.
8778 * pthread_setcanceltype.c: Likewise.
8779 * pthread_timedjoin.c: Likewise.
8780 * pthread_tryjoin.c: Likewise.
8781 * sysdeps/pthread/createthread.c: Likewise.
8782
b1aea098
UD
87832003-03-20 Ulrich Drepper <drepper@redhat.com>
8784
8785 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
4baa087a 8786 Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
b1aea098
UD
8787 definitions. Replace uses with calls to atomic_* functions.
8788 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
8789 * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
8790 __lll_test_and_set calls with atomic_exchange_and_add and
8791 atomic_exchange calls respectively.
8792 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
8793 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
8794 * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
8795 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
8796 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
8797 * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
8798 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
8799
8800 * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
8801 returns the old value.
8802
100a7100
RM
88032003-03-20 Martin Schwidefsky <sky@mschwid3.boeblingen.de.ibm.com>
8804
8805 * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
8806 int for variable OLDVAL and correct inline assembler contraint.
8807 * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
8808 type int for variable OLD.
8809
8810 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
8811 only for s390-32.
8812 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
8813 (SINGLE_THREAD_P): Use global variable __local_multiple_threads
8814 instead of multiple_threads field in the TCB.
8815
95767b36
UD
88162003-03-19 Ulrich Drepper <drepper@redhat.com>
8817
4009bf40
UD
8818 * sysdeps/i386/i686/bits/atomic.h: Removed.
8819 * sysdeps/i386/i586/bits/atomic.h: Removed.
8820 * sysdeps/i386/i486/bits/atomic.h: Removed. Moved to glibc.
8821 * sysdeps/x86_64/bits/atomic.h: Removed. Moved to glibc.
8822 * sysdeps/s390/bits/atomic.h: Removed. Moved to glibc.
8823 * sysdeps/sh/bits/atomic.h: Removed. Moved to glibc.
8824 * sysdeps/ia64/bits/atomic.h: Removed. Moved to glibc.
8825 * sysdeps/powerpc/bits/atomic.h: Removed. Moved to glibc.
8826 * atomic.h: Removed. Moved to glibc.
8827
560a784f
UD
8828 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
8829 support for clock selection.
8830
95767b36
UD
8831 * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
8832 signalling waiters.
8833
043ad426
RM
88342003-03-18 Roland McGrath <roland@redhat.com>
8835
94659495
RM
8836 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
8837 Add __lll_rel_instr first. Add memory clobber.
8838 (lll_mutex_unlock): Use __lll_test_and_set.
8839 From Paul Mackerras <paulus@samba.org>.
8840
8841 * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
8842 unconditionally.
8843 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
8844 (SINGLE_THREAD_P): Add `header.' prefix.
8845 From Paul Mackerras <paulus@samba.org>.
8846
043ad426
RM
8847 * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
8848 pthread_timedjoin_np to ...
8849 (libpthread: GLIBC_2.3.3): ... here.
8850 (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
8851
8852 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
8853 Avoid shadowing VAL variable.
8854
8855 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
8856 New macro.
8857
86a9ee5e
UD
88582003-03-18 Ulrich Drepper <drepper@redhat.com>
8859
ac9e0aa1
UD
8860 * Makefile (tests): Add tst-cond11.
8861 * tst-cond11.c: New file.
8862
a14b373c
UD
8863 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
8864 struct passed to cleanup handler to eliminate one more
8865 instruction.
8866 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8867
24a49f38
UD
8868 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
8869 (pthrad_cond_t): Replace __unused field with __clock.
8870
8871 * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
8872 waken all waiters in cleanup handler.
8873 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8874 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8875
86a9ee5e
UD
8876 * pthread_condattr_getclock.c: New file.
8877 * pthread_condattr_setclock.c: New file.
8878 * sysdeps/pthread/pthread.h: Declare these new functions.
8879 * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
8880 * Makefile (libpthread-routines): Add the new functions.
8881 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
8882 Renamed field to value. Document use of the bits.
8883 * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
8884 change.
8885 * pthread_condattr_setpshared.c: Likewise.
d5cb8389 8886 * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
86a9ee5e
UD
8887 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
8888 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
8889 Add __clock field.
8890 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8891 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8892 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8893 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8894 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
8895 Implement clock selection.
8896 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
8897 * pthread-errnos.sym: Add ENOSYS.
8898 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
8899 _POSIX_CLOCK_SELECTION.
8900 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
8901
8902 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
8903 invalid .size directive.
8904
98054a05
RM
89052003-03-17 Roland McGrath <roland@redhat.com>
8906
8907 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
8908 Formatting tweaks.
8909
001bea71
UD
89102003-03-17 Ulrich Drepper <drepper@redhat.com>
8911
4773086e
UD
8912 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
8913 Use __lll_add instead of spelling it out. Use protected symbol names.
8914 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
8915 Use __lll_add.
8916 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
8917 Renamed from lll_compare_and_swap. Use new name where necessary.
8918 (__lll_add): Defined.
8919 (__lll_dec_if_positive): Defined.
8920 (__lll_test_and_set): Defined.
8921 * sysdeps/ia64/pthread_spin_init.c: Removed.
8922 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
8923 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
8924 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
8925 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
8926 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
8927 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
8928 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
001bea71
UD
8929 * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
8930 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
8931 __sync_lock_release_si.
8932 Patch by Jakub Jelinek.
8933
8934 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
8935 Fix timeout handling.
8936 (__lll_timedwait_tid): Likewise.
8937 (lll_unlock_wake_cb): Wake up other waiters if necessary.
8938 Patch by Jakub Jelinek.
8939
8940 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
8941
de4471dd
RM
89422003-03-17 Roland McGrath <roland@redhat.com>
8943
8944 PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
8945 * sysdeps/pthread/pthread_spin_init.c: New file.
8946 * sysdeps/pthread/pthread_spin_unlock.c: New file.
8947 * sysdeps/powerpc/Makefile: New file.
8948 * sysdeps/powerpc/pthread_spin_lock.c: New file.
8949 * sysdeps/powerpc/pthread_spin_trylock.c: New file.
8950 * sysdeps/powerpc/pthreaddef.h: New file.
8951 * sysdeps/powerpc/tcb-offsets.sym: New file.
8952 * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
8953 * sysdeps/powerpc/tls.h: New file.
8954 * sysdeps/powerpc/bits/atomic.h: New file.
8955 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
8956 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
8957 * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
98054a05 8958
de4471dd
RM
8959 * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
8960 * sysdeps/unix/sysv/linux/sem_post.c: New file.
8961 * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
8962 * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
8963 * sysdeps/unix/sysv/linux/sem_wait.c: New file.
8964 * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
8965 * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
8966 * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
8967 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
8968 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
8969 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
8970 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
8971 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
8972 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
8973 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
8974
8975 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
8976 not gettimeofday.
8977 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
8978 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
8979 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
8980 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
8981 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8982
5778033f
UD
89832003-03-17 Ulrich Drepper <drepper@redhat.com>
8984
8985 * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
8986 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
8987 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8988 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8989 Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
8990
796038f8
RM
89912003-03-16 Roland McGrath <roland@redhat.com>
8992
8993 * tst-fork4.c: Include <string.h>.
8994 * tst-signal2.c: Likewise.
8995 * tst-mutex5.c (do_test): exit -> return.
8996 * tst-mutex2.c: Include <stdlib.h>.
8997
51d0678c
UD
89982003-03-16 Ulrich Drepper <drepper@redhat.com>
8999
5778033f
UD
9000 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
9001 (__lll_mutex_timedlock_wait): Correct expected value after
9002 spurious wakeup. Otherwise we would never wait again.
9003
b6e2f87a
UD
9004 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
9005 zone versus inline asm stupidity. Use correct instructions.
9006
51d0678c
UD
9007 * tst-rwlock6.c: Add some more status output.
9008
8112cc70
RM
90092003-03-15 Roland McGrath <roland@redhat.com>
9010
9011 * sysdeps/pthread/configure.in: New file.
9012 * sysdeps/pthread/configure: New file (generated).
9013
49773c19
UD
90142003-03-15 Ulrich Drepper <drepper@redhat.com>
9015
9016 * allocatestack.c (allocate_stack): Store the exact stack size of
9017 user allocated stacks.
9018
eec0ca9f
JJ
90192003-03-15 Jakub Jelinek <jakub@redhat.com>
9020
9021 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
9022 (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
9023 * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
9024 * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
9025 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
9026 Use `header.' prefix.
9027 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
9028
a87731e2
UD
90292003-03-15 Ulrich Drepper <drepper@redhat.com>
9030
9031 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
9032 __builtin_frame_address, use stack pointer.
9033
9034 * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
9035 instead of __builtin_frame_pointer.
9036
e22a221d
UD
90372003-03-14 Ulrich Drepper <drepper@redhat.com>
9038
92ed3daf
UD
9039 * tst-basic1.c (do_test): Add cast to avoid warning.
9040 * tst-basic2.c (do_test): Likewise.
9041
9b89567d
UD
9042 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
9043 amount of stack correction.
9044
e22a221d
UD
9045 * tst-fork4.c: Use test-skeleton.c.
9046
2e49caba
RM
90472003-03-14 Roland McGrath <roland@redhat.com>
9048
9049 * init.c: Fix typo "#eli" for "#else".
9050
415ef7d8
RM
90512003-03-14 Steven Munroe <sjmunroe@us.ibm.com>
9052
9053 * allocatestack.c (__stack_user): Use hidden_data_def.
9054 * pthread_create.c (__pthread_keys): Likewise.
9055
9056 * init.c [__powerpc__] (__NR_set_tid_address): Define it.
9057
52287505
RM
90582003-03-14 Roland McGrath <roland@redhat.com>
9059
415ef7d8
RM
9060 * tst-fork4.c: New file.
9061 * Makefile (tests): Add it.
9062
52287505
RM
9063 * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
9064 we always define the padding space.
9065 [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
9066 stopped supporting its own extensions fully.
9067 [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
9068 struct also called `header', so `header.multiple_threads' is the field
9069 name to use on all machines.
9070 * allocatestack.c (allocate_stack): Use `header.' prefix.
9071 * sysdeps/pthread/createthread.c (create_thread): Likewise.
9072 * pthread_create.c (__pthread_create_2_1): Likewise.
9073 * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
9074 (THREAD_SELF): Likewise.
9075 * sysdeps/x86_64/tls.h: Likewise.
9076 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
9077 (SINGLE_THREAD_P): Likewise.
9078 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
9079 (SINGLE_THREAD_P): Likewise.
9080 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
9081 (SINGLE_THREAD_P): Likewise.
9082
9083 * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
9084 value directly.
9085
c44bf9aa
UD
90862003-03-14 Ulrich Drepper <drepper@redhat.com>
9087
e22a221d
UD
9088 * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
9089 * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
9090
0eb18281
UD
9091 * pthread_create.c (start_thread): setjmp is expected to return 0.
9092
c44bf9aa
UD
9093 * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
9094 (THREAD_GETMEM_NC): Likewise.
9095
564cd8b6
UD
90962003-03-13 Ulrich Drepper <drepper@redhat.com>
9097
9098 * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
9099 and the size of the stack which must be allocated is a multiple,
9100 allocate one more page.
9101 * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
9102 MULTI_PAGE_ALIASING.
9103
6461e577
RM
91042003-03-13 Roland McGrath <roland@redhat.com>
9105
9106 * pthread_create.c (start_thread): Set EXITING_BIT after the
9107 event-reporting (and destructors), not before.
9108
b5ec5617
UD
91092003-03-13 Jakub Jelinek <jakub@redhat.com>
9110
6461e577
RM
9111 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
9112 lll_futex_wake): Declare register variables as long int instead of
9113 unsigned long int. Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
9114 Make syscall arguments clobbered by the syscall.
9115 (lll_futex_wait): Define using lll_futex_timed_wait.
9116
9117 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
9118 to void *.
9119
9120 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
9121 PPID if [! NDEBUG].
9122
9123 * allocatestack.c (nptl_ncreated): Only declare if
9124 COLORING_INCREMENT != 0.
9125
9126 * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
9127 (__libc_enable_asynccancel_2): Remove prototype.
9128
b5ec5617
UD
9129 * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
9130 ctid to match kernel.
9131
d0369fb8
UD
91322003-03-12 Ulrich Drepper <drepper@redhat.com>
9133
7588880f
UD
9134 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
9135 libc_multiple_threads.
9136 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
9137 __libc_multiple_threads to...
9138 * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here. New file.
9139
9140 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
9141 versioning.
9142 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
9143 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
9144
9145 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
9146 (__pthread_once_internal): Define.
9147
9148 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
9149 macros instead of .symver directly.
9150 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
9151 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
9152
d0369fb8
UD
9153 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
9154 * sysdeps/x86_64/tcb-offsets.sym: New file.
9155 * sysdeps/x86_64/Makefile: New file.
9156
9157 * sysdeps/i386/tcb-offsets.sym: Add SELF.
9158 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
9159 to access own pthread_t in TCB.
9160 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9161 Likewise.
9162 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9163 Likewise.
9164 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
9165
0bb2ac85
RM
91662003-03-12 Roland McGrath <roland@redhat.com>
9167
9168 * pthread-errnos.sym: New file.
9169 * Makefile (gen-as-const-headers): New variable, list that file.
9170 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
9171 header <pthread-errnos.h> instead of defining errno values here.
9172 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
9173 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
9174 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
9175 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
9176 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9177 Likewise.
9178 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9179 Likewise.
9180 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
9181 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9182 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
9183 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
9184 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
9185 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
9186 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
9187 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
9188 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9189 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
9190 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
9191 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
9192 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
9193 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
9194 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
9195 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9196 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
9197 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
9198 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
9199 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
9200 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
9201 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
9202 * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
9203 * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
9204 * sysdeps/sh/pthread_spin_trylock.S: Likewise.
9205 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
9206 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
9207
9208 * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
9209 CLONE_CHILD_SETTID worked.
9210
35e148cb
UD
92112003-03-12 Ulrich Drepper <drepper@redhat.com>
9212
d0369fb8
UD
9213 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
9214 file.
9215 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
9216 file.
9217
9218 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
9219 (pthread_cond_t): Add padding.
9220
da49194d
UD
9221 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
9222 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
9223 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
9224
35e148cb
UD
9225 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
9226 (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
9227 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
9228 (__pthread_rwlock_timedrdlock): Likewise.
9229 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
9230 (__pthread_rwlock_wrlock): Likewise.
9231 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
9232 (__pthread_rwlock_rdlock): Likewise.
9233
9234 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
9235
9236 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
9237 result of lock re-get if it fails.
9238
3e976b96
UD
92392003-03-11 Ulrich Drepper <drepper@redhat.com>
9240
5a03acfe
UD
9241 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
9242 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
9243 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
9244 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
9245 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9246 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
9247 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
9248 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
9249 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
9250 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
9251
9252 * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
9253 THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
9254
9255 * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
9256 Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
9257 * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
9258 (create_thread): Likewise.
9259 Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
9260 * init.c (__pthread_initialize_minimal_internal): Initialize
9261 __libc_multiple_threads_ptr if necessary.
9262 * pthreadP.h: Adjust prototype for __libc_pthread_init. Declare
9263 __pthread_multiple_threads and __libc_multiple_threads_ptr.
9264 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
9265 __libc_multiple_threads.
9266 (__libc_pthread_init): Return pointer to __libc_pthread_init if
9267 necessary.
9268
9269 * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
9270 (THREAD_SETMEM_NC): Likewise.
9271
9272 * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
9273 * sysdeps/x86_64/pthread_spin_trylock.S: New file.
9274 * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
9275 * sysdeps/x86_64/pthread_spin_unlock.S: New file.
9276
9277 * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
9278 Eliminate one entire instruction.
9279
32a589b1
UD
9280 * cancellation.c (__pthread_enable_asynccancel_2): New function.
9281 * pthreadP.h: Declare __pthread_enable_asynccancel_2.
9282 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
9283 (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
9284 instead of __pthread_enable_asynccancel.
9285 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
9286 (__pthread_cond_wait): Likewise.
9287 * sysdeps/pthread/pthread_cond_timedwait.c
9288 (__pthread_cond_timedwait): Likewise.
9289 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
9290
3e976b96
UD
9291 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
9292 (__condvar_cleanup): Wake up all waiters in case we got signaled
9293 after being woken up but before disabling asynchronous
9294 cancellation.
9295 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
9296 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
9297 (__condvar_cleanup): Likewise.
9298
9299 * init.c (__NR_set_tid_address): If already defined, don't redefine.
9300 Make it an error if architecture has no #if case. Add x86-64.
9301
9302 * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
9303 pt-initfini.s generation.
9304
9305 * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
9306 (TLS_INIT_TP): Fix typo.
9307
6c477888
UD
93082003-03-11 Jakub Jelinek <jakub@redhat.com>
9309
9310 * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
9311 3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
9312
9313 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
9314 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
9315 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
9316 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
9317 * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
9318 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
9319 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
9320 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
9321
ea694823
UD
93222003-03-11 Ulrich Drepper <drepper@redhat.com>
9323
6c477888
UD
9324 * sysdeps/pthread/pthread_cond_timedwait.c
9325 (__pthread_cond_timedwait): Return the result of the final
9326 locking. If it succeeds, the regular function return value.
9327
9328 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
9329 Return result of the final locking.
9330 * version.c (__nptl_main): Work around problems with the strange
9331 INTERNAL_SYSCALL macro on ppc32.
9332 * init.c (__pthread_initialize_minimal_internal): Unblock
9333 SIGCANCEL in case the parent blocked it.
9334 Reported by Paul Mackerras <paulus@samba.org>.
9335
ea694823
UD
9336 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
9337 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
9338 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
9339
b33e6163
RM
93402003-03-11 Jakub Jelinek <jakub@redhat.com>
9341
9342 * sysdeps/pthread/pthread_cond_timedwait.c
9343 (__pthread_cond_timedwait): Unlock and fail if
9344 __pthread_mutex_unlock_internal failed.
9345
9346 * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
9347 (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
9348 Use ARCH_CLONE.
9349 * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
9350 [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
9351 STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
9352 ALLOCATE_STACK): New macros.
9353 (TLS_TPADJ): New macro.
9354 (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
9355 (allocate_stack): Handle TLS_DTV_AT_TP and
9356 NEED_SEPARATE_REGISTER_STACK. Use TLS_TPADJ.
9357 * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
9358 Don't set PD->self.
9359 * init.c [__ia64__] (__NR_set_tid_address): Define.
9360
9361 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
9362 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
9363 * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
9364 * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
9365 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
9366 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
9367 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
9368 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
9369 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
9370 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
9371 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
9372 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
9373 * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
9374 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
9375 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
9376 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
9377 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
9378 * sysdeps/ia64/bits/atomic.h: New file.
9379 * sysdeps/ia64/Makefile: New file.
9380 * sysdeps/ia64/pthread_spin_init.c: New file.
9381 * sysdeps/ia64/pthread_spin_lock.c: New file.
9382 * sysdeps/ia64/pthread_spin_trylock.c: New file.
9383 * sysdeps/ia64/pthread_spin_unlock.c: New file.
9384 * sysdeps/ia64/pthreaddef.h: New file.
9385 * sysdeps/ia64/tcb-offsets.sym: New file.
9386 * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
9387 * sysdeps/ia64/tls.h: New file.
9388
9389 * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
9390 to syscall instead of no arguments.
9391
2b30b2e5
UD
93922003-03-10 Ulrich Drepper <drepper@redhat.com>
9393
db5f2fc9
UD
9394 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
9395 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
9396 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
9397 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
9398
9399 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
9400 unused code.
9401
6a4263e3
UD
9402 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
9403
3de7c2a9
UD
9404 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
9405 lowlevelbarrier.sym.
9406 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
9407 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
9408 Include lowlevelbarrier.h and don't define offsets locally.
6a4263e3 9409 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
3de7c2a9 9410
2a544d82
UD
9411 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
9412 (__lll_mutex_lock_wait): Reverse order of first two parameters.
9413 (__lll_mutex_timedlock_wait): Likewise.
9414 (lll_mutex_lock): Adjust asm for that.
9415 (lll_mutex_timedlock): Likewise. Mark cx, cc, r10 as clobbered.
9416 (lll_lock): Adjust asm for operand order change.
9417 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
9418 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
9419
ec06436c
UD
9420 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
9421 Reverse order of parameters.
9422 (__lll_timedwait_tid): Remove regparms attribute.
9423 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
9424 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
9425
3273832c
UD
9426 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
9427 (__lll_timedwait_tid): Remove one unnecessary instruction.
9428
51f32ab8
UD
9429 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
9430 __lll_mutex_timedlock_wait only for NOT_IN_libc.
9431 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
9432 lowlevelmutex.S.
9433
9434 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
9435 lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
9436 for NOT_IN_libc.
9437 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
9438 lowlevellock.S.
9439
fad48d9e
UD
9440 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
9441 LOCK is already defined. Don't define __lll_mutex_timedlock_wait
9442 for libc.so.
9443 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
9444 define LOCK here (if UP is not defined). The actual code is in
9445 lowlevelmutex.S.
9446
9356d063
UD
9447 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
9448 LOCK is already defined. Don't define lll_unlock_wake_cb and
9449 __lll_timedwait_tid for libc.so.
9450 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
9451 define LOCK here (if UP is not defined). The actual code is in
9452 lowlevellock.S.
9453
ebf0cbc5 9454 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
106f6f9d
UD
9455 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
9456 * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
9457 instead of lowlevelsem.h.
9458 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
9459 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
9460 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
0be8ee21 9461
c915e5ad
UD
9462 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
9463 lowlevelrwlock.sym.
9464 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
9465 * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
146fa1ee 9466 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
c915e5ad 9467
4c3c2e8a
UD
9468 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
9469 register loading.
9470 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
9471 last changed. D'oh.
9472
2b30b2e5
UD
9473 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
9474
9475 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
9476 of __libc_locking_needed.
9477 (lll_trylock): Initialize %eax to zero.
9478
2b30b2e5
UD
9479 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
9480 pthread_cond_t definition.
9481
e48f9638
RM
94822003-03-10 Roland McGrath <roland@redhat.com>
9483
9484 * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
9485 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
9486 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
9487 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
9488 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
9489
9490 * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
9491 Instead of setting PD->multiple_threads, set globals
9492 __pthread_multiple_threads and __libc_multiple_threads.
9493 * sysdeps/pthread/createthread.c (create_thread): Likewise.
9494 * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
9495 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
9496
9497 * descr.h (struct pthread): Conditionalize first member on
9498 [!TLS_DTV_AT_TP]. Replace the `header' member with an anonymous union
9499 containing an anonymous tcbhead_t. Move `list' member out.
9500 [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
9501 * allocatestack.c: Remove use of `header.data.' prefix.
9502 * pthread_create.c: Likewise.
9503 * init.c (__pthread_initialize_minimal_internal): Likewise.
9504 * sysdeps/pthread/createthread.c (create_thread): Likewise.
9505 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
9506 (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
9507 * sysdeps/x86_64/tls.h: Likewise.
9508 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
9509 (SINGLE_THREAD_P): Likewise.
9510 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
9511 (SINGLE_THREAD_P): Likewise.
9512 * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
9513 * sysdeps/s390/tls.h (tcbhead_t): Likewise.
9514
c37cae9e
UD
95152003-03-09 Ulrich Drepper <drepper@redhat.com>
9516
d38c777e
RM
9517 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
9518
7b44a5e0 9519 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
2b30b2e5 9520 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
7b44a5e0 9521
c2e5e085
UD
9522 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
9523 leftovers from the ia32 code.
9524
9525 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
9526 memory load.
9527 (clear_once_control): Don't load %esi.
9528
9529 * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
9530 handling.
9531
9532 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
9533
cd4b2a55
UD
9534 * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
9535 * sysdeps/unix/sysv/linux/createthread.c: ...here.
9536
c37cae9e
UD
9537 * Makefile (tests): Add tst-cond10.
9538 * tst-cond10.c: New file.
9539
d130a341
UD
95402003-03-08 Ulrich Drepper <drepper@redhat.com>
9541
ccf1d573
UD
9542 * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
9543 * tst-signal3.c (do_test): Likewise.
9544 * tst-sem5.c (do_test): Likewise.
9545 * tst-kill6.c (do_test): Likewise.
9546 * tst-tls3.c (do_test): Likewise. Include <errno.h>.
9547
9548 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
9549 of inc/dec.
9550 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
9551 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
9552 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
9553 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
9554 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
9555 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
9556 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9557 Likewise.
9558 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9559 Likewise.
9560 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
9561 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9562 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9563 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
9564 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
9565 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
9566 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
9567 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
9568
d130a341
UD
9569 * allocatestack.c (allocate_stack): If mprotect() fails free the
9570 TLS memory.
9571
bc6389ad
UD
95722003-03-07 Ulrich Drepper <drepper@redhat.com>
9573
41d4d223
UD
9574 * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
9575
9576 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
9577 lll_wake_tid. This was used only to work around kernel limits in
9578 the early days.
9579 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
9580 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
9581 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
9582 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
9583
bc6389ad
UD
9584 * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
9585 (__pthread_initialize_minimal_internal): Change initialization of
9586 __static_tls_align_m1 appropriately.
9587 * pthreadP.h (__static_tls_align_m1): Renamed from
9588 __static_tls_align.
9589 * allocatestack.c (allocate_stack): Use __static_tls_align_m1
9590 instead of __static_tls_align-1.
9591
cc775edf
UD
95922003-03-04 Ulrich Drepper <drepper@redhat.com>
9593
0de28d5c 9594 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
6245b6ae 9595
518b5308
UD
9596 * pthread_create.c: Define __pthread_keys using nocommon
9597 attribute, not by placing it explicitly in bss.
9598 Remove DEFINE_DEALLOC definition. Not needed anymore.
9599
9600 * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
9601 Use it in mmap call to allocate stacks.
9602
9603 * sysdeps/pthread/createthread.c (create_thread): Fix comment.
9604
cc775edf
UD
9605 * pthread_create.c (start_thread): Use THREAD_SETMEM to store
9606 result of the thread function.
9607
4f6f0a8f
UD
96082003-03-03 Ulrich Drepper <drepper@redhat.com>
9609
f04a2721
UD
9610 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed. The generic
9611 version is just fine.
9612
4f6f0a8f
UD
9613 * sysdeps/unix/sysv/linux/libc_pthread_init.c
9614 (__pthread_child_handler): Renamed from pthread_child_handler,
9615 exported, and marked hidden. Change all users.
9616 * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
9617 free __pthread_child_handler from child list.
9618
7ce5c164
UD
96192003-03-03 Martin Schwidefsky <schwidefsky@de.ibm.com>
9620
9621 * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
9622
9623 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
9624 Fix handling of cancellation and failing pthread_mutex_unlock call.
9625 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
9626 (__pthread_cond_wait): Likewise.
9627
9628 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
9629 (pthread_rwlock_timedrdlock): Fix clobber of result variable by
9630 lll_futex_timed_wait call.
9631 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
9632 (pthread_rwlock_timedwrlock): Likewise.
9633
9634 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
9635 Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
9636 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
9637
9638 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
9639 check of lll_futex_wake return value.
9640
ea6a015b
RM
96412003-03-03 Roland McGrath <roland@redhat.com>
9642
9643 * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
9644
9645 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
9646 Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
9647 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
9648
4adacf57
UD
96492003-03-02 Ulrich Drepper <drepper@redhat.com>
9650
1be3d664
UD
9651 * sysdeps/pthread/timer_create.c (timer_create): Return correct
9652 error for CPU clocks.
9653
885bafa1
UD
9654 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
9655 _POSIX_MONOTONIC_CLOCK.
9656 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
9657
4adacf57
UD
9658 * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
9659 recent kernels.
9660
86bfff4d
UD
96612003-03-01 Ulrich Drepper <drepper@redhat.com>
9662
9663 * descr.h (struct pthread): Move cleanup field to the front.
9664
d1149385
RM
96652003-03-01 Roland McGrath <roland@redhat.com>
9666
9667 * sem_open.c (sem_open): Braino fix.
9668
bd8bb78b
UD
96692003-03-01 Ulrich Drepper <drepper@redhat.com>
9670
748bec08
UD
9671 * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
9672 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
9673 __pthread_cleanup_pop functionality.
9674 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9675
bd8bb78b
UD
9676 * descr.h (struct pthread): Move tid field to the front now that
9677 it is often used.
9678
9679 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
9680 (__lll_mutex_timedlock_wait): Remove.
9681 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
9682 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
9683 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
9684 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
9685 (lll_unlock_wake_cb): Don't save and restore %esi.
9686 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
9687 %esi.
9688 (__lll_timedwait_tid): Add alignment.
9689 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
9690 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
9691 %esi.
9692 (__lll_timedwait_tid): Removed.
9693 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
9694 (__pthread_cond_broadcast): Don't save, load, and restore %esi.
9695 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
9696 (pthread_barrier_wait): Don't save, load, and restore %esi for
9697 last thread.
9698 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
9699 (__pthread_cond_signal): Don't save, load, and restore %esi.
9700 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
9701 (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
9702 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
9703 Don't save, load, and restore %esi.
9704
d2637c70
UD
97052003-02-27 Ulrich Drepper <drepper@redhat.com>
9706
567fb22a
UD
9707 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
9708 Release lock before waking up the waiters.
9709
427f5fa1
UD
9710 * tst-exit1.c (do_test): Don't start more than one thread in parallel.
9711
a2d83cfb
UD
9712 * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
9713 (reader_thread): Likewise.
9714
d2637c70
UD
9715 * sysdeps/pthread/pthread_rwlock_unlock.c
9716 (__pthread_rwlock_unlock): Release internal lock early. Don't try
9717 to wake up readers if there are none.
9718
9719 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
9720 Release internal lock before wake threads.
9721
b1531183
UD
97222003-02-26 Ulrich Drepper <drepper@redhat.com>
9723
dbf6131c
UD
9724 * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
9725 * tst-rwlock8.c: Initialize lock with INIT. Allow INIT to be
9726 predefined.
9727 * tst-rwlock9.c: Likewise.
9728 * tst-rwlock10.c: New file.
9729 * tst-rwlock11.c: New file.
9730
695799fe
UD
9731 * Makefile (tests): Add tst-dlsym1.
9732 * tst-dlsym1.c: New file.
9733
b1531183
UD
9734 * init.c (__pthread_initialize_minimal_internal): Set
9735 GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
9736 * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
9737
3724f268
UD
97382003-02-24 Ulrich Drepper <drepper@redhat.com>
9739
3857ca78
UD
9740 * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
9741
80d80779
UD
9742 * tst-cond2.c: Fix sychronization with child.
9743
86371308
UD
9744 * tst-rwlock8.c (reader_thread): Remove unused variable.
9745
ffeb4481
UD
9746 * Makefile: Add rules to build and run tst-tls3.
9747 * tst-tls3.c: New file.
9748 * tst-tls3mod.c: New file.
9749
3724f268
UD
9750 * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
9751 * tst-rwlock8.c: New file.
9752 * tst-rwlock9.c: New file.
9753 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
9754 complete broken rwlock implementation.
9755 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9756 Likewise.
9757 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9758 Likewise.
9759 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
9760 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
18a53579
UD
9761 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
9762 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
9763 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
9764 * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
9765 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
3724f268 9766
8915cc40
RM
97672003-02-23 Roland McGrath <roland@redhat.com>
9768
9769 * Makefile (nptl-version): Change regexp so case sensitivity is ok.
9770
fd1a0d0c
UD
97712003-02-23 Ulrich Drepper <drepper@redhat.com>
9772
ecf28959
UD
9773 * Makefile (tests): Add tst-context1.
9774 * tst-context1.c: New file.
9775
5e47b76b
UD
9776 * Makefile (tests): Add tst-tls1 and tst-tls2.
9777 * tst-tls1.c: New file.
9778 * tst-tls2.c: New file.
9779
5a6bbb41
UD
9780 * libc-cancellation.c (__libc_enable_asynccancel): Correct test
9781 for failed cmpxchg.
9782
fd1a0d0c
UD
9783 * pthread_create.c (start_thread): Set EXITING_BIT early.
9784
9785 * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
9786 (THREAD_GETMEM_NC): Likewise.
9787
757f9fcb
UD
97882003-02-22 Ulrich Drepper <drepper@redhat.com>
9789
b1b8e747
UD
9790 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
9791 off 3 more bytes by using offset-less instructions when possible.
9792
c780aa21 9793 * Makefile: Add dependency for $(objpfx)version.d.
757f9fcb
UD
9794
9795 * eintr.c (eintr_source): Add unnecessary return but the compiler
9796 insists.
9797
9798 * tst-kill3.c: Include <unistd.h>.
9799
5148559c
RM
98002003-02-21 Roland McGrath <roland@redhat.com>
9801
9802 * pthread_create.c (start_thread): Call __libc_thread_freeres.
9803
ab2d98e3
UD
98042003-02-21 Ulrich Drepper <drepper@redhat.com>
9805
71028edd
UD
9806 * Makefile (tests): Add tst-eintr1.
9807 (distribute): Add eintr.c.
9808 * tst-eintr1.c: New file.
9809 * eintr.c: New file.
9810
e814f748
UD
9811 * pthread_cancel.c (pthread_cancel): Use tkill directly.
9812
9813 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
9814 Disallow sending SIGCANCEL.
9815
ab2d98e3 9816 * Makefile (tests): Remove tst-basic7. Add tst-kill1, tst-kill2,
9c03686d 9817 tst-kill3, tst-kill4, tst-kill5, tst-kill6.
e814f748
UD
9818 * tst-kill1.c: New file.
9819 * tst-kill2.c: New file.
9820 * tst-kill3.c: New file.
9821 * tst-kill5.c: New file.
9c03686d 9822 * tst-kill6.c: New file.
e814f748
UD
9823 * tst-basic7.c: Renamed to...
9824 * tst-kill4.c: ...this.
ab2d98e3 9825
59fed0e2
RM
98262003-02-21 Roland McGrath <roland@redhat.com>
9827
9828 * Makefile (install-lib-ldscripts): New variable.
9829
49dc759f
UD
98302003-02-21 Ulrich Drepper <drepper@redhat.com>
9831
8c2e9a29
UD
9832 * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
9833 * pthread_cancel.c: Use INVALID_TD_P.
9834 * pthread_detach.c: Likewise.
9835 * pthread_getschedparam.c: Likewise.
9836 * pthread_setschedparam.c: Likewise.
9837 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
9838 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
9839 * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
9840 * pthread_timedjoin.c: Likewise.
9841
9842 * tst-basic7.c: Include <signal.h>.
9843
49dc759f
UD
9844 * pthread_join.c (pthread_join): Limited checking for invalid
9845 descriptors.
9846 * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
9847
df5803bf
UD
98482003-02-20 Ulrich Drepper <drepper@redhat.com>
9849
c5acd3d7
UD
9850 * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
9851 beginning of the loop. Clear the entire first block of TSD.
df5803bf
UD
9852 * Makefile (tests): Add tst-key4.
9853 * tst-key4.c: New file.
9854
729924a0
UD
98552003-02-18 Ulrich Drepper <drepper@redhat.com>
9856
2f7dc594
UD
9857 * Makefile (tests): Add tst-basic7.
9858 * tst-basic7.c: New file.
9859
ba25bb0f
UD
9860 * pthread_create.c (deallocate_tsd): Mark as internal_function.
9861 Add some more __builtin_expect.
9862
12fd3c5f 9863 * pthreadP.h: Define dummy version of DEBUGGING_P.
729924a0 9864
5430d926
UD
98652003-02-17 Ulrich Drepper <drepper@redhat.com>
9866
b0db7fbe
UD
9867 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
9868 _POSIX_THREAD_PRIORITY_SCHEDULING.
9869 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
9870 _XOPEN_REALTIME_THREADS.
9871 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
9872
9873 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
9874 kernel returns EINVAL for PID <= 0, work around it.
9875
ecfda9bd
UD
9876 * Makefile (tests): Add tst-signal5.
9877 * tst-signal5.c: New file.
9878
7d78ab99
UD
9879 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
9880 and LOGIN_NAME_MAX.
9881
371a2972
UD
9882 * tst-cancel1.c (tf): Block all signals.
9883
5430d926
UD
9884 * Makefile (tests): Add tst-basic6.
9885 * tst-basic6.c: New file.
9886
9887 * tst-basic1.c: Add test for process ID.
9888
9889 * Makefile (tests): Add tst-cancel10.
9890 * tst-cancel10.c: New file.
9891
9892 * Makefile (tests): Add tst-signal4.
9893 * tst-signal4.c: New file.
9894
9895 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
9896 __sigismember instead of sigismember. Add __builtin_expect.
9897
1564916a
UD
98982003-02-16 Ulrich Drepper <drepper@redhat.com>
9899
179ff175
UD
9900 * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
9901 pthread_setcancelstate, and pthread_rwlock_setpshared.
9902
e4335f9a
UD
9903 * tst-cancel7.c (do_test): Make sure the pid file exists before
9904 canceling the thread.
9905
0a37669a
UD
9906 * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
9907 pthread_rwlock_timedrdlock tests.
9908 * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
9909 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9910 Check for invalid tv_nsec field.
9911 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9912 Likewise.
9913
9914 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
9915 recursive mutex of overflow.
9916
9917 * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
9918
e4335f9a 9919 * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
1564916a
UD
9920 going into an endless loop.
9921 * Makefile (tests): Add tst-cancel9.
9922 * tst-cancel9.c: New file.
9923
9924 * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
9925
b270b548
UD
99262003-02-15 Ulrich Drepper <drepper@redhat.com>
9927
1c82b97f
UD
9928 * tst-mutex5.c (do_test): Add more timedlock tests.
9929
b2f05465 9930 * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
c3bb9ee1
UD
9931 * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
9932
e798b60f
UD
9933 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
9934 use INLINE_SYSCALL. Error number is returned, not -1.
9935
90491dc4
UD
9936 * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
9937 and __deallocate_stack with internal_function.
9938 * pthread_create.c: Adjust definitions appropriately.
9939 * allocatestack.c: Likewise.
9940
9941 * pthread_join.c: Add one more __builtin_expect.
9942 * pthread_timedjoin.c: Likewise.
9943
9944 * pthread_getspecific.c (__pthread_getspecific): Clear data->data
9945 not data of sequence number does not match.
9946 Add one __builtin_expect.
9947
c6247c9d
UD
9948 * Makefile (tests): Add tst-clock1.
9949 * tst-clock1.c: New file.
9950
b270b548
UD
9951 * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
9952 negative arguments.
9953 * Makefile (tests): Add tst-basic5.
9954 * tst-basic5.c: New file.
9955
700bf7af
UD
99562003-02-14 Ulrich Drepper <drepper@redhat.com>
9957
757de559
UD
9958 * Makefile (tests): Add tst-basic4.
9959 * tst-basic4.c: New file.
9960
47202270
UD
9961 * pthreadP.h: Add declaraction for __nptl_nthreads.
9962 * pthread_create.c: Define __nptl_nthreads
9963 (start_thread): Increment __nptl_nthreads at beginning. Decrement
b270b548 9964 after thread is done. If then zero, call exit(0).
47202270
UD
9965 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
9966 Add ptr_nthreads. Define HAVE_PTR_NTHREADS.
9967 * init.c (pthread_functions): Initialize ptr_nthreads.
9968 * allocatestack.c (nptl_nthreads): Remove definition and all uses.
9969 (__reclaim_stacks): Decrement __nptl_nthreads.
9970 * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
9971 Define.
9972 * Makefile (tests): Add tst-basic3.
9973 * tst-basic3.c: New file.
9974
e320ef46
UD
9975 * descr.h: Define CANCELING_BIT and CANCELING_BITMASK. Introduce
9976 after CANCELTYPE_BIT, move the other bits up. Update CANCEL_RESTMASK.
9977 * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
9978 * pthread_cancel.c (pthread_cancel): Likewise. Also set CANCELING_BIT
9979 if asynchronous canceling is enabled.
9980 * pthread_join.c (pthread_join): When recognizing circular joins,
9981 take into account the other thread might be already canceled.
9982 * Makefile (tests): Add tst-join5.
9983 * tst-join5.c: New file.
9984
700bf7af
UD
9985 * Makefile (tests): Add tst-join4.
9986 * tst-join4.c: New file.
9987
99882003-02-13 Ulrich Drepper <drepper@redhat.com>
9989
9990 * tst-cond4.c (main): Add test of pthread_attr_getpshared.
9991
dac0f772
UD
99922003-02-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
9993
9994 * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
9995 THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
9996 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
9997 warning.
9998 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
9999 to avoid warning.
10000 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
10001 error if lll_futex_wake failed.
10002
e8cda341
UD
100032003-02-13 Ulrich Drepper <drepper@redhat.com>
10004
a7720b5e
UD
10005 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
10006 handling of cancellation and failung pthread_mutex_unlock call.
10007 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10008 * Makefile (tests): Add tst-cond8 and tst-cond9.
10009 * tst-cond8.c: New file.
10010 * tst-cond9.c: New file.
10011
a1ea4c06
UD
10012 * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
10013
10014 * sysdeps/pthread/pthread.h: Add missing initializers. Protect
10015 non-standard initializers with __USE_GNU.
10016
e8cda341
UD
10017 * Makefile (tests): Add tst-cleanup3.
10018 * tst-cleanup3.c: New file.
10019
2067577c
UD
100202003-02-12 Ulrich Drepper <drepper@redhat.com>
10021
89e78a95
UD
10022 * Makefile (tests): Add tst-attr1 and tst-attr2.
10023 * tst-attr1.c: New file.
10024 * tst-attr2.c: New file.
10025
dfdd294a
UD
10026 * Makefile: Add rules to build and run tst-atfork2 test.
10027 * tst-atfork2.c: New file.
10028 * tst-atfork2mod.c: New file.
10029
10030 * sysdeps/unix/sysv/linux/unregister-atfork.c
10031 (__unregister_atfork): Free the memory allocated for the handlers
10032 after removing them from the lists.
10033
10034 * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
10035 cleanup function.
10036
10037 * tst-atfork1.c (do_test): Wait for the child we forked.
10038 Report error in child.
10039
10040 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
10041
2067577c
UD
10042 * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
10043
2a8a8a84
UD
100442003-02-10 Ulrich Drepper <drepper@redhat.com>
10045
d9dd121e
UD
10046 * Makefile (tests): Add tst-cancel8.
10047 * tst-cancel8.c: New file.
10048
2a8a8a84
UD
10049 * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
10050 clearing of control variable.
defd1870 10051 * Makefile (tests): Add tst-once3 and tst-once4.
2a8a8a84 10052 * tst-once3.c: New file.
defd1870 10053 * tst-once4.c: New file.
2a8a8a84 10054
a54e8d33
UD
100552003-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
10056
10057 * sysdeps/sh/Makefile: New file.
10058 * sysdeps/sh/bits/atomic.h: New file.
10059 * sysdeps/sh/pthread_spin_init.c: New file.
10060 * sysdeps/sh/pthread_spin_lock.c: New file.
10061 * sysdeps/sh/pthread_spin_trylock.S: New file.
10062 * sysdeps/sh/pthread_spin_unlock.S: New file.
10063 * sysdeps/sh/pthreaddef.h: New file.
10064 * sysdeps/sh/tcb-offsets.sym: New file.
10065 * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
10066 * sysdeps/sh/tls.h: New file.
10067 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
10068 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
10069 * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
10070 * sysdeps/unix/sysv/linux/sh/fork.c: New file.
10071 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
10072 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
10073 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
10074 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
10075 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
10076 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
10077 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
10078 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
10079 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
10080 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
10081 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
10082 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
10083 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
10084 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
10085 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
10086 * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
10087 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
10088 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
10089 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
10090 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
10091 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
10092 * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
10093 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
10094 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
10095 * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
10096 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
10097
696e556e
UD
100982003-02-08 Ulrich Drepper <drepper@redhat.com>
10099
10100 * tst-cond2.c: Rearrange code to not rely on behavior undefined
10101 according to POSIX.
10102
10103 * tst-basic2.c (do_test): Lock mutex before creating the thread.
10104
fef710d6
UD
101052003-02-07 Ulrich Drepper <drepper@redhat.com>
10106
c6180643
UD
10107 * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
10108 (TLS_GET_FS): New #define.
10109 (TLS_SET_FS): New #define.
10110 Correct value of __NR_set_thread_area.
10111
fef710d6
UD
10112 * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
10113
11090a99
UD
101142003-02-06 Ulrich Drepper <drepper@redhat.com>
10115
65c68990
UD
10116 * Makefile (tests): Add tst-popen1.
10117 * tst-popen1.c: New file.
10118
11090a99
UD
10119 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
10120 but inactive generalization.
10121 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10122 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
10123 Minor optimization, remove one instruction.
10124 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
10125
a88c9263
UD
101262003-02-04 Martin Schwidefsky <schwidefsky@de.ibm.com>
10127
10128 * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
10129
101302003-01-31 Martin Schwidefsky <schwidefsky@de.ibm.com>
10131
10132 * init.c (__NR_set_tid_address): Add #ifdef for s390.
10133 * sysdeps/pthread/pthread_barrier_wait.c: New file.
10134 * sysdeps/pthread/pthread_cond_broadcast.c: New file.
10135 * sysdeps/pthread/pthread_cond_signal.c: New file.
10136 * sysdeps/pthread/pthread_cond_timedwait.c: New file.
10137 * sysdeps/pthread/pthread_cond_wait.c: New file.
10138 * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
10139 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
10140 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
10141 * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
10142 * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
10143 * sysdeps/s390/Makefile: New file.
10144 * sysdeps/s390/bits/atomic.h: New file.
10145 * sysdeps/s390/pthread_spin_init.c: New file.
10146 * sysdeps/s390/pthread_spin_lock.c: New file.
10147 * sysdeps/s390/pthread_spin_trylock.c: New file.
10148 * sysdeps/s390/pthread_spin_unlock.c: New file.
10149 * sysdeps/s390/pthreaddef.h: New file.
10150 * sysdeps/s390/tcb-offsets.sym: New file.
10151 * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
10152 * sysdeps/s390/tls.h: New file.
10153 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
10154 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
10155 * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
10156 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
10157 * sysdeps/unix/sysv/linux/s390/fork.c: New file.
10158 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
10159 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
10160 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
10161 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
10162 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
10163 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
10164 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
10165 * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
10166 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
10167 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
10168 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
10169 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
10170 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
10171 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
10172 * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
10173 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
10174 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
10175 * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
10176
6f1cff95
UD
101772003-02-04 Ulrich Drepper <drepper@redhat.com>
10178
ec609a8e
UD
10179 * atomic.h: Add a couple more default implementations.
10180 (atomic_compare_and_exchange_acq): Use
d45e8740
UD
10181 __arch_compare_and_exchange_32_acq in return value definition. It
10182 always exists.
10183 (atomic_bit_set): Renamed from atomic_set_bit.
0289bef9 10184 Add missing atomic_ prefixes.
e3ec8904 10185
6f1cff95
UD
10186 * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
10187 thread library is available, use correct value to mark initialized
10188 once variable.
10189
4f088329
UD
101902003-02-03 Ulrich Drepper <drepper@redhat.com>
10191
6f1cff95
UD
10192 * allocatestack.c (allocate_stack): Use __getpagesize instead of
10193 __sysconf to determine pagesize.
10194
3e4fc359 10195 * pthread_create.c: Include <atomic.h>.
4f088329
UD
10196 * allocatestack.c (allocate_stack): Implement coloring of the
10197 allocated stack memory. Rename pagesize to pagesize_m1. It's the
10198 size minus one. Adjust users.
3e4fc359 10199 * sysdeps/i386/i686/Makefile: New file.
4f088329 10200
2f42e8be
UD
102012003-02-02 Ulrich Drepper <drepper@redhat.com>
10202
4301f7e2
UD
10203 * allocatestack.c: Improve comment throughout the file.
10204
2f42e8be 10205 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
a37818b3 10206 (__lll_lock_wait): Add branch prediction.
2f42e8be
UD
10207 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
10208 (__lll_lock_wait): Likewise.
10209 (lll_unlock_wake_cb): Removed.
10210
4a7d6545
UD
102112003-01-31 Ulrich Drepper <drepper@redhat.com>
10212
10213 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
10214 _POSIX_THREAD_PRIORITY_SCHEDULING.
10215
886d5973
UD
102162003-01-30 Jakub Jelinek <jakub@redhat.com>
10217
10218 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
10219 Fix return type of ptr___pthread_getspecific.
10220
e474ca78
UD
102212003-01-29 Ulrich Drepper <drepper@redhat.com>
10222
10223 * Makefile (tests): Add tst-umask1.
10224 (tst-umask1-ARGS): Define.
10225 * tst-umask1.c: New file.
10226
e6ebd2e4
UD
102272003-01-28 Ulrich Drepper <drepper@redhat.com>
10228
6cf26f41
UD
10229 * Makefile (libpthread-routines): Remove lowlevelrwlock. Add
10230 pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
10231 pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
10232 pthread_rwlock_unlock.
10233 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
10234 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
10235 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
10236 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
10237 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10238 New file.
10239 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
10240 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10241 New file.
10242 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
10243 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
10244 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
10245 New file.
10246 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
10247 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
10248 New file.
10249 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
10250 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
10251 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
10252 New file.
10253 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
10254 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
10255 New file.
10256 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
10257
1d087a7e
UD
10258 * Makefile (libpthread-routines): Remove lowlevelcond and
10259 lowlevelsem. Add sem_wait, sem_trywait, sem_timedwait, sem_post,
10260 pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
10261 and pthread_cond_broadcast.
4a99d160
UD
10262 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
10263 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
10264 * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
10265 * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
10266 * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
10267 * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
10268 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
10269 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
10270 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
10271 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
10272 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
10273 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
10274 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
10275 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
10276 * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
10277 * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
10278 * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
10279 * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
10280 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
10281 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
10282 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
10283 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
10284 * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
10285 * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
10286 * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
10287 * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
10288 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
10289 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
10290 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
10291 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
10292 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
1d087a7e 10293
e6ebd2e4
UD
10294 * sysdeps/unix/sysv/linux/i386/createthread.c: Define
10295 PREPARE_CREATE and TLS_VALUE with x86-specific bits. All the rest
10296 of the code is moved to ...
10297 * sysdeps/pthread/createthread.c: ...here. New file.
10298
a15698cb
UD
102992003-01-27 Ulrich Drepper <drepper@redhat.com>
10300
0566b130
UD
10301 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
10302 (__new_sem_post): Clear %eax before returning.
10303 Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
10304
e6fb8846
UD
10305 * Makefile (tests): Add tst-cleanup2.
10306 * tst-cleanup2.c: New file.
10307
a15698cb
UD
10308 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
10309 Interpret first parameter correctly.
10310
8824b0a1
UD
103112003-01-17 Ulrich Drepper <drepper@redhat.com>
10312
10313 * Makefile (headers): Add bits/semaphore.h.
10314
850dcfca
UD
103152003-01-16 Jakub Jelinek <jakub@redhat.com>
10316
10317 * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
10318 if not SHARED.
10319
574b892e
UD
103202003-01-14 Ulrich Drepper <drepper@redhat.com>
10321
a8d87c92
UD
10322 * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
10323 must be used and mapping failed.
10324 Reported by Luke Elliott <luke.elliott@activfinancial.com>.
10325
574b892e
UD
10326 * Makefile (CFLAGS-pthread_self.os): Define this, not
10327 CFLAGS-pthread_self.c.
10328
fb48047a
UD
103292003-01-13 Ulrich Drepper <drepper@redhat.com>
10330
47805511
UD
10331 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
10332 lll_unlock_wake_cb.
10333
fb48047a
UD
10334 * Makefile (libpthread-routines): Add version. Add rules to build
10335 version.os and banner.h.
10336 * version.c: New file.
10337
115bb61d
UD
103382003-01-13 Jakub Jelinek <jakub@redhat.com>
10339
10340 * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
10341 the alias unconditional.
10342 * pthread_mutex_unlock.c (__pthread_mutex_unlock_internal): Likewise.
10343
103442003-01-13 Ulrich Drepper <drepper@redhat.com>
10345
10346 * Makefile (CFLAGS-pthread_self.c): New definition.
10347
6aca81bb
UD
103482003-01-06 Jakub Jelinek <jakub@redhat.com>
10349
10350 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
10351 INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
10352 * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
10353 * init.c (__pthread_initialize_minimal_internal): Likewise.
10354
e9c7764e
UD
103552003-01-07 Jakub Jelinek <jakub@redhat.com>
10356
b5facfda
UD
10357 * pthreadP.h (__pthread_cond_timedwait): Add prototype.
10358
e9c7764e
UD
10359 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
10360 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
10361 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
10362 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
10363 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
10364 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
10365
bef1e42f
UD
103662003-01-06 Jakub Jelinek <jakub@redhat.com>
10367
10368 * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
10369 * pt-system.c (LIBC_CANCEL_HANDLED): Add.
10370 * tst-cancel-wrappers.sh: Remove all exceptions.
10371
bbd17455
UD
103722003-01-05 Ulrich Drepper <drepper@redhat.com>
10373
a73ab6df
UD
10374 * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
10375 features. Reported by Marijn Ros <marijn@mad.scientist.com>.
10376
bbd17455
UD
10377 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
10378 Use __libc_pthread_functions array if SHARED.
10379
10380 * pthreadP.h: Move pthread_cond_2_0_t definition to...
10381 * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
10382
10383 * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
10384 (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
10385 __libc_key_create, __libc_getspecific, __libc_setspecific): Use
10386 __libc_ptf_call instead of __libc_maybe_call.
10387 (PTF): New #define.
10388 (__libc_cleanup_region_start): Wrap function name with PTF call.
10389 (__libc_cleanup_region_end): Likewise.
10390 (__libc_cleanup_end): Likewise.
10391
10392 * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
10393 * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
10394 * pthread_key_create.c: Add __pthread_key_create_internal alias.
10395 * pthreadP.h: Add prototypes.
10396
10397 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
10398 __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
10399 __pthread_rwlock_unlock aliases.
10400 * pthreadP.h: Add prototypes for new aliases.
10401
10402 * pthreadP.h (struct pthead_functions): Moved to...
10403 * sysdeps/pthread/pthread-functions.h: ...here. New file.
10404 * init.c (pthread_functions): Add initializers for new elements.
10405
10406 * cleanup_defer.c: Add __pthread_cleanup_push_defer and
10407 __pthread_cleanup_pop_restore aliases.
10408 * pthreadP.h: Add prototypes.
10409
10410 * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
10411 and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
10412 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
10413 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
10414 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
10415 * pthreadP.h: Adjust prototypes and callers.
10416
d27a78be
UD
104172003-01-04 Ulrich Drepper <drepper@redhat.com>
10418
b74121ae
UD
10419 * Makefile (tests): Add tst-cancel7.
10420 (tst-cancel7-ARGS): New variable.
bbd17455 10421 * tst-cancel7.c: New file.
b74121ae 10422
29bc410c
UD
10423 * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
10424 around gcc defficiencies.
10425 * old_pthread_cond_signal.c: Likewise.
10426 * old_pthread_cond_timedwait.c: Likewise.
10427 * old_pthread_cond_wait.c: Likewise.
10428
d27a78be
UD
10429 * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
10430
733f25e6
UD
104312003-01-03 Ulrich Drepper <drepper@redhat.com>
10432
7edb2ae3
UD
10433 * Makefile (tests): Add tst-cond7.
10434 * tst-cond7.c: New file.
10435
b1151300
UD
10436 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
10437 (condvar_cleanup): Get condvar address from the right place.
10438
733f25e6
UD
10439 * atomic.h: Correct definitions of atomic_full_barrier,
10440 atomic_read_barrier, atomic_write_barrier.
10441
10442 * old_pthread_cond_broadcast.c: Make memory allocate and initialization
10443 race-free.
10444 * old_pthread_cond_signal.c: Likewise.
10445 * old_pthread_cond_timedwait.c: Likewise.
10446 * old_pthread_cond_wait.c: Likewise.
10447
686b7223
UD
104482003-01-03 Jakub Jelinek <jakub@redhat.com>
10449
10450 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
10451
0e07706e
UD
104522003-01-03 Ulrich Drepper <drepper@redhat.com>
10453
997256dd
UD
10454 * pthreadP.h (pthread_cond_2_0_t): New type.
10455 (struct pthread_functions): Use new type for 2.0 condvar callbacks.
10456 Use new type for the 2.0 condvar function prototypes.
10457 * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
10458 * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
10459 parameter.
10460 * old_pthread_cond_destroy.c: Likewise.
10461 * old_pthread_cond_broadcast.c: Likewise. Lock appropriately.
10462 * old_pthread_cond_signal.c: Likewise.
10463 * old_pthread_cond_timedwait.c: Likewise.
10464 * old_pthread_cond_wait.c: Likewise.
10465
842d2817
UD
10466 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
10467 (__pthread_cond_wait): Don't save cancellation mode and seq value
10468 in same location.
10469
0e07706e
UD
10470 * herrno.c (__h_errno_location): Don't define as weak.
10471
bf293afe
UD
104722003-01-02 Jakub Jelinek <jakub@redhat.com>
10473
10474 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
10475 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
10476 and pthread_cond_wait.
10477 * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
10478 Renamed to...
10479 (__pthread_cond_broadcast_2_0): ... this.
10480 * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
10481 Renamed to...
10482 (__pthread_cond_destroy_2_0): ... this.
10483 * old_pthread_cond_init.c (__old_pthread_cond_init):
10484 Renamed to...
10485 (__pthread_cond_init_2_0): ... this.
10486 * old_pthread_cond_signal.c (__old_pthread_cond_signal):
10487 Renamed to...
10488 (__pthread_cond_signal_2_0): ... this.
10489 * old_pthread_cond_wait.c (__old_pthread_cond_wait):
10490 Renamed to...
10491 (__pthread_cond_wait_2_0): ... this.
10492 * pthread_cond_destroy.c: Include shlib-compat.h.
10493 (pthread_cond_destroy): Change strong_alias into versioned_symbol.
10494 * pthread_cond_init.c: Include shlib-compat.h.
10495 (pthread_cond_init): Change strong_alias into versioned_symbol.
10496 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
10497 fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
10498 fields.
10499 (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
10500 __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
10501 __pthread_cond_wait_2_0): New prototypes.
10502 (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
10503 __old_pthread_cond_init, __old_pthread_cond_signal,
10504 __old_pthread_cond_wait): Removed.
10505 * init.c: Include shlib-compat.h.
10506 (pthread_functions): Guard ptr___pthread_attr_init_2_0
10507 initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
10508 Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
10509 ptr___pthread_cond_*_2_0 fields.
10510 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
10511 pthread_cond_*@GLIBC_2.0 compatibility symbols.
10512
10513 * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
10514 LIBC_SIGACTION was not yet defined.
10515 [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
10516 [!defined LIBC_SIGACTION] (__sigaction): New function and
10517 libc_hidden_weak.
10518 [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
10519 [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
10520
105212003-01-02 Jakub Jelinek <jakub@redhat.com>
10522
10523 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
10524
05df18c3
UD
105252003-01-02 Ulrich Drepper <drepper@redhat.com>
10526
10527 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
10528 New, larger type definition.
10529 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
10530 implementation.
10531 * Versions [libpthread]: Add definitions for new pthread_cond_*
10532 interfaces for version GLIBC_2.3.2.
10533 * pthread_cond_init.c: Update initialization for new type definition.
10534 * Makefile (libpthread-routines): Remove pthread_cond_wait,
10535 pthread_cond_timedwait, pthread_cond_signal, and
10536 pthread_cond_broadcast. Add old_pthread_cond_init,
10537 old_pthread_cond_destroy, old_pthread_cond_wait,
10538 old_pthread_cond_timedwait, old_pthread_cond_signal, and
10539 old_pthread_cond_broadcast.
10540 * old_pthread_cond_broadcast.c: New file.
10541 * old_pthread_cond_destroy.c: New file.
10542 * old_pthread_cond_init.c: New file.
10543 * old_pthread_cond_signal.c: New file.
10544 * old_pthread_cond_timedwait.c: New file.
10545 * old_pthread_cond_wait.c: New file.
10546 * pthreadP.h: Add prototypes for the compatibility interfaces.
10547
10548 * pthread_cond_destroy.c: Don't include <errno.h>.
10549
fd8979e4
UD
105502003-01-01 Ulrich Drepper <drepper@redhat.com>
10551
10552 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
10553 unnecessary zero offset when addressing MUTEX.
10554
6d6ee629
UD
105552002-12-31 Ulrich Drepper <drepper@redhat.com>
10556
10557 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
10558 __register_atfork.
10559 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
10560 for __register_atfork.
10561
a4baf360
UD
105622002-12-31 Jakub Jelinek <jakub@redhat.com>
10563
10564 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
10565 instead of ASSEMBLER test macro.
10566
10567 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
10568 __libc_current_sigrtmax): Add libc_hidden_def.
10569
10570 * sysdeps/pthread/list.h: Remove assert.h include.
10571
e9395a94
UD
105722002-12-31 Ulrich Drepper <drepper@redhat.com>
10573
10574 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
10575 __pthread_initialize_minimal_internal not
10576 __pthread_initialize_minimal.
10577
89d6e444
UD
105782002-12-30 Ulrich Drepper <drepper@redhat.com>
10579
416d2de6
UD
10580 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
10581 __pthread_initialize_minimal as hidden.
10582
89d6e444
UD
10583 * init.c (__pthread_initialize_minimal_internal): Don't mark as
10584 constructor.
10585
105862002-12-31 Jakub Jelinek <jakub@redhat.com>
10587
10588 * Makefile ($(inst_libdir)/libpthread.so): Depend on
10589 $(common-objpfx)format.lds, include that into the output script.
10590 Fix comment.
10591 (extra-B-pthread.so): Change linuxthreads/ into nptl/.
10592
8cac677c
UD
105932002-12-28 Andreas Jaeger <aj@suse.de>
10594
10595 * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
10596 nsec resolution changes.
10597 (xstat64_conv): Likewise.
10598 (xstat32_conv): Likewise.
10599 * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
10600 struct kernel_stat.
10601 * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
10602 structs stat and stat64.
10603 * time/time.h (__timespec_defined): Define for __USE_MISC.
89d6e444 10604 * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
8cac677c 10605
49e9f864
UD
106062002-12-30 Jakub Jelinek <jakub@redhat.com>
10607
10608 * forward.c (FORWARD2): Renamed from FORWARD3. Remove unused export
10609 argument.
10610 (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
10611 (pthread_exit): Use strong_alias to avoid warnings.
10612 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
10613 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
10614 ptr___pthread_attr_init_2_*.
10615 * init.c (pthread_functions): Adjust.
10616
bab09b26
UD
106172002-12-29 Ulrich Drepper <drepper@redhat.com>
10618
598d7a42
UD
10619 * forward.c: Make all functions available by default again. It
10620 caused too much trouble.
10621
bab09b26
UD
10622 * pt-siglongjmp.c: Removed.
10623
3b7ed871
UD
106242002-12-28 Jakub Jelinek <jakub@redhat.com>
10625
10626 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
10627 (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
10628 * sysdeps/i386/Makefile: New file.
10629 * sysdeps/i386/tcb-offsets.sym: New file.
10630 * sysdeps/pthread/tcb-offsets.h: New file.
10631 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
10632 Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
10633
10634 * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
10635 __register_atfork...
10636 (GLIBC_2.3.2): ...here.
10637
106382002-12-28 Ulrich Drepper <drepper@redhat.com>
10639
10640 * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
10641 pthread_attr_setstackaddr with __attribute_deprecated__.
10642
270d9d47
UD
106432002-12-27 Jakub Jelinek <jakub@redhat.com>
10644
10645 * pt-system.c (system): Remove cancellation handling.
10646 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
10647 cancellation routines.
10648
131fd126
UD
106492002-12-28 Ulrich Drepper <drepper@redhat.com>
10650
afb2e954
UD
10651 * descr.h: Include <dl-sysdep.h>.
10652 (struct pthread): Move header.data.list to the back of the struct.
131fd126
UD
10653 * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
10654 (MULTIPLE_THREADS_OFFSET): Adjust offset.
10655 (SYSINFO_OFFSEET): Likewise.
10656
106572002-12-27 Jakub Jelinek <jakub@redhat.com>
10658
10659 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
10660 Define.
10661 (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
10662 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
10663 DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
10664 (USE_DL_SYSINFO): Undef.
10665
106662002-12-22 Jakub Jelinek <jakub@redhat.com>
10667
10668 * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
10669 $(common-objpfx)libc.so.
10670 * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
10671 it is bigger than pipe buffer size even on arches with bigger
10672 page size.
10673 (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
10674
a218c9cf
UD
106752002-12-25 Ulrich Drepper <drepper@redhat.com>
10676
10677 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
10678 correct errno access for case that USE___THREAD is not defined.
10679
015a2dc9
UD
106802002-12-24 Ulrich Drepper <drepper@redhat.com>
10681
10682 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
10683 Patch by Marijn Ros <marijn@mad.scientist.com>.
10684
5220f9ac
RM
106852002-12-22 Roland McGrath <roland@redhat.com>
10686
10687 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
10688
1561bf63
UD
106892002-12-20 Ulrich Drepper <drepper@redhat.com>
10690
10691 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
10692
3325198e
UD
106932002-12-19 Ulrich Drepper <drepper@redhat.com>
10694
057c823f
UD
10695 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
10696 NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
10697 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
10698
097eca29
UD
10699 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
10700 of int $0x80.
10701 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
10702 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
10703 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
10704 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
10705 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
10706 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
10707 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
10708 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
10709
10710 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
10711 sysenter.
10712 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
10713
10714 * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
10715
5f5843e3
UD
10716 * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
10717 in new TCB.
10718 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
10719 that sysinfo is properly initialized.
10720 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
10721 to 1 only for ld.so.
10722
3325198e
UD
10723 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
10724 RTLD_CORRECT_DYNAMIC_WEAK.
10725
74e8f2dc
UD
107262002-12-19 Jakub Jelinek <jakub@redhat.com>
10727
10728 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
10729 Use return 0 as 6th argument to FORWARD4.
10730 * pthread_equal.c: Include pthreadP.h instead of pthread.h.
10731
df45b31e
UD
107322002-12-18 Ulrich Drepper <drepper@redhat.com>
10733
10734 * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
10735 * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
10736 Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
10737 (INIT_SYSINFO): New #define.
10738 (TLS_TP_INIT): Use INIT_SYSINFO.
10739 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
10740 At test to make sure SYSINFO_OFFSET value is correct.
10741 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
10742
3d539579
UD
107432002-12-18 Jakub Jelinek <jakub@redhat.com>
10744
10745 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
10746 * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
10747 * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
10748 [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
10749 __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
10750 __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
10751 __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
10752
d7913e0e
UD
107532002-12-18 Ulrich Drepper <drepper@redhat.com>
10754
f051627f
UD
10755 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
10756 macro instead of using int $0x80 directly.
10757
d7913e0e
UD
10758 * sysdeps/pthread/bits/stdio-lock.h: New file.
10759 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
10760 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
10761 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
10762 * Makefile (routines): Add libc-lowlevelmutex.
10763
10764 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
10765 __i686.get_pc_thunk.dx.
10766
f077a4a9
UD
107672002-12-17 Jakub Jelinek <jakub@redhat.com>
10768
10769 * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
10770 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
10771 ($(objpfx)tst-cancel-wrappers.out): New rule.
10772 * tst-cancel-wrappers.sh: New test.
10773 * tst-locale1.c: Include signal.h.
10774 (uselocale): Test static linking of __libc_current_sigrt*.
10775
107762002-12-17 Ulrich Drepper <drepper@redhat.com>
10777
10778 * Makefile (tests): Add tst-cancel6.
10779 * tst-cancel6.c: New file
10780
bd499a3b
UD
107812002-12-17 Jakub Jelinek <jakub@redhat.com>
10782
10783 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
10784 Define meaningfully for assembler as well.
10785 * pthreadP.h (struct pthread_functions): Remove
10786 ptr_pthread_attr_init field. Add ptr_pthread_attr_init_2_0
10787 and ptr_pthread_attr_init_2_1 fields.
10788 * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
10789 and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
10790 * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
10791 (FORWARD3): Define using FORWARD4.
10792 (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
10793 versions.
10794 * pt-system.c: Remove duplicate stdlib.h include.
10795
0a1063f4
UD
107962002-12-16 Ulrich Drepper <drepper@redhat.com>
10797
87d60668
UD
10798 * sem_init.c: Define sem_init@GLIBC_2.0.
10799 * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
10800 * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
10801
0a1063f4
UD
10802 * flockfile.c: Moved to...
10803 * sysdeps/pthread/flockfile.c: ...here. New file.
10804 * funlockfile.c: Moved to...
10805 * sysdeps/pthread/funlockfile.c: ...here. New file.
10806 * ftrylockfile.c: Moved to...
10807 * sysdeps/pthread/ftrylockfile.c: ...here. New file.
10808
9634cf9d
UD
108092002-12-16 Jakub Jelinek <jakub@redhat.com>
10810
10811 * libc-cancellation.c: Guard both function with
10812 #if !defined NOT_IN_libc.
10813 * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
10814 automatically provided pthread wrappers.
10815 * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
10816 CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
10817 nor in libpthread.
10818 * pt-open.c: Removed.
10819 * pt-fcntl.c: Removed.
10820 * pt-fsync.c: Removed.
10821 * pt-lseek.c: Removed.
10822 * pt-msgrcv.c: Removed.
10823 * pt-msgsnd.c: Removed.
10824 * pt-msync.c: Removed.
10825 * pt-nanosleep.c: Removed.
10826 * pt-open64.c: Removed.
10827 * pt-pause.c: Removed.
10828 * pt-pread.c: Removed.
10829 * pt-pread64.c: Removed.
10830 * pt-pwrite.c: Removed.
10831 * pt-pwrite64.c: Removed.
10832 * pt-read.c: Removed.
10833 * pt-recv.c: Removed.
10834 * pt-recvfrom.c: Removed.
10835 * pt-recvmsg.c: Removed.
10836 * pt-send.c: Removed.
10837 * pt-sendto.c: Removed.
10838 * pt-sigtimedwait.c: Removed.
10839 * pt-sigwait.c: Removed.
10840 * pt-wait.c: Removed.
10841 * pt-waitpid.c: Removed.
10842 * pt-write.c: Removed.
10843 * pt-accept.c: Removed.
10844 * pt-close.c: Removed.
10845 * pt-connect.c: Removed.
10846 * pt-lseek64.c: Removed.
10847 * pt-sendmsg.c: Removed.
10848 * pt-tcdrain.c: Removed.
10849
6ee8d334
UD
108502002-12-15 Ulrich Drepper <drepper@redhat.com>
10851
81fa9371
UD
10852 * init.c (__pthread_initialize_minimal_internal): Renamed from
10853 __pthread_initialize_minimal. Make old name an alias. This
10854 converts a normal relocation into a relative relocation.
10855
f3015aa5
UD
10856 * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
10857
4cbc1950
UD
10858 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
10859 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
10860 * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
10861 pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
10862 pt-sigwaitinfo, pt-waitid, and pt-writev.
10863 * pt-creat.c: Removed.
10864 * pt-poll.c: Removed.
10865 * pt-pselect.c: Removed.
10866 * pt-readv.c: Removed.
10867 * pt-select.c: Removed.
10868 * pt-sigpause.c: Removed.
10869 * pt-sigsuspend.c: Removed.
10870 * pt-sigwaitinfo.c: Removed.
10871 * pt-waitid.c: Removed.
10872 * pt-writev.c: Removed.
10873
8454830b
UD
10874 * init.c (pthread_functions): New variable.
10875 (__pthread_initialize_minimal): Pass pointer to pthread_functions
10876 (or NULL) to __libc_pthread_init.
10877 * forward.c: Rewrite to use __libc:pthread_functions array to get
10878 function addresses.
10879 * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
10880 prototype.
10881 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
10882 Take new parameter. Copy content of variable pointed to by it
10883 to __libc_pthread_init.
10884
10885 * pthreadP.h (struct pthread_functions): New type.
10886 (__libc_pthread_init): Declare.
10887
10888 * pthread_attr_destroy.c: Add namespace protected alias.
10889 * pthread_attr_getdetachstate.c: Likewise.
10890 * pthread_attr_getinheritsched.c: Likewise.
10891 * pthread_attr_getschedparam.c: Likewise.
10892 * pthread_attr_getschedpolicy.c: Likewise.
10893 * pthread_attr_getscope.c: Likewise.
10894 * pthread_attr_setdetachstate.c: Likewise.
10895 * pthread_attr_setinheritsched.c: Likewise.
10896 * pthread_attr_setschedparam.c: Likewise.
10897 * pthread_attr_setschedpolicy.c: Likewise.
10898 * pthread_attr_setscope.c: Likewise.
10899 * pthread_cond_broadcast.c: Likewise.
10900 * pthread_cond_destroy.c: Likewise.
10901 * pthread_cond_init.c: Likewise.
10902 * pthread_cond_signal.c: Likewise.
10903 * pthread_cond_wait.c: Likewise.
10904 * pthread_condattr_destroy.c: Likewise.
10905 * pthread_condattr_init.c: Likewise.
10906 * pthread_equal.c: Likewise.
10907 * pthread_exit.c: Likewise.
10908 * pthread_getschedparam.c: Likewise.
10909 * pthread_self.c: Likewise.
10910 * pthread_setcancelstate.c: Likewise.
10911 * pthread_setschedparam.c: Likewise.
10912 * pthread_mutex_destroy.c: Likewise.
10913 * pthread_mutex_init.c: Likewise.
10914 * pthreadP.h: Add prototypes for the aliases.
10915
0d5f4929
UD
10916 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
10917 multiple_threads member in correct TCB to 1.
10918
6ee8d334
UD
10919 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
10920 SINGLE_THREAD_P. If in libc or libpthread examine multiple_thread
10921 member of thread decriptor, otherwise return unconditionally 1.
10922
2fb6444d
UD
109232002-12-14 Ulrich Drepper <drepper@redhat.com>
10924
10925 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
10926 regular Linux version. Remove file.
10927 * sysdeps/unix/sysv/linux/connect.S: Likewise. Remove file.
10928 * sysdeps/unix/sysv/linux/llseek.c: Likewise. Remove file.
10929 * sysdeps/unix/sysv/linux/msgrcv.c: Likewise. Remove file.
10930 * sysdeps/unix/sysv/linux/msgsnd.c: Likewise. Remove file.
10931 * sysdeps/unix/sysv/linux/open64.c: Likewise. Remove file.
10932 * sysdeps/unix/sysv/linux/poll.c: Likewise. Remove file.
10933 * sysdeps/unix/sysv/linux/pread.c: Likewise. Remove file.
10934 * sysdeps/unix/sysv/linux/pread64.c: Likewise. Remove file.
10935 * sysdeps/unix/sysv/linux/pselect.c: Likewise. Remove file.
10936 * sysdeps/unix/sysv/linux/pwrite.c: Likewise. Remove file.
10937 * sysdeps/unix/sysv/linux/pwrite64.c: Likewise. Remove file.
10938 * sysdeps/unix/sysv/linux/readv.c: Likewise. Remove file.
10939 * sysdeps/unix/sysv/linux/recv.S: Likewise. Remove file.
10940 * sysdeps/unix/sysv/linux/recvfrom.S: Likewise. Remove file.
10941 * sysdeps/unix/sysv/linux/recvmsg.S: Likewise. Remove file.
10942 * sysdeps/unix/sysv/linux/send.S: Likewise. Remove file.
10943 * sysdeps/unix/sysv/linux/sendmsg.S: Likewise. Remove file.
10944 * sysdeps/unix/sysv/linux/sendto.S: Likewise. Remove file.
10945 * sysdeps/unix/sysv/linux/sigpause.c: Likewise. Remove file.
10946 * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise. Remove file.
10947 * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise. Remove file.
10948 * sysdeps/unix/sysv/linux/sigwait.c: Likewise. Remove file.
10949 * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise. Remove file.
10950 * sysdeps/unix/sysv/linux/system.c: Likewise. Remove file.
10951 * sysdeps/unix/sysv/linux/tcdrain.c: Likewise. Remove file.
10952 * sysdeps/unix/sysv/linux/wait.c: Likewise. Remove file.
10953 * sysdeps/unix/sysv/linux/waitid.c: Likewise. Remove file.
10954 * sysdeps/unix/sysv/linux/waitpid.c: Likewise. Remove file.
10955 * sysdeps/unix/sysv/linux/writev.c: Likewise. Remove file.
10956 * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise. Remove file.
10957
86b2dc40
UD
109582002-12-14 Jakub Jelinek <jakub@redhat.com>
10959
10960 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
10961 * sysdeps/unix/sysv/linux/open.c: Removed.
10962 * sysdeps/unix/sysv/linux/fsync.c: Removed.
10963 * sysdeps/unix/sysv/linux/lseek.c: Removed.
10964 * sysdeps/unix/sysv/linux/msync.c: Removed.
10965 * sysdeps/unix/sysv/linux/read.c: Removed.
10966 * sysdeps/unix/sysv/linux/close.c: Removed.
10967 * sysdeps/unix/sysv/linux/creat.c: Removed.
10968 * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
10969 * sysdeps/unix/sysv/linux/pause.c: Removed.
10970 * sysdeps/unix/sysv/linux/select.c: Removed.
10971 * sysdeps/unix/sysv/linux/write.c: Removed.
10972
9d263d72
UD
109732002-12-14 Ulrich Drepper <drepper@redhat.com>
10974
10975 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
10976 element in TCB to see whether locking is needed.
10977
10978 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
10979 MULTIPLE_THREADS_OFFSET value is correct.
10980
10981 * sysdeps/unix/sysv/linux/close.c: New file.
10982 * sysdeps/unix/sysv/linux/connect.S: New file.
10983 * sysdeps/unix/sysv/linux/creat.c: New file.
10984 * sysdeps/unix/sysv/linux/fsync.c: New file.
10985 * sysdeps/unix/sysv/linux/llseek.c: New file.
10986 * sysdeps/unix/sysv/linux/lseek.c: New file.
10987 * sysdeps/unix/sysv/linux/msgrcv.c: New file.
10988 * sysdeps/unix/sysv/linux/msgsnd.c: New file.
10989 * sysdeps/unix/sysv/linux/msync.c: New file.
10990 * sysdeps/unix/sysv/linux/nanosleep.c: New file.
10991 * sysdeps/unix/sysv/linux/open.c: New file.
10992 * sysdeps/unix/sysv/linux/open64.c: New file.
10993 * sysdeps/unix/sysv/linux/pause.c: New file.
10994 * sysdeps/unix/sysv/linux/poll.c: New file.
10995 * sysdeps/unix/sysv/linux/pread.c: New file.
10996 * sysdeps/unix/sysv/linux/pread64.c: New file.
10997 * sysdeps/unix/sysv/linux/pselect.c: New file.
10998 * sysdeps/unix/sysv/linux/pwrite.c: New file.
10999 * sysdeps/unix/sysv/linux/pwrite64.c: New file.
11000 * sysdeps/unix/sysv/linux/readv.c: New file.
11001 * sysdeps/unix/sysv/linux/recv.S: New file.
11002 * sysdeps/unix/sysv/linux/recvfrom.S: New file.
11003 * sysdeps/unix/sysv/linux/recvmsg.S: New file.
11004 * sysdeps/unix/sysv/linux/select.c: New file.
11005 * sysdeps/unix/sysv/linux/send.S: New file.
11006 * sysdeps/unix/sysv/linux/sendmsg.S: New file.
11007 * sysdeps/unix/sysv/linux/sendto.S: New file.
11008 * sysdeps/unix/sysv/linux/sigpause.c: New file.
11009 * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
11010 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
11011 * sysdeps/unix/sysv/linux/sigwait.c: New file.
11012 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
11013 * sysdeps/unix/sysv/linux/system.c: New file.
11014 * sysdeps/unix/sysv/linux/tcdrain.c: New file.
11015 * sysdeps/unix/sysv/linux/wait.c: New file.
11016 * sysdeps/unix/sysv/linux/waitid.c: New file.
11017 * sysdeps/unix/sysv/linux/waitpid.c: New file.
11018 * sysdeps/unix/sysv/linux/writev.c: New file.
11019 * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
11020
11021 * pt-readv.c: Fix comment.
11022
110232002-12-14 Jakub Jelinek <jakub@redhat.com>
11024
11025 * tst-cleanup1.c: Include stdlib.h.
11026
11027 * tst-cancel5.c: New test.
11028 * Makefile (tests): Add tst-cancel5.
11029 (tst-cancel5): Link against libc.so libpthread.so in that order.
11030
9ae0909b
UD
110312002-12-13 Ulrich Drepper <drepper@redhat.com>
11032
b7bdd9c4
UD
11033 * forward.c (test_loaded): Prevent recursive calls.
11034
9ae0909b
UD
11035 * Makefile (routines): Add libc-cancellation.
11036 * libc-cancellation.c: New file.
11037 * descr.h (struct pthread): Add multiple_threads field.
11038 * allocatestack.c (allocate_stack): Initialize multiple_header field of
11039 new thread descriptor to 1.
11040 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
11041 Initialize multiple_thread field after successful thread creation.
11042 * cancellation.c (__do_cancel): Move to pthreadP.h.
11043 (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
11044 (__pthread_disable_asynccancel): Add internal_function attribute.
11045 * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
11046 * pthread_setcancelstate.c: Likewise.
11047 * pthread_setcanceltype.c: Likewise.
11048 * pthread_exit.c: Likewise.
11049 * pthreadP.h (CANCELLATION_P): Likewise.
11050 (__do_cancel): Define as static inline.
11051 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
11052 (__libc_enable_asynccancel, __libc_disable_asynccancel): New
11053 declarations.
11054 * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
11055 fields. Define MULTIPLE_THREADS_OFFSET.
11056 * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
11057 declaration.
11058 * sysdeps/unix/sysv/linux/accept.S: New file.
11059 * sysdeps/unix/sysv/linux/read.c: New file.
11060 * sysdeps/unix/sysv/linux/write.c: New file.
11061 * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
11062 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
11063 initialization of __libc_locking_needed.
11064 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
11065 __libc_locking_needed, use multiple_threads field in TCB.
11066 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
11067
22f20674
UD
110682002-12-12 Ulrich Drepper <drepper@redhat.com>
11069
2ad2e1e7
UD
11070 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
11071 version.
11072 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
11073
22f20674
UD
11074 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
11075 access to __libc_locking_needed for PIC.
11076
aa80bf86
UD
110772002-12-12 Jakub Jelinek <jakub@redhat.com>
11078
11079 * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
11080 declare for libc.so.
11081 (__libc_lock_init, __libc_lock_init_recursive): Change into comma
11082 expression.
11083 (__libc_lock_lock): Put into statement expression.
11084 (__libc_lock_unlock): Remove trailing semicolon.
11085 * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
11086
24021373
RM
110872002-12-12 Roland McGrath <roland@redhat.com>
11088
11089 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
11090 "m" constraint to refer to __libc_locking_needed. Declare it here.
11091
14e7aece
UD
110922002-12-12 Ulrich Drepper <drepper@redhat.com>
11093
11094 * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
11095 * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
11096 Initialize __libc_locking_needed.
11097 * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
11098 instead of __register_pthread_fork_handler.
11099 * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
11100 * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
11101 fork-gen with libc_pthread_init.
11102 * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
11103 of __register_pthread_fork_handler.
11104 * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
11105 of __register_pthread_fork_handler.
11106 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
11107 __libc_locking_needed to determine whether lock prefix can be avoided.
11108 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
11109
85631c8e
UD
111102002-12-11 Ulrich Drepper <drepper@redhat.com>
11111
da63009e
UD
11112 * Makefile (tests): Add tst-cleanup1.
11113 * tst-cleanup1.c: New file.
11114 * cancellation.c (__cleanup_thread): Removed.
11115 (__do_cancel): Remove call to __cleanup_thread.
11116 * pthreadP.h: Remove __cleanup_thread prorotype.
11117
000160a2
UD
11118 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
11119 Remember function and argument even if cancellation handler
11120 function is not available.
11121 (__libc_cleanup_region_end): Execute registered function directly if
11122 pthread functions are not available.
11123 (__libc_cleanup_end): Likewise.
11124
85631c8e
UD
11125 * init.c (__pthread_initialize_minimal): Fix initialization in
11126 static lib by preventing gcc from being too clever.
11127
dce8f2b6
UD
111282002-12-10 Ulrich Drepper <drepper@redhat.com>
11129
34a075be
UD
11130 * init.c (__pthread_initialize_minimal): Remove unneccesary
11131 sigaddset call.
11132
dce8f2b6
UD
11133 * Makefile (tests): We can run tst-locale2 now.
11134
e5e45b53
UD
111352002-12-09 Ulrich Drepper <drepper@redhat.com>
11136
11137 * Versions: Remove duplicated sigwait entry.
11138
bdb04f92
UD
111392002-12-08 Ulrich Drepper <drepper@redhat.com>
11140
1e506629
UD
11141 * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
11142 inside libpthread.
11143
a3957dd5
UD
11144 * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
11145
bdb04f92
UD
11146 * pthreadP.h: Declare __pthread_enable_asynccancel and
11147 __pthread_disable_asynccancel.
11148 (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
11149 (CANCEL_RESET): Use __pthread_disable_asynccancel.
11150 * cancellation.c (__pthread_enable_asynccancel): New function.
11151 (__pthread_disable_asynccancel): New function.
11152 * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
11153 * pt-close.c: Likewise.
11154 * pt-connect.c: Likewise.
11155 * pt-creat.c: Likewise.
11156 * pt-fcntl.c: Likewise.
11157 * pt-fsync.c: Likewise.
11158 * pt-lseek.c: Likewise.
11159 * pt-lseek64.c: Likewise.
11160 * pt-msgrcv.c: Likewise.
11161 * pt-msgsnd.c: Likewise.
11162 * pt-msync.c: Likewise.
11163 * pt-nanosleep.c: Likewise.
11164 * pt-open.c: Likewise.
11165 * pt-open64.c: Likewise.
11166 * pt-pause.c: Likewise.
11167 * pt-poll.c: Likewise.
11168 * pt-pread.c: Likewise.
11169 * pt-pread64.c: Likewise.
11170 * pt-pselect.c: Likewise.
11171 * pt-pwrite.c: Likewise.
11172 * pt-pwrite64.c: Likewise.
11173 * pt-read.c: Likewise.
11174 * pt-readv.c: Likewise.
11175 * pt-recv.c: Likewise.
11176 * pt-recvfrom.c: Likewise.
11177 * pt-recvmsg.c: Likewise.
11178 * pt-select.c: Likewise.
11179 * pt-send.c: Likewise.
11180 * pt-sendmsg.c: Likewise.
11181 * pt-sendto.c: Likewise.
11182 * pt-sigpause.c: Likewise.
11183 * pt-sigsuspend.c: Likewise.
11184 * pt-sigtimedwait.c: Likewise.
11185 * pt-sigwait.c: Likewise.
11186 * pt-sigwaitinfo.c: Likewise.
11187 * pt-system.c: Likewise.
11188 * pt-tcdrain.c: Likewise.
11189 * pt-wait.c: Likewise.
11190 * pt-waitid.c: Likewise.
11191 * pt-waitpid.c: Likewise.
11192 * pt-write.c: Likewise.
11193 * pt-writev.c: Likewise.
a3957dd5
UD
11194 * pthread_join.c: Likewise.
11195 * pthread_timedjoin.c: Likewise.
bdb04f92
UD
11196
11197 * pt-sigpause.c (sigsuspend): Call __sigsuspend.
11198 (__xpg_sigpause): New function.
11199 * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
11200
6ccb3834
UD
112012002-12-07 Ulrich Drepper <drepper@redhat.com>
11202
09efc3ba
UD
11203 * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
11204
11205 * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
11206 _GI_pthread_cleanup_pop to pthreadP.h.
11207
11208 * ftrylockfile.c: Use _IO_lock_trylock instead of
11209 pthread_mutex_trylock.
11210
11211 * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
11212 (CANCEL_RESET): Likewise.
11213 (__pthread_setcanceltype_): Declare.
11214 (__pthread_mutex_lock_internal): Declare.
11215 (__pthread_mutex_unlock_internal): Declare.
11216 (__pthread_once_internal): Declare.
11217 (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
11218 (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
11219
11220 * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
11221 and pthread_mutex_unlock.
11222 * pthread_cond_wait.c: Likewise.
11223 * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
11224 * pthread_mutex_unlock.c: Likewise.
11225
11226 * pthread_setcanceltype.c: Add additional alias
11227 __pthread_setcanceltype.
11228
11229 * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
11230 * sem_open.c (sem_open): Likewise.
11231 Use __libc_open, __libc_write, and __libc_close instead of
11232 open, write, and close respectively.
11233
11234 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
11235 Rewrite as statement expression since it must return a value.
11236
11237 * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
11238 * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
11239 __pthread_kill.
11240
11241 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
11242 alias __pthread_once_internal.
11243
6ccb3834
UD
11244 * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
11245
d3c9f895
UD
112462002-12-06 Ulrich Drepper <drepper@redhat.com>
11247
4614167a
UD
11248 * Makefile (tests): Add tst-stdio1 and tst-stdio2.
11249 * tst-stdio1.c: New file.
11250 * tst-stdio2.c: New file.
11251
a4548cea
UD
11252 * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
11253
d3c9f895
UD
11254 * Makefile (tests): Comment out tst-locale2 for now.
11255 (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
11256
11257 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
11258 -D_IO_MTSAFE_IO.
11259 * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
11260 Use _IO_lock_init instead of explicit assignment.
11261
11262 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
11263 Define __libc_lock_* and __libc_lock_recursive macros with
11264 lowlevellock macros, not pthread mutexes.
11265
11266 * flockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_lock instead
11267 of pthread_mutex_lock.
11268 * funlockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_unlock
11269 instead of pthread_mutex_unlock.
11270
fde89ad0
RM
112712002-12-06 Roland McGrath <roland@redhat.com>
11272
11273 * allocatestack.c (__stack_user): Use uninitialized defn.
11274 * init.c (__pthread_initialize_minimal): Initialize it here.
11275
11767d47
RM
112762002-12-05 Roland McGrath <roland@redhat.com>
11277
fde89ad0
RM
11278 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
11279 string.
11280 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
11281
11767d47
RM
11282 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
11283 missing & here too.
11284
440d8bc2
UD
112852002-12-05 Ulrich Drepper <drepper@redhat.com>
11286
11287 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
11288 lowlevellock.
11289 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
11290 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
11291 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
11292 * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
11293 for __libc_lock_* macros.
11294 * Makefile (routines): Add libc-lowlevellock.
11295
112962002-10-09 Roland McGrath <roland@redhat.com>
11297
11298 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
11299 Under [__PIC__], call the function via the pointer fetched for
11300 comparison rather than a call by name that uses the PLT.
11301 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
11302 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
11303 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
11304 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
11305 (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
11306
d5ed0118
RM
113072002-12-04 Roland McGrath <roland@redhat.com>
11308
11309 * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
11310
11311 * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
11312 * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
11313
11314 * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
11315
eaa4099f
UD
113162002-12-04 Ulrich Drepper <drepper@redhat.com>
11317
11318 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
11319 a completely opaque, non-integer type.
11320 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
11321
33b5d0cc
UD
113222002-12-05 Jakub Jelinek <jakub@redhat.com>
11323
11324 * sysdeps/i386/tls.h: Include stdlib.h.
11325 * sysdeps/x86_64/tls.h: Likewise.
11326
7a5cdb30
UD
113272002-12-04 Ulrich Drepper <drepper@redhat.com>
11328
c4a6d859
UD
11329 * Makefile (tests): Add tst-locale2.
11330 (tests-static): Likewise.
11331 * tst-locale2.c: New file.
11332
7a5cdb30
UD
11333 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
11334 volatile and add memory clobbers to lock operations.
11335
d82d5d12
UD
113362002-12-03 Ulrich Drepper <drepper@redhat.com>
11337
69cae3cf
UD
11338 * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
11339 * sysdeps/i386/i486/bits/atomic.h: New file.
11340 * sysdeps/i386/i586/bits/atomic.h: New file.
11341 * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
11342 include i486 version.
11343 * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
11344 * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
c97c64de 11345 Patch by Marijn Ros <marijn@mad.scientist.com>.
69cae3cf 11346
e4044c01
UD
11347 * allocatestack.c (get_cached_stack): Don't crash if we first
11348 found a stack with a larger size then needed.
11349 Reported by Hui Huang <hui.huang@sun.com>.
11350
d82d5d12
UD
11351 * Makefile (tests): Add tst-sysconf.
11352 * tst-sysconf.c: New file.
11353
11354 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
11355 PTHREAD_THREADS_MAX.
11356
fa9a4ff0
RM
113572002-12-02 Roland McGrath <roland@redhat.com>
11358
11359 * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
11360 Declare using hidden_proto instead of attribute_hidden, so there are
11361 non-.hidden static symbols for gdb to find.
11362 (__pthread_keys): Likewise.
11363 * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
11364 * allocatestack.c (__stack_user): Likewise.
11365 * pthread_create.c (__pthread_keys): Likewise.
11366 (__nptl_threads_events, __nptl_last_event): Make these static instead
11367 of hidden.
11368 * pthread_key_create.c (__pthread_pthread_keys_max,
11369 __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
11370
91949a33
UD
113712002-12-02 Ulrich Drepper <drepper@redhat.com>
11372
c22b52fa
UD
11373 * Makefile (tests): Add tst-locale1. If buid-static is yes link
11374 statically.
11375 * tst-locale1.c: New file.
11376
beb6aa41
UD
11377 * pthread_cond_timedwait.c: Include <stdlib.h>.
11378
91949a33
UD
11379 * Makefile (tests): Add tst-fork2 and tst-fork3.
11380 * tst-fork2.c: New file.
11381 * tst-fork3.c: New file.
11382
654dff90
UD
113832002-11-28 Ulrich Drepper <drepper@redhat.com>
11384
cb0e76b4
UD
11385 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
11386
11387 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
11388 require it to 200112L.
11389
11390 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
11391 instruction only if HAVE_CMOV is defined.
11392 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
11393
975aa229
UD
11394 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
11395
654dff90
UD
11396 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
11397
11398 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
11399
11400 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
11401
a3931336
UD
114022002-11-27 Ulrich Drepper <drepper@redhat.com>
11403
c10c099c
UD
11404 * sysdeps/x86_64/bits/atomic.h: New file.
11405
11406 * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
11407 16-bit operations.
11408
dca99d27
UD
11409 * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
11410 possible since gettid cannot fail.
11411
f78deea6
UD
11412 * sysdeps/x86_64/pthreaddef.h: New file.
11413
11414 * sysdeps/i386/pthreaddef.h (gettid): Removed.
11415
11416 * sysdeps/x86_64/pthread_spin_init.c: New file.
11417 * sysdeps/x86_64/pthread_spin_lock.c: New file.
11418 * sysdeps/x86_64/pthread_spin_trylock.c: New file.
11419 * sysdeps/x86_64/pthread_spin_unlock.c: New file.
11420
11421 * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
11422 Add missing lock prefix. Minute optimization.
11423
11424 * tst-spin2.c (main): Also check successful trylock call.
11425
11426 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
11427 syscall. Fix typo in case INTERNAL_SYSCALL is not used.
11428
11429 * sysdeps/i386/pthread_spin_destroy.c: Moved to...
11430 * sysdeps/pthread/pthread_spin_destroy.c: ...here. New file.
11431
11432 * sysdeps/i386/pthread_sigmask.c: Removed. Use the generic code.
11433 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
11434 value in case of an error. Add support for INTERNAL_SYSCALL.
b54e18eb
UD
11435
11436 * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
11437 value in case of an error.
11438
a3931336
UD
11439 * sysdeps/x86_64/tls.h: New file.
11440
76a50749
UD
114412002-11-26 Ulrich Drepper <drepper@redhat.com>
11442
117c452c
UD
11443 * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface. It now
11444 takes the array member name and the index as parameters.
11445 (THREAD_SETMEM_NC): Likewise.
11446 * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
11447 * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
11448 interfaces.
11449
11450 * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
11451 to decide which code to use.
11452 (THREAD_SETMEM_NC): Likewise.
11453
76a50749
UD
11454 * allocatestack.c (queue_stack): Don't remove stack from list here.
11455 Do it in the caller. Correct condition to prematurely terminate
11456 loop to free stacks.
11457 (__deallocate_stack): Remove stack from list here.
11458
114592002-11-26 Ulrich Drepper <drepper@redhat.com>
11460
11461 * Makefile (tests): Add tst-stack1.
11462 * tst-stack1.c: New file.
11463
11464 * allocatestack.c (allocate_stack): Initialize the TCB on a user
11465 provided stack.
11466
11467 * pthread_attr_getstack.c: Return bottom of the thread area.
11468
114692002-11-25 Ulrich Drepper <drepper@redhat.com>
11470
11471 * Makefile (libpthread-routines): Add pt-allocrtsig and
11472 pthread_kill_other_threads.
11473 * pt-allocrtsig.c: New file.
11474 * pthread_kill_other_threads.c: New file.
11475 * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
11476 all three functions.
11477 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
11478 allocrtsig.
11479 * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
11480 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
11481 and __libc_allocate_rtsig_private.
11482 * Versions (libpthread): Export pthread_kill_other_threads_np,
11483 __libc_current_sigrtmin, and __libc_current_sigrtmax.
11484
114852002-11-24 Ulrich Drepper <drepper@redhat.com>
11486
11487 * allocatestack.c (allocate_stack): stackaddr in attribute points to
11488 the end of the stack. Adjust computations.
11489 When mprotect call fails dequeue stack and free it.
11490 * pthread_attr_setstack.c: Store top of the stack in stackaddr
11491 attribute.
11492 * pthread_getattr_np.c: Likewise.
11493
11494 * descr.h (IS_DETACHED): Add some more parenthesis to prevent
11495 surprises.
11496
114972002-11-23 Ulrich Drepper <drepper@redhat.com>
11498
11499 * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
11500 attribute definitions. Patch by Luca Barbieri <ldb@ldb.ods.org>.
11501
115022002-11-22 Ulrich Drepper <drepper@redhat.com>
11503
11504 * pthread_getspecific.c: Optimize access to first 2nd-level array.
11505 * pthread_setspecific.c: Likewise.
11506
115072002-11-21 Ulrich Drepper <drepper@redhat.com>
11508
11509 * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
11510 definitions. Get them from the official place.
11511 * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
11512
11513 * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
11514 Use new CLONE_ flags in clone() calls.
11515
11516 * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
11517 * sysdeps/unix/sysv/linux/i386/fork.c: New file.
11518
11519 * Versions: Add pthread_* functions for libc.
11520 * forward.c: New file.
11521
11522 * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
11523 errno-loc.
11524 * herrno.c: New file.
11525 * res.c: New file.
11526
11527 * Makefile (libpthread-routines): Remove sem_post, sem_wait,
11528 sem_trywait, and sem_timedwait. Add herrno and res.
11529 * sem_init.c: Don't initialize lock and waiters members.
11530 * sem_open.c: Likewise.
11531 * sem_post.c: Removed.
11532 * sem_wait.c: Removed.
11533 * sem_trywait.c: Removed.
11534 * sem_timedwait.c: Removed.
11535 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
11536 Includes full implementations of sem_post, sem_wait, sem_trywait,
11537 and sem_timedwait.
11538 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
11539 for new implementation.
11540 * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
11541 and waiters fields.
11542
11543 * tst-sem3.c: Improve error message.
11544 * tst-signal3.c: Likewise.
11545
11546 * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
11547 to tell the kernel about the termination futex and to initialize tid
11548 member. Don't initialize main_thread.
11549 * descr.h (struct pthread): Remove main_thread member.
11550 * cancelllation.c (__do_cancel): Remove code handling main thread.
11551 The main thread is not special anymore.
11552
11553 * allocatestack.c (__reclaim_stacks): Mark stacks as unused. Add
11554 size of the stacks to stack_cache_actsize.
11555
11556 * pt-readv.c: Add missing "defined".
11557 * pt-sigwait.c: Likewise.
11558 * pt-writev.c: Likewise.
11559
115602002-11-09 Ulrich Drepper <drepper@redhat.com>
11561
11562 * Versions: Export __connect from libpthread.
11563 Patch by Luca Barbieri <ldb@ldb.ods.org>.
11564
11565 * Makefile (libpthread-routines): Add pt-raise.
11566 * sysdeps/unix/sysv/linux/raise.c: New file.
11567 * sysdeps/unix/sysv/linux/pt-raise.c: New file.
11568 * sysdeps/generic/pt-raise.c: New file.
11569
11570 * pthread_cond_init.c: Initialize all data elements of the condvar
11571 structure. Patch by Luca Barbieri <ldb@ldb.ods.org>.
11572
11573 * pthread_attr_init.c: Actually implement 2.0 compatibility version.
11574 * pthread_create.c: Likewise.
11575
11576 * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
11577 * tst-key1.c: New file.
11578 * tst-key2.c: New file.
11579 * tst-key3.c: New file.
11580
11581 * Versions: Export pthread_detach for version GLIBC_2.0.
11582 Reported by Saurabh Desai <sdesai@austin.ibm.com>.
11583
115842002-11-08 Ulrich Drepper <drepper@redhat.com>
11585
11586 * pthread_key_create.c: Terminate search after an unused key was found.
11587 Patch by Luca Barbieri <ldb@ldb.ods.org>.
11588
11589 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
11590 Patch by Luca Barbieri <ldb@ldb.ods.org>.
11591
115922002-10-10 Ulrich Drepper <drepper@redhat.com>
11593
11594 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
11595 dynamic lookup for errno in PIC.
11596
11597 * allocatestack.c (get_cached_stack): Rearrange code slightly to
11598 release the stack lock as soon as possible.
11599 Call _dl_allocate_tls_init for TCB from the cache to re-initialize
11600 the static TLS block.
11601 (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
11602
11603 * cancellation.c: Renamed from cancelation.c.
11604 * Makefile: Adjust accordingly.
11605 * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
11606 * cleanup_defer.c: Use CANCELLATION_P.
11607 * pthread_testcancel.c: Likewise.
11608 * descr.h: Fix spelling in comments.
11609 * init.c: Likewise.
11610 * pthread_getattr_np.c: Likewise.
11611 * pthread_getschedparam.c: Likewise.
11612 * pthread_setschedparam.c: Likewise.
11613 * Versions: Likewise.
11614
11615 * pt-pselect.c: New file.
11616 * Makefile (libpthread-routines): Add pt-pselect.
11617 * Versions: Add pselect.
11618
11619 * tst-cancel4.c: New file.
11620 * Makefile (tests): Add tst-cancel4.
11621
116222002-10-09 Ulrich Drepper <drepper@redhat.com>
11623
11624 * pthread_mutex_lock.c: Always record lock ownership.
11625 * pthread_mutex_timedlock.c: Likewise.
11626 * pthread_mutex_trylock.c: Likewise.
11627
11628 * pt-readv.c: New file.
11629 * pt-writev.c: New file.
11630 * pt-creat.c: New file.
11631 * pt-msgrcv.c: New file.
11632 * pt-msgsnd.c: New file.
11633 * pt-poll.c: New file.
11634 * pt-select.c: New file.
11635 * pt-sigpause.c: New file.
11636 * pt-sigsuspend.c: New file.
11637 * pt-sigwait.c: New file.
11638 * pt-sigwaitinfo.c: New file.
11639 * pt-waitid.c: New file.
11640 * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
11641 pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
11642 pt-sigwait, pt-sigwaitinfo, and pt-waitid.
11643 * Versions: Add all the new functions.
11644
11645 * tst-exit1.c: New file.
11646 * Makefile (tests): Add tst-exit1.
11647
11648 * sem_timedwait.c: Minor optimization for more optimal fastpath.
11649
116502002-10-08 Ulrich Drepper <drepper@redhat.com>
11651
11652 * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
11653
11654 * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
11655 call. pthread_join is an official cancellation point.
11656 * pthread_timedjoin.c: Likewise.
11657
11658 * pthread_cond_wait.c: Revert order in which internal lock are dropped
11659 and the condvar's mutex are retrieved.
11660 * pthread_cond_timedwait.c: Likewise.
11661 Reported by dice@saros.East.Sun.COM.
11662
116632002-10-07 Ulrich Drepper <drepper@redhat.com>
11664
11665 * pthreadP.h: Cut out all type definitions and move them...
11666 * sysdeps/unix/sysv/linux/internaltypes.h: ...here. New file.
11667 * pthreadP.h: Include <internaltypes.h>.
11668
11669 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
11670 performance tweaks.
11671
11672 * sem_trywait.c: Shuffle #includes around to get right order.
11673 * sem_timedwait.c: Likewise.
11674 * sem_post.c: Likewise.
11675 * sem_wait.c: Likewise.
11676
11677 * nptl 0.3 released.
11678
11679 * Makefile (tests): Add tst-signal3.
11680 * tst-signal3.c: New file.
11681
116822002-10-05 Ulrich Drepper <drepper@redhat.com>
11683
11684 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
11685 the asms modify the sem object.
11686 (__lll_sem_timedwait): Now takes struct sem* as first parameter.
11687
11688 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
11689 the actual members.
11690 * pthreadP.h (struct sem): New type. Actual semaphore type.
11691 * semaphoreP.h: Include pthreadP.h.
11692 * sem_getvalue.c: Adjust to sem_t change.
11693 * sem_init.c: Likewise.
11694 * sem_open.c: Likewise.
11695 * sem_post.c: Likewise.
11696 * sem_timedwait.c: Likewise.
11697 * sem_trywait.c: Likewise.
11698 * sem_wait.c: Likewise.
11699
117002002-10-04 Ulrich Drepper <drepper@redhat.com>
11701
11702 * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
11703 * tst-basic2.c: New file.
11704 * tst-exec1.c: New file.
11705 * tst-exec2.c: New file.
11706 * tst-exec3.c: New file.
11707
11708 * tst-fork1.c: Remove extra */.
11709
11710 * nptl 0.2 released. The API for IA-32 is complete.