]> git.ipfire.org Git - thirdparty/glibc.git/blame - nptl/ChangeLog
Use x86_64/bits/xtitypes.h for i386/x86-64
[thirdparty/glibc.git] / nptl / ChangeLog
CommitLineData
865eac65
AS
12012-05-30 Andreas Schwab <schwab@linux-m68k.org>
2
3 [BZ #14132]
4 * nptl-init.c (pthread_functions): Remove use of INTUSE and
5 _internal aliases.
6 (__pthread_initialize_minimal_internal): Likewise.
7 * sem_open.c: Likewise.
8 * sem_unlink.c: Likewise.
9 * pthreadP.h: Replace _internal aliases by hidden_proto
10 declarations.
11 * pthread_getspecific.c: Replace _internal alias by hidden_def.
12 * pthread_key_create.c: Likewise.
13 * pthread_mutex_destroy.c: Likewise.
14 * pthread_mutex_init.c: Likewise.
15 * pthread_mutex_lock.c: Likewise.
16 * pthread_mutex_unlock.c: Likewise.
17 * pthread_once.c: Likewise.
18 * pthread_rwlock_rdlock.c: Likewise.
19 * pthread_rwlock_unlock.c: Likewise.
20 * pthread_rwlock_wrlock.c: Likewise.
21 * pthread_setspecific.c: Likewise.
22 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
23 Likewise.
24 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
25 Likewise.
26 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
27 Likewise.
28 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
29 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
30 * sysdeps/unix/sysv/linux/s390/pthread_once.c: Likewise.
31 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Likewise.
32 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
33 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
34 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
35 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
36 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
37 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
38 Likewise.
39 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
40 Likewise.
41 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
42 Likewise.
43
65a4de4e
CLT
442012-05-27 Chung-Lin Tang <cltang@codesourcery.com>
45
d701a1ab
CLT
46 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO, LOAD_ARGS_1)
47 (LOAD_ARGS_2 ,LOAD_ARGS_3 ,LOAD_ARGS_4): Add CFI restores.
48
65a4de4e
CLT
49 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_lock_wait_private)
50 (__lll_lock_wait, __lll_timedlock_wait, __lll_timedwait_tid): Add CFI
51 directives.
52 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S
53 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Likewise.
54 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
55 (pthread_barrier_wait): Likewise.
56 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
57 (__pthread_cond_broadcast): Likewise.
58 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
59 (__pthread_cond_signal): Likewise.
60 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
61 (__pthread_cond_timedwait): Likewise.
62 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S (__pthread_cond_wait):
63 Likewise.
64 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S
65 (__pthread_rwlock_rdlock): Likewise.
66 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
67 (pthread_rwlock_timedrdlock): Likewise.
68 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
69 (pthread_rwlock_timedwrlock): Likewise.
70 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S
71 (__pthread_rwlock_unlock): Likewise.
72 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S
73 (__pthread_rwlock_wrlock): Likewise.
74 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post): Likewise.
75 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Likewise.
76 * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
77 Likewise.
78 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
79
9c6ea9fa
SP
802012-05-26 Siddhesh Poyarekar <siddhesh@redhat.com>
81
82 [BZ #12416]
83 * nptl/pthread_getattr_np.c (pthread_getattr_np): Use
84 __libc_stack_end rounded to the end of containing page as the
85 real stack end.
86
17557282
RH
872012-05-25 Rayson Ho <rho@redhat.com>
88
89 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Low-level SystemTap
90 probes for i386.
91 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
92 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
93 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
94 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
95 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
96 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
97 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
98 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
99
5acf7263
RM
1002012-05-25 Rayson Ho <rho@redhat.com>
101 Roland McGrath <roland@hack.frob.com>
102
103 * DESIGN-systemtap-probes.txt: New file.
104 * pthread_cond_broadcast.c: SystemTap probes.
105 * pthread_cond_init.c: Likewise.
106 * pthread_cond_signal.c: Likewise.
107 * pthread_cond_wait.c: Likewise.
108 * pthread_cond_destroy.c: Likewise.
109 * pthread_create.c: Likewise.
110 * pthread_join.c: Likewise.
111 * pthread_mutex_destroy.c: Likewise.
112 * pthread_mutex_init.c: Likewise.
113 * pthread_mutex_lock.c: Likewise.
114 * pthread_mutex_timedlock.c: Likewise.
115 * pthread_mutex_unlock.c: Likewise.
116 * pthread_rwlock_destroy.c: Likewise.
117 * pthread_rwlock_rdlock.c: Likewise.
118 * pthread_rwlock_unlock.c: Likewise.
119 * pthread_rwlock_wrlock.c: Likewise.
120 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
121 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
122 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
123 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
124 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
125 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
126 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
127 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
128
3a097cc7
RM
1292012-05-24 Roland McGrath <roland@hack.frob.com>
130
131 * pthread_create.c (start_thread): Define pthread_start LIBC_PROBE.
132
de7f5ce7
AJ
1332012-05-17 Andreas Jaeger <aj@suse.de>
134
135 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
136 (HAVE_DL_DISCOVER_OSVERSION): Don't declare _dl_discover_osversion
137 only for older kernels.
138
04807399
JM
1392012-05-15 Joseph Myers <joseph@codesourcery.com>
140
141 * pthreadP.h [!__NR_set_robust_list] (__NR_set_robust_list): Do
142 not define.
143
f16af742
L
1442012-05-15 H.J. Lu <hongjiu.lu@intel.com>
145
146 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_lock): Load
147 futex pointer into RDI_LP. Use RSP_LP to operate on stack.
148 (lll_robust_lock): Likewise.
149 (lll_cond_lock): Likewise.
150 (lll_robust_cond_lock): Likewise.
151 (lll_timedlock): Likewise.
152 (lll_robust_timedlock): Likewise.
153 (lll_unlock): Likewise.
154 (lll_robust_unlock): Likewise.
155
d9754f55
L
1562012-05-15 H.J. Lu <hongjiu.lu@intel.com>
157
158 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use
159 LP_OP(cmp) and RCX_LP on dep_mutex pointer.
160
dde05f00
L
1612012-05-15 H.J. Lu <hongjiu.lu@intel.com>
162
163 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Use LP_OP(op)
164 on NWAITERS.
165 (__gcc_personality_v0): Replace 8-byte data alignment with
166 LP_SIZE alignment and .quad with ASM_ADDR.
167
9dba3b5c
L
1682012-05-15 H.J. Lu <hongjiu.lu@intel.com>
169
170 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Use LP_OP(op)
171 on NWAITERS.
172 (__gcc_personality_v0): Replace 8-byte data alignment with
173 LP_SIZE alignment and .quad with ASM_ADDR.
174
5f658cf1
L
1752012-05-15 H.J. Lu <hongjiu.lu@intel.com>
176
177 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Use LP_OP(cmp) on
178 NWAITERS, which is unsigned long int.
179
6cae4b26
L
1802012-05-15 H.J. Lu <hongjiu.lu@intel.com>
181
182 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
183 (__gcc_personality_v0): Replace 8-byte data alignment with
184 LP_SIZE alignment and .quad with ASM_ADDR.
185
592f90e6
L
1862012-05-15 H.J. Lu <hongjiu.lu@intel.com>
187
188 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Use
189 LP_OP(cmp), RSI_LP and R8_LP on dep_mutex pointer. Load
190 __vdso_clock_gettime pointer into RAX_LP.
191 (__gcc_personality_v0): Replace 8-byte data alignment with
192 LP_SIZE alignment and .quad with ASM_ADDR.
193
0e8860ad
L
1942012-05-15 H.J. Lu <hongjiu.lu@intel.com>
195
196 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Use
197 LP_OP(cmp), RSI_LP and R8_LP on dep_mutex pointer. Load
198 __vdso_clock_gettime pointer into RAX_LP.
199 (__gcc_personality_v0): Replace 8-byte data alignment with
200 LP_SIZE alignment and .quad with ASM_ADDR.
201
30996e93
L
2022012-05-15 H.J. Lu <hongjiu.lu@intel.com>
203
204 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Use
205 LP_OP(cmp) and R8_LP on dep_mutex pointer.
206
289ac435
L
2072012-05-15 H.J. Lu <hongjiu.lu@intel.com>
208
209 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Use LP_OP(mov)
210 to update pointer in memory. Load pointer into RDI_LP.
211
10f74fbc
L
2122012-05-15 H.J. Lu <hongjiu.lu@intel.com>
213
214 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
215 (LLL_STUB_UNWIND_INFO_START): Align label to LP_SIZE instead
216 of 8.
217 (LLL_STUB_UNWIND_INFO_END): Likewise.
218 (lll_timedlock): Load timeout pointer into RDX_LP.
219 (lll_robust_timedlock): Likewise.
220
439bf404
SP
2212012-05-15 Siddhesh Poyarekar <siddhesh@redhat.com>
222 Jakub Jelinek <jakub@redhat.com>
223
224 [BZ #13613]
225 * Makefile (tests): Add test cases.
226 * descr.h (struct pthread): Add a comment describing multiple_threads.
227 * pthreadP.h (__pthread_multiple_threads): Expand comment to include
228 single-process case.
229 * pthread_cancel.c (pthread_cancel): Enable multiple_threads
230 before setting cancelstate of the thread.
231 * sysdeps/unix/sysv/linux/libc_multiple_threads.c
232 (__libc_multiple_threads): Add explanatory comment.
233 * tst-cancel-self-cancelstate.c: New test case.
234 * tst-cancel-self-canceltype.c: Likewise.
235 * tst-cancel-self-cleanup.c: Supporting file for test cases.
236 * tst-cancel-self-testcancel.c: New test case.
237 * tst-cancel-self.c: Likewise.
238 * vars.c: Expand comment to include single-process case.
239
2949684c
L
2402012-05-14 H.J. Lu <hongjiu.lu@intel.com>
241
242 * sysdeps/x86_64/tls.h: Don't include <bits/wordsize.h>.
243 (tcbhead_t): Remove __x86_64__ check. Align rtld_savespace_sse
244 to 32 bytes.
245
245a11d7
L
2462012-05-14 H.J. Lu <hongjiu.lu@intel.com>
247
248 * sysdeps/pthread/pthread.h (__PTHREAD_RWLOCK_INT_FLAGS_SHARED):
249 New.
250 (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Check
251 __PTHREAD_RWLOCK_INT_FLAGS_SHARED instead of __WORDSIZE.
252
0b254d8f
L
2532012-05-14 H.J. Lu <hongjiu.lu@intel.com>
254
255 * shlib-versions: Move x86_64-.*-linux.* entry to ...
256 * sysdeps/x86_64/64/shlib-versions: Here. New file.
257 * sysdeps/x86_64/x32/shlib-versions: New file.
258
b8caea2c
L
2592012-05-14 H.J. Lu <hongjiu.lu@intel.com>
260
261 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Define x32
262 __SIZEOF_PTHREAD_XXX_T.
263 (__pthread_internal_list): Check __x86_64__ instead of __WORDSIZE.
264 (pthread_mutex_t): Likewise.
265 (pthread_rwlock_t): Likewise.
266 (__PTHREAD_RWLOCK_INT_FLAGS_SHARED): New. Defined if __x86_64__
267 is defined.
268
60d45b36
L
2692012-05-11 H.J. Lu <hongjiu.lu@intel.com>
270
271 * sysdeps/x86_64/x32/tls.h: New file.
272
a04e06bc
L
2732012-05-11 H.J. Lu <hongjiu.lu@intel.com>
274
275 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Use uint64_t on 64-bit
276 integer.
277 (THREAD_SETMEM_NC): Likewise.
278
512ec530
L
2792012-05-11 H.J. Lu <hongjiu.lu@intel.com>
280
281 * sysdeps/x86_64/tls.h (THREAD_SELF): Replace movq/%q0 with
282 mov/%0.
283
c0d2c853
L
2842012-05-11 H.J. Lu <hongjiu.lu@intel.com>
285
286 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
287 (__cleanup_fct_attribute): Check __x86_64__ instead of
eae2d36a 288 __WORDSIZE.
c0d2c853 289
1f59b0b1
L
2902012-05-11 H.J. Lu <hongjiu.lu@intel.com>
291
292 * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER): Check
293 __PTHREAD_MUTEX_HAVE_PREV instead of __WORDSIZE.
294 (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Likewise.
295 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
296 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
297
c252ec15
L
2982012-05-11 H.J. Lu <hongjiu.lu@intel.com>
299
300 * pthread_create.c (start_thread): Check __PTHREAD_MUTEX_HAVE_PREV
301 instead of __WORDSIZE.
302
be971a2b
TS
3032012-05-10 Thomas Schwinge <thomas@schwinge.name>
304
305 [BZ #3748]
306 * sysdeps/pthread/bits/libc-lockP.h (__libc_once_get): New macro.
307
e1b4354e
CLT
3082012-05-09 Chung-Lin Tang <cltang@codesourcery.com>
309
310 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
311 (__pthread_cond_timedwait): Use CFI directives.
312 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
313 (__pthread_cond_wait): Likewise.
314 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Likewise.
315 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
316
76e835cf
DM
3172012-05-03 David S. Miller <davem@davemloft.net>
318
319 * sysdeps/sparc/sparc64/pthread_spin_unlock.S: Fix thinko, we
320 always have to return 0, especially for the pthread_spin_init
321 alias.
322 * sysdeps/sparc/sparc32/pthread_spin_lock.S: Add missing trailing
323 newline.
324 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S: Likewise.
325 * sysdeps/sparc/sparc64/pthread_spin_lock.S: Likewise.
326
e2dbf201
DM
3272012-05-02 David S. Miller <davem@davemloft.net>
328
329 * sysdeps/sparc/sparc64/pthread_spin_lock.S: New.
330 * sysdeps/sparc/sparc64/pthread_spin_lock.c: Delete.
331 * sysdeps/sparc/sparc64/pthread_spin_unlock.S: New.
332 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: Delete.
333 * sysdeps/sparc/sparc64/pthread_spin_trylock.S: New.
334 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: Delete.
335 * sysdeps/sparc/sparc64/pthread_spin_init.c: New.
336 * sysdeps/sparc/sparc32/pthread_spin_lock.S: New.
337 * sysdeps/sparc/sparc32/pthread_spin_lock.c: Delete.
338 * sysdeps/sparc/sparc32/pthread_spin_trylock.S: New.
339 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: Delete.
340 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S: New.
341 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: Delete.
342 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.S: New.
343 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: Delete.
344 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.S: New.
345 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: Delete.
346 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_init.c: New.
347
d4c2917f
AM
3482012-05-02 Allan McRae <allan@archlinux.org>
349
350 * Makefile: (LDFLAGS-tst-tls5): Use $(no-as-needed).
351 (LDFLAGS-tst-cancel24): Likewise.
352
b93d565a
PP
3532012-05-02 Paul Pluzhnikov <ppluzhnikov@google.com>
354
355 * sysdeps/i386/pthread_spin_lock.S: New.
356 * sysdeps/i386/pthread_spin_lock.c: Delete.
357 * sysdeps/x86_64/pthread_spin_lock.S: New.
358 * sysdeps/x86_64/pthread_spin_lock.c: Delete.
359
6d5c57fa
AS
3602012-04-28 Andreas Schwab <schwab@linux-m68k.org>
361
362 * Makefile ($(objpfx)tst-stack3-mem, $(objpfx)tst-tls6.out): Don't
363 run when cross-compiling.
364
6e236b92
SP
3652012-04-26 Siddhesh Poyarekar <siddhesh@redhat.com>
366
367 * sysdeps/pthread/unwind-forcedunwind.c: Include gnu/lib-names.h
368 instead of libgcc_s.h.
369
0cec7c54
PP
3702012-04-20 Paul Pluzhnikov <ppluzhnikov@google.com>
371
372 * sysdeps/x86_64/tls.h (TLS_GET_FS, TLS_SET_FS): Delete.
373
7ac88e38
DM
3742012-03-27 David S. Miller <davem@davemloft.net>
375
376 * tst-cond16.c (do_test): Use a thread stack size which is either
377 PTHREAD_STACK_MIN or the page size, whichever is larger.
378 * tst-cond18.c (do_test): Likewise.
379
24d8f4b7
L
3802012-03-19 H.J. Lu <hongjiu.lu@intel.com>
381
382 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Use
383 register char * __asm__("rsp") to get stack frame.
384
4adaaafc
L
3852012-03-19 H.J. Lu <hongjiu.lu@intel.com>
386
387 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (SYS_futex): Use
388 __NR_futex directly.
389
ca7b8af5
L
3902012-03-19 H.J. Lu <hongjiu.lu@intel.com>
391
392 * unwind.c (unwind_stop): Cast _Unwind_GetCFA return to
393 _Unwind_Ptr first.
394
7e7fa5f8
DM
3952012-03-16 David S. Miller <davem@davemloft.net>
396
397 [BZ #13844]
398 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: Include using <..>
399 instead of "...".
400 * sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c:
401 Delete, not needed.
402
c4a7b16e
DM
4032012-03-15 David S. Miller <davem@davemloft.net>
404
405 [BZ #13844]
406 * sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c: New file.
407
c524201a
PE
4082012-03-09 Paul Eggert <eggert@cs.ucla.edu>
409
410 [BZ #13673]
411 * pt-crti.S: Replace FSF snail mail address with URL.
412
90ad551f
JM
4132012-03-09 Joseph Myers <joseph@codesourcery.com>
414
415 * sysdeps/pthread/pthread.h (__need_clockid_t, __need_timespec):
416 Do not define before including <time.h>.
417
c64bf5fe
DM
4182012-03-08 David S. Miller <davem@davemloft.net>
419
420 * sysdeps/unix/sysv/linux/sparc/sem_post.c: Update copyright year.
421
48aff776
TS
4222012-03-08 Thomas Schwinge <thomas@codesourcery.com>
423
2edd9a79
TS
424 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
425 Check for timestamp before the Epoch.
426
c564a812
TS
427 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Fix
428 updating nwaiters.
429
48aff776
TS
430 * tst-sem13.c (do_test): Add another test case.
431 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
432 Fix updating nwaiters.
433
e7dbb1be
JM
4342012-03-07 Joseph Myers <joseph@codesourcery.com>
435
436 [BZ #10545]
437 * sysdeps/pthread/configure.in (libc_cv_forced_unwind): Change
438 link test to a compile test.
439 (libc_cv_c_cleanup): Likewise. Declare puts rather than including
440 <stdio.h>.
441 * sysdeps/pthread/configure: Regenerated.
442
a4300c7a
UD
4432012-03-07 Ulrich Drepper <drepper@gmail.com>
444
445 * Makefile (distribute): Remove variable.
446
840df61e
TS
4472012-01-23 Thomas Schwinge <thomas@codesourcery.com>
448
449 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Get rid of
450 superfluous assignment.
451 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c (sem_timedwait):
452 Likewise.
453 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
454 (sem_timedwait): Likewise.
455
9463518d
UD
4562012-03-06 Ulrich Drepper <drepper@gmail.com>
457
abdf2e19
UD
458 * sysdeps/pthread/bits/libc-lock.h: Move information not needed in
459 installed headers to...
9463518d
UD
460 * sysdeps/pthread/bits/libc-lockP.h: ...here. New file.
461
e9258400
DM
4622012-03-06 David S. Miller <davem@davemloft.net>
463
464 * sysdeps/unix/sysv/linux/sparc/sem_post.c (__new_sem_post): Use
465 atomic_increment and remove unused local variable.
466 (__old_sem_post): Likewise.
467
22f9d9df
DM
4682012-02-27 David S. Miller <davem@davemloft.net>
469
9463518d
UD
470 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Don't refer to
471 non-existing __pthread_attr.
22f9d9df
DM
472 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
473 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
474 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
475 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
476 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
477
4efeffc1
UD
4782012-02-26 Ulrich Drepper <drepper@gmail.com>
479
d94a4670
UD
480 * sysdeps/pthread/pthread.h: Define __need_clockid_t for __USE_XOPEN2K.
481
4efeffc1
UD
482 * sysdeps/pthread/pthread.h: Define __need_timespec before including
483 <time.h>.
484 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Name pthread_attr_t
485 union.
486 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
487 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
488 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
489 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
490 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
491
0e7dfaef
JM
4922012-02-21 Joseph Myers <joseph@codesourcery.com>
493
494 [BZ #13695]
495 * Makefile (generated): Remove crti.S, crtn.S, defs.h and
496 pt-initfini.s.
497 [crti.S not in sysdirs] (omit-deps): Do not append.
498 [crti.S not in sysdirs] (CFLAGS-pt-initfini.s): Remove variable.
499 [crti.S not in sysdirs] (pt-initfini.c): Remove vpath directive.
500 [crti.S not in sysdirs] ($(objpfx)crti.S): Remove rule.
501 [crti.S not in sysdirs] ($(objpfx)crtn.S): Likewise.
502 [crti.S not in sysdirs] ($(objpfx)defs.h): Likewise.
503 [crti.S not in sysdirs] ($(objpfx)crti.o): Likewise.
504 [crti.S not in sysdirs] ($(objpfx)crtn.o): Likewise.
505 [crti.S in sysdirs] (extra-objs): Append unconditionally.
506 [crti.S in sysdirs] ($(objpfx)crti.o): Define rule
507 unconditionally.
508 * sysdeps/pthread/pt-initfini.c: Remove file.
509
e3b69ca7
RH
5102012-02-16 Richard Henderson <rth@twiddle.net>
511
959e12e3
UD
512 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: Remove file.
513 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: Remove file.
e3b69ca7 514
df83af67
KK
5152012-02-15 Kaz Kojima <kkojima@rr.iij4u.or.jp>
516
517 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Remove file.
518
f63f3380
DM
5192012-02-16 David S. Miller <davem@davemloft.net>
520
521 * sysdeps/sparc/Makefile: Add -fPIC when building pt-crti.S and crtn.S
522
d463ab10
MP
5232012-02-15 Marek Polacek <polacek@redhat.com>
524
525 * sysdeps/unix/sysv/linux/x86_64/Makefile: Remove file.
526
59ba27a6
PE
5272012-02-09 Paul Eggert <eggert@cs.ucla.edu>
528
529 Replace FSF snail mail address with URLs, as per GNU coding standards.
530
28328403
AS
5312012-02-08 Andreas Schwab <schwab@linux-m68k.org>
532
533 * Makefile (extra-objs) [crti.S in sysdirs]: Add pt-crti.o.
534
3add8e13
JM
5352012-02-08 Joseph Myers <joseph@codesourcery.com>
536
537 Support crti.S and crtn.S provided directly by architectures.
538 * Makefile [crti.S in sysdirs] (omit-deps): Do not append.
539 [crti.S in sysdirs] (CFLAGS-pt-initfini.s): Do not define variable.
540 [crti.S in sysdirs] ($(objpfx)pt-initfini.s): Disable rule.
541 [crti.S in sysdirs] ($(objpfx)crti.S): Likewise.
542 [crti.S in sysdirs] ($(objpfx)crtn.S): Likewise.
543 [crti.S in sysdirs] ($(objpfx)defs.h): Likewise.
544 [crti.S in sysdirs] ($(objpfx)crti.o): Likewise.
545 [crti.S in sysdirs] ($(objpfx)crtn.o): Likewise.
546 [crti.S in sysdirs] (pt-initfini.c): Remove vpath directive.
547 [crti.S in sysdirs] ($(objpfx)crti.o): New rule.
548 * pt-crti.S: New file.
549 * sysdeps/unix/sysv/linux/i386/Makefile: Remove file.
550
9a1d9254
JM
5512012-02-03 Joseph Myers <joseph@codesourcery.com>
552
553 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
554 macros for PIC register setup.
555 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
556 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
557 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
558 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
559 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
560
5452bffe
UD
5612012-01-11 Marek Polacek <polacek@redhat.com>
562
563 * forward.c (FORWARD_NORETURN): Define macro.
564 (__pthread_unwind): Use FORWARD_NORETURN macro to avoid warning.
565 (__pthread_exit): Likewise.
566
356fa562
UD
5672012-01-10 Ulrich Drepper <drepper@gmail.com>
568
8898f020
UD
569 * sysdeps/pthread/pthread.h: Add const attribute to pthread_equal.
570
356fa562
UD
571 * pthreadP.h: Add noreturn to __pthread_exit.
572 * sysdeps/pthread/pthread-functions.h: Likewise for ptr___pthread_exit.
573
f5420cf0
AZ
5742011-12-30 Adhemerval Zanella <azanella@linux.vnet.ibm.com>
575
576 * sysdeps/unix/sysv/linux/aio_misc.h (__aio_create_helper_thread):
577 Call pthread_attr_setstacksize() with result of
578 __pthread_get_minstack() to account for application TLS usage.
579
c473bd1c
MP
5802012-01-08 Marek Polacek <polacek@redhat.com>
581
582 * sysdeps/unix/sysv/linux/mq_notify.c: Include <nptl/pthreadP.h>.
583
120ced3f
UD
5842012-01-07 Ulrich Drepper <drepper@gmail.com>
585
a784e502
UD
586 [BZ #13553]
587 * pthreadP.h: Use const instead of __const.
588 * semaphore.h: Likewise.
589 * sysdeps/pthread/bits/libc-lock.h: Likewise.
590 * sysdeps/pthread/bits/sigthread.h: Likewise.
591 * sysdeps/pthread/pthread.h: Likewise.
592
0269750c
UD
593 * Makefile: Remove elf=yes test, only ELF is supported.
594
ecb6fb48
UD
595 * shlib-versions: Remove entries for ports architectures.
596
120ced3f
UD
597 In case anyone cares, the IA-64 architecture could move to ports.
598 * sysdeps/ia64/*: Removed.
599 * sysdeps/unix/sysv/linux/ia64/*: Removed.
600
2c1094bd
UD
6012011-12-22 Ulrich Drepper <drepper@gmail.com>
602
ee9e0640
UD
603 * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread): Use
604 __pthread_get_minstack.
605 * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Likewise.
606
2c1094bd
UD
607 [BZ #13088]
608 * sysdeps/unix/sysv/linux/timer_routines.c: Get minimum stack size
609 through __pthread_get_minstack.
610 * nptl-init.c (__pthread_initialize_minimal_internal): Get page size
611 directly from _rtld_global_ro.
612 (__pthread_get_minstack): New function.
613 * pthreadP.h: Declare __pthread_get_minstack.
614 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_get_minstack.
615
60e8585f
UD
6162011-12-21 Ulrich Drepper <drepper@gmail.com>
617
618 [BZ #13515]
619 * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
620 Correct reading name from file.
621
caafb2b0
CD
6222011-12-14 Carlos O'Donell <carlos@systemhalted.org>
623
624 * allocatestack.c (allocate_stack): Return errno on failure.
625
e988dba9
JL
6262011-12-14 Jeff Law <law@redhat.com>
627
628 [BZ #5245]
629 * pthread_create.c (__pthread_create_2_1): Translate ENOMEM to EAGAIN.
630
ade60c89
UD
6312011-11-28 Andreas Schwab <schwab@redhat.com>
632
633 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Handle
634 EAGAIN from FUTEX_WAIT_REQUEUE_PI.
635 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
636
312be3f9
UD
6372011-11-15 Ulrich Drepper <drepper@gmail.com>
638
639 * pthread_getattr_np.c (pthread_getattr_np): Set FD_CLOEXEC for
640 /proc/self/maps.
641
c2b18f7a
UD
6422011-10-29 Ulrich Drepper <drepper@gmail.com>
643
644 [BZ #13358]
645 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
646 (__pthread_cond_timedwait): Initialize %r15 correctly also for code
647 path for kernels with FUTEX_CLOCK_REALTIME.
648 Debugged by H.J. Lu <hjl.tools@gmail.com>.
649
3871f58f
AS
6502011-10-27 Andreas Schwab <schwab@redhat.com>
651
652 [BZ #13344]
653 * sysdeps/pthread/pthread.h: Use __THREADNL instead of __THREAD
654 for memory synchronization functions.
655 * semaphore.h: Likewise.
656
485683c3
UD
6572011-10-24 Ulrich Drepper <drepper@gmail.com>
658
659 * tst-cancel7.c: Avoid warning.
660 * tst-mutex6.c: Likewise.
661 * tst-mutex9.c: Likewise.
662 * tst-mutexpi6.c: Likewise.
663
10d005f7
UD
6642011-10-23 Ulrich Drepper <drepper@gmail.com>
665
666 * sysdeps/i386/tls.h: Remove #include <list.h>.
667
fd5bdc09
UD
6682011-10-15 Ulrich Drepper <drepper@gmail.com>
669
10d005f7 670 * pthread_create.c (start_thread): Call __ctype_init.
fd5bdc09 671
7a775e6b
AS
6722011-09-15 Andreas Schwab <schwab@redhat.com>
673
674 * sysdeps/pthread/list.h: Define only list_t if __need_list_t is
675 defined.
676 (list_add): Add atomic_write_barrier.
677 * descr.h: Define __need_list_t before including <list.h>.
678 * nptl-init.c: Include <list.h>
679 * allocatestack.c: Likewise.
680
83cd1420
UD
6812011-09-11 Ulrich Drepper <drepper@gmail.com>
682
683 * sysdeps/i386/tls.h: Remove HAVE_TLS_SUPPORT test.
684 * sysdeps/ia64/tls.h: Likewise.
685 * sysdeps/powerpc/tls.h: Likewise.
686 * sysdeps/s390/tls.h: Likewise.
687 * sysdeps/sh/tls.h: Likewise.
688 * sysdeps/sparc/tls.h: Likewise.
689 * sysdeps/x86_64/tls.h: Likewise.
690
3ce1f295
UD
6912011-09-10 Ulrich Drepper <drepper@gmail.com>
692
02d46fc4
UD
693 * sysdeps/pthread/malloc-machine.h: Define MUTEX_INITIALIZER.
694
d063d164
UD
695 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Don't handle
696 !USE___THREAD.
697 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
698 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
699 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
700 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
701 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
702 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
703 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
704 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
705 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
706 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
707 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
708 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
709
3ce1f295
UD
710 * tst-tls1.c: Support for __thread is now mandatory.
711 * tst-tls2.c: Likewise.
712 * tst-tls3.c: Likewise.
713 * tst-tls3mod.c: Likewise.
714 * tst-tls4.c: Likewise.
715 * tst-tls4moda.c: Likewise.
716 * tst-tls4modb.c: Likewise.
717 * tst-tls5.h: Likewise.
718
1e4bd093
L
7192011-09-08 Ulrich Drepper <drepper@gmail.com>
720
721 [BZ #12403]
722 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
723 (pthread_rwlock_timedwrlock): Use correct macro in test.
724 Patch by H.J. Lu <hongjiu.lu@intel.com>.
725
a0e1f41b
UD
7262011-09-06 Ulrich Drepper <drepper@gmail.com>
727
728 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait): Don't
729 use gettimeofday vsyscall, just call gettimeofday.
9e5c9dcd
UD
730 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
731 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
732 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
733 Likewise.
734 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
735 Likewise.
736 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
737 Simplify __vdso_clock_gettime use.
a0e1f41b 738
39c4451c
DM
7392011-09-05 David S. Miller <davem@davemloft.net>
740
741 * sysdeps/unix/sysv/linux/sem_timedwait.c (do_futex_timed_wait):
742 New function.
743 (sem_timedwait): Call it to force an exception region around
744 the async cancel enable and the futex operation.
745 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: Likewise.
746 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: Likewise.
747 * sysdeps/unix/sysv/linux/sem_wait.c (do_futex_wait): New function.
748 (__new_sem_wait): Call it to force an exception region around
749 the async cancel enable and the futex operation.
750 * sysdeps/unix/sysv/linux/sparc/sem_wait.c: Likewise.
751 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: Likewise.
752
523df511
AS
7532011-08-31 Andreas Schwab <schwab@redhat.com>
754
755 * allocatestack.c (setxid_mark_thread): Ensure that the exiting
756 thread is woken up.
757
e315850c
DM
7582011-08-20 David S. Miller <davem@davemloft.net>
759
760 * Makefile (tst-cleanup0.out): Fix typo in output redirection.
761
5744c68d
RM
7622011-08-14 Roland McGrath <roland@hack.frob.com>
763
764 * sysdeps/i386/pthreaddef.h (TCB_ALIGNMENT): Set to 64, optimal on Atom.
765 * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Likewise.
766
a724d1b9
AS
7672011-08-08 Andreas Schwab <schwab@redhat.com>
768
769 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Maintain aligned
770 stack.
771 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
772 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
773
7a03a9c8
UD
7742011-07-22 Ulrich Drepper <drepper@gmail.com>
775
776 * sysdeps/pthread/unwind-forcedunwind.c (_Unwind_Resume): Add read
777 barrier.
778 (__gcc_personality_v0): Likewise.
779 (_Unwind_ForcedUnwind): Likewise.
780 (_Unwind_GetCFA): Likewise.
781
4b3d3e28
RM
7822011-07-14 Roland McGrath <roland@hack.frob.com>
783
784 * allocatestack.c (__reclaim_stacks): Use uintptr_t cast rather than
785 UINTMAX_C.
786
6f8326ca
UD
7872011-06-30 Ulrich Drepper <drepper@gmail.com>
788
789 * nptl-init.c (__nptl_set_robust): New function.
790 (pthread_functions): Add reference.
791 * npthreadP.h: Declare __nptl_set_robust.
792 * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
793 ptr_set_robust member.
794 * sysdeps/unix/sysv/linux/fork.c: Call set_robust_list syscall in
795 child if threads are used.
796
c71ca1f8
AJ
7972011-06-14 Andreas Jaeger <aj@suse.de>
798
799 * pthread_rwlock_init.c: Include <string.h> for memset declaration.
800
5bdcc103
UD
8012011-05-11 Ulrich Drepper <drepper@gmail.com>
802
803 [BZ #386]
804 * allocatestack.c (allocate_stack): Convert ENOMEM error to EAGAIN.
805
e6c61494
UD
8062011-04-10 Ulrich Drepper <drepper@gmail.com>
807
808 [BZ #12650]
809 * allocatestack.c (get_cached_stack): Deallocate DTV entries before
810 clearing memory.
811 Patch partly by Robert Rex <robert.rex@exasol.com>.
812
c5be0f71
RM
8132011-01-19 Roland McGrath <roland@redhat.com>
814
815 * pthread_cond_wait.c (__pthread_cond_wait): Fix comment typo.
816 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
817 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Likewise.
818 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
819 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock): Likewise.
820 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock): Likewise.
821
1f20b93a
AS
8222011-01-16 Andreas Schwab <schwab@linux-m68k.org>
823
824 * Makefile (test-extras): Add tst-cleanup4aux.
825
70181fdd
UD
8262011-01-14 Ulrich Drepper <drepper@gmail.com>
827
828 [BZ #10563]
829 * sysdeps/pthread/setxid.h (__SETXID_1): Add cast to assignment.
830 (__SETXID_2): Likewise.
831 (__SETXID_3): Likewise.
832
451f001b
UD
8332011-01-13 Ulrich Drepper <drepper@gmail.com>
834
835 [BZ #10484]
836 * Versions [libc] (GLIBC_PRIVATE): Export __libc_alloca_cutoff.
a85b5cb4 837 * alloca_cutoff.c: Add libc_hidden_def.
451f001b 838
f9068148
L
8392010-10-13 H.J. Lu <hongjiu.lu@intel.com>
840
841 [BZ #12113]
842 * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Changed to 32.
843 * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Defined with alignment
844 of "struct pthread".
845
c3758fee
AS
8462010-09-21 Andreas Schwab <schwab@redhat.com>
847
848 * sysdeps/pthread/pthread.h (pthread_cleanup_push)
849 [!__EXCEPTIONS]: Mangle local variable not_first_call.
850 (pthread_cleanup_push_defer_np): Likewise.
851
4ac42e19
UD
8522010-09-03 Ulrich Drepper <drepper@redhat.com>
853
854 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Expect blocks are
855 small.
856
022f6b89
DG
8572010-08-10 Dinakar Guniguntala <dino@in.ibm.com>
858 Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
859
860 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: If
861 FUTEX_WAKE_OP fails make sure to call FUTEX_WAKE instead.
862
f8392f40
L
8632010-08-12 H.J. Lu <hongjiu.lu@intel.com>
864
93f17abf 865 * sysdeps/unix/sysv/linux/i386/Makefile: New file.
f8392f40 866
bebff237
AM
8672010-05-01 Alan Modra <amodra@gmail.com>
868
869 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
870 (PSEUDO): Use correct cr save. Don't use wrong parm save area
871 to save temps. Correct cfi for possible later frame manipulation.
872 (DOCARGS_1, UNDOCARGS_1): Use the correct parm save area.
873 (DOCARGS_2, UNDOCARGS_2, DOCARGS_3, UNDOCARGS_3): Likewise.
874 (DOCARGS_4, UNDOCARGS_4, DOCARGS_5, UNDOCARGS_5): Likewise.
875 (DOCARGS_6, UNDOCARGS_6): Likewise.
876 (CENABLE, CDISABLE): Add nops for non-shared calls.
877
e8ee8bdf
AS
8782010-07-06 Andreas Schwab <schwab@redhat.com>
879
880 * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
881 Fix type mismatch.
882
03e87550
UD
8832010-07-03 Ulrich Drepper <drepper@redhat.com>
884
885 * tst-abstime.c (do_test): Some more cleanups
886
145569dc
UD
8872010-07-02 Ulrich Drepper <drepper@redhat.com>
888
889 * tst-abstime.c: Correct testing and add test for sem_timedwait.
890
2983d85e
AS
8912010-07-01 Andreas Schwab <schwab@redhat.com>
892 Ulrich Drepper <drepper@redhat.com>
893
894 * Makefile (tests): Add tst-abstime.
895 * tst-abstime.c: New file.
896 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
897 (__lll_timedlock_wait): Check for timestamp before the Epoch.
898 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
899 (__lll_timedlock_wait): Likewise.
900 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
901 (__lll_robust_timedlock_wait): Likewise.
902 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
903 (__pthread_cond_timedwait): Likewise.
904 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
905 (pthread_rwlock_timedrdlock): Likewise.
906 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
907 (pthread_rwlock_timedwrlock): Likewise.
908 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
909 Likewise.
910
72b6e8c8
UD
9112010-07-01 Ulrich Drepper <drepper@redhat.com>
912
913 * Makefile (tst-_res1): Add tst-_res1mod1 to dependency list.
914
4bc93b30
TY
9152010-06-01 Takashi Yoshii <takashi.yoshii.zj@renesas.com>
916
917 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Fix incorrect
918 location of ifndef __ASSUME_FUTEX_CLOCK_REALTIME.
919
86a4c67f
UD
9202010-04-09 Ulrich Drepper <drepper@redhat.com>
921
922 [BZ #11390]
923 * sysdeps/unix/sysv/linux/pthread_getname.c: New file.
924 * sysdeps/unix/sysv/linux/pthread_setname.c: New file.
925 * nptl/sysdeps/pthread/pthread.h: Declare pthread_getname and
926 pthread_setname.
927 * Makefile (libpthread-routines): Add pthread_getname and
928 pthread_setname.
929 * Versions: Export pthread_getname and pthread_setname for GLIBC_2.12.
930
f571a994
RM
9312010-04-05 Thomas Schwinge <thomas@schwinge.name>
932
933 * sysdeps/pthread/unwind-resume.c: Moved to main tree sysdeps/gnu/.
934 * sysdeps/pthread/rt-unwind-resume.c: Likewise.
935 * sysdeps/pthread/Makefile: Remove csu section and rt section's
936 unwind-resume bits, now in main tree sysdeps/gnu/Makefile instead.
937
7749bf5f
LM
9382010-03-23 Luis Machado <luisgpm@br.ibm.com>
939
940 * pthread_cond_timedwait.c: Add check for
941 HAVE_CLOCK_GETTIME_VSYSCALL to use VDSO whenever possible.
942 (pthread_cond_timedwait): Use INTERNAL_VSYSCALL instead of
943 INTERNAL_SYSCALL.
944
1d78f299
UD
9452010-03-09 Ulrich Drepper <drepper@redhat.com>
946
947 * pthread_create.c (__pthread_create_2_1): If priorities are incorrect
948 and the call fails wake eventually waiting setxid threads. Don't free
949 stack here if we try starting a thread.
950 * sysdeps/pthread/createthread.c (do_clone): Only wake setxid waiter
951 if the clone call failed.
952
058e9ba9
AS
9532010-03-08 Andreas Schwab <schwab@redhat.com>
954
955 * pthread_create.c (__pthread_create_2_1): Don't set setxid_futex.
956 * allocatestack.c (get_cached_stack): Set setxid_futex.
957 (allocate_stack): Likewise.
958
66f1b8ee
UD
9592010-03-05 Andreas Schwab <schwab@redhat.com>
960 Ulrich Drepper <drepper@redhat.com>
961
962 * allocatestack.c (setxid_mark_thread): Delay handling of thread if
963 it is creating a thread or it is just being created.
964 * pthread_create.c (start_thread): Wake setxid thread if it is
965 waiting.
966 (__pthread_create_2_1): Initialize setxid_futex.
967 * sysdeps/pthread/createthread.c (do_clone): Wake setxid thread if it
968 is waiting.
969
893549c5
MS
9702010-01-15 Ulrich Drepper <drepper@redhat.com>
971
972 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
973 Fix unwind info.
974 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
975
9762010-01-15 Michal Schmidt <mschmidt@redhat.com>
977
978 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
979 Fix pthread_cond_timedwait with requeue-PI.
980 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
981 Fix pthread_cond_wait with requeue-PI.
982
402cd987
UD
9832010-01-14 Ulrich Drepper <drepper@redhat.com>
984
78ee2185
UD
985 * Versions: Add pthread_mutex_consistent, pthread_mutexattr_getrobust,
986 and pthread_mutexattr_setrobust for GLIBC_2.12.
402cd987 987 * pthread_mutex_consistent.c: Define alias pthread_mutex_consistent.
78ee2185
UD
988 * pthread_mutexattr_getrobust.c: Define alias
989 pthread_mutexattr_getrobust.
990 * pthread_mutexattr_setrobust.c: Define alias
991 pthread_mutexattr_setrobust.
402cd987 992
d3c7e686
UD
9932010-01-12 Ulrich Drepper <drepper@redhat.com>
994
995 * sysdeps/pthread/pthread.h: Cleanup. Fix up for XPG7.
996
f095bb72
UD
9972010-01-08 Ulrich Drepper <drepper@redhat.com>
998
999 * sysdeps/pthread/pthread.h: Fix pthread_mutex_consistent declaration.
1000
d34bd80f
TS
10012009-12-18 Thomas Schwinge <thomas@codesourcery.com>
1002
1003 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c (_init): Don't
1004 call __gmon_start__.
1005 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c (_init): Likewise.
1006
f01c2359
UD
10072009-12-17 Ulrich Drepper <drepper@redhat.com>
1008
1009 * pthread_rwlock_init.c (__pthread_rwlock_init): Simplify code by
1010 using memset.
1011
75956694
DG
10122009-12-01 Dinakar Guniguntala <dino@in.ibm.com>
1013
1014 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.h: Define
1015 FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
1016 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: If mutex
1017 is a non robust PI mutex, then use FUTEX_CMP_REQUEUE_PI.
1018 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
1019 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: If mutex
1020 is a non robust PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
1021 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1022
9554ebf2
UD
10232009-12-12 Ulrich Drepper <drepper@redhat.com>
1024
1025 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1026 Don't update nwaiters after invalid timeout is recognized.
1027
ebb92a49
TS
10282009-11-27 Thomas Schwinge <thomas@codesourcery.com>
1029
1030 * sysdeps/unix/sysv/linux/sh/pt-initfini.c (_init): Don't call
1031 __gmon_start__.
1032
b55ec98c
AS
10332009-11-27 Andreas Schwab <schwab@redhat.com>
1034
1035 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Reload
1036 THREAD_SELF->cancelhandling after returning from futex call.
1037
80b3a4ea
UD
10382009-11-24 Ulrich Drepper <drepper@redhat.com>
1039
1040 * tst-sem13.c: New file.
1041 * Makefile (tests): Add tst-sem13.
1042
57a299fe
RM
10432009-11-22 Roland McGrath <roland@redhat.com>
1044
1045 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: # include "i686/dl-sysdep.h"
1046 instead of recapitulating its contents.
1047
dfedb126
UD
10482009-11-18 Ulrich Drepper <drepper@redhat.com>
1049
1050 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Minor
1051 optimizations and cleanups.
1052
dd7106b3
DG
10532009-11-18 Dinakar Guniguntala <dino@in.ibm.com>
1054
1055 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
1056 Remove redundant code. Fix cfi offsets.
1057 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
1058 Fix cfi offsets.
1059
f8c10bb4
UD
10602009-11-17 Ulrich Drepper <drepper@redhat.com>
1061
62616842
UD
1062 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Minimally
1063 reduce size of unwind info.
1064
f8c10bb4
UD
1065 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Convert to use
1066 cfi directives.
1067 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1068 Based on a patch by Dinakar Guniguntala <dino@in.ibm.com>.
1069
13f6812f
AS
10702009-11-03 Andreas Schwab <schwab@linux-m68k.org>
1071
1072 [BZ #4457]
1073 * sysdeps/pthread/unwind-resume.c: Include <libgcc_s.h> and use
1074 LIBGCC_S_SO.
1075 * sysdeps/pthread/unwind-forcedunwind.c: Likewise.
1076
25db0f6c
DJ
10772009-10-30 Ulrich Drepper <drepper@redhat.com>
1078
9c04f7c1
UD
1079 * tst-sem11.c (main): Rewrite to avoid aliasing problems.
1080
25db0f6c
DJ
1081 [BZ #3270]
1082 * allocatestack.c (__nptl_setxid): Perform the operation in multiple
1083 steps to avoid races with creation and terminations.
1084 * nptl-init.c (sighandler_setxid): Adjust.
1085 Patch by Daniel Jacobowitz.
1086
3d60eb17
AS
10872009-09-07 Andreas Schwab <schwab@redhat.com>
1088
1089 * sysdeps/pthread/bits/libc-lock.h (BP_SYM): Remove space before paren.
1090
38eb6136
SP
10912009-09-02 Suzuki K P <suzuki@in.ibm.com>
1092 Joseph Myers <joseph@codesourcery.com>
1093
1094 [BZ #7094]
1095 * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
1096 Initialize the sigev_notify field for newly created timer to make sure
01034d75 1097 the timer gets deleted from the active timer's list upon timer_delete.
38eb6136 1098
7812c65b
AS
10992009-08-27 Andrew Stubbs <ams@codesourcery.com>
1100
1101 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
1102 Correct a logic error.
1103
84088310
UD
11042009-08-25 Ulrich Drepper <drepper@redhat.com>
1105
1106 * sysdeps/x86_64/tls.h (RTLD_ENABLE_FOREIGN_CALL): Store old value
1107 of the field in local variables.
1108 (RTLD_FINALIZE_FOREIGN_CALL): Restore rtld_must_xmm_save from local
1109 variable and don't unconditionally clear it.
1110
b42a214c
UD
11112009-08-24 Ulrich Drepper <drepper@redhat.com>
1112
1113 * pthread_create.c (start_thread): Hint to the kernel that memory for
1114 the stack can be reused. We do not mark all the memory. The part
1115 still in use and some reserve are kept.
1116
2d094b73
UD
11172009-08-23 Ulrich Drepper <drepper@redhat.com>
1118
1119 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Clean up namespace.
1120
ae0d5450
UD
11212009-08-11 Ulrich Drepper <drepper@redhat.com>
1122
1123 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Add CFI
1124 directives.
1125
1bc2b97e
UD
11262009-08-10 Ulrich Drepper <drepper@redhat.com>
1127
1128 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Add CFI
1129 directives.
1130 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1131
ec492239
AS
11322009-08-10 Andreas Schwab <schwab@redhat.com>
1133
1134 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
1135 (__pthread_cond_signal): Don't clobber register used for syscall
1136 number.
1137
49eea97b
UD
11382009-08-08 Ulrich Drepper <drepper@redhat.com>
1139
efa0569d
UD
1140 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1141 Optimize code path used when FUTEX_CLOCK_REALTIME is supported.
1142
49eea97b
UD
1143 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1144 (__pthread_cond_wait): Optimize by avoiding use of callee-safe
1145 register.
1146
9083bcc5
UD
11472009-08-07 Ulrich Drepper <drepper@redhat.com>
1148
1149 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Little optimizations
1150 enabled by the special *_asynccancel functions.
1151 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1152 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1153
1154 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Include lowlevellock.h.
1155
421665c4
UD
11562009-08-04 Ulrich Drepper <drepper@redhat.com>
1157
1158 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: New file.
1159 * sysdeps/unix/sysv/linux/x86_64/libc-cancellation.S: New file.
1160 * sysdeps/unix/sysv/linux/x86_64/librt-cancellation.S: New file.
1161 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Optimize
1162 since we can assume the special __*_{en,dis}able_asynccancel
1163 functions.
1164 (PUSHARGS_*, POPARGS_*, SAVESTK_*, RESTSTK_*): Removed.
1165 * sysdeps/x86_64/tcb-offsets.sym: Add cancellation-related bits
1166 and PTHREAD_CANCELED.
1167
bd03a1af
UD
11682009-07-31 Ulrich Drepper <drepper@redhat.com>
1169
1170 * descr.h: Better definition of *_BITMASK macros for cancellation.
1171
b48a267b
UD
11722009-07-29 Ulrich Drepper <drepper@redhat.com>
1173
586fa886
UD
1174 * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Define explicitly to 32.
1175
b48a267b 1176 * sysdeps/x86_64/tls.h (tcbhead_t): Add room for SSE registers the
586fa886
UD
1177 dynamic linker might have to save.
1178 Define RTLD_CHECK_FOREIGN_CALL, RTLD_ENABLE_FOREIGN_CALL,
1179 RTLD_PREPARE_FOREIGN_CALL, and RTLD_FINALIZE_FOREIGN_CALL. Pretty
1180 printing.
1181
b48a267b
UD
1182 * sysdeps/x86_64/tcb-offsets.sym: Add RTLD_SAVESPACE_SSE.
1183
b0948ffd
UD
11842009-07-28 Ulrich Drepper <drepper@redhat.com>
1185
1186 * pthread_mutex_lock.c [NO_INCR] (__pthread_mutex_cond_lock_adjust):
1187 New function.
1188 * pthreadP.h: Declare __pthread_mutex_cond_lock_adjust.
1189 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add ROBUST_BIT.
1190 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Don't use
1191 requeue_pi for robust mutexes.
1192 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
1193 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1194 Don't only skip __pthread_mutex_cond_lock. Call instead
1195 __pthread_mutex_cond_lock_adjust.
1196 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1197
1198 * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Minor
1199 optimization of PI mutex handling.
1200
e73e694e
UD
12012009-07-27 Ulrich Drepper <drepper@redhat.com>
1202
1203 [BZ #10418]
1204 * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Use _rel
1205 instead of of _acq variants of cmpxchg.
1206
f1adf1f4
UD
12072009-07-23 Ulrich Drepper <drepper@redhat.com>
1208
01b597da
UD
1209 * sysdeps/x86_64/configure.in: New file.
1210
f1adf1f4
UD
1211 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix error
1212 path when not using absolute timeout futex.
1213
c3db953c
UD
12142009-07-20 Ulrich Drepper <drepper@redhat.com>
1215
1216 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Minor
1217 optimizations of last changes.
1218 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1219
515a8908
UD
12202009-07-19 Ulrich Drepper <drepper@redhat.com>
1221
42e69bcf
UD
1222 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
1223 FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
1224 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: If mutex
1225 is a PI mutex, then use FUTEX_CMP_REQUEUE_PI.
1226 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
1227 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: If mutex
1228 is a PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
1229 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1230
515a8908
UD
1231 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1232 (__pthread_cond_timedwait): Make more robust.
1233
30b1954a
UD
12342009-07-18 Ulrich Drepper <drepper@redhat.com>
1235
e2dca2fe
UD
1236 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
1237 (__lll_robust_timedlock_wait): If possible use FUTEX_WAIT_BITSET to
1238 directly use absolute timeout.
1239
3d77b268
UD
1240 * tst-sem5.c (do_test): Add test for premature timeout.
1241 * Makefile: Linu tst-sem5 with librt.
1242
d979611e
UD
1243 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
1244 (pthread_rwlock_timedwrlock): If possible use FUTEX_WAIT_BITSET to
1245 directly use absolute timeout.
32c6c342
UD
1246 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
1247 (pthread_rwlock_timedrdlock): Likewise.
d979611e 1248
f8b6cd21
UD
1249 * tst-cond11.c (run_test): Add test to check that the timeout is
1250 long enough.
1251
e88726b4
UD
1252 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1253 (__pthread_cond_timedwait): If possible use FUTEX_WAIT_BITSET to
1254 directly use absolute timeout.
1255
30b1954a
UD
1256 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1257 (__pthread_cond_wait): Convert to using exception handler instead of
1258 registered unwind buffer.
92618c95
UD
1259 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1260 (__pthread_cond_timedwait): Likewise.
30b1954a 1261
d52c96e7
UD
12622009-07-17 Ulrich Drepper <drepper@redhat.com>
1263
f351f2b7
UD
1264 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1265 If possible use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME to directly
1266 use absolute timeout.
1267
0adae468
UD
1268 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Optimize
1269 handling of uncontested semaphore.
1270
d52c96e7
UD
1271 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1272 (__condvar_cleanup): Rewrite to use cfi directives instead of
1273 hand-coded unwind tables.
63601ccd
UD
1274 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S (__pthread_once):
1275 Likewise.
c3c2f3cf 1276 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
aee2665a
UD
1277 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1278 Likewise.
d52c96e7 1279
bfdb73e1
UD
12802009-06-12 Ulrich Drepper <drepper@redhat.com>
1281
1282 * Makefile (libpthread-routines): Add pthread_sigqueue.
1283 * Versions: Add pthread_sigqueue for GLIBC_2.11.
1284 * sysdeps/pthread/bits/sigthread.h: Declare pthread_sigqueue.
1285 * sysdeps/unix/sysv/linux/pthread_sigqueue.c: New file.
1286
1828530f
BK
12872009-06-11 Ulrich Drepper <drepper@redhat.com>
1288
1289 [BZ #10262]
1290 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1291 (LOAD_FUTEX_WAIT_ABS): Fix futex parameter in case private futexes
1292 cannot be assumed.
1293 Patch by Bryan Kadzban <bz-glibc@kdzbn.homelinux.net>.
1294
a5b8b56d
UD
12952009-05-16 Ulrich Drepper <drepper@redhat.com>
1296
e20c4ef0
UD
1297 * libc-cancellation.c: Move __libc_cleanup_routine to...
1298 * libc-cleanup.c: ...here. New file.
1299 * Makefile (routines): Add libc-cleanup.
1300
cba0ca79
UD
1301 * cancellation.c (__pthread_disable_asynccancel): Remove unnecessary
1302 test.
1303 * libc-cancellation.c: Use <nptl/cancellation.c: to define the code.
1304 * sysdeps/pthread/librt-cancellation.c: Likewise.
1305
a5b8b56d
UD
1306 [BZ #9924]
1307 * nptl-init.c: Renamed from init.c.
1308 * Makefile: Change all occurences of init.c to nptl-init.c.
1309
1a7f254b
UD
13102009-05-15 Ulrich Drepper <drepper@redhat.com>
1311
9437b427
UD
1312 * cancellation.c (__pthread_disable_asynccancel): Correct the bits
1313 to test when deciding on the delay.
1314 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
1315 * pthread_cancel.c: Close race between deciding on sending a signal
1316 and setting the CANCELING_BIT bit.
1317
1a7f254b
UD
1318 * cancellation.c (__pthread_disable_asynccancel): Don't return if
1319 thread is canceled.
1320 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
1321
d5c157a9
UD
13222009-04-27 Ulrich Drepper <drepper@redhat.com>
1323
1324 * cancellation.c (__pthread_disable_asynccancel): Use THREAD_ATOMIC_AND
1325 is available.
1326 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
1327 * sysdeps/x86_64/tls.h: Define THREAD_ATOMIC_AND.
1328 * sysdeps/i386/tls.h: Likewise.
1329 (tcbhead_t): Add __private_tm member.
1330
f521be31
UD
13312009-04-26 Ulrich Drepper <drepper@redhat.com>
1332
5efe8650
UD
1333 * sem_open.c (sem_open): Rewrite initialization of initsem to
1334 avoid warnings.
1335
f521be31
UD
1336 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1337 Avoid warning by using may_alias attribute on ptrhack.
1338
d301a6e1
UD
13392009-04-22 Ulrich Drepper <drepper@redhat.com>
1340
5497de87 1341 [BZ #10090]
d301a6e1
UD
1342 * pthread_attr_setschedparam.c (__pthread_attr_setschedparam):
1343 Check policy and priority for validity.
1344 Patch mostly by Zhang Xiliang <zhangxiliang@cn.fujitsu.com>.
1345
71a5bd3e
UD
13462009-03-15 Ulrich Drepper <drepper@redhat.com>
1347
1348 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1349 (__pthread_cond_timedwait): Change to use cfi directives instead of
1350 hand-coded unwind sections.
1351
30991b8b
UD
13522009-03-10 Ulrich Drepper <drepper@redhat.com>
1353
1354 * init.c (nptl_freeres): Compile only for SHARED.
1355
9920a6b8
JJ
13562009-03-09 Jakub Jelinek <jakub@redhat.com>
1357
1358 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Define
1359 FUTEX_WAIT_BITSET, FUTEX_WAKE_BITSET, FUTEX_CLOCK_REALTIME and
1360 FUTEX_BITSET_MATCH_ANY.
1361
e965d514
RM
13622009-02-27 Roland McGrath <roland@redhat.com>
1363
1364 * init.c (__nptl_initial_report_events): Mark __attribute_used__.
1365 * pthread_create.c (__nptl_threads_events, __nptl_last_event): Likewise.
1366
6cbe890a
UD
13672009-02-26 Ulrich Drepper <drepper@redhat.com>
1368
1369 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1370 _POSIX_THREAD_ROBUST_PRIO_INHERIT and
1371 _POSIX_THREAD_ROBUST_PRIO_PROTECT. Reset value of macros from
1372 200112L to 200809L.
1373
77db439e
UD
13742009-02-25 Ulrich Drepper <drepper@redhat.com>
1375
1376 * sysdeps/pthread/pthread.h: The robust mutex functions are in
1377 POSIX 2008.
1378
5be0a688
UD
13792009-02-24 Ulrich Drepper <drepper@redhat.com>
1380
1381 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_BITS_POSIX_OPT_H):
1382 Unify name of include protector macro.
1383
4c869eb6
UD
13842009-02-14 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
1385
1386 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
1387 LOAD_FUTEX_WAIT_ABS even if (FUTEX_WAIT == 0).
1388
cca50323
UD
13892009-01-29 Ulrich Drepper <drepper@redhat.com>
1390
7f901dd7
UD
1391 * sysdeps/pthread/unwind-forcedunwind.c: Encrypt all function
1392 pointer variables.
1393
cca50323
UD
1394 * allocatestack.c (__free_stacks): Renamed from free_stacks.
1395 (__free_stack_cache): Removed. Change callers to call __free_stacks.
1396 * init.c (nptl_freeres): New function.
1397 (pthread_functions): Initialize ptr_freeres to nptl_freeres.
1398 * pthreadP.h: Don't declare __free_stack_cache. Declare __free_stacks.
1399 * sysdeps/pthread/unwind-forcedunwind.c (libgcc_s_handle): New
1400 variable.
1401 (pthread_cancel_init): Depend in libgcc_s_handle for decision to
1402 load DSO. Assign last.
1403 (__unwind_freeres): New function.
1404
1405 * allocatestack.c (__reclaim_stacks): Reset in_flight_stack later
1406 for better debugging. No need to use stack_list_add here.
1407
a7bd183f
UD
14082009-01-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1409
1410 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
1411 (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
1412 instead of computing relative timeout.
1413 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
1414 FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
1415
563ee1cb
UD
14162009-01-25 Ulrich Drepper <drepper@redhat.com>
1417
1418 * pthread_mutex_lock.c (__pthread_mutex_lock): Remove unused label out.
1419
f25c7b08
UD
14202009-01-08 Ulrich Drepper <drepper@redhat.com>
1421
1422 * sysdeps/pthread/list.h (list_add): Initialize new element first.
1423 (list_add_tail): Removed.
1424
40de0fe3
JJ
14252009-01-07 Ulrich Drepper <drepper@redhat.com>
1426
1427 * (in_flight_stack): New variable.
1428 (stack_list_del): New function. Use instead of list_del.
1429 (stack_list_add): New function. Use instead of list_add when adding to
1430 stack_cache and stack_used lists.
1431 (__reclaim_stacks): Complete operations on stack_cache and stack_used lists
1432 when the fork call interrupted another thread.
1433
3c612057
UD
14342009-01-04 Ulrich Drepper <drepper@redhat.com>
1435
1436 * init.c (__pthread_initialize_minimal_internal): Optimize test
1437 FUTEX_CLOCK_REALTIME a bit.
1438
19834b42
UD
14392009-01-03 Ulrich Drepper <drepper@redhat.com>
1440
1441 * init.c (__pthread_initialize_minimal_internal): Cheat a bit by
1442 only passing five parameters to FUTEX_WAIT_BITSET call.
1443
1444 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
a9fa090b 1445 (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
19834b42
UD
1446 instead of computing relative timeout.
1447
7dd650d7
UD
14482009-01-02 Ulrich Drepper <drepper@redhat.com>
1449
cbd8aeb8
UD
1450 * init.c (__pthread_initialize_minimal_internal): Check for
1451 FUTEX_CLOCK_REALTIME flag.
1452 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
a9fa090b 1453 Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME instead of computing
cbd8aeb8
UD
1454 relative timeout.
1455
7dd650d7
UD
1456 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
1457 FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
1458 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1459 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1460 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1461 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1462
217d45cd
UD
14632008-12-09 Ulrich Drepper <drepper@redhat.com>
1464
1465 * sysdeps/pthread/pthread.h (pthread_cleanup_pop): Use { } as empty
1466 loop body instead of ; to avoid gcc warnings.
1467 (pthread_cleanup_pop_restore_np): Likewise.
1468 Patch by Caolán McNamara <caolanm@redhat.com>.
1469
6de79a49
UD
14702008-12-09 Jakub Jelinek <jakub@redhat.com>
1471
1472 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle only the
1473 fast path here, for robust/PI/PP mutexes call
1474 __pthread_mutex_lock_full. Don't use switch, instead use a series
1475 of ifs according to their probability.
1476 (__pthread_mutex_lock_full): New function.
1477 * pthread_mutex_unlock.c: Include assert.h.
1478 (__pthread_mutex_unlock_usercnt): Handle only the
1479 fast path here, for robust/PI/PP mutexes call
1480 __pthread_mutex_unlock_full. Don't use switch, instead use a series
1481 of ifs according to their probability.
1482 (__pthread_mutex_unlock_full): New function.
1483 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c
1484 (__pthread_mutex_lock_full): Define.
1485
71bb2639
UD
14862008-12-08 Ulrich Drepper <drepper@redhat.com>
1487
1488 * sysdeps/x86_64/tls.h (tcbhead_t): Add fields reserved for TM
1489 implementation. Add necessary padding and.
1490 * descr.h (struct pthread): Increase padding for tcbhead_t to 24
1491 words.
1492
247626f3
UD
14932008-12-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1494
1495 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define FUTEX_WAIT_BITSET
1496 and FUTEX_WAKE_BITSET.
1497
da5ac135
UD
14982008-12-02 Ulrich Drepper <drepper@redhat.com>
1499
1500 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_WAIT_BITSET
1501 and FUTEX_WAKE_BITSET.
1502 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1503 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1504 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1505 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1506
c0439b95
RM
15072008-11-25 Roland McGrath <roland@redhat.com>
1508
1509 * sysdeps/alpha, sysdeps/unix/sysv/linux/alpha:
1510 Subdirectories moved to ports repository as
1511 sysdeps/.../nptl subdirectories.
1512
0e54a725
UD
15132008-11-12 Jakub Jelinek <jakub@redhat.com>
1514
1515 [BZ #7008]
1516 * pthread_condattr_setclock.c (pthread_condattr_setclock): Fix masking
1517 of old value.
1518 * pthread_cond_init.c (__pthread_cond_init): Fix
1519 cond->__data.__nwaiters initialization.
1520 * Makefile (tests): Add tst-cond23.
1521 * tst-cond23.c: New test.
1522
4b23f9bd
JJ
15232008-11-07 Jakub Jelinek <jakub@redhat.com>
1524
1525 * sysdeps/pthread/malloc-machine.h (MALLOC): Adjust __libc_tsd_define
1526 arguments.
1527 (tsd_setspecific, tsd_getspecific): Adjust __libc_tsd_{set,get}
1528 arguments.
1529
efac1fce
UD
15302008-11-01 Ulrich Drepper <drepper@redhat.com>
1531
1532 [BZ #6955]
1533 * pthread_mutex_lock.c: Add support for private PI mutexes.
1534 * pthread_mutex_timedlock.c: Likewise.
1535 * pthread_mutex_trylock.c: Likewise.
1536 * pthread_mutex_unlock.c: Likewise.
1537 Patch mostly by Ben Jackson <ben@ben.com>.
1538
bf837fa3
UD
15392008-10-31 Ulrich Drepper <drepper@redhat.com>
1540
1541 [BZ #6843]
1542 * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread):
1543 Increase stack size for helper thread.
1544
208bc836
UD
15452008-10-06 Martin Schwidefsky <schwidefsky@de.ibm.com>
1546
1547 * sysdeps/s390/tls.h (THREAD_SET_STACK_GUARD): Add empty inline
1548 assembly with a clobber list for access registers a0 and a1.
1549
17f8b4a9
UD
15502008-09-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
1551
1552 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Add memory barrier
1553 to force runp->refcntr to be read from memory.
1554
2458c748
AJ
15552008-09-08 Richard Guenther <rguenther@suse.de>
1556
1557 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_lock,
1558 lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
1559 lll_timedlock, lll_robust_timedlock, lll_unlock,
1560 lll_robust_unlock): Promote private to int.
1561
965805e8
UD
15622008-08-15 Ulrich Drepper <drepper@redhat.com>
1563
1564 * sysdeps/x86_64/pthreaddef.h: Remove ARCH_MAP_FLAGS and
1565 ARCH_RETRY_MMAP definitions.
1566 * allocatestack.c: Remove definition of ARCH_MAP_FLAGS.
1567 Define MAP_STACK when not defined.
1568 (allocate_stack): Use MAP_STACK instead of ARCH_MAP_FLAGS. Remove
1569 handling of ARCH_RETRY_MMAP.
1570
bd7f4857
UD
15712008-07-30 Ulrich Drepper <drepper@redhat.com>
1572
1573 * tst-align2.c (f): Print message that f is reached.
1574
619cc2f6
UD
15752008-04-28 Hiroki Kaminaga <kaminaga@sm.sony.co.jp>
1576
1577 [BZ #6740]
1578 * sysdeps/powerpc/tcb-offsets.sym (PRIVATE_FUTEX_OFFSET): Guard symbol
1579 definition with #ifndef __ASSUME_PRIVATE_FUTEX.
1580
8ccf22f9
UD
15812008-07-25 Ulrich Drepper <drepper@redhat.com>
1582
1583 * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Use
1584 SOCK_CLOEXEC if possible.
1585
15862008-05-29 Ulrich Drepper <drepper@redhat.com>
1587
1588 * Makefile (tests): Add tst-rwlock2a.
1589 * tst-rwlock2.c: Use TYPE macro to decide what rwlock type to use.
1590 * tst-rwlock2a.c: New file.
1591
5a337776
UD
15922008-06-12 Ulrich Drepper <drepper@redhat.com>
1593
1594 * sysdeps/pthread/pthread.h: Remove inadvertant checkin.
1595
e4d6e7f5
UD
15962008-05-17 Samuel Thibault <samuel.thibault@ens-lyon.org>
1597
1598 * sysdeps/pthread/pthread.h: Fix typo in comment.
1599
d6296e88
UD
16002008-05-28 Ulrich Drepper <drepper@redhat.com>
1601
1602 * sysdeps/pthread/createthread.c (do_clone): Pass accurate length
1603 of CPU set to the kernel.
1604
62605cbf
UD
16052008-05-23 Paul Pluzhnikov <ppluzhnikov@google.com>
1606
1607 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Add
1608 cfi directives.
1609 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
1610 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
1611 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1612 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1613 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1614 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1615
16162008-05-22 Paul Pluzhnikov <ppluzhnikov@google.com>
1617
1618 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: Add
1619 cfi directives.
1620 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1621 Likewise.
1622 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1623 Likewise.
1624 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1625 Likewise.
1626
4b2c85c0
UD
16272008-05-26 Ulrich Drepper <drepper@redhat.com>
1628
1629 * tst-typesizes.c: Explicitly check __SIZEOF_PTHREAD_* constants.
1630
b72f5692 16312008-05-20 Jakub Jelinek <jakub@redhat.com>
4b2c85c0
UD
1632
1633 David S. Miller <davem@davemloft.net>
3b15b590 1634
b72f5692 1635 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
3b15b590 1636
cdffaaa6
UD
16372008-05-10 Ulrich Drepper <drepper@redhat.com>
1638
1639 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Access
1640 __pshared correctly.
1641 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1642 Likewise.
1643 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1644 Likewise.
1645 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
1646 Likewise.
1647 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
1648 Likewise.
1649 Reported by Clemens Kolbitsch <clemens.kol@gmx.at>.
1650
2313c48f
JJ
16512008-04-14 David S. Miller <davem@davemloft.net>
1652
1653 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
1654 (__old_sem_wait): Fix argument to lll_futex_wait().
1655
2f611ada
UD
16562007-11-26 Daniel Jacobowitz <dan@codesourcery.com>
1657
1658 * pthread_create.c: Require pthread_mutex_trylock and
1659 pthread_key_delete for libgcc.
1660
d24be489
JJ
16612008-04-08 Jakub Jelinek <jakub@redhat.com>
1662
1663 [BZ #6020]
1664 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
1665 (lll_futex_wake_unlock): Add private argument to the pre-v9 macro.
1666 Patch by Sunil Amitkumar Janki <devel.sjanki@gmail.com>.
1667
f96853be
UD
16682008-03-27 Ulrich Drepper <drepper@redhat.com>
1669
8ccf22f9 1670 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine ARG_MAX if
f96853be
UD
1671 <linux/limits.h> has defined it.
1672 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
1673 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
1674 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
1675 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
1676
354b7527
JJ
16772008-03-18 Jakub Jelinek <jakub@redhat.com>
1678
1679 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Use __ASSEMBLER__ instead
1680 of ASSEMBLER.
1681 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
1682 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Likewise.
1683
702ae329
UD
16842008-03-14 Ulrich Drepper <drepper@redhat.com>
1685
1686 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
1687 HAVE_DL_DISCOVER_OSVERSION.
1688 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
1689 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Likewise.
1690
443db178
UD
16912008-03-07 Ulrich Drepper <drepper@redhat.com>
1692
1693 [BZ #5778]
1694 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Change
1695 _POSIX_CHOWN_RESTRICTED value to zero.
1696
67fbfa5c
RM
16972008-01-31 Roland McGrath <roland@redhat.com>
1698
1699 * Makefile (omit-deps): Variable removed.
1700
dd3113da
UD
17012008-01-30 Ulrich Drepper <drepper@redhat.com>
1702
1703 * sysdeps/unix/sysv/linux/x86_64/sem_post.S (sem_post): Avoid
1704 unnecessary addr32 prefix.
1705
16cd816f
RM
17062008-01-29 Roland McGrath <roland@redhat.com>
1707
1708 * Makeconfig (ptw-CPPFLAGS, sysd-rules-patterns): New variables.
1709
b4b166af
UD
17102008-01-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1711
1712 * sysdeps/unix/sysv/linux/sh/sem_post.S: Don't overflow value field.
1713
17142008-01-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1715
1716 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XADD): Use
1717 a scratch register.
1718 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
1719 (__lll_lock_wait_private): Fix typo.
1720 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
1721 (pthread_barrier_wait): Likewise. Adjust XADD use.
1722 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
1723 Adjust XADD use.
1724 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
1725 (pthread_rwlock_timedrdlock): Return correct return value.
1726 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
16cd816f 1727 (pthread_rwlock_timedwrlock): Likewise.
b4b166af 1728
eaf95a26
UD
17292008-01-15 Ulrich Drepper <drepper@redhat.com>
1730
1731 * tst-eintr2.c (do_test): make sure that if mutex_lock in main
1732 thread returns the program exits with an error code.
1733
ab355d9a
UD
17342008-01-10 Ulrich Drepper <drepper@redhat.com>
1735
1736 * pthread-errnos.sym: Add EOVERFLOW.
1737 * sysdeps/unix/sysv/linux/structsem.sym: Add SEM_VALUE_MAX.
1738 * sysdeps/unix/sysv/linux/sem_post.c: Don't overflow value field.
1739 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1740 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1741
b8cca206
UD
17422007-12-14 Ulrich Drepper <drepper@redhat.com>
1743
1744 * sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
1745 parameter. Passed it as permission to mmap.
1746 * allocatestack.c (allocate_stack): Pass prot as second parameter
1747 to ARCH_RETRY_MMAP.
1748
189dce4f
UD
17492007-12-12 Ulrich Drepper <drepper@redhat.com>
1750
3eb0e1c6
UD
1751 * tst-basic7.c: Allocate memory for the stack.
1752
189dce4f
UD
1753 [BZ #5465]
1754 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
1755 (__pthread_cond_timedwait): Don't use VDSO.
58d11795 1756 Patch by Michal Januszewski.
189dce4f 1757
26e21e75
UD
17582007-12-07 Ulrich Drepper <drepper@redhat.com>
1759
1760 [BZ #5455]
1761 * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
1762 Allow label before pthread_cleanup_pop.
1763 (pthread_cleanup_pop_restore_np): Likewise.
1764
191ec77f
UD
17652007-12-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1766
1767 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
1768 Store 2 before returning ETIMEDOUT.
1769
c012be6f
UD
17702007-11-23 Ulrich Drepper <drepper@redhat.com>
1771
1772 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
1773 Store 2 before returning ETIMEDOUT.
1774 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
1775 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
1776 (__lll_lock_wait_private): Optimize.
1777 (__lll_lock_wait): Likewise.
1778
77f1e09a
UD
17792007-11-20 Jakub Jelinek <jakub@redhat.com>
1780
1781 * sysdeps/pthread/pthread.h (pthread_cleanup_push,
1782 pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
1783 g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
1784
0f7e0ee5
UD
17852007-11-08 Ulrich Drepper <drepper@redhat.com>
1786
cbed6a60
UD
1787 [BZ #5240]
1788 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
1789 If we time out, try one last time to lock the futex to avoid
1790 losing a wakeup signal.
1791 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1792 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1793
0f7e0ee5
UD
1794 [BZ #5245]
1795 * sysdeps/pthread/createthread.c (do_clone): Translate clone error
1796 if necessary.
1797
f6ed654c
UD
17982007-11-07 Ulrich Drepper <drepper@redhat.com>
1799
1800 [BZ #5245]
1801 * allocatestack.c (allocate_stack): Change ENOMEM error in case
1802 mmap failed to EAGAIN.
1803 * Makefile (tests): Add tst-basic7.
1804 * tst-basic7.c: New file.
1805
b92e3780
UD
18062007-11-05 Ulrich Drepper <drepper@redhat.com>
1807
1808 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
1809 Use __linkin_atfork.
1810
94a749f6
UD
18112007-11-03 Mike Frysinger <vapier@gentoo.org>
1812
1813 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
1814 missing line continuations.
1815 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
1816 LOAD_FUTEX_WAKE): Likewise. Also add missing 3rd parameter.
1817
f160a450
UD
18182007-10-28 Ulrich Drepper <drepper@redhat.com>
1819
1820 [BZ #5220]
1821 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
1822 __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
1823 (struct timer): Add next element.
1824 * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
1825 enqueue timer structure into __active_timer_sigev_thread list.
1826 * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
1827 remove timer struct from __active_timer_sigev_thread.
1828 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
1829 Before using timer structure make sure it is still on the
1830 __active_timer_sigev_thread list. Keep lock until done.
1831 Define __active_timer_sigev_thread and
1832 __active_timer_sigev_thread_lock.
1833
94833f11
UD
18342007-10-27 Ulrich Drepper <drepper@redhat.com>
1835
1836 * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
1837 Redefine thread_atfork for use of ATFORK_MEM.
1838 * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
1839 * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
1840 function.
1841 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
1842 Use atomic operation when removing first element of list.
1843
96c06e08
JJ
18442007-10-17 Jakub Jelinek <jakub@redhat.com>
1845
1846 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
1847 routine instead of an alias to __new_sem_post.
1848
e807818b
JJ
18492007-10-15 Jakub Jelinek <jakub@redhat.com>
1850
1851 * init.c (__pthread_initialize_minimal): Initialize word to appease
1852 valgrind.
1853
59d430c6
UD
18542007-10-10 Jakub Jelinek <jakub@redhat.com>
1855
1856 * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
1857 libc.so just clear NAME.
1858 (__libc_rwlock_fini): Nop inside of libc.so.
1859 * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
1860 all zeros.
1861
221d9d8e
UD
18622007-09-02 Ulrich Drepper <drepper@redhat.com>
1863
1864 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1865 (__pthread_cond_wait): Fix unlocking of internal lock after mutex
1866 unlocking failed.
1867 Patch by Luca Barbieri <luca.barbieri@gmail.com>.
1868
2a01ce56
UD
18692007-08-21 Ulrich Drepper <drepper@redhat.com>
1870
1871 [BZ #4938]
1872 * allocatestack.c (__reclaim_stacks): Clear the TSD in the
1873 reclaimed stack if necessary.
1874 * Makefile (tests): Add tst-tsd6.
1875 * tst-tsd6.c: New file.
1876
c273641b
JJ
18772007-08-21 Jakub Jelinek <jakub@redhat.com>
1878
1879 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
1880 Add private argument.
1881
fb84593c
UD
18822007-08-20 Ulrich Drepper <drepper@redhat.com>
1883
1884 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1885 (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
1886
3e8d1eab
JJ
18872007-08-16 Jakub Jelinek <jakub@redhat.com>
1888
1889 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
1890 (__lll_robust_timedlock): Pass private as last argument to
1891 __lll_robust_timedlock_wait.
1892 (__lll_unlock): Fix a pasto.
1893
e4720b0e
JJ
18942007-08-15 Jakub Jelinek <jakub@redhat.com>
1895
1896 * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
1897 sparc_old_sem): New structs.
1898 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
1899 (__sem_wait_cleanup): New function.
1900 (__new_sem_wait): Use sparc_new_sem structure. Bump and afterwards
1901 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
1902 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
1903 lll_futex_wait.
1904 (__old_sem_wait): New function.
1905 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
1906 nptl/sysdeps/unix/sysv/linux/sparc version.
1907 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
1908 Likewise.
1909 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
1910 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
1911 (__new_sem_trywait): Use sparc_old_sem structure.
1912 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
1913 (sem_timedwait): Use sparc_new_sem structure. Bump and afterwards
1914 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
1915 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
1916 lll_futex_timed_wait.
1917 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
1918 Use sparc_new_sem structure. Only wake if nwaiters > 0. Pass
1919 isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
1920 lll_futex_wake.
1921 (__old_sem_post): New function.
1922 * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
1923 * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
1924 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
1925 * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
1926 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
1927 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
1928
d13f4a43
UD
19292007-08-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1930
1931 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
1932 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
1933 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1934 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
1935 * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
1936 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
1937 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1938 Use FUTEX_WAKE_OP.
1939 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
1940 kernel-features.h and tcb-offsets.h.
1941 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
1942 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
1943 process private.
1944 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
1945 tcb-offsets.h.
1946 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
1947 to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
1948 process private.
1949 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
1950 __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
1951 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
1952 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
1953 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
1954 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
1955 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1956
702a9414
JJ
19572007-08-14 Jakub Jelinek <jakub@redhat.com>
1958
467d1345
JJ
1959 * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
1960 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
1961 (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
1962 lll_futex_timed_wait.
1963
702a9414
JJ
1964 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
1965 __lll_robust_unlock): Rewrite as macros instead of inline functions.
1966 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
1967 __lll_robust_unlock, __lll_wait_tid): Likewise.
1968
22502ea2
UD
19692007-08-13 Jakub Jelinek <jakub@redhat.com>
1970
1971 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
1972 Fix a pasto.
1973 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
1974 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
1975 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1976 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
1977 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
1978 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
1979 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1980 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
1981 kernel-features.h.
1982 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
1983 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
1984 process private. Switch DW_CFA_advance_loc1 and some
1985 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
1986 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
1987 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
1988 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
1989 process private. Switch DW_CFA_advance_loc{1,2} and some
1990 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
1991 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
1992 #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
1993 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1994 Likewise.
1995 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1996 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1997 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1998 Likewise.
1999 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2000 (__pthread_cond_broadcast): Compare %r8 instead of
2001 dep_mutex-cond_*(%rdi) with $-1.
2002 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2003 (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
2004 of oring.
2005
4baf59ad
UD
20062007-08-13 Ulrich Drepper <drepper@redhat.com>
2007
2008 * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
2009
9c6f6953
UD
20102007-08-13 Jakub Jelinek <jakub@redhat.com>
2011
2012 * allocatestack.c: Include kernel-features.h.
2013 * pthread_create.c: Likewise.
2014 * pthread_mutex_init.c: Likewise.
2015 * init.c: Likewise.
2016 * pthread_cond_timedwait.c: Likewise.
2017 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
2018 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2019 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2020 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2021 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2022 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2023 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2024 Likewise.
2025 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2026 Likewise.
2027 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2028 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2029 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2030 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2031
974a1f0f
UD
20322007-08-12 Jakub Jelinek <jakub@redhat.com>
2033
2034 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
2035 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
2036 byte elements. One of them is the new __shared element.
2037 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
2038 adjust names of other padding elements.
2039 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
2040 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
2041 byte elements. One of them is the new __shared element.
2042 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
2043 adjust names of other padding elements.
2044 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
2045 Renamed __pad1 element to __shared, adjust names of other padding
2046 elements.
2047 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
2048 (pthread_rwlock_t): Likewise.
2049 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
2050 typo.
2051
20522007-08-09 Anton Blanchard <anton@samba.org>
2053
2054 * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
2055
f47e2626
UD
20562007-08-12 Ulrich Drepper <drepper@redhat.com>
2057
2058 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
2059 <kernel-features.h>.
2060 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2061
5bd8a249
UD
20622007-08-11 Ulrich Drepper <drepper@redhat.com>
2063
2064 * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
2065 * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
2066 dealing with robust mutexes.
2067 * pthread_mutex_timedlock.c: Likewise.
2068 * pthread_mutex_trylock.c: Likewise.
2069 * pthread_mutex_unlock.c: Likewise.
2070 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
2071
20722007-08-06 Jakub Jelinek <jakub@redhat.com>
2073
2074 * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
2075 (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
2076 (PTHREAD_MUTEX_PSHARED): Define.
2077 * pthread_mutex_init.c (__pthread_mutex_init): Set
2078 PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
2079 mutexes.
2080 * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
2081 instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
2082 as second argument to lll_lock.
2083 (LLL_MUTEX_TRYLOCK): Take mutex as argument
2084 instead of its __data.__lock field.
2085 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
2086 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
2087 to lll_robust_lock.
2088 (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
2089 LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
2090 instead of mutex->__data.__kind directly, pass
2091 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
2092 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
2093 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
2094 directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
2095 (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
2096 to lll_timedlock, lll_robust_timedlock, lll_unlock and
2097 lll_futex_timed_wait. Use PTHREAD_MUTEX_TYPE (mutex) instead
2098 of mutex->__data.__kind directly.
2099 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
2100 PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
2101 lll_robust_timedlock, lll_unlock and lll_futex_timed_wait. Use
2102 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
2103 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
2104 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
2105 and lll_futex_wake.
2106 * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
2107 PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
2108 Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
2109 directly.
2110 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
2111 Take mutex as argument instead of its __data.__lock field, pass
2112 PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
2113 (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
2114 __data.__lock field.
2115 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
2116 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
2117 to lll_robust_cond_lock.
2118 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
2119 variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
2120 lll_futex_wake. Don't use lll_futex_requeue if dependent mutex
2121 has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
2122 * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
2123 variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
2124 lll_futex_wait.
2125 * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
2126 variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
2127 lll_futex_wake.
2128 * pthread_cond_timedwait.c (__pthread_cond_wait): Add
2129 pshared variable, pass it to lll_lock, lll_unlock,
2130 lll_futex_timedwait and lll_futex_wake.
2131 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
2132 pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
2133 and lll_futex_wake.
2134 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
2135 lll_futex_wake_unlock): Add private argument, use __lll_private_flag
2136 macro.
2137 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
2138 lll_futex_wake_unlock): Likewise.
2139 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
2140 Likewise.
2141 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
2142 lll_futex_wake_unlock): Likewise.
2143 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
2144 Likewise.
2145 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
2146 lll_futex_wake_unlock): Likewise.
2147 (lll_futex_wake): Fix a typo.
2148 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
2149 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2150 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
2151 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2152 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
2153 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2154 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
2155 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2156 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2157 (__pthread_cond_timedwait): Likewise.
2158 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
2159 (__condvar_cleanup, __pthread_cond_wait): Likewise.
2160
0470fa46
JJ
21612007-08-05 Jakub Jelinek <jakub@redhat.com>
2162
2163 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
2164 Don't use CGOTSETUP and CGOTRESTORE macros.
2165 (CGOTSETUP, CGOTRESTORE): Remove.
2166 <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
2167 @local symbol.
2168
64f6281c
UD
21692007-08-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2170
2171 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
2172 definitions for private futexes.
2173 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
2174 kernel-features.h and lowlevellock.h. Use private futexes if
2175 they are available.
2176 (__lll_lock_wait_private, __lll_unlock_wake_private): New.
2177 (__lll_mutex_lock_wait): Rename to
2178 (__lll_lock_wait): ... this. Don't compile in for libc.so.
2179 (__lll_mutex_timedlock_wait): Rename to ...
2180 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday.
2181 Don't compile in for libc.so.
2182 (__lll_mutex_unlock_wake): Rename to ...
2183 (__lll_unlock_wake): ... this. Don't compile in for libc.so.
2184 (__lll_timedwait_tid): Use __NR_gettimeofday.
2185 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
2186 the header from assembler. Renamed all lll_mutex_* resp.
2187 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
2188 Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
2189 (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
2190 Define.
2191 (__lll_lock_wait_private): Add prototype.
2192 (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
2193 __lll_robust_timedlock_wait, __lll_unlock_wake_private,
2194 __lll_unlock_wake): Likewise.
2195 (lll_lock): Add private argument. Call __lll_lock_wait_private
2196 if private is constant LLL_PRIVATE.
2197 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
2198 lll_timedlock, lll_robust_timedlock): Add private argument.
2199 (lll_unlock): Add private argument. Call __lll_unlock_wake_private
2200 if private is constant LLL_PRIVATE.
2201 (lll_robust_unlock, lll_robust_dead): Add private argument.
2202 (lll_lock_t): Remove.
2203 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
2204 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
2205 lll_cond_wake, lll_cond_broadcast): Remove.
2206 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
2207 kernel-features.h and lowlevellock.h.
2208 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
2209 (LOAD_FUTEX_WAIT): Define.
2210 (__lll_robust_mutex_lock_wait): Rename to ...
2211 (__lll_robust_lock_wait): ... this. Add private argument.
2212 Use LOAD_FUTEX_WAIT macro.
2213 (__lll_robust_mutex_timedlock_wait): Rename to ...
2214 (__lll_robust_timedlock_wait): ... this. Add private argument.
2215 Use __NR_gettimeofday. Use LOAD_FUTEX_WAIT macro.
2216 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
2217 lowlevellock.h.
2218 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
2219 (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
2220 __lll_mutex_{lock,unlock}_*.
2221 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
2222 lowlevellock.h and pthread-errnos.h.
2223 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
2224 FUTEX_CMP_REQUEUE, EINVAL): Remove.
2225 (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
2226 __lll_mutex_{lock,unlock}_*.
2227 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
2228 lowlevellock.h and pthread-errnos.h.
2229 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
2230 (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
2231 __lll_mutex_{lock,unlock}_*.
2232 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
2233 lowlevellock.h.
2234 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
2235 (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
2236 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
2237 (__condvar_tw_cleanup): Likewise.
2238 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
2239 lowlevellock.h.
2240 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
2241 (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
2242 __lll_mutex_{lock,unlock}_*.
2243 ( __condvar_w_cleanup): Likewise.
2244 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
2245 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2246 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
2247 lowlevellock.h.
2248 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2249 (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
2250 __lll_mutex_{lock,unlock}_*.
2251 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
2252 lowlevellock.h.
2253 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
2254 FUTEX_PRIVATE_FLAG): Remove.
2255 (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
2256 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
2257 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
2258 lowlevellock.h.
2259 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
2260 FUTEX_PRIVATE_FLAG): Remove.
2261 (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
2262 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
2263 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
2264 lowlevellock.h.
2265 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2266 (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
2267 __lll_mutex_{lock,unlock}_*.
2268 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
2269 lowlevellock.h.
2270 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2271 (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
2272 __lll_mutex_{lock,unlock}_*.
2273 * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
2274 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2275 (__new_sem_post): Use standard initial exec code sequences.
2276 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
2277 lowlevellock.h.
2278 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
2279 FUTEX_PRIVATE_FLAG): Remove.
2280 (sem_timedwait): Use __NR_gettimeofday. Use standard initial
2281 exec code sequences.
2282 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
2283 (__new_sem_trywait): Use standard initial exec code sequences.
2284 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
2285 (__new_sem_wait): Use standard initial exec code sequences.
2286
e51deae7
UD
22872007-07-31 Anton Blanchard <anton@samba.org>
2288
2289 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
2290 Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
2291 atomic_full_barrier.
2292
22932007-07-31 Jakub Jelinek <jakub@redhat.com>
2294
2295 * allocatestack.c (stack_cache_lock): Change type to int.
2296 (get_cached_stack, allocate_stack, __deallocate_stack,
2297 __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
2298 __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
2299 as second argument to lll_lock and lll_unlock macros on
2300 stack_cache_lock.
2301 * pthread_create.c (__find_in_stack_list): Likewise.
2302 (start_thread): Similarly with pd->lock. Use lll_robust_dead
2303 macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
2304 as second argument.
2305 * descr.h (struct pthread): Change lock and setxid_futex field
2306 type to int.
2307 * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
2308 LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
2309 * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
2310 * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
2311 Likewise.
2312 * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
2313 * pthread_cond_init.c (__pthread_cond_init): Likewise.
2314 * pthreadP.h (__attr_list_lock): Change type to int.
2315 * pthread_attr_init.c (__attr_list_lock): Likewise.
2316 * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
2317 ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
2318 lll_{,un}lock.
2319 * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
2320 also for lll_futex_{wake,wait}.
2321 * pthread_barrier_init.c (pthread_barrier_init): Make iattr
2322 a pointer to const.
2323 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
2324 LLL_SHARED as second argument to lll_{,un}lock.
2325 * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
2326 * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
2327 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
2328 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
2329 Likewise.
2330 * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
2331 as second argument to lll_{,un}lock macros on pd->lock.
2332 * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
2333 * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
2334 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
2335 * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
2336 Likewise.
2337 * sysdeps/pthread/createthread.c (do_clone, create_thread):
2338 Likewise.
2339 * pthread_once.c (once_lock): Change type to int.
2340 (__pthread_once): Pass LLL_PRIVATE as second argument to
2341 lll_{,un}lock macros on once_lock.
2342 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
2343 lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
2344 rwlock->__data.__shared as second argument to them and similarly
2345 for lll_futex_w*.
2346 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
2347 Likewise.
2348 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
2349 Likewise.
2350 * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
2351 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
2352 * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
2353 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
2354 * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
2355 to lll_{,un}lock macros on __sem_mappings_lock.
2356 * sem_open.c (check_add_mapping): Likewise.
2357 (__sem_mappings_lock): Change type to int.
2358 * semaphoreP.h (__sem_mappings_lock): Likewise.
2359 * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
2360 LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
2361 instead of lll_*mutex_*, pass LLL_SHARED as last
2362 argument.
2363 (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
2364 pass LLL_SHARED as last argument.
2365 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
2366 LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
2367 lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
2368 pass LLL_SHARED as last argument.
2369 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
2370 lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
2371 LLL_SHARED as last argument.
2372 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
2373 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
2374 Similarly.
2375 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
2376 __libc_lock_lock_recursive, __libc_lock_unlock,
2377 __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
2378 argument to lll_{,un}lock.
2379 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
2380 _IO_lock_unlock): Likewise.
2381 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
2382 compound literal.
2383 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
2384 Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
2385 __fork_lock.
2386 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
2387 free_mem): Likewise.
2388 (__fork_lock): Change type to int.
2389 * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
2390 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
2391 isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
2392 lll_futex_wake.
2393 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
2394 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
2395 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
2396 New function.
2397 (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
2398 pass it through to lll_futex_*wait, only compile in when
2399 IS_IN_libpthread.
2400 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
2401 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
2402 argument and pass it through to lll_futex_*wait.
2403 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
2404 lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
2405 lll_robust_*. Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
2406 inline functions to __lll_* resp. __lll_robust_*.
2407 (LLL_MUTEX_LOCK_INITIALIZER): Remove.
2408 (lll_mutex_dead): Add private argument.
2409 (__lll_lock_wait_private): New prototype.
2410 (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
2411 __lll_robust_lock_timedwait): Add private argument to prototypes.
2412 (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
2413 call __lll_lock_wait_private, otherwise pass private to
2414 __lll_lock_wait.
2415 (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
2416 __lll_robust_timedlock): Add private argument, pass it to
2417 __lll_*wait functions.
2418 (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
2419 call __lll_unlock_wake_private, otherwise pass private to
2420 __lll_unlock_wake.
2421 (__lll_robust_unlock): Add private argument, pass it to
2422 __lll_robust_unlock_wake.
2423 (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
2424 lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
2425 argument, pass it through to __lll_* inline function.
2426 (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
2427 (lll_lock_t): Remove.
2428 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
2429 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
2430 lll_cond_wake, lll_cond_broadcast): Remove.
2431 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2432 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2433 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2434 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2435 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
2436 the header from assembler. Renamed all lll_mutex_* resp.
2437 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
2438 (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
2439 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2440 (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
2441 LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
2442 (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
2443 __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
2444 Remove prototype.
2445 (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
2446 (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
2447 rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
2448 (lll_trylock): Likewise, use __lll_trylock_asm, pass
2449 MULTIPLE_THREADS_OFFSET as another asm operand.
2450 (lll_lock): Add private argument, use __lll_lock_asm_start, pass
2451 MULTIPLE_THREADS_OFFSET as last asm operand, call
2452 __lll_lock_wait_private if private is constant LLL_PRIVATE,
2453 otherwise pass private as another argument to __lll_lock_wait.
2454 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
2455 lll_timedlock, lll_robust_timedlock): Add private argument, pass
2456 private as another argument to __lll_*lock_wait call.
2457 (lll_unlock): Add private argument, use __lll_unlock_asm, pass
2458 MULTIPLE_THREADS_OFFSET as another asm operand, call
2459 __lll_unlock_wake_private if private is constant LLL_PRIVATE,
2460 otherwise pass private as another argument to __lll_unlock_wake.
2461 (lll_robust_unlock): Add private argument, pass private as another
2462 argument to __lll_unlock_wake.
2463 (lll_robust_dead): Add private argument, use __lll_private_flag
2464 macro.
2465 (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
2466 LLL_MUTEX_LOCK_INITIALIZER.
2467 (lll_lock_t): Remove.
2468 (LLL_LOCK_INITIALIZER_WAITERS): Define.
2469 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
2470 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
2471 lll_cond_wake, lll_cond_broadcast): Remove.
2472 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2473 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
2474 2007-05-2{3,9} changes.
2475 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
2476 kernel-features.h and lowlevellock.h.
2477 (LOAD_PRIVATE_FUTEX_WAIT): Define.
2478 (LOAD_FUTEX_WAIT): Rewritten.
2479 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
2480 define.
2481 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
2482 (__lll_mutex_lock_wait): Rename to ...
2483 (__lll_lock_wait): ... this. Take futex addr from %edx instead of
2484 %ecx, %ecx is now private argument. Don't compile in for libc.so.
2485 (__lll_mutex_timedlock_wait): Rename to ...
2486 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday. %esi
2487 contains private argument. Don't compile in for libc.so.
2488 (__lll_mutex_unlock_wake): Rename to ...
2489 (__lll_unlock_wake): ... this. %ecx contains private argument.
2490 Don't compile in for libc.so.
2491 (__lll_timedwait_tid): Use __NR_gettimeofday.
2492 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
2493 kernel-features.h and lowlevellock.h.
2494 (LOAD_FUTEX_WAIT): Define.
2495 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
2496 define.
2497 (__lll_robust_mutex_lock_wait): Rename to ...
2498 (__lll_robust_lock_wait): ... this. Futex addr is now in %edx
2499 argument, %ecx argument contains private. Use LOAD_FUTEX_WAIT
2500 macro.
2501 (__lll_robust_mutex_timedlock_wait): Rename to ...
2502 (__lll_robust_timedlock_wait): ... this. Use __NR_gettimeofday.
2503 %esi argument contains private, use LOAD_FUTEX_WAIT macro.
2504 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
2505 lowlevellock.h.
2506 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2507 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
2508 PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
2509 __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
2510 to __lll_lock_wait in %edx.
2511 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
2512 Include lowlevellock.h and pthread-errnos.h.
2513 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
2514 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
2515 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
2516 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
2517 pass LLL_SHARED in %ecx to both __lll_lock_wait and
2518 __lll_unlock_wake.
2519 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
2520 Include lowlevellock.h and pthread-errnos.h.
2521 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
2522 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
2523 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
2524 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
2525 pass LLL_SHARED in %ecx to both __lll_lock_wait and
2526 __lll_unlock_wake.
2527 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
2528 Include lowlevellock.h.
2529 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
2530 Don't define.
2531 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
2532 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
2533 pass LLL_SHARED in %ecx to both __lll_lock_wait and
2534 __lll_unlock_wake. Use __NR_gettimeofday.
2535 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
2536 Include lowlevellock.h.
2537 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2538 (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
2539 to __lll_*, pass cond_lock address in %edx rather than %ecx to
2540 __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
2541 and __lll_unlock_wake.
2542 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
2543 Include lowlevellock.h.
2544 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2545 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
2546 MUTEX(%ebx) address in %edx rather than %ecx to
2547 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
2548 and __lll_unlock_wake. Move return value from %ecx to %edx
2549 register.
2550 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2551 Include lowlevellock.h.
2552 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
2553 Don't define.
2554 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
2555 MUTEX(%ebp) address in %edx rather than %ecx to
2556 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
2557 and __lll_unlock_wake. Move return value from %ecx to %edx
2558 register. Use __NR_gettimeofday.
2559 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2560 Include lowlevellock.h.
2561 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
2562 Don't define.
2563 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
2564 MUTEX(%ebp) address in %edx rather than %ecx to
2565 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
2566 and __lll_unlock_wake. Move return value from %ecx to %edx
2567 register. Use __NR_gettimeofday.
2568 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
2569 Include lowlevellock.h.
2570 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2571 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
2572 MUTEX(%edi) address in %edx rather than %ecx to
2573 __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
2574 and __lll_unlock_wake.
2575 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
2576 Include lowlevellock.h.
2577 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2578 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
2579 MUTEX(%ebx) address in %edx rather than %ecx to
2580 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
2581 and __lll_unlock_wake. Move return value from %ecx to %edx
2582 register.
2583 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
2584 lowlevellock.h.
2585 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
2586 define.
2587 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
2588 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
2589 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
2590 lowlevellock.h.
2591 (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
2592 (sem_timedwait): Use __NR_gettimeofday.
2593 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
2594 lowlevellock.h.
2595 (LOCK): Don't define.
2596 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
2597 lowlevellock.h.
2598 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
2599 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
2600 are waiters.
2601 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
2602 2007-05-2{3,9} changes.
2603 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
2604 kernel-features.h and lowlevellock.h.
2605 (LOAD_PRIVATE_FUTEX_WAIT): Define.
2606 (LOAD_FUTEX_WAIT): Rewritten.
2607 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
2608 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
2609 (__lll_mutex_lock_wait): Rename to ...
2610 (__lll_lock_wait): ... this. %esi is now private argument.
2611 Don't compile in for libc.so.
2612 (__lll_mutex_timedlock_wait): Rename to ...
2613 (__lll_timedlock_wait): ... this. %esi contains private argument.
2614 Don't compile in for libc.so.
2615 (__lll_mutex_unlock_wake): Rename to ...
2616 (__lll_unlock_wake): ... this. %esi contains private argument.
2617 Don't compile in for libc.so.
2618 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
2619 kernel-features.h and lowlevellock.h.
2620 (LOAD_FUTEX_WAIT): Define.
2621 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
2622 (__lll_robust_mutex_lock_wait): Rename to ...
2623 (__lll_robust_lock_wait): ... this. %esi argument contains private.
2624 Use LOAD_FUTEX_WAIT macro.
2625 (__lll_robust_mutex_timedlock_wait): Rename to ...
2626 (__lll_robust_timedlock_wait): ... this. %esi argument contains
2627 private, use LOAD_FUTEX_WAIT macro.
2628 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
2629 lowlevellock.h.
2630 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2631 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
2632 PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
2633 __lll_lock_wait and __lll_unlock_wake.
2634 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
2635 Include lowlevellock.h and pthread-errnos.h.
2636 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
2637 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
2638 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
2639 pass LLL_SHARED in %esi to both __lll_lock_wait and
2640 __lll_unlock_wake.
2641 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
2642 Include lowlevellock.h and pthread-errnos.h.
2643 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
2644 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
2645 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
2646 pass LLL_SHARED in %esi to both __lll_lock_wait and
2647 __lll_unlock_wake.
2648 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
2649 Include lowlevellock.h.
2650 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2651 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
2652 pass LLL_SHARED in %esi to both __lll_lock_wait and
2653 __lll_unlock_wake.
2654 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
2655 Include lowlevellock.h.
2656 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2657 (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
2658 to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
2659 and __lll_unlock_wake.
2660 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
2661 Include lowlevellock.h.
2662 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2663 Don't define.
2664 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
2665 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
2666 and __lll_unlock_wake.
2667 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
2668 Include lowlevellock.h.
2669 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2670 Don't define.
2671 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
2672 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
2673 and __lll_unlock_wake.
2674 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2675 Include lowlevellock.h.
2676 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2677 Don't define.
2678 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
2679 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
2680 and __lll_unlock_wake.
2681 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
2682 Include lowlevellock.h.
2683 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2684 Don't define.
2685 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
2686 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
2687 and __lll_unlock_wake.
2688 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
2689 Include lowlevellock.h.
2690 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2691 Don't define.
2692 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
2693 pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
2694 and __lll_unlock_wake.
2695 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
2696 lowlevellock.h.
2697 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
2698 define.
2699 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
2700 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
2701 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
2702 lowlevellock.h.
2703 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
2704 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
2705 lowlevellock.h.
2706 (LOCK): Don't define.
2707 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
2708 lowlevellock.h.
2709 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
2710 * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
2711 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
2712 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
2713 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
2714 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
2715 (__lll_lock_wait_private): New function.
2716 (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
2717 it to lll_futex_*wait. Don't compile in for libc.so.
2718 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
2719 Remove.
2720 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
2721 (struct sparc_pthread_barrier): Remove.
2722 (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
2723 struct sparc_pthread_barrier. Pass
2724 ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
2725 and lll_futex_wait macros.
2726 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
2727 Remove.
2728 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
2729 Include sparc pthread_barrier_wait.c instead of generic one.
2730
6f59d56e
UD
27312007-07-30 Jakub Jelinek <jakub@redhat.com>
2732
1475e201
UD
2733 * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
2734
6f59d56e
UD
2735 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
2736 (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
2737 %ecx.
2738 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
2739 (pthread_rwlock_timedwrlock): Likewise.
2740 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
2741 (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
2742
558f0300
JJ
27432007-07-31 Jakub Jelinek <jakub@redhat.com>
2744
2745 * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
2746
cedb4109
UD
27472007-07-26 Jakub Jelinek <jakub@redhat.com>
2748
2749 * tst-locale2.c (useless): Add return statement.
2750
085a4412
UD
27512007-07-24 Jakub Jelinek <jakub@redhat.com>
2752
2753 * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
2754 lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
2755 * pthread_create.c (start_thread): Likewise.
2756 * init.c (sighandler_setxid): Likewise.
2757 * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2758 * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2759 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2760 * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2761 * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2762 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2763 * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2764 * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2765 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
2766 Likewise.
2767 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
2768 Likewise.
2769 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
2770 Likewise.
2771 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
2772 __rtld_notify): Likewise.
2773 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
2774 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
2775 __pthread_once): Likewise.
2776 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
2777 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
2778 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
2779 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
2780 (lll_futex_wait): Add private argument, define as wrapper around
2781 lll_futex_timed_wait.
2782 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
2783 use __lll_private_flag macro.
2784 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
2785 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
2786 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
2787 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
2788 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
2789 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
2790 (lll_futex_wait): Add private argument, define as wrapper around
2791 lll_futex_timed_wait.
2792 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
2793 use __lll_private_flag macro.
2794 (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
2795 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
2796 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
2797 Define.
2798 (lll_futex_timed_wait, lll_futex_wake): Use it.
2799 (lll_private_futex_wait, lll_private_futex_timed_wait,
2800 lll_private_futex_wake): Removed.
2801 * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
2802 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
2803 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
2804 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
2805 (lll_futex_wait): Add private argument, define as wrapper around
2806 lll_futex_timed_wait.
2807 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
2808 use __lll_private_flag macro.
2809 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
2810 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
2811 to lll_futex_*.
2812 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
2813 (lll_private_futex_wait, lll_private_futex_timed_wait,
2814 lll_private_futex_wake): Removed.
2815 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
2816 Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
2817 (lll_private_futex_wait, lll_private_futex_timed_wait,
2818 lll_private_futex_wake): Removed.
2819 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
2820 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
2821 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
2822 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
2823 (lll_futex_wait): Add private argument, define as wrapper around
2824 lll_futex_timed_wait.
2825 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
2826 use __lll_private_flag macro.
2827 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
2828 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
2829 to lll_futex_*.
2830 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
2831 Define.
2832 (lll_futex_timed_wait, lll_futex_wake): Use it.
2833 (lll_private_futex_wait, lll_private_futex_timed_wait,
2834 lll_private_futex_wake): Removed.
2835
ef0af159
JJ
28362007-07-27 Jakub Jelinek <jakub@redhat.com>
2837
2838 * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
2839 of the structure for sparc32.
2840
28412007-07-26 Aurelien Jarno <aurelien@aurel32.net>
2842
2843 * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
2844
eb4f5909
UD
28452007-07-23 Ulrich Drepper <drepper@redhat.com>
2846
2847 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
2848 code used when private futexes are assumed.
2849 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2850 Likewise.
2851
b5f13526
UD
28522007-07-23 Jakub Jelinek <jakub@redhat.com>
2853
2854 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
2855 (__lll_private_flag): Define.
2856 (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
2857 (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
2858 __lll_private_flag.
2859 (lll_private_futex_wait, lll_private_futex_timedwait,
2860 lll_private_futex_wake): Define as wrapper around non-_private
2861 macros.
2862 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2863 (__lll_private_flag): Define.
2864 (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
2865 (lll_private_futex_wait, lll_private_futex_timedwait,
2866 lll_private_futex_wake): Define as wrapper around non-_private
2867 macros.
2868
eb7721f2
UD
28692007-07-10 Steven Munroe <sjmunroe@us.ibm.com>
2870
2871 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
2872 parameter to lll_futex_wait call.
2873 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
2874
2875 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
2876 Replace lll_futex_wait with lll_private_futex_wait.
2877 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
2878 Add LLL_SHARED parameter to lll_futex_wake().
2879
2880 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
2881 LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
2882 lll_private_futex_wake.
2883 (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
2884 bit from private parm before syscall.
2885 (lll_futex_timed_wait): Likewise.
2886 (lll_futex_wake): Likewise.
2887 (lll_futex_wake_unlock): Likewise.
2888 (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
2889 (lll_robust_mutex_unlock): Likewise.
2890 (lll_mutex_unlock_force): Likewise.
2891 (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
2892
defc45f2
UD
28932007-07-23 Ulrich Drepper <drepper@redhat.com>
2894
2895 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
2896 compilation when unconditionally using private futexes.
2897 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
2898 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2899 Likewise.
2900 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
2901 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
2902
087722b8
UD
29032007-07-17 Jakub Jelinek <jakub@redhat.com>
2904
2905 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
2906 Define.
2907
765c6b0c
UD
29082007-07-06 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2909
2910 * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
2911 kernel-features.h.
2912
7d9d8bd1
RM
29132007-05-16 Roland McGrath <roland@redhat.com>
2914
2915 * init.c (__nptl_initial_report_events): New variable.
2916 (__pthread_initialize_minimal_internal): Initialize pd->report_events
2917 to that.
2918
a4915df2
UD
29192007-06-22 Jakub Jelinek <jakub@redhat.com>
2920
2921 * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
2922 cpusetsize if pthread_getaffinity_np failed with ENOSYS.
2923
e4eb675d
UD
29242007-06-19 Ulrich Drepper <drepper@redhat.com>
2925
2926 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
2927 implementation.
2928
ae1ad3ae
UD
29292007-06-18 Ulrich Drepper <drepper@redhat.com>
2930
2931 * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
2932 * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
2933 * pthread_mutex_timedlock.c: Likewise.
2934 * pthread_mutex_trylock.c: Likewise.
2935 * pthread_mutex_unlock.c: Likewise.
2936
89074592
UD
29372007-06-17 Andreas Schwab <schwab@suse.de>
2938
2939 * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
2940 sections.
2941
d4201cc4
UD
29422007-06-17 Ulrich Drepper <drepper@redhat.com>
2943
2944 * allocatestack.c (allocate_stack): Make code compile if
2945 __ASSUME_PRIVATE_FUTEX is set.
2946
339dbf0e
UD
29472007-06-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2948
2949 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
2950 (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
2951 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
2952 (__pthread_rwlock_wrlock): Likewise.
2953 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
2954 (pthread_rwlock_timedrdlock): Likewise.
2955 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
2956 (pthread_rwlock_timedwrlock): Likewise.
2957 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
2958 (__pthread_rwlock_unlock): Likewise.
2959
29602007-06-10 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2961
2962 * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
2963 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
2964 Split __flags into __flags, __shared, __pad1 and __pad2.
2965 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
b42a214c 2966 futexes if they are available.
339dbf0e 2967 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
b42a214c 2968 in libc-lowlevellock.S allow using private futexes.
339dbf0e
UD
2969 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
2970 FUTEX_PRIVATE_FLAG. Add additional parameter to lll_futex_wait,
2971 lll_futex_timed_wait and lll_futex_wake. Change lll_futex_wait
2972 to call lll_futex_timed_wait. Add lll_private_futex_wait,
2973 lll_private_futex_timed_wait and lll_private_futex_wake.
2974 (lll_robust_mutex_unlock): Fix typo.
2975 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
b42a214c 2976 field in futex command setup.
339dbf0e
UD
2977 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
2978 COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
2979 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
2980 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
b42a214c 2981 if they are available. Remove clear_once_control.
339dbf0e
UD
2982 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
2983 futexes if they are available.
2984 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
2985 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
2986 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
2987 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
2988 * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
2989 Wake only when there are waiters.
2990 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
2991 support. Indicate that there are waiters. Remove unnecessary
b42a214c 2992 extra cancellation test.
339dbf0e
UD
2993 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise. Removed
2994 left-over duplication of __sem_wait_cleanup.
2995
26f56c1c
UD
29962007-06-07 Ulrich Drepper <drepper@redhat.com>
2997
2998 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
2999 parameter to lll_futex_wait, lll_futex_timed_wait, and
3000 lll_futex_wake. Change lll_futex_wait to call lll_futex_timed_wait.
3001 Add lll_private_futex_wait, lll_private_futex_timed_wait, and
3002 lll_private_futex_wake.
3003 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
3004 * allocatestack.c: Adjust use of lll_futex_* macros.
3005 * init.c: Likewise.
3006 * lowlevellock.h: Likewise.
3007 * pthread_barrier_wait.c: Likewise.
3008 * pthread_cond_broadcast.c: Likewise.
3009 * pthread_cond_destroy.c: Likewise.
3010 * pthread_cond_signal.c: Likewise.
3011 * pthread_cond_timedwait.c: Likewise.
3012 * pthread_cond_wait.c: Likewise.
3013 * pthread_create.c: Likewise.
3014 * pthread_mutex_lock.c: Likewise.
3015 * pthread_mutex_setprioceiling.c: Likewise.
3016 * pthread_mutex_timedlock.c: Likewise.
3017 * pthread_mutex_unlock.c: Likewise.
3018 * pthread_rwlock_timedrdlock.c: Likewise.
3019 * pthread_rwlock_timedwrlock.c: Likewise.
3020 * pthread_rwlock_unlock.c: Likewise.
3021 * sysdeps/alpha/tls.h: Likewise.
3022 * sysdeps/i386/tls.h: Likewise.
3023 * sysdeps/ia64/tls.h: Likewise.
3024 * sysdeps/powerpc/tls.h: Likewise.
3025 * sysdeps/pthread/aio_misc.h: Likewise.
3026 * sysdeps/pthread/gai_misc.h: Likewise.
3027 * sysdeps/s390/tls.h: Likewise.
3028 * sysdeps/sh/tls.h: Likewise.
3029 * sysdeps/sparc/tls.h: Likewise.
3030 * sysdeps/unix/sysv/linux/fork.c: Likewise.
3031 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
3032 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
3033 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
3034 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
3035 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
3036 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
3037 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
3038 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
3039 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
3040 Likewise.
3041 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
3042 * sysdeps/x86_64/tls.h: Likewise.
3043
ee5d5755
UD
30442007-05-29 Ulrich Drepper <drepper@redhat.com>
3045
b03b0c29
UD
3046 * pthread_getattr_np.c: No need to install a cancellation handler,
3047 this is no cancellation point.
3048 * pthread_getschedparam.c: Likewise.
3049 * pthread_setschedparam.c: Likewise.
3050 * pthread_setschedprio.c: Likewise.
3051 * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
3052 lll_unlock_wake_cb.
3053 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
3054 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
3055 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
3056 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3057 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3058 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3059 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
3060 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
3061 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
3062 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
3063 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
3064 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
fc3f0ccb 3065
0154658d
UD
3066 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
3067 whether there are more than one thread makes no sense here since
3068 we only call the slow path if the locks are taken.
3069 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
3070
ee5d5755
UD
3071 * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
3072 COND_NWAITERS_SHIFT.
3073 * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
3074 COND_CLOCK_BITS.
3075 * pthread_cond_init.c: Likewise.
3076 * pthread_cond_timedwait.c: Likewise.
3077 * pthread_cond_wait.c: Likewise.
3078 * pthread_condattr_getclock.c: Likewise.
3079 * pthread_condattr_setclock.c: Likewise.
3080 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
3081 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3082 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3083 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3084 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3085
991fa82b
UD
30862007-05-28 Jakub Jelinek <jakub@redhat.com>
3087
40f57573
UD
3088 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
3089 unistd.h.
3090
991fa82b
UD
3091 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
3092 insn suffix.
3093 (THREAD_GSCOPE_GET_FLAG): Remove.
3094 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
3095 * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
3096 changes.
3097 * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
3098 (THREAD_GSCOPE_GET_FLAG): Remove.
3099 (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
3100 instead of THREAD_GSCOPE_GET_FLAG.
3101 (THREAD_GSCOPE_SET_FLAG): Likewise. Add atomic_write_barrier after
3102 it.
3103 * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3104 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3105 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3106 THREAD_GSCOPE_WAIT): Define.
3107 * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3108 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3109 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3110 THREAD_GSCOPE_WAIT): Define.
3111 * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3112 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3113 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3114 THREAD_GSCOPE_WAIT): Define.
3115 * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3116 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3117 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3118 THREAD_GSCOPE_WAIT): Define.
3119
31202007-05-24 Richard Henderson <rth@redhat.com>
3121
3122 * descr.h (struct pthread): Add header.gscope_flag.
3123 * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3124 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3125 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3126 THREAD_GSCOPE_WAIT): Define.
3127
e59660bc
UD
31282007-05-27 Ulrich Drepper <drepper@redhat.com>
3129
3130 * init.c: Make it compile with older kernel headers.
3131
3132 * tst-initializers1.c: Show through exit code which test failed.
3133
3134 * pthread_rwlock_init.c: Also initialize __shared field.
3135 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
3136 element in rwlock structure into four byte elements. One of them is
3137 the new __shared element.
3138 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
3139 Likewise.
cd0dbd89 3140 [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
e59660bc
UD
3141 __shared, adjust names of other padding elements.
3142 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3143 * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
3144 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
3145 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
3146 FUTEX_PRIVATE_FLAG.
3147 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
3148 futex to use private operations if possible.
3149 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3150 Likewise.
3151 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3152 Likewise.
3153 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
3154 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
50f1dec5
UD
3155 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
3156 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3157 Likewise.
3158 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3159 Likewise.
3160 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
3161 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
e59660bc 3162
d8ff3792
UD
31632007-05-26 Ulrich Drepper <drepper@redhat.com>
3164
546346b6
UD
3165 * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
3166 * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
3167 * pthread_rwlock_timedrdlock.c: Likewise.
3168 * pthread_rwlock_tryrdlock.c: Likewise.
3169
a2dd3360
UD
3170 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
3171 optimization.
3172
6df7ffad
UD
3173 * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
3174 * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
3175 duplication of __sem_wait_cleanup.
3176
3177 * allocatestack.c: Revert last change.
3178 * init.c: Likewise.
3179 * sysdeps/i386/tls.h: Likewise.
3180 * sysdeps/x86_64/tls.h: Likewise.
3181 * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
3182 header structure.
3183 * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
3184
d8ff3792
UD
3185 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
3186 Add private field.
3187 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
3188 * pthread_barrier_init.c: Set private flag if pshared and private
3189 futexes are supported.
3190 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
3191 private field in futex command setup.
3192 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
3193
3d2dd6ca
UD
31942007-05-25 Ulrich Drepper <drepper@redhat.com>
3195
42e6c665
UD
3196 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
3197 support.
3198 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
3199 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
3200 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3201 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3202 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3203
3d2dd6ca
UD
3204 * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
3205 * sem_init.c (__new_sem_init): Rewrite to initialize all three
3206 fields in the structure.
3207 (__old_sem_init): New function.
3208 * sem_open.c: Initialize all fields of the structure.
3209 * sem_getvalue.c: Adjust for renamed element.
3210 * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
3211 (gen-as-const-headers): Add structsem.sym.
3212 * sysdeps/unix/sysv/linux/structsem.sym: New file.
3213 * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
3214 struct new_sem. Add struct old_sem.
3215 * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
3216 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
3217 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3218 * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
3219 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
3220 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3221 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
3222 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
3223 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3224 * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
3225 * tst-sem10.c: New file.
3226 * tst-sem11.c: New file.
3227 * tst-sem12.c: New file.
3228 * tst-typesizes.c: Test struct new_sem and struct old_sem instead
3229 of struct sem.
3230
20a4d722
JJ
32312007-05-25 Ulrich Drepper <drepper@redhat.com>
3232 Jakub Jelinek <jakub@redhat.com>
3233
3234 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
3235 Move __pthread_enable_asynccancel right before futex syscall.
3236 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
3237 Likewise.
3238
32392007-05-24 Jakub Jelinek <jakub@redhat.com>
86acd596
UD
3240
3241 * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
3242 THREAD_COPY_PRIVATE_FUTEX): Define.
3243 * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
3244 THREAD_COPY_PRIVATE_FUTEX): Define.
3245 * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
3246 * init.c (__pthread_initialize_minimal_internal): Use
3247 THREAD_SET_PRIVATE_FUTEX.
0a54ab53
UD
3248
3249 * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
3250 (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
3251 THREAD_GSCOPE_FLAG_WAIT): Define.
3252 (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
3253 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
3254 * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
3255 PTR_DEMANGLE.
3256 (THREAD_GSCOPE_GET_FLAG): Define.
3257 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
3258 * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
3259 instead of ->header.gscope_flag directly.
3260
5a8075b1
UD
32612007-05-23 Ulrich Drepper <drepper@redhat.com>
3262
3263 * init.c (__pthread_initialize_minimal_internal): Check whether
3264 private futexes are available.
3265 * allocatestack.c (allocate_stack): Copy private_futex field from
3266 current thread into the new stack.
3267 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
3268 futexes if they are available.
3269 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
3270 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
3271 in libc-lowlevellock.S allow using private futexes.
3272 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
3273 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
3274 FUTEX_PRIVATE_FLAG.
3275 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
3276 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
3277 if they are available.
3278 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
3279 * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
3280 * sysdeps/i386/tcb-offsets.sym: Likewise.
3281 * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
3282 * sysdeps/i386/tls.h (tcbhead_t): Likewise.
3283
6d59823c
UD
32842007-05-21 Ulrich Drepper <drepper@redhat.com>
3285
3286 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3287 Remove ptr_wait_lookup_done again.
3288 * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
3289 (__pthread_initialize_minimal_internal): Initialize
3290 _dl_wait_lookup_done pointer in _rtld_global directly.
3291 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
3292 Remove code to code _dl_wait_lookup_done.
3293 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
3294 encrypted for now.
3295
2c9718f3
JJ
32962007-05-21 Jakub Jelinek <jakub@redhat.com>
3297
3298 * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
3299 pthread_mutex_init failed with ENOTSUP.
3300
df94b641
UD
33012007-05-19 Ulrich Drepper <drepper@redhat.com>
3302
3303 * allocatestack.c (__wait_lookup_done): New function.
3304 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3305 Add ptr_wait_lookup_done.
3306 * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
3307 * pthreadP.h: Declare __wait_lookup_done.
3308 * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
3309 Define macros to implement reference handling of global scope.
3310 * sysdeps/x86_64/tls.h: Likewise.
3311 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
3312 Initialize GL(dl_wait_lookup_done).
3313
bec51a30
UD
33142007-05-17 Ulrich Drepper <drepper@redhat.com>
3315
113ad5fc
UD
3316 [BZ #4512]
3317 * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
3318 is detected.
3319 * pthread_mutex_timedlock.c: Likewise.
3320 * pthread_mutex_trylock.c: Likewise.
3321 Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
3322
3323 * Makefile (tests): Add tst-robust9 and tst-robustpi9.
3324 * tst-robust9.c: New file.
3325 * tst-robustpi9.c: New file.
3326
bec51a30
UD
3327 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
3328 unnecessary extra cancellation test.
3329
83d87915
UD
33302007-05-14 Ulrich Drepper <drepper@redhat.com>
3331
83d87915
UD
3332 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
3333 extra cancellation test.
3334 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3335
3771196d
UD
33362007-05-10 Ulrich Drepper <drepper@redhat.com>
3337
341c566f
UD
3338 * descr.h (struct pthread): Rearrange members to fill hole in
3339 64-bit layout.
3340
3771196d
UD
3341 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
3342 (__pthread_setaffinity_new): If syscall was successful and
3343 RESET_VGETCPU_CACHE is defined, use it before returning.
3344 * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
3345
7d29b542
JJ
33462007-05-10 Jakub Jelinek <jakub@redhat.com>
3347
3348 [BZ #4455]
3349 * tst-align2.c: Include stackinfo.h.
3350 * tst-getpid1.c: Likewise.
3351
16105fe0
UD
33522007-05-02 Carlos O'Donell <carlos@systemhalted.org>
3353
29c113f0
UD
3354 [BZ #4455]
3355 * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
3356 * tst-getpid1.c (do_test): Likewise.
3357
16105fe0
UD
3358 [BZ #4456]
3359 * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
3360 (allocate_stack): Likewise.
3361
6780bc44
UD
33622007-05-07 Ulrich Drepper <drepper@redhat.com>
3363
3364 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
3365 (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
3366 (__lll_robust_timedlock_wait): Likewise.
3367 Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
3368
aa75f64c
UD
33692007-05-06 Mike Frysinger <vapier@gentoo.org>
3370
15eca720 3371 [BZ #4465]
aa75f64c
UD
3372 * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
3373 * tst-cancel4.c (tf_fdatasync): New test.
3374
f672076e
UD
33752007-04-27 Ulrich Drepper <drepper@redhat.com>
3376
1bb5f5a1
UD
3377 [BZ #4392]
3378 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
3379 check mutexes like normal mutexes.
3380
f672076e
UD
3381 [BZ #4306]
3382 * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
3383 Initialize the whole sigevent structure to appease valgrind.
3384
bce20b9a
UD
33852007-04-25 Ulrich Drepper <drepper@redhat.com>
3386
3387 * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
3388 * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
3389
0c786eac
UD
33902007-04-06 Ulrich Drepper <drepper@redhat.com>
3391
3392 * tst-locale1.c: Avoid warnings.
3393 * tst-locale2.c: Likewise.
3394
e1f0c5bc
UD
33952007-03-19 Steven Munroe <sjmunroe@us.ibm.com>
3396
3397 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3398 (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
3399
965cba04
UD
34002007-03-16 Jakub Jelinek <jakub@redhat.com>
3401
3402 * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
3403 __extern_always_inline where appropriate.
3404 * sysdeps/pthread/pthread.h: Likewise.
3405
a5ea509b
RH
34062007-03-13 Richard Henderson <rth@redhat.com>
3407
3408 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
3409 separate cfi regions for the two subsections.
3410
00a1430e
UD
34112007-02-25 Ulrich Drepper <drepper@redhat.com>
3412
3413 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
3414 new thread, don't just decrement it.
3415 Patch by Suzuki K P <suzuki@in.ibm.com>.
3416
63a2f305
UD
34172007-02-21 Ulrich Drepper <drepper@redhat.com>
3418
3419 * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
3420 PTHFCT_CALL definition.
3421
2484468b
UD
34222007-02-18 Ulrich Drepper <drepper@redhat.com>
3423
3424 * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
3425 available, don't use it.
3426
5ed61e0f
UD
34272007-02-09 Jakub Jelinek <jakub@redhat.com>
3428
3429 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3430 (__lll_mutex_timedlock_wait): Use correct pointer when we don't
3431 call into the kernel to delay.
3432
10ccaa5c
UD
34332007-01-18 Ulrich Drepper <drepper@redhat.com>
3434
f8a17855
UD
3435 * tst-initializers1.c: We want to test the initializers as seen
3436 outside of libc, so undefined _LIBC.
3437
10ccaa5c
UD
3438 * pthread_join.c (cleanup): Avoid warning.
3439
ea1533e0
UD
34402007-01-17 Ulrich Drepper <drepper@redhat.com>
3441
1476bce6
UD
3442 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3443 (__lll_timedwait_tid): Add unwind info.
3444
ea1533e0
UD
3445 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
3446 function table, mangle the pointers.
3447 * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
3448 * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
3449 * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
3450 demangle pointers before use.
3451 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
3452 demangle pointer.
3453 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
3454 * sysdeps/pthread/setxid.h: Likewise.
3455
8980796b
UD
34562007-01-12 Ulrich Drepper <drepper@redhat.com>
3457
3458 * tst-rwlock7.c: Show some more information in case of correct
3459 behavior.
3460
a1d87b5d
UD
34612007-01-11 Ulrich Drepper <drepper@redhat.com>
3462
3463 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3464 (lll_futex_timed_wait): Undo part of last change, don't negate
3465 return value.
3466
11bf311e 34672007-01-10 Ulrich Drepper <drepper@redhat.com>
66193697 3468
11bf311e
UD
3469 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups. Define
3470 FUTEX_CMP_REQUEUE and lll_futex_requeue.
66193697 3471
11bf311e 34722006-12-28 David S. Miller <davem@davemloft.net>
14a31e35 3473
11bf311e 3474 * shlib-versions: Fix sparc64 linux target specification.
a744da90 3475
11bf311e 34762007-01-10 Jakub Jelinek <jakub@redhat.com>
a744da90 3477
11bf311e
UD
3478 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
3479 Adjust include path for pthread_barrier_wait.c move.
fc242bef 3480
11bf311e 34812006-12-21 Jakub Jelinek <jakub@redhat.com>
fc242bef 3482
11bf311e
UD
3483 * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
3484 tid isn't reread from pd->tid in between ESRCH test and the syscall.
a822d9f4 3485
11bf311e
UD
34862006-12-06 Jakub Jelinek <jakub@redhat.com>
3487
3488 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
3489 6 argument cancellable syscalls.
3490 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
3491 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
3492 6 argument cancellable syscalls.
3493 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
a822d9f4 3494
66f17705
UD
34952006-12-09 Ulrich Drepper <drepper@redhat.com>
3496
3497 * sysdeps/unix/sysv/linux/rtld-lowlevel.h
3498 (__rtld_mrlock_initialize): Add missing closing parenthesis.
3499
11bf311e
UD
35002006-10-30 Jakub Jelinek <jakub@redhat.com>
3501
3502 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
3503 __sync_lock_release instead of __sync_lock_release_si.
3504
536e40e2
UD
35052006-10-29 Jakub Jelinek <jakub@redhat.com>
3506
3507 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
3508 Define.
3509 (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
3510 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
3511 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
3512 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
3513 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
3514 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
3515 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
3516 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3517 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
3518 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
3519 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
3520
11bf311e
UD
35212006-10-27 Ulrich Drepper <drepper@redhat.com>
3522
3523 * sysdeps/pthread/pthread_barrier_wait.c: Move to...
3524 * pthread_barrier_wait.c: ...here.
3525 * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
3526 * pthread_cond_broadcast.c: ...here.
3527 * sysdeps/pthread/pthread_cond_signal.c: Move to...
3528 * pthread_cond_signal.c: ...here.
3529 * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
3530 * pthread_cond_timedwait.c: ...here.
3531 * sysdeps/pthread/pthread_cond_wait.c: Move to...
3532 * pthread_cond_wait.c: ...here.
3533 * sysdeps/pthread/pthread_once.c: Move to...
3534 * pthread_once.c: ...here.
3535 * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
3536 * pthread_rwlock_rdlock.c: ...here.
3537 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
3538 * pthread_rwlock_timedrdlock.c: ...here.
3539 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
3540 * pthread_rwlock_timedwrlock.c: ...here.
3541 * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
3542 * pthread_rwlock_unlock.c: ...here.
3543 * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
3544 * pthread_rwlock_wrlock.c: ...here.
3545 * sysdeps/pthread/pthread_spin_destroy.c: Move to...
3546 * pthread_spin_destroy.c: ...here.
3547 * sysdeps/pthread/pthread_spin_init.c: Move to...
3548 * pthread_spin_init.c: ...here.
3549 * sysdeps/pthread/pthread_spin_unlock.c: Move to...
3550 * pthread_spin_unlock.c: ...here.
3551 * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
3552 * pthread_getcpuclockid.c: ...here.
3553
3554 * init.c: USE_TLS support is now always enabled.
3555 * tst-tls5.h: Likewise.
3556 * sysdeps/alpha/tls.h: Likewise.
3557 * sysdeps/i386/tls.h: Likewise.
3558 * sysdeps/ia64/tls.h: Likewise.
3559 * sysdeps/powerpc/tls.h: Likewise.
3560 * sysdeps/s390/tls.h: Likewise.
3561 * sysdeps/sh/tls.h: Likewise.
3562 * sysdeps/sparc/tls.h: Likewise.
3563 * sysdeps/x86_64/tls.h: Likewise.
3564
006a8f6f 35652006-10-27 Jakub Jelinek <jakub@redhat.com>
c0a777e8
UD
3566
3567 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
3568 __rtld_mrlock_change): Update oldval if atomic compare and exchange
3569 failed.
3570
3571 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
3572 Define to THREAD_SELF->header.multiple_threads.
3573 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
3574 Likewise.
3575 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
3576 Likewise.
3577 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
3578 (SINGLE_THREAD_P): Likewise.
3579 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
3580 (SINGLE_THREAD_P): Likewise.
3581 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3582 (SINGLE_THREAD_P): Likewise.
3583 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
3584 (SINGLE_THREAD_P): Likewise.
3585 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
3586 Likewise.
3587 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
3588 (SINGLE_THREAD_P): Likewise.
3589 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
3590 (SINGLE_THREAD_P): Likewise.
3591 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
3592 Likewise.
3593
11bf311e 35942006-10-26 Jakub Jelinek <jakub@redhat.com>
32c075e1 3595
11bf311e
UD
3596 * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
3597 by default rather than 2_3_3.
32c075e1 3598
11bf311e 35992006-10-17 Jakub Jelinek <jakub@redhat.com>
32c075e1 3600
11bf311e
UD
3601 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
3602 __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
3603 atomic_* instead of catomic_* macros.
3604
36052006-10-12 Ulrich Drepper <drepper@redhat.com>
3606
3607 [BZ #3285]
3608 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
3609 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
3610 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
3611 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
3612 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
3613 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
3614 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
3615 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
3616 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
3617 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
3618 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
3619 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
3620 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
3621
36222006-10-11 Ulrich Drepper <drepper@redhat.com>
3623
3624 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
3625 cancelable syscalls with six parameters.
3626
3627 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
3628 operations instead of atomic_*.
32c075e1 3629
11bf311e 36302006-10-09 Ulrich Drepper <drepper@redhat.com>
32c075e1 3631
11bf311e 3632 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
32c075e1 3633
11bf311e 36342006-10-07 Ulrich Drepper <drepper@redhat.com>
32c075e1 3635
11bf311e
UD
3636 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
3637 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
3638 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
3639 New file.
3640 * pthread_attr_setstack.c: Allow overwriting the version number of the
3641 new symbol.
3642 * pthread_attr_setstacksize.c: Likewise.
3643 (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
3644 it.
3645 * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
3646 pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
fa279678 3647
457b559e
UD
36482006-09-24 Ulrich Drepper <drepper@redhat.com>
3649
3650 [BZ #3251]
3651 * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
3652 Patch by Petr Baudis.
3653
0466106e
UD
36542006-09-18 Jakub Jelinek <jakub@redhat.com>
3655
3656 * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
3657
3658 * tst-cancel2.c (tf): Loop as long as something was written.
3659
bd6d3b7d
UD
36602006-09-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3661
3662 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
3663 mutexes wake all mutexes.
3664 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
3665 WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
3666 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
3667
30aa5785
UD
36682006-09-12 Ulrich Drepper <drepper@redhat.com>
3669
3670 * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
3671 to guarantee the thread is always canceled.
3672
2b6a801e
UD
36732006-09-08 Jakub Jelinek <jakub@redhat.com>
3674
3675 * tst-cond22.c: Include pthread.h instead of pthreadP.h.
3676 Include stdlib.h.
3677 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
3678 increase FUTEX if increasing WAKEUP_SEQ. Fix comment typo.
3679 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3680 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3681 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
bd6d3b7d 3682
346e6ad4
UD
36832006-09-08 Ulrich Drepper <drepper@redhat.com>
3684
3685 [BZ #3123]
3686 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
3687 increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
2b6a801e
UD
3688 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3689 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3690 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
346e6ad4
UD
3691 * Makefile (tests): Add tst-cond22.
3692 * tst-cond22.c: New file.
3693
b051fc44
UD
36942006-09-05 Ulrich Drepper <drepper@redhat.com>
3695
3696 [BZ #3124]
3697 * descr.h (struct pthread): Add parent_cancelhandling.
3698 * sysdeps/pthread/createthread.c (create_thread): Pass parent
3699 cancelhandling value to child.
3700 * pthread_create.c (start_thread): If parent thread was canceled
3701 reset the SIGCANCEL mask.
3702 * Makefile (tests): Add tst-cancel25.
3703 * tst-cancel25.c: New file.
3704
d052233c 37052006-09-05 Jakub Jelinek <jakub@redhat.com>
b42a214c 3706 Ulrich Drepper <drepper@redhat.com>
d052233c
UD
3707
3708 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
3709 counterp if it is already zero.
3710 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
3711
cd248c3f 37122006-03-04 Jakub Jelinek <jakub@redhat.com>
b42a214c 3713 Roland McGrath <roland@redhat.com>
cd248c3f
UD
3714
3715 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
3716 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
3717 LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
3718 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
3719 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
3720 lll_robust_mutex_timedlock, lll_mutex_unlock,
3721 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
3722 Add _L_*_ symbols around the subsection.
3723 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
3724 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
3725
37262006-03-03 Jakub Jelinek <jakub@redhat.com>
b42a214c 3727 Roland McGrath <roland@redhat.com>
cd248c3f
UD
3728
3729 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3730 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
3731 LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
3732 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
3733 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
3734 lll_robust_mutex_timedlock, lll_mutex_unlock,
3735 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
3736 Add _L_*_ symbols around the subsection.
3737 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
3738 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
3739
b80770b2
UD
37402006-08-31 Ulrich Drepper <drepper@redhat.com>
3741
3742 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
3743 change because it can disturb too much existing code. If real hard
3744 reader preference is needed we'll introduce another type.
3745 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
3746 (pthread_rwlock_timedwrlock): Likewise.
3747 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
3748 Likewise.
3749
bee2df0b
UD
37502006-08-30 Ulrich Drepper <drepper@redhat.com>
3751
3752 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
3753 reader preference.
3754 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
3755 (pthread_rwlock_timedwrlock): Likewise.
3756 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
3757 Likewise.
3758
d678ebc1
UD
37592006-08-25 Jakub Jelinek <jakub@redhat.com>
3760
3761 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
3762 Only define ifdef SHARED.
3763
ba408f84
UD
37642006-08-23 Ulrich Drepper <drepper@redhat.com>
3765
3766 * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
3767 (free_stacks): ...here.
3768 (__free_stack_cache): New function.
3769 * pthreadP.h: Declare __free_stack_cache.
3770 * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
3771 ptr_freeres.
3772 * init.c (pthread_functions): Initialize ptr_freeres.
3773 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
3774 New freeres function.
3775
376e973a
UD
37762006-07-30 Joseph S. Myers <joseph@codesourcery.com>
3777
3778 [BZ #3018]
3779 * Makefile (extra-objs): Add modules to extra-test-objs instead.
3780
2b34af01
UD
37812006-08-20 Ulrich Drepper <drepper@redhat.com>
3782
3783 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
3784 _XOPEN_REALTIME_THREADS.
3785
89c85f87
UD
37862006-08-15 Jakub Jelinek <jakub@redhat.com>
3787
3788 * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
3789 HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
3790 HAVE_CLOCK_GETTIME_VSYSCALL.
3791 (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
3792
f17efcb4
UD
37932006-08-14 Jakub Jelinek <jakub@redhat.com>
3794
3795 * sysdeps/unix/sysv/linux/bits/posix_opt.h
3796 (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
3797 * descr.h (struct priority_protection_data): New type.
3798 (struct pthread): Add tpp field.
3799 * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
3800 PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
3801 PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
3802 * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
3803 TPP mutexes.
3804 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
3805 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
3806 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
3807 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
3808 * tpp.c: New file.
3809 * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
3810 boosted by TPP.
3811 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
3812 * pthread_mutexattr_getprioceiling.c
3813 (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
3814 in the SCHED_FIFO priority range.
3815 * pthread_mutexattr_setprioceiling.c
3816 (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
3817 * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
3818 if mutex is not TPP. Ceiling is now in __data.__lock.
3819 * pthread_mutex_setprioceiling.c: Include stdbool.h.
3820 (pthread_mutex_setprioceiling): Fix prioceiling validation. Ceiling
3821 is now in __data.__lock. Add locking.
3822 * pthread_create.c (__free_tcb): Free pd->tpp structure.
3823 * Makefile (libpthread-routines): Add tpp.
3824 (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
3825 * tst-tpp.h: New file.
3826 * tst-mutexpp1.c: New file.
3827 * tst-mutexpp6.c: New file.
3828 * tst-mutexpp10.c: New file.
3829 * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
3830 * tst-mutex6.c (TEST_FUNCTION): Likewise.
3831
22bb134c
UD
38322006-08-12 Ulrich Drepper <drepper@redhat.com>
3833
3834 [BZ #2843]
3835 * pthread_join.c (pthread_join): Account for self being canceled
3836 when checking for deadlocks.
3837 * tst-join5.c: Cleanups. Allow to be used in tst-join6.
3838 (tf1): Don't print anything after pthread_join returns, this would be
3839 another cancellation point.
3840 (tf2): Likewise.
3841 * tst-join6.c: New file.
3842 * Makefile (tests): Add tst-join6.
3843
f1762c0c
UD
38442006-08-03 Ulrich Drepper <drepper@redhat.com>
3845
9c06eb66
UD
3846 [BZ #2892]
3847 * pthread_setspecific.c (__pthread_setspecific): Check
3848 out-of-range index before checking for unused key.
3849
f1762c0c
UD
3850 * sysdeps/pthread/gai_misc.h: New file.
3851
7bb1b2c9
UD
38522006-08-01 Ulrich Drepper <drepper@redhat.com>
3853
3854 * sysdeps/unix/sysv/linux/i386/smp.h: New file. Old Linux-specific
3855 file. Don't use sysctl.
3856 * sysdeps/unix/sysv/linux/smp.h: Always assume SMP. Archs can
3857 overwrite the file if this is likely not true.
3858
b06e7e9a
UD
38592006-07-31 Daniel Jacobowitz <dan@codesourcery.com>
3860
3861 * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
3862 * Makefile (tests): Add tst-getpid3.
3863 * tst-getpid3.c: New file.
3864
b894c2ea
RM
38652006-07-30 Roland McGrath <roland@redhat.com>
3866
3867 * Makefile (libpthread-routines): Add ptw-sigsuspend.
3868
3869 * sysdeps/unix/sysv/linux/i386/not-cancel.h
3870 (pause_not_cancel): New macro.
3871 (nanosleep_not_cancel): New macro.
3872 (sigsuspend_not_cancel): New macro.
3873 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
3874 nanosleep_not_cancel macro from <not-cancel.h>.
3875 * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
3876 macro from <not-cancel.h>.
3877
df47504c
UD
38782006-07-28 Ulrich Drepper <drepper@redhat.com>
3879 Jakub Jelinek <jakub@redhat.com>
3880
3881 * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
3882 notification of PI mutex. Add ENQUEUE_MUTEX_PI.
3883 * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
3884 * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
3885 * pthread_mutex_init.c: Add support for priority inheritance mutex.
3886 * pthread_mutex_lock.c: Likewise.
3887 * pthread_mutex_timedlock.c: Likewise.
3888 * pthread_mutex_trylock.c: Likewise.
3889 * pthread_mutex_unlock.c: Likewise.
3890 * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
3891 all mutexes.
3892 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
3893 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
3894 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
3895 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
3896 pthread-pi-defines.sym.
3897 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
3898 FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
3899 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
d5ba53f9
UD
3900 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
3901 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3902 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3903 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3904 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
3905 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
df47504c
UD
3906 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
3907 _POSIX_THREAD_PRIO_INHERIT to 200112L.
3908 * tst-mutex1.c: Adjust to allow use in PI mutex test.
3909 * tst-mutex2.c: Likewise.
3910 * tst-mutex3.c: Likewise.
3911 * tst-mutex4.c: Likewise.
3912 * tst-mutex5.c: Likewise.
3913 * tst-mutex6.c: Likewise.
3914 * tst-mutex7.c: Likewise.
3915 * tst-mutex7a.c: Likewise.
3916 * tst-mutex8.c: Likewise.
3917 * tst-mutex9.c: Likewise.
3918 * tst-robust1.c: Likewise.
3919 * tst-robust7.c: Likewise.
3920 * tst-robust8.c: Likewise.
3921 * tst-mutexpi1.c: New file.
3922 * tst-mutexpi2.c: New file.
3923 * tst-mutexpi3.c: New file.
3924 * tst-mutexpi4.c: New file.
3925 * tst-mutexpi5.c: New file.
3926 * tst-mutexpi6.c: New file.
3927 * tst-mutexpi7.c: New file.
3928 * tst-mutexpi7a.c: New file.
3929 * tst-mutexpi8.c: New file.
3930 * tst-mutexpi9.c: New file.
3931 * tst-robust1.c: New file.
3932 * tst-robust2.c: New file.
3933 * tst-robust3.c: New file.
3934 * tst-robust4.c: New file.
3935 * tst-robust5.c: New file.
3936 * tst-robust6.c: New file.
3937 * tst-robust7.c: New file.
3938 * tst-robust8.c: New file.
3939 * Makefile (tests): Add the new tests.
3940
3941 * pthread_create.c (start_thread): Add some casts to avoid warnings.
3942 * pthread_mutex_destroy.c: Remove unneeded label.
3943
f3be81a9
UD
39442006-07-01 Ulrich Drepper <drepper@redhat.com>
3945
3946 * pthread_mutex_init.c (__pthread_mutex_init): Move some
3947 computations to compile time.
3948
c26ca5e1
UD
39492006-06-04 Ulrich Drepper <drepper@redhat.com>
3950
3951 * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
3952
6f8a7dff
UD
39532006-05-15 Ulrich Drepper <drepper@redhat.com>
3954
c26ca5e1 3955 * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
6f8a7dff 3956
3d237e42
UD
39572006-05-11 Ulrich Drepper <drepper@redhat.com>
3958
04974d63
UD
3959 * pthread_key_create.c (__pthread_key_create): Do away with
3960 __pthread_keys_lock.
3961
3962 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
3963 (__kernel_cpumask_size): Mark as hidden.
3964 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
3965
3d237e42
UD
3966 * sem_open.c (__sem_mappings_lock): Mark as hidden.
3967 * semaphoreP.h (__sem_mappings_lock): Likewise.
3968
790fc6e4
UD
39692006-05-10 Ulrich Drepper <drepper@redhat.com>
3970
3971 * pthread_atfork.c: Mark __dso_handle as hidden.
3972
be434a72
UD
39732006-05-09 Ulrich Drepper <drepper@redhat.com>
3974
3975 [BZ #2644]
3976 * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
3977 the reload problem. Change the one path in pthread_cancel_init
3978 which causes the problem. Force gcc to reload. Simplify callers.
3979 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
3980 (_Unwind_GetBSP): Undo last patch.
3981
3142b1ac
UD
39822006-05-07 Ulrich Drepper <drepper@redhat.com>
3983
bf3635d3
UD
3984 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
3985 function pointer is reloaded after pthread_cancel_init calls.
3142b1ac
UD
3986
3987 [BZ #2644]
3988 * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
3989 pointers are reloaded after pthread_cancel_init calls.
3990
27488789
UD
39912006-05-01 Ulrich Drepper <drepper@redhat.com>
3992
3993 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
3994 __always_inline.
3995
a6375d11
UD
39962006-04-27 Ulrich Drepper <drepper@redhat.com>
3997
3998 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
3999 Allocate new object which is passed to timer_sigev_thread so that
4000 the timer can be deleted before the new thread is scheduled.
4001
16a1d952
RM
40022006-04-26 Roland McGrath <roland@redhat.com>
4003
4004 * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
4005
7960f2a7
UD
40062006-04-08 Ulrich Drepper <drepper@redhat.com>
4007
ab9a9ff8
UD
4008 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
4009 suffix for conditional jumps.
4010 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
4011 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
4012 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
4013 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
4014 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
4015 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
4016
7960f2a7
UD
4017 * init.c (sigcancel_handler): Compare with correct PID even if the
4018 thread is in the middle of a fork call.
4019 (sighandler_setxid): Likewise.
4020 Reported by Suzuki K P <suzuki@in.ibm.com> .
4021
2035d91c
UD
40222006-04-07 Jakub Jelinek <jakub@redhat.com>
4023
4024 * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
4025
0292b0dd
UD
40262006-04-06 Ulrich Drepper <drepper@redhat.com>
4027
4028 * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
4029 fails [Coverity CID 105].
4030
6738b3c0
UD
40312006-04-05 Ulrich Drepper <drepper@redhat.com>
4032
4033 * sysdeps/pthread/pthread.h: Add nonnull attributes.
4034
359157a5
RM
40352006-04-03 Steven Munroe <sjmunroe@us.ibm.com>
4036
4037 [BZ #2505]
4038 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
4039 Define __lll_rel_instr using lwsync.
4040
cd277b2d
UD
40412006-03-27 Ulrich Drepper <drepper@redhat.com>
4042
4043 * allocatestack.c (allocate_stack): Always initialize robust_head.
4044 * descr.h: Define struct robust_list_head.
4045 (struct pthread): Use robust_list_head in robust mutex list definition.
4046 Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
4047 * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
4048 (__pthread_initialize_minimal_internal): Register robust_list with
4049 the kernel.
4050 * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
4051 Declare __set_robust_list_avail.
4052 * pthread_create.c (start_thread): Register robust_list of new thread.
4053 [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
4054 waiters.
4055 * pthread_mutex_destroy.c: For robust mutexes don't look at the
4056 number of users, it's unreliable.
4057 * pthread_mutex_init.c: Allow use of pshared robust mutexes if
4058 set_robust_list syscall is available.
4059 * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
4060 * pthread_mutex_lock.c: Simplify robust mutex code a bit.
4061 Set robust_head.list_op_pending before trying to lock a robust mutex.
4062 * pthread_mutex_timedlock.c: Likewise.
4063 * pthread_mutex_trylock.c: Likewise.
4064 * pthread_mutex_unlock.c: Likewise for unlocking.
4065 * Makefile (tests): Add tst-robust8.
4066 * tst-robust8.c: New file.
4067
facac085
UD
40682006-03-08 Andreas Schwab <schwab@suse.de>
4069
4070 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
4071 (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
4072
7ccbe1a1
RM
40732006-03-05 Roland McGrath <roland@redhat.com>
4074
4075 * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
4076 and $config_os doesn't match *linux*.
4077
043cee37
RM
40782006-03-05 David S. Miller <davem@sunset.davemloft.net>
4079
4080 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
4081 Use __syscall_error.
4082 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
4083 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
4084 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
4085 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
4086 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
4087 * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
4088
88bce79e
UD
40892006-03-02 Ulrich Drepper <drepper@redhat.com>
4090
4091 * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
4092
672ec465
UD
40932006-03-01 Ulrich Drepper <drepper@redhat.com>
4094
4095 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
4096 (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
4097 mutex.
4098 (__lll_robust_timedlock_wait): Likewise.
4099 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
4100 (__lll_robust_lock_wait): Likewise.
4101 (__lll_robust_timedlock_wait): Likewise.
4102 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
4103 (__lll_robust_lock_wait): Likewise.
4104 (__lll_robust_timedlock_wait): Likewise.
4105
c4a4875d
RM
41062006-03-01 Jakub Jelinek <jakub@redhat.com>
4107
4108 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
4109 lll_robust_mutex_trylock, lll_robust_mutex_lock,
4110 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
4111 lll_robust_mutex_unlock): Define.
4112 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
4113
3192fd8e
RM
41142006-02-28 H.J. Lu <hongjiu.lu@intel.com>
4115
4116 * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
4117 instead of <clone.S>.
4118
14d44b19
RM
41192006-02-27 Jakub Jelinek <jakub@redhat.com>
4120
4121 * Makefile (libpthread-routines): Add
4122 pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
4123 and pthread_mutex_[sg]etprioceiling.
4124 * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
4125 pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
4126 pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
4127 pthread_mutex_setprioceiling.
4128 * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
4129 PTHREAD_PRIO_PROTECT): New enum values.
4130 (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
4131 pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
4132 pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
4133 prototypes.
4134 * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
4135 PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
4136 (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
4137 Define.
4138 (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
4139 PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
4140 PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
4141 (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
4142 and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
4143 * pthread_mutex_init.c (__pthread_mutex_init): For the time being
4144 return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
4145 protocol mutexes.
4146 * pthread_mutex_getprioceiling.c: New file.
4147 * pthread_mutex_setprioceiling.c: New file.
4148 * pthread_mutexattr_getprioceiling.c: New file.
4149 * pthread_mutexattr_setprioceiling.c: New file.
4150 * pthread_mutexattr_getprotocol.c: New file.
4151 * pthread_mutexattr_setprotocol.c: New file.
4152
62f6b9b2
RM
41532006-02-27 Daniel Jacobowitz <dan@codesourcery.com>
4154
4155 * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
4156
e0a3ed4f
RM
41572006-02-27 Roland McGrath <roland@redhat.com>
4158
4159 * sysdeps/pthread/Subdirs: List nptl here too.
4160 * configure (libc_add_on_canonical): New variable.
4161
4162 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
4163
4164 * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
4165 self to get main source tree's file.
4166 * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
4167 * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
4168 * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
4169 * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
4170 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
4171 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
4172 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
4173 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
4174 * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
4175 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
4176 * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
4177 * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
4178 * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
4179
4180 * Makefile: Use $(sysdirs) in vpath directive.
4181
4182 * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
4183 (CPPFLAGS-timer_routines.c): Likewise.
4184
4185 * Makeconfig (includes): Variable removed.
4186
84cfa284
RM
41872006-02-26 Roland McGrath <roland@redhat.com>
4188
4189 * sysdeps/generic/pt-raise.c: Moved to ...
4190 * pt-raise.c: ... here.
4191 * sysdeps/generic/lowlevellock.h: Moved to ...
4192 * lowlevellock.h: ... here.
4193
c5132ca1
RM
41942006-02-23 Roland McGrath <roland@redhat.com>
4195
4196 * descr.h (struct pthread): Add final member `end_padding'.
4197 (PTHREAD_STRUCT_END_PADDING): Use it.
4198
41992006-02-20 Roland McGrath <roland@redhat.com>
4200
4201 * sysdeps/mips: Directory removed, saved in ports repository.
4202 * sysdeps/unix/sysv/linux/mips: Likewise.
4203
a93317a1
UD
42042006-02-18 Ulrich Drepper <drepper@redhat.com>
4205
4206 * tst-robust1.c: Add second mutex to check that the mutex list is
4207 handled correctly.
4208
f1740bc4
UD
42092006-02-17 Jakub Jelinek <jakub@redhat.com>
4210
4211 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
4212 lll_robust_mutex_trylock, lll_robust_mutex_lock,
4213 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
4214 lll_robust_mutex_unlock): New macros.
4215 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
4216 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
4217 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
4218 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
4219 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
4220
a7245bf5
UD
42212006-02-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4222
4223 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
4224 definitions.
4225 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
4226
49bfc1fe
UD
42272006-02-17 Ulrich Drepper <drepper@redhat.com>
4228
4229 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
4230 (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
4231 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
4232 (lll_robust_mutex_unlock): Likewise.
4233
56e987ac
UD
42342006-02-13 Jakub Jelinek <jakub@redhat.com>
4235
4236 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
4237 Set robust_list.__next rather than robust_list.
4238 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
4239 (__pthread_list_t): New typedef.
4240 (pthread_mutex_t): Replace __next and __prev fields with __list.
4241 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
4242 (__pthread_list_t): New typedef.
4243 (pthread_mutex_t): Replace __next and __prev fields with __list.
4244 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4245 (__pthread_list_t, __pthread_slist_t): New typedefs.
4246 (pthread_mutex_t): Replace __next and __prev fields with __list.
4247 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
4248 (__pthread_list_t, __pthread_slist_t): New typedefs.
4249 (pthread_mutex_t): Replace __next and __prev fields with __list.
4250 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
4251 (__pthread_list_t, __pthread_slist_t): New typedefs.
4252 (pthread_mutex_t): Replace __next and __prev fields with __list.
4253 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
4254 (__pthread_slist_t): New typedef.
4255 (pthread_mutex_t): Replace __next field with __list.
4256
683040c3
UD
42572006-02-15 Ulrich Drepper <drepper@redhat.com>
4258
25bc77e6 4259 * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
683040c3
UD
4260 PTHREAD_MUTEX_OWNERDEAD.
4261 (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
4262 Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
4263 * Makefile (libpthread-routines): Add lowlevelrobustlock.
4264 * pthread_create.c (start_thread): Very much simplify robust_list loop.
4265 * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
4266 to PTHREAD_MUTEX_INCONSISTENT.
4267 * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
4268 * pthread_mutex_lock.c: Reimplement robust mutex handling.
4269 * pthread_mutex_trylock.c: Likewise.
4270 * pthread_mutex_timedlock.c: Likewise.
4271 * pthread_mutex_unlock.c: Likewise.
4272 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
4273 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
4274 lowlevelrobustlock.sym.
4275 * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
4276 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
4277 definitions.
4278 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4279 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
4280 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
4281 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
4282 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
4283
bbf209a4
UD
42842006-02-12 Ulrich Drepper <drepper@redhat.com>
4285
b007ce7c
UD
4286 * allocatestack.c (allocate_stack): Initialize robust_list.
4287 * init.c (__pthread_initialize_minimal_internal): Likewise.
4288 * descr.h (struct xid_command): Pretty printing.
4289 (struct pthread): Use __pthread_list_t or __pthread_slist_t for
4290 robust_list. Adjust macros.
4291 * pthread_create.c (start_thread): Adjust robust_list handling.
4292 * phtread_mutex_unlock.c: Don't allow unlocking from any thread
4293 but the owner for all robust mutex types.
4294 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
4295 __pthread_list_t and __pthread_slist_t. Use them in pthread_mutex_t.
0ca3379d 4296 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
b007ce7c
UD
4297 * sysdeps/pthread/pthread.h: Adjust mutex initializers.
4298
bbf209a4 4299 * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
b42a214c 4300 openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
bbf209a4 4301
b576fca1
UD
43022006-02-08 Jakub Jelinek <jakub@redhat.com>
4303
4304 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
4305 lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
4306
a6df7387
UD
43072006-01-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4308
4309 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
4310 Return status.
4311 (lll_futex_timed_wait): Define.
4312
7c65e900
UD
43132006-01-19 Ulrich Drepper <drepper@redhat.com>
4314
4315 * tst-cancel4.c: Test ppoll.
4316
5f9f21e8
AJ
43172006-01-18 Andreas Jaeger <aj@suse.de>
4318
cf407dfb 4319 [BZ #2167]
5f9f21e8
AJ
4320 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
4321 (pthread_mutex_t): Follow changes for other archs. Based on patch
4322 by Jim Gifford <patches@jg555.com>.
4323
251278c6
UD
43242006-01-13 Richard Henderson <rth@redhat.com>
4325
4326 * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
4327
de59a291
RM
43282006-01-10 Roland McGrath <roland@redhat.com>
4329
4330 * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
4331 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
4332 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
4333 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
4334 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
4335 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
4336 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
4337 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
4338 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
0ca13e14 4339 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
de59a291 4340
931786ee
RM
43412006-01-09 Roland McGrath <roland@redhat.com>
4342
5d42c8c3
RM
4343 * tst-initializers1-c89.c: New file.
4344 * tst-initializers1-c99.c: New file.
4345 * tst-initializers1-gnu89.c: New file.
4346 * tst-initializers1-gnu99.c: New file.
4347 * Makefile (tests): Add them.
4348 (CFLAGS-tst-initializers1-c89.c): New variable.
4349 (CFLAGS-tst-initializers1-c99.c): New variable.
4350 (CFLAGS-tst-initializers1-gnu89.c): New variable.
4351 (CFLAGS-tst-initializers1-gnu99.c): New variable.
4352
931786ee
RM
4353 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
4354 Use __extension__ on anonymous union definition.
4355 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4356 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4357 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4358 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3c238452 4359 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
931786ee 4360
8dd18431
RM
43612006-01-08 Jakub Jelinek <jakub@redhat.com>
4362
4363 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
4364 Don't give the union a name because it changes the mangled name.
4365 Instead name the struct for __data.
4366 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
4367 Likewise.
4368 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
4369 Likewise.
4370
ae11e412
UD
43712006-01-09 Jakub Jelinek <jakub@redhat.com>
4372
4373 * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
4374 stack bias to mc_ftp field.
4375
c6885aa1
UD
43762006-01-07 Ulrich Drepper <drepper@redhat.com>
4377
4378 * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
6e741bc3 4379 being too clever and reloading the futex value where it shouldn't.
c6885aa1 4380
ae4ad00a
UD
43812006-01-06 Ulrich Drepper <drepper@redhat.com>
4382
4383 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
4384 correct type.
4385
ced368f7
UD
43862006-01-06 Jakub Jelinek <jakub@redhat.com>
4387
4388 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
4389 Add cfi directives.
4390
d804f5df
UD
43912006-01-06 Ulrich Drepper <drepper@redhat.com>
4392
cbbbb188 4393 * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
719046c1
UD
4394 * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
4395 rename in tcbhead_t.
4396
d804f5df
UD
4397 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
4398 Don't give the union a name because it changes the mangled name.
4399 Instead name the struct for __data.
4400 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4401 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4402 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4403 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4404 * pthread_create.c (start_thread): Adjust robust mutex free loop.
4405 * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
4406
679d83ba
UD
44072006-01-05 Ulrich Drepper <drepper@redhat.com>
4408
4409 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
4410 Return status.
4411 (lll_futex_timed_wait): Define.
4412 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4413 * sysdeps/pthread/aio_misc.h: New file.
4414
06dc5bf3
RM
44152006-01-03 Joseph S. Myers <joseph@codesourcery.com>
4416
4417 * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
4418
9759bbf1
UD
44192006-01-03 Steven Munroe <sjmunroe@us.ibm.com>
4420
4421 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
4422 (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
4423 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4424
db59b28b
UD
44252006-01-04 Ulrich Drepper <drepper@redhat.com>
4426
4427 * tst-cancel24.cc: Use C headers instead of C++ headers.
4428
b01fe5f7
UD
44292006-01-03 Jakub Jelinek <jakub@redhat.com>
4430
4431 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
4432 sparc-linux configured glibc.
4433 (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
4434 (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
4435 __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
4436 atomic_compare_and_exchange_val_24_acq instead of
4437 atomic_compare_and_exchange_val_acq.
4438 (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
4439 instead of atomic_exchange_rel.
4440 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
4441 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
4442 file.
4443 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
4444 file.
4445 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
4446 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
4447 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
4448 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
4449 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
4450 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
4451 New file.
4452 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
4453 New file.
4454 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
4455 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
4456 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
4457 file.
4458 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
4459 file.
4460 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
4461
35c2fd59
UD
44622006-01-03 Ulrich Drepper <drepper@redhat.com>
4463
4464 * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
4465 mutex initializers.
4466
305bb37e
UD
44672006-01-02 Jakub Jelinek <jakub@redhat.com>
4468
4469 * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
4470 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
4471 THREAD_COPY_POINTER_GUARD): Define.
4472 * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
4473 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
4474
cc792128
UD
44752006-01-01 Ulrich Drepper <drepper@redhat.com>
4476
4477 * version.c: Update copyright year.
4478
db0a00d3
UD
44792005-12-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4480
4481 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
4482 .eh_frame section, use cfi_* directives.
4483 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
4484
b36205c4
UD
44852005-12-30 Ulrich Drepper <drepper@redhat.com>
4486
4487 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
4488 now.
4489
8b4f1598
UD
44902005-12-29 Ulrich Drepper <drepper@redhat.com>
4491
4492 * sysdeps/pthread/sigaction.c: Removed.
4493 * sigaction.c: New file.
4494 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
4495
fec5592d
UD
44962005-12-28 Ulrich Drepper <drepper@redhat.com>
4497
4498 * Makefile (tests): Add tst-signal7.
4499 * tst-signal7.c: New file.
4500
db169ed5
RM
45012005-12-27 Roland McGrath <roland@redhat.com>
4502
4503 * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
4504 (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
4505 * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
4506 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
4507 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
4508 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
4509 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
4510 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
4511 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
4512 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
4513 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
4514
bfffffae
UD
45152005-12-27 Jakub Jelinek <jakub@redhat.com>
4516
4517 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
4518 and __prev field to pthread_mutex_t.
4519 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4520 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4521 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4522 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4523 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
4524 to pthread_mutex_t.
4525
1bcfb5a5
UD
45262005-12-26 Ulrich Drepper <drepper@redhat.com>
4527
4528 * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
4529 PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
4530 PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
4531 PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
4532 PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
4533 and PTHREAD_MUTEXATTR_FLAG_BITS.
4534 * descr.h (struct pthread): Add robust_list field and define
4535 ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
4536 * pthread_mutexattr_getrobust.c: New file.
4537 * pthread_mutexattr_setrobust.c: New file.
4538 * pthread_mutex_consistent.c: New file.
4539 * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
4540 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
4541 Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
4542 Adjust pthread_mutex_t initializers.
4543 * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
4544 field to pthread_mutex_t.
4545 * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
4546 and __prev field to pthread_mutex_t.
4547 * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
4548 pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
4549 * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
4550 and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
4551 * pthread_mutexattr_gettype.c: Likewise.
4552 * pthread_mutexattr_setpshared.c: Likewise.
4553 * pthread_mutexattr_settype.c: Likewise.
4554 * pthread_mutex_init.c: Reject robust+pshared attribute for now.
4555 Initialize mutex kind according to robust flag.
4556 * pthread_mutex_lock.c: Implement local robust mutex.
4557 * pthread_mutex_timedlock.c: Likewise.
4558 * pthread_mutex_trylock.c: Likewise.
4559 * pthread_mutex_unlock.c: Likewise.
4560 * pthread_create.c (start_thread): Mark robust mutexes which remained
4561 locked as dead.
4562 * tst-robust1.c: New file.
4563 * tst-robust2.c: New file.
4564 * tst-robust3.c: New file.
4565 * tst-robust4.c: New file.
4566 * tst-robust5.c: New file.
4567 * tst-robust6.c: New file.
4568 * tst-robust7.c: New file.
4569 * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
4570 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
4571 (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
4572 tst-robust5, tst-robust6, and tst-robust7.
4573
4574 * tst-typesizes.c: New file.
4575 * Makefile (tests): Add tst-typesizes.
4576
4577 * tst-once3.c: More debug output.
4578
9333ed0d
UD
45792005-12-24 Ulrich Drepper <drepper@redhat.com>
4580
d4d138a4
UD
4581 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
4582 missing after last change.
4583
bfffffae 4584 * version.c: Update copyright year.
9333ed0d 4585
dcc73a8d
UD
45862005-12-23 Ulrich Drepper <drepper@redhat.com>
4587
4588 * pthread_mutex_destroy.c: Set mutex type to an invalid value.
4589 * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
4590 * pthread_mutex_trylock.c: Likewise.
4591 * pthread_mutex_timedlock.c: Likewise.
4592 * pthread_mutex_unlock.c: Likewise.
4593
879f3ca6
RM
45942005-12-22 Roland McGrath <roland@redhat.com>
4595
4596 * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
4597 so that #include_next's search location is not reset to the -I..
4598 directory where <nptl/...> can be found.
4599
077a0da7
UD
46002005-12-22 Ulrich Drepper <drepper@redhat.com>
4601
4602 [BZ #1913]
4603 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
4604 Fix unwind info. Remove useless branch prediction prefix.
7735afa2
UD
4605 * tst-cancel24.cc: New file.
4606 * Makefile: Add rules to build and run tst-cancel24.
077a0da7 4607
8dea90aa
RM
46082005-12-21 Roland McGrath <roland@redhat.com>
4609
4610 * libc-cancellation.c: Use <> rather than "" #includes.
4611 * pt-cleanup.c: Likewise.
4612 * pthread_create.c: Likewise.
4613 * pthread_join.c: Likewise.
4614 * pthread_timedjoin.c: Likewise.
4615 * pthread_tryjoin.c: Likewise.
4616 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
4617 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
4618 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
4619 * unwind.c: Likewise.
4620
8da21f96
UD
46212005-12-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4622
4623 * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
4624 * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
4625 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
4626 THREAD_COPY_POINTER_GUARD): Define.
4627
00c2b3b9
UD
46282005-12-19 Jakub Jelinek <jakub@redhat.com>
4629
4630 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
4631 rather than one.
4632 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
4633 THREAD_COPY_POINTER_GUARD): Define.
4634 * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
4635 * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
4636 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
4637 THREAD_COPY_POINTER_GUARD): Define.
4638 * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
4639 * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
4640 THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
4641 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
4642 Use PTR_DEMANGLE for B0 if defined.
4643
827b7087
UD
46442005-12-17 Ulrich Drepper <drepper@redhat.com>
4645
4646 * pthread_create.c (__pthread_create_2_1): Use
4647 THREAD_COPY_POINTER_GUARD if available.
4648 * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
4649 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
4650 * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
4651 Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
4652 * sysdeps/x86_64/tls.h: Likewise.
4653
2826ac7e
RM
46542005-12-15 Roland McGrath <roland@redhat.com>
4655
4656 * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
4657
b6ab06ce
UD
46582005-12-13 Ulrich Drepper <drepper@redhat.com>
4659
4660 * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
4661 sysdeps/generic.
4662 * errno-loc.c: New file.
4663
f0d1a3b5
RM
46642005-12-12 Roland McGrath <roland@redhat.com>
4665
4666 * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
4667 adjustments before choosing stack size. Update minimum stack size
4668 calculation to match allocate_stack change.
4669
db13ddbc
UD
46702005-12-12 Ulrich Drepper <drepper@redhat.com>
4671
4672 * allocatestack.c (allocate_stack): Don't demand that there is an
4673 additional full page available on the stack beside guard, TLS, the
4674 minimum stack.
4675
088f460f
UD
46762005-11-24 Ulrich Drepper <drepper@redhat.com>
4677
4678 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
4679 (__cleanup_fct_attribute): Use __regparm__ not regparm.
4680
4681 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
4682 compiling 32-bit code we must define __cleanup_fct_attribute.
4683
16feadf2
UD
4684005-11-24 Jakub Jelinek <jakub@redhat.com>
4685
4686 [BZ #1920]
4687 * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
4688 __attribute__ instead of __attribute.
4689 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
4690 (__cleanup_fct_attribute): Likewise.
4691
e6e493bb
UD
46922005-11-17 Jakub Jelinek <jakub@redhat.com>
4693
4694 * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
4695 a write barrier before writing libgcc_s_getcfa.
4696
8e635611
UD
46972005-11-06 Ulrich Drepper <drepper@redhat.com>
4698
4699 * sysdeps/unix/sysv/linux/configure: Removed.
4700
ce33ee7c
UD
47012005-11-05 Ulrich Drepper <drepper@redhat.com>
4702
4703 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
4704 optional init_array/fini_array support.
4705
20d511e0
RM
47062005-10-24 Roland McGrath <roland@redhat.com>
4707
4708 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
4709 versioned_symbol use.
4710
fe60d146
RM
47112005-10-16 Roland McGrath <roland@redhat.com>
4712
4713 * init.c (__pthread_initialize_minimal_internal): Even when using a
4714 compile-time default stack size, apply the minimum that allocate_stack
4715 will require, and round up to page size.
4716
0faa1cf5
RM
47172005-10-10 Daniel Jacobowitz <dan@codesourcery.com>
4718
4719 * Makefile ($(test-modules)): Remove static pattern rule.
4720
f9126cc2 47212005-10-14 Jakub Jelinek <jakub@redhat.com>
b42a214c 4722 Ulrich Drepper <drepper@redhat.com>
f9126cc2
UD
4723
4724 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
4725 alignment in callback function.
4726 * Makefile: Add rules to build and run tst-align3.
4727 * tst-align3.c: New file.
4728
015a5d22
RM
47292005-10-03 Jakub Jelinek <jakub@redhat.com>
4730
4731 * allocatestack.c (setxid_signal_thread): Add
4732 INTERNAL_SYSCALL_DECL (err).
4733
b71ce910
UD
47342005-10-02 Jakub Jelinek <jakub@redhat.com>
4735
4736 * allocatestack.c (setxid_signal_thread): Need to use
4737 atomic_compare_and_exchange_bool_acq.
4738
dff9a7a1 47392005-10-01 Ulrich Drepper <drepper@redhat.com>
b42a214c 4740 Jakub Jelinek <jakub@redhat.com>
dff9a7a1
UD
4741
4742 * descr.h: Define SETXID_BIT and SETXID_BITMASK. Adjust
4743 CANCEL_RESTMASK.
4744 (struct pthread): Move specific_used field to avoid padding.
4745 Add setxid_futex field.
4746 * init.c (sighandler_setxid): Reset setxid flag and release the
4747 setxid futex.
4748 * allocatestack.c (setxid_signal_thread): New function. Broken
4749 out of the bodies of the two loops in __nptl_setxid. For undetached
4750 threads check whether they are exiting and if yes, don't send a signal.
4751 (__nptl_setxid): Simplify loops by using setxid_signal_thread.
4752 * pthread_create.c (start_thread): For undetached threads, check
4753 whether setxid bit is set. If yes, wait until signal has been
4754 processed.
4755
4756 * allocatestack.c (STACK_VARIABLES): Initialize them.
4757 * pthread_create.c (__pthread_create_2_1): Initialize pd.
4758
560b4709
UD
47592004-09-02 Jakub Jelinek <jakub@redhat.com>
4760
4761 * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
4762 waiters, awake all waiters on the associated mutex.
4763
5eac4760
RM
47642005-09-22 Roland McGrath <roland@redhat.com>
4765
4766 * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
4767 ../sysdeps/x86_64/hp-timing.h).
4768
a3615024
UD
47692005-08-29 Jakub Jelinek <jakub@redhat.com>
4770
4771 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
4772 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4773 (lll_futex_wake_unlock): Define.
4774 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
4775 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4776 (lll_futex_wake_unlock): Define.
4777 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
4778 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4779 (lll_futex_wake_unlock): Define.
4780 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
4781 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4782 (lll_futex_wake_unlock): Define.
4783 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
4784 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4785 (lll_futex_wake_unlock): Define.
4786 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
4787 lll_futex_wake_unlock.
4788 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
4789 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4790 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
4791 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
4792 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4793 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
4794
bf017034
UD
47952005-09-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4796
4797 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
4798 Fix typo in register name.
4799
fd4af664
UD
48002005-08-23 Ulrich Drepper <drepper@redhat.com>
4801
8558d715
UD
4802 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
4803 Use __sigfillset. Document that sigfillset does the right thing wrt
4804 to SIGSETXID.
fd4af664 4805
3fd1bc67
UD
48062005-07-11 Jakub Jelinek <jakub@redhat.com>
4807
44d75caf 4808 [BZ #1102]
3fd1bc67
UD
4809 * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
4810 PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
4811 PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
4812 PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
4813 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
4814 PTHREAD_COND_INITIALIZER): Supply zeros for all fields
4815 in the structure.
4816 * Makefile (tests): Add tst-initializers1.
4817 (CFLAGS-tst-initializers1.c): Set.
4818 * tst-initializers1.c: New test.
4819
553185e2
UD
48202005-07-11 Jakub Jelinek <jakub@redhat.com>
4821
4822 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
4823 Make sure __flags are located at offset 48 from the start of the
4824 structure.
4825
8df08cb2
RM
48262005-07-02 Roland McGrath <roland@redhat.com>
4827
4828 * Makeconfig: Comment fix.
4829
253eb3a0
UD
48302005-07-05 Jakub Jelinek <jakub@redhat.com>
4831
4832 * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
4833 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
4834 is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
4835 (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
4836 TLS_PRE_TCB_SIZE is sizeof (struct pthread).
4837 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4838 * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
4839 Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
4840 * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
4841 assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
4842
bb6e8ca3
UD
48432005-06-25 Jakub Jelinek <jakub@redhat.com>
4844
4845 * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
4846 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4847 * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
4848 fields.
4849 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4850 * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
4851 field. Put in sysinfo field unconditionally.
4852 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4853 * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
4854 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4855 * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
4856 fields.
4857 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4858 * pthread_create.c (__pthread_create_2_1): Use
4859 THREAD_COPY_STACK_GUARD macro.
4860 * Makefile: Add rules to build and run tst-stackguard1{,-static}
4861 tests.
4862 * tst-stackguard1.c: New file.
4863 * tst-stackguard1-static.c: New file.
4864
99c7f870
UD
48652005-06-14 Alan Modra <amodra@bigpond.net.au>
4866
4867 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
4868 Invoke CGOTSETUP and CGOTRESTORE.
4869 (CGOTSETUP, CGOTRESTORE): Define.
4870
8074c5c5
RM
48712005-05-29 Richard Henderson <rth@redhat.com>
4872
4873 * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
4874 (tf_write, tf_writev): Use it.
4875 (do_test): Use socketpair instead of pipe. Set SO_SNDBUF to
4876 the system minimum.
4877
c179df4e
UD
48782005-05-23 Jakub Jelinek <jakub@redhat.com>
4879
4880 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
4881 [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
4882 __librt_*_asynccancel@local.
4883
b0e196a4
UD
48842005-05-17 Alan Modra <amodra@bigpond.net.au>
4885
4886 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
4887 all occurrences of JUMPTARGET. Instead append @local to labels.
4888
f7d78e18
UD
48892005-05-20 Jakub Jelinek <jakub@redhat.com>
4890
4891 * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
4892 size/alignment of struct pthread rather than tcbhead_t.
4893 * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
4894 Likewise.
4895 * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
4896 Likewise.
4897 * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
4898 Likewise.
4899
363dd976
UD
49002005-05-19 Richard Henderson <rth@redhat.com>
4901
4902 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
4903 __sync_val_compare_and_swap, not explicit _si variant.
4904 * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
4905
1ad9da69
UD
49062005-05-03 Ulrich Drepper <drepper@redhat.com>
4907
4908 [BZ #915]
4909 * sysdeps/pthread/pthread.h: Avoid empty initializers.
4910
5085cd1f
UD
49112005-05-03 Jakub Jelinek <jakub@redhat.com>
4912
4913 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
4914 .eh_frame section, use cfi_* directives.
4915
ad529081
UD
49162005-04-27 Jakub Jelinek <jakub@redhat.com>
4917
4918 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
4919 of "" includes.
4920
dea99685
UD
49212005-04-27 Ulrich Drepper <drepper@redhat.com>
4922
c06aad09 4923 [BZ #1075]
dea99685
UD
4924 * tst-cancel17.c (do_test): Add arbitrary factor to make sure
4925 aio_write blocks.
4926
84060bad
RM
49272005-04-27 Roland McGrath <roland@redhat.com>
4928
5e2d8ac8
RM
4929 * Makefile (tests): Remove tst-clock2.
4930
84060bad
RM
4931 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
4932 CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
4933 translating to the kernel clockid_t for our own process/thread clock.
4934
4935 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
4936
4a035b9d
RM
49372005-04-15 Jakub Jelinek <jakub@redhat.com>
4938
4939 * old_pthread_cond_init.c: Include <errno.h>.
4940 (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
4941 process shared or uses clock other than CLOCK_REALTIME.
4942 * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
4943
edac0e8f
UD
49442005-04-13 David S. Miller <davem@davemloft.net>
4945
4946 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
4947 * sysdeps/sparc/sparc64/clone.S: New file.
4948
613d8d52
RM
49492005-04-05 Jakub Jelinek <jakub@redhat.com>
4950
44d75caf 4951 [BZ #1102]
613d8d52
RM
4952 * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
4953 __inline instead of inline.
4954 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
4955
ee618985
UD
49562005-03-31 Jakub Jelinek <jakub@redhat.com>
4957
4958 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
4959 functionally equivalent, but shorter instructions.
4960 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
4961 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
4962 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
4963 Likewise.
4964 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
4965 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
4966 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
4967 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
4968 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4969 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
4970 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
4971 Likewise.
4972 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
4973 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
4974 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4975 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
4976 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
4977
f850220b
AJ
49782005-03-28 Daniel Jacobowitz <dan@codesourcery.com>
4979
4980 * sysdeps/mips/Makefile: New file.
4981 * sysdeps/mips/nptl-sysdep.S: New file.
4982 * sysdeps/mips/tcb-offsets.sym: New file.
4983 * sysdeps/mips/pthread_spin_lock.S: New file.
4984 * sysdeps/mips/pthread_spin_trylock.S: New file.
4985 * sysdeps/mips/pthreaddef.h: New file.
4986 * sysdeps/mips/tls.h: New file.
4987 * sysdeps/mips/jmpbuf-unwind.h: New file.
4988 * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
4989 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
4990 * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
4991 * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
4992 * sysdeps/unix/sysv/linux/mips/fork.c: New file.
4993 * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
4994 * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
4995 * sysdeps/unix/sysv/linux/mips/clone.S: New file.
4996 * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
4997 * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
4998
1e6da2b0
UD
49992005-03-23 Ulrich Drepper <drepper@redhat.com>
5000
c06aad09 5001 [BZ #1112]
1e6da2b0
UD
5002 * pthread_create.c (__pthread_create_2_1): Rename syscall error
5003 variable to scerr.
5004
5233d576
RM
50052005-03-10 Jakub Jelinek <jakub@redhat.com>
5006
5007 * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
5008
3053ff11
RM
50092005-02-25 Roland McGrath <roland@redhat.com>
5010
5011 * alloca_cutoff.c: Correct license text.
5012 * tst-unload.c: Likewise.
5013 * sysdeps/pthread/allocalim.h: Likewise.
5014 * sysdeps/pthread/pt-initfini.c: Likewise.
5015 * sysdeps/pthread/bits/libc-lock.h: Likewise.
5016 * sysdeps/pthread/bits/sigthread.h: Likewise.
5017 * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
5018 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
5019
9cfe5381
RM
50202005-02-16 Roland McGrath <roland@redhat.com>
5021
5022 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
5023 Use unsigned int * for ptr_nthreads.
5024
7de00121
RM
50252005-02-14 Alan Modra <amodra@bigpond.net.au>
5026
20d511e0 5027 [BZ #721]
7de00121
RM
5028 * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
5029 gcc4.
5030
4bae262d
UD
50312005-02-07 Richard Henderson <rth@redhat.com>
5032
613d8d52 5033 [BZ #787]
4bae262d
UD
5034 * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
5035 argument.
5036
75df54b7
RM
50372004-11-03 Marcus Brinkmann <marcus@gnu.org>
5038
5039 * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
5040 order of arguments in invocation of atomic_add_zero.
5041
ea9c93cc
UD
50422005-01-26 Jakub Jelinek <jakub@redhat.com>
5043
9cfe5381 5044 [BZ #737]
ea9c93cc
UD
5045 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
5046 Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
5047 at least gotntpoff relocation and addition.
5048 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
5049 Likewise.
5050 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
5051 Likewise.
5052 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
5053 Likewise.
5054
9dcafc55
UD
50552005-01-06 Ulrich Drepper <drepper@redhat.com>
5056
5057 * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
5058 entry for static tls deallocation fix.
5059 * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
5060 also contains information whether the memory pointed to is static
5061 TLS or not.
5062 * sysdeps/i386/tls.h: Likewise.
5063 * sysdeps/ia64/tls.h: Likewise.
5064 * sysdeps/powerpc/tls.h: Likewise.
5065 * sysdeps/s390/tls.h: Likewise.
5066 * sysdeps/sh/tls.h: Likewise.
5067 * sysdeps/sparc/tls.h: Likewise.
5068 * sysdeps/x86_64/tls.h: Likewise.
5069
a71c152c
UD
50702004-12-27 Ulrich Drepper <drepper@redhat.com>
5071
5072 * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
5073
d143c49e
UD
50742004-12-21 Jakub Jelinek <jakub@redhat.com>
5075
5076 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
5077 %esp.
5078 * Makefile (tests): Add tst-align2.
5079 * tst-align2.c: New test.
5080 * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
5081 -mpreferred-stack-boundary=4.
5082
50130ded
RM
50832004-12-18 Roland McGrath <roland@redhat.com>
5084
5085 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
5086 New file removed withdrawn for the moment.
5087
cbc53df0
RH
50882004-12-17 Richard Henderson <rth@redhat.com>
5089
5090 * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
5091 * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
50130ded 5092
fb9d5c73
UD
50932004-12-16 Ulrich Drepper <drepper@redhat.com>
5094
03332aa6
UD
5095 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
5096 Increased PTHREAD_STACK_MIN.
5097
fb9d5c73
UD
5098 * tst-context1.c (stacks): Use bigger stack size.
5099
e853ea00
UD
51002004-12-16 Jakub Jelinek <jakub@redhat.com>
5101
5102 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
5103 * sysdeps/sparc/tcb-offsets.sym: Add TID.
5104
f23673fc
UD
51052004-12-15 Jakub Jelinek <jakub@redhat.com>
5106
5107 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
5108 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
5109 * sysdeps/s390/tcb-offsets.sym (TID): Add.
5110
917fbe70
UD
51112004-12-15 Ulrich Drepper <drepper@redhat.com>
5112
5113 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
5114
1f9d7c27
UD
51152004-12-14 Ulrich Drepper <drepper@redhat.com>
5116
5117 * sysdeps/powerpc/tcb-offsets.sym: Add TID.
5118 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
5119
5120 * tst-getpid1.c: If child crashes, report this first. Print which
5121 signal.
5122
bf7c04cd
UD
51232004-12-09 Ulrich Drepper <drepper@redhat.com>
5124
5125 * init.c (__pthread_initialize_minimal_internal): Also unblock
5126 SIGSETXID.
5127
51282004-12-01 Jakub Jelinek <jakub@redhat.com>
5129
5130 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
5131 _POSIX_THREAD_CPUTIME): Define to 0.
5132 * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
5133 handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
5134 * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
5135 __timer_signal_thread_tclk): Remove.
5136 (init_module): Remove their initialization.
5137 (thread_cleanup): Remove their cleanup assertions.
5138 * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
5139 __timer_signal_thread_tclk): Remove.
5140 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
75df54b7 5141 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
bf7c04cd
UD
5142 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
5143
484cc801
UD
51442004-12-07 Jakub Jelinek <jakub@redhat.com>
5145
5146 * sysdeps/ia64/tcb-offsets.sym (TID): Add.
5147 * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
5148
5149 * Makefile (tests): Add tst-getpid2.
5150 * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
5151 (do_test): Use it. Use __clone2 instead of clone on ia64.
5152 * tst-getpid2.c: New test.
5153
2da9a6a1
UD
51542004-12-07 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5155
5156 * sysdeps/unix/sysv/linux/sh/clone.S: New file.
5157
1ff241b8
UD
51582004-12-04 Ulrich Drepper <drepper@redhat.com>
5159
5160 * Makefile (tests): Add tst-getpid1.
5161 * tst-getpid1.c: New file.
5162 * sysdeps/unix/sysv/linux/i386/clone.S: New file.
5163 * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
5164
3f488b9c
RM
51652004-12-02 Roland McGrath <roland@redhat.com>
5166
5167 * Makefile (libpthread-nonshared): Variable removed.
5168 ($(objpfx)libpthread_nonshared.a): Target removed.
5169 ($(inst_libdir)/libpthread_nonshared.a): Likewise.
5170 These are now handled by generic magic from
5171 libpthread-static-only-routines being set.
5172
597ce09c
UD
51732004-11-27 Ulrich Drepper <drepper@redhat.com>
5174
5175 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
5176 _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
5177 _POSIX_THREAD_PRIO_PROTECT): Define.
5178 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5179 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
5180 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
5181
60e4523a
UD
51822004-11-26 Jakub Jelinek <jakub@redhat.com>
5183
5184 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
5185 _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
5186 _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
5187 _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
5188 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5189 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
5190 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
5191
f1f2cafc
UD
51922004-11-24 Ulrich Drepper <drepper@redhat.com>
5193
bca2d208
UD
5194 * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
5195
f1f2cafc
UD
5196 * Makefile (libpthread-routines): Add pthread_setschedprio.
5197 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
5198 * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
5199 * pthread_setschedprio.c: New file.
5200
b639d0c9
UD
52012004-11-20 Jakub Jelinek <jakub@redhat.com>
5202
ef2bb413
UD
5203 * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
5204 * pthread_cancel.c (pthread_create): Likewise.
5205
b639d0c9
UD
5206 * Makefile (libpthread-routines): Add vars.
5207 * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
5208 * init.c (__default_stacksize, __is_smp): Remove.
5209 * vars.c: New file.
5210 * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
5211 and define a wrapper macro.
5212 (PTHREAD_STATIC_FN_REQUIRE): Define.
5213 * allocatestack.c (__find_thread_by_id): Undefine.
5214 * pthread_create (__pthread_keys): Remove.
5215 (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
5216 pthread_key_create, pthread_setspecific, pthread_getspecific): Add
5217 PTHREAD_STATIC_FN_REQUIRE.
5218
3defcff3
UD
52192004-11-18 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5220
5221 * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
5222 parameter to REGISTER macro.
5223
ec188f92
RM
52242004-11-17 Roland McGrath <roland@redhat.com>
5225
5226 * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
5227 Make sure SIGCANCEL is blocked as well.
5228
ccd8de9a
UD
52292004-11-10 Jakub Jelinek <jakub@redhat.com>
5230
5231 * sysdeps/pthread/setxid.h: New file.
5232 * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
5233 (struct xid_command): Add forward decl.
5234 (struct pthread_functions): Change return type of __nptl_setxid hook
5235 to int.
5236 * pthreadP.h (__nptl_setxid): Change return type to int.
5237 * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
5238 calling thread, return its return value and set errno on failure.
5239 * descr.h (struct xid_command): Change id type to long array.
5240
5241 * Makefile: Add rules to build and test tst-setuid1 and
5242 tst-setuid1-static.
5243 * tst-setuid1.c: New test.
5244 * tst-setuid1-static.c: New test.
5245
ed2ced8a
UD
52462004-11-10 Jakub Jelinek <jakub@redhat.com>
5247
5248 * Makefile (tests): Add tst-exit3.
5249 * tst-exit3.c: New test.
5250
948603ee
UD
52512004-11-09 Ulrich Drepper <drepper@redhat.com>
5252
5253 * Makefile (tests): Add tst-exit2.
5254 * tst-exit2.c: New file.
5255
ba5ffd2a
RM
52562004-11-09 Roland McGrath <roland@redhat.com>
5257
5258 [BZ #530]
5259 * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
5260 here, before calling clone.
5261 * pthread_create.c (start_thread): Don't do it here.
5262
c4d7bd39
RM
52632004-11-02 Jakub Jelinek <jakub@redhat.com>
5264
5265 * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
5266
543fb0c8
UD
52672004-10-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5268
5269 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
5270 Set ETIMEDOUT to errno when time is up. Tweak to avoid
5271 assembler warning.
5272
a1fbd858
UD
52732004-10-28 Jakub Jelinek <jakub@redhat.com>
5274
5275 * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
5276 if sched_priority is not between minprio and maxprio.
5277
c2a4357a
UD
52782004-10-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5279
5280 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
5281 (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
5282
5283 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
5284 (__lll_mutex_timedlock_wait): Fix a bad branch condition.
5285
78d8d211
UD
52862004-10-24 Ulrich Drepper <drepper@redhat.com>
5287
5288 * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
5289 not-cancelable I/O functions.
5290
dd28590f
UD
52912004-10-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5292
5293 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
5294 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
5295 make sure 2 is stored in the futex and we looked at the old value.
5296 Fix a few other problems to return the correct value.
5297
f8c97af7
RH
52982004-10-14 Richard Henderson <rth@redhat.com>
5299
5300 * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
5301 make gcc4 happy.
5302
3feb8efa
UD
53032004-10-06 Jakub Jelinek <jakub@redhat.com>
5304
5305 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
5306 of pthread-functions.h and pthreaddef.h.
5307 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
5308
5309 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
5310 Change __data.__nwaiters from int to unsigned int.
5311
5312 * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
5313 sysconf (_SC_THREAD_CPUTIME) returns negative value.
5314
5315 * allocatestack.c (__find_thread_by_id): Move attribute_hidden
5316 before return type.
5317
5318 * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
5319 (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
5320
67060ef5
UD
53212004-10-06 Ulrich Drepper <drepper@redhat.com>
5322
5323 * tst-cancel4.c (tf_msgrcv): Check for failure in msgget. If the
5324 test fails, remove message queue.
5325 (tf_msgsnd): Likewise.
5326
f38a3086
UD
53272004-10-05 Jakub Jelinek <jakub@redhat.com>
5328
5329 * tst-clock1.c: Change #ifdef to #if defined.
5330 * tst-clock2.c: Likewise.
5331 * tst-cond11.c: Likewise.
5332
2c03b6db
UD
5333 * sysdeps/pthread/timer_create.c (timer_create): Use
5334 defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
5335 defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
5336 THREAD_CPUTIME.
5337
6ab5f50d
UD
53382004-10-05 Jakub Jelinek <jakub@redhat.com>
5339
5340 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
5341 _POSIX_THREAD_CPUTIME): Define to 0.
5342
e4bb4853
UD
53432004-10-04 Ulrich Drepper <drepper@redhat.com>
5344
5345 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
5346 and _POSIX_THREAD_CPUTIME to zero.
5347 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
5348 * tst-barrier2.c: Fix testing for POSIX feature.
5349 * tst-clock1.c: Likewise.
5350 * tst-clock2.c: Likewise.
5351 * tst-cond11.c: Likewise.
5352 * tst-cond4.c: Likewise.
5353 * tst-cond6.c: Likewise.
5354 * tst-flock2.c: Likewise.
5355 * tst-mutex4.c: Likewise.
5356 * tst-mutex9.c: Likewise.
5357 * tst-rwlock12.c: Likewise.
5358 * tst-rwlock4.c: Likewise.
5359 * tst-signal1.c: Likewise.
5360 * tst-spin2.c: Likewise.
5361 * sysdeps/pthread/posix-timer.h: Likewise.
5362 * sysdeps/pthread/timer_create.c: Likewise.
5363 * sysdeps/pthread/timer_routines.c: Likewise.
5364
c1b48791
UD
53652004-10-01 Ulrich Drepper <drepper@redhat.com>
5366
927f0673
UD
5367 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5368 (__lll_mutex_timedlock_wait): Address futex correctly.
5369
c1b48791 5370 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
b610fa2d 5371 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
c1b48791
UD
5372 make sure 2 is stored in the futex and we looked at the old value.
5373 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5374 (__lll_mutex_timedlock_wait): Likewise. Fix a few other problems
5375 which might very well made the code not working at all before.
7b87aca6 5376 [BZ #417]
c1b48791 5377
e9f4e844
UD
53782004-09-28 Ulrich Drepper <drepper@redhat.com>
5379
4f21c95d
UD
5380 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
5381 allow SIGSETXID to be sent.
5382 * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
5383 for SIGSETXID to be defined.
5384 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
5385 SIGSETXID cannot be blocked.
5386
e9f4e844
UD
5387 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
5388 Add __extension__ to long long types.
5389 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5390 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5391 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5392 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5393 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
5394 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5395 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5396
5f66b766
UD
53972004-09-25 Ulrich Drepper <drepper@redhat.com>
5398
5399 * descr.h (struct pthread): Add stopped_start field.
5400 * sysdeps/pthread/createthread.c (create_thread): Set
5401 start_stopped flag in descriptor for new thread appropriately.
5402 * pthread_create.c (start_thread): Only take lock to be stopped on
5403 startup if stopped_start flag says so.
5404
362038b0
UD
54052004-09-24 Ulrich Drepper <drepper@redhat.com>
5406
3f80a99b
UD
5407 * pthread_create.c (__pthread_create_2_1): Remember whether thread
5408 is created detached and if yes, do not try to free the stack in case
5409 the thread creation failed.
5410 * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
5411 call fails. Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
5412 case there has been no error. [BZ #405]
5413
362038b0
UD
5414 * pthread_create.c (start_thread): Don't wait for scheduler data
5415 etc to be set at the beginning of the function. The cancellation
5416 infrastructure must have been set up. And enable async
5417 cancellation before potentially going to sleep. [BZ #401]
5418
65f0beb9
UD
54192004-09-20 Ulrich Drepper <drepper@redhat.com>
5420
3c12b91a 5421 * Versions: Remove exports for pthread_set*id_np functions.
65f0beb9
UD
5422 * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
5423 for now.
5424 * Makefile: Don't build pthread_set*id code for now.
5425
2edb61e3
UD
54262004-09-19 Ulrich Drepper <drepper@redhat.com>
5427
5428 * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
5429 internal use.
5430 * allocatestack.c (__nptl_setxid): New function.
5431 * descr.h (struct xid_command): Define type.
5432 * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
5433 (sighandler_setxid): New function.
5434 (__pthread_initialize_minimal): Register sighandler_setxid for
5435 SIGCANCEL.
5436 * pt-allocrtsig.c: Update comment.
5437 * pthreadP.h: Define SIGSETXID. Declare __xidcmd variable.
5438 Declare __nptl_setxid.
5439 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
5440 * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
5441 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
5442 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
5443 and pthread_setresuid_np.
5444 * pthread_setgid_np.c: New file.
5445 * pthread_setuid_np.c: New file.
5446 * pthread_setegid_np.c: New file.
5447 * pthread_seteuid_np.c: New file.
5448 * pthread_setregid_np.c: New file.
5449 * pthread_setreuid_np.c: New file.
5450 * pthread_setresgid_np.c: New file.
5451 * pthread_setresuid_np.c: New file.
5452 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
5453 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
5454 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
5455 and pthread_setresuid_np.
5456 * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
5457 pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
5458 pthread_setregid, and pthread_setresgid.
5459
1ab1fa6f
UD
54602004-09-18 Ulrich Drepper <drepper@redhat.com>
5461
5462 * allocatestack.c (allocate_stack): Return EAGAIN instead of
5463 ENOMEM when out of memory.
5464
ae9e6b36
RM
54652004-09-10 Roland McGrath <roland@redhat.com>
5466
5467 [BZ #379]
5468 * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
5469 code, since we don't try to use the broken CLONE_STOPPED any more.
5470 * pthread_create.c (start_thread): Likewise.
5471
424bd2f8
RH
54722004-09-15 Richard Henderson <rth@redhat.com>
5473
5474 * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
5475
17b8a52d
UD
54762004-09-01 David Mosberger <davidm@hpl.hp.com>
5477
5478 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
5479 (__libc_unwind_longjmp): Delete macro and declare as function.
5480 * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
5481 __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
5482 nptl directory.
5483 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
5484 * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
5485 * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
5486
ccc63b07
UD
54872004-09-12 Ulrich Drepper <drepper@redhat.com>
5488
5489 * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
5490 for __USE_XOPEN2K.
5491 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
5492 types also for __USE_XOPEN2K.
5493 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5494 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5495 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5496 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5497 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5498 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5499 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5500 [BZ #320]
5501
31f93b3b
UD
55022004-09-08 Ulrich Drepper <drepper@redhat.com>
5503
5504 * sysdeps/pthread/pthread.h
5505 (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
5506 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
5507 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
5508 (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
5509 [BZ #375]
5510
e0329987
UD
55112004-09-07 Ulrich Drepper <drepper@redhat.com>
5512
590b40f7
UD
5513 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
5514 PSEUDO to be used with . prefix.
5515
67254a97
UD
5516 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
5517 Use atomic_increment instead of atomic_exchange_and_add.
5518 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
5519 Likewise.
5520 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
5521 Likewise.
5522 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
5523 Likewise.
5524
5525 * allocatestack.c (allocate_stack): Use atomic_increment_val
5526 instead of atomic_exchange_and_add.
5527 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
5528 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
5529 Likewise.
5530 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5531 Likewise.
5532
e0329987
UD
5533 * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
5534 the initialization function might throw.
5535
42d86dd6 55362005-09-05 Richard Henderson <rth@redhat.com>
e0329987 5537
42d86dd6
RH
5538 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
5539 Move definition inside libpthread, libc, librt check. Provide
5540 definition for rtld.
5541
73f7c32c
UD
55422004-09-02 Ulrich Drepper <drepper@redhat.com>
5543
f76c8499
UD
5544 * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
5545 * sysdeps/i386/jmpbuf-unwind.h: Likewise
5546 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
5547 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
5548 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
5549 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
5550 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
5551 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
5552 * unwind.c: Use it.
5553
73f7c32c
UD
5554 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
5555 Rename __data.__clock to __data.__nwaiters, make it unsigned int.
5556 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
5557 Likewise.
5558 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
5559 Decrement __nwaiters. If pthread_cond_destroy has been called and
5560 this is the last waiter, signal pthread_cond_destroy caller and
5561 avoid using the pthread_cond_t structure after unlock.
5562 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5563 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5564 Read clock type from the least significant bits of __nwaiters instead
5565 of __clock.
5566 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5567 * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
5568
55692004-08-31 Jakub Jelinek <jakub@redhat.com>
5570
5571 [BZ #342]
5572 * Makefile (tests): Add tst-cond20 and tst-cond21.
5573 * tst-cond20.c: New test.
5574 * tst-cond21.c: New test.
5575 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
5576 (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
5577 it unsigned int.
5578 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
5579 Likewise.
5580 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
5581 (pthread_cond_t): Likewise.
5582 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
5583 Likewise.
5584 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
5585 Likewise.
5586 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
5587 Likewise.
5588 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
5589 (cond_nwaiters): New.
5590 (clock_bits): New.
5591 * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
5592 if there are waiters not signalled yet.
5593 Wait until all already signalled waiters wake up.
5594 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
5595 __nwaiters. If pthread_cond_destroy has been called and this is the
5596 last waiter, signal pthread_cond_destroy caller and avoid using
5597 the pthread_cond_t structure after unlock.
5598 (__pthread_cond_wait): Increment __nwaiters in the beginning,
5599 decrement it when leaving. If pthread_cond_destroy has been called
5600 and this is the last waiter, signal pthread_cond_destroy caller.
5601 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5602 Likewise. Read clock type from the least significant bits of
5603 __nwaiters instead of __clock.
5604 * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
5605 whether clock ID can be encoded in COND_CLOCK_BITS bits.
5606 * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
5607 clock type just from the last COND_CLOCK_BITS bits of value.
5608 * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
5609 instead of __clock, just from second bit of condattr's value.
5610
409f7493
UD
56112004-08-30 Jakub Jelinek <jakub@redhat.com>
5612
5613 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
5614 bits/wordsize.h. Make the header match i386 header when __WORDSIZE
5615 != 64.
5616 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
5617
92c6ccd1
RM
56182004-08-15 Roland McGrath <roland@frob.com>
5619
5620 * pthread_atfork.c: Update copyright terms including special exception
5621 for these trivial files, which are statically linked into executables
5622 that use dynamic linking for the significant library code.
5623
4d004cfb
UD
56242004-08-09 Jakub Jelinek <jakub@redhat.com>
5625
5626 * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
5627 pthread_rwlock_rdlock.
5628 * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
5629 Decrease __nr_readers_queued after reacquiring lock.
5630 * sysdeps/pthread/pthread_rwlock_timedrdlock
5631 (pthread_rwlock_timedrdlock): Likewise.
5632 Reported by Bob Cook <bobcook47@hotmail.com>.
5633
90595fb6
RM
56342004-08-11 Jakub Jelinek <jakub@redhat.com>
5635
5636 * tst-rwlock14.c (tf): Read main thread handle from *ARG
5637 before pthread_barrier_wait.
5638
fa46f7ab
UD
56392004-08-07 Ulrich Drepper <drepper@redhat.com>
5640
5641 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
5642 Remove unnecessary exception handling data.
5643
15ef4b55
UD
56442004-07-23 Jakub Jelinek <jakub@redhat.com>
5645
5646 [BZ #284]
5647 * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
5648 instead of clockid_t.
5649
4fb907b7
RM
56502004-07-21 Roland McGrath <roland@redhat.com>
5651
5652 * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
5653
56542004-07-19 Roland McGrath <roland@redhat.com>
5655
5656 * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
5657
8f73811b
RM
56582004-07-02 Roland McGrath <roland@redhat.com>
5659
5660 * configure: Don't exit.
5661
290639c3
UD
56622004-07-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5663
5664 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
5665 (__pthread_cond_timedwait): Check for invalid nanosecond in
5666 timeout value.
5667
8e5aaad9
UD
56682004-07-07 Ulrich Drepper <drepper@redhat.com>
5669
5670 * Makefile: Add rules to build and run tst-fini1.
5671 * tst-fini1.c: New file.
5672 * tst-fini1mod.c: New file.
5673
ce6e047f
UD
56742004-07-05 Ulrich Drepper <drepper@redhat.com>
5675
5676 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
5677 if no cancellation support is needed.
5678 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
5679 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
5680 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
5681 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
5682 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
5683 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
5684 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
5685 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
5686 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
5687
5688 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
5689 only if not already defined.
5690
9b9ef823
UD
56912004-07-05 Jakub Jelinek <jakub@redhat.com>
5692
2dd18ce2
UD
5693 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
5694 constraint "m" instead of "0" for futex.
5695
9b9ef823
UD
5696 * shlib-versions: Add powerpc64-.*-linux.*.
5697
38205402
UD
56982004-07-04 Jakub Jelinek <jakub@redhat.com>
5699
5700 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
5701 (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
5702 for valid tv_nsec.
5703 * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
5704 1 billion and 64-bit tv_nsec which is valid when truncated to 32
5705 bits.
5706
78a9c837
RM
57072004-06-29 Roland McGrath <roland@redhat.com>
5708
5709 * Banner: NPTL no longer has its own version number.
5710 * Makefile (nptl-version): Variable removed.
5711 * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
5712 using $(version), the glibc version number.
5713
d3d35527
UD
57142004-06-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5715
5716 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
5717 Fix branch offset for a PLT entry.
5718 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
5719 Likewise.
5720 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
5721 Likewise.
5722 * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
5723 Likewise.
5724 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
5725 Likewise.
5726
346f18ae
UD
57272004-06-28 Jakub Jelinek <jakub@redhat.com>
5728
5729 * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
5730 unconditionally.
5731
f3a19754
UD
57322004-06-28 Jakub Jelinek <jakub@redhat.com>
5733
5734 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
5735 (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
5736 instead of tv_sec.
5737 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
5738 (pthread_rwlock_timedrdlock): Likewise.
5739
539842a4
UD
57402004-06-22 Jakub Jelinek <jakub@redhat.com>
5741
5742 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
5743 Set __r7 to val, not mutex.
5744
46f4c578
UD
57452004-06-27 Ulrich Drepper <drepper@redhat.com>
5746
5747 * Makefile: Add rules to build tst-rwlock14.
5748 * tst-rwlock14.c: New file.
5749
57502004-06-24 Boris Hu <boris.hu@intel.com>
5751
5752 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
5753 check.
5754 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
5755
9898e99c
AJ
57562004-06-19 Andreas Jaeger <aj@suse.de>
5757
5758 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
5759 assembler in last patch.
5760
7c3164bc
UD
57612004-06-17 Ulrich Drepper <drepper@redhat.com>
5762
5763 * sysdeps/pthread/pthread_cond_timedwait.c
5764 (__pthread_cond_timedwait): Also check for negativ nanoseconds.
5765 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5766 (__pthread_cond_timedwait): Check for invalid nanosecond in
5767 timeout value.
5768 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5769 * tst-cond19.c: New file.
5770 * Makefile: Add rules to build and run tst-cond19.
5771
72e61500
UD
57722004-06-15 Steven Munroe <sjmunroe@us.ibm.com>
5773
5774 * tst-context1.c (GUARD_PATTERN): Defined.
5775 (tst_context_t): Define struct containing ucontext_t & guard words.
5776 (ctx): Declare as an array of tst_context_t.
5777 (fct): Verify uc_link & guard words are still valid.
5778 (tf): Initialize guard words in ctx. Adjust ctx refs for new struct.
5779
7c370086
UD
57802004-06-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5781
5782 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
5783 Add __data.__futex field, reshuffle __data.__clock.
5784 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
5785 (__pthread_cond_signal): Increment __futex at the same time as
5786 __wakeup_seq or __total_seq. Pass address of __futex instead of
5787 address of low 32-bits of __wakeup_seq to futex syscall.
5788 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
5789 (__pthread_cond_wait): Likewise. Pass __futex value from before
5790 releasing internal lock to FUTEX_WAIT.
5791 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
5792 (__pthread_cond_timedwait): Likewise.
5793 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
5794 (FUTEX_CMP_REQUEUE): Define.
5795 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
5796 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
5797 Pass __futex value from before the unlock and __futex address instead
5798 of address of low 32-bits of __wakeup_seq to futex syscall.
5799 Fallback to FUTEX_WAKE all on any errors.
5800
a9e526e7
RM
58012004-06-08 Jakub Jelinek <jakub@redhat.com>
5802
5803 * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
5804 comment typo.
5805 * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
5806 * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
5807 * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
5808 * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
5809 Likewise. Reported by Bob Cook <bobcook47@hotmail.com>.
5810
f1847a84
RM
58112004-06-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
5812
5813 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
5814 Add memory clobber to inline assembly.
5815 (__lll_mutex_trylock): Likewise.
5816 (__lll_mutex_cond_trylock): Likewise.
5817
f7c81e1a
UD
58182004-06-07 Martin Schwidefsky <schwidefsky@de.ibm.com>
5819
5820 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
5821 Pass val argument as 6th system call argument in %r7.
5822
75fccede
UD
58232004-05-21 Jakub Jelinek <jakub@redhat.com>
5824
5825 * Makefile (tests): Add tst-cond16.
5826 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
5827 * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
5828 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
5829 Add __data.__futex field, reshuffle __data.__clock.
5830 * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
5831 (__pthread_cond_signal): Increment __futex at the same time as
5832 __wakeup_seq or __total_seq. Pass address of __futex instead of
5833 address of low 32-bits of __wakeup_seq to futex syscall.
5834 * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
5835 (__pthread_cond_wait): Likewise. Pass __futex value from before
5836 releasing internal lock to FUTEX_WAIT.
5837 * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
5838 (__pthread_cond_timedwait): Likewise.
5839 * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
5840 (FUTEX_CMP_REQUEUE): Define.
5841 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
5842 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
5843 Pass __futex value from before the unlock and __futex address instead
5844 of address of low 32-bits of __wakeup_seq to futex syscall.
5845 Fallback to FUTEX_WAKE all on any errors.
5846 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
5847 Define.
5848 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
5849 internally. Return non-zero if error, zero if success.
5850 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
5851 Add __data.__futex field, reshuffle __data.__clock.
5852 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
5853 Define.
5854 (lll_futex_requeue): Add val argument, return 1 unconditionally
5855 for the time being.
5856 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
5857 Add __data.__futex field, reshuffle __data.__clock.
5858 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
5859 Define.
5860 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
5861 internally. Return non-zero if error, zero if success.
5862 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
5863 (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
5864 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
5865 Define.
5866 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
5867 internally. Return non-zero if error, zero if success.
5868 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
5869 Add __data.__futex field, reshuffle __data.__clock.
5870 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
5871 Define.
5872 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
5873 internally. Return non-zero if error, zero if success.
5874 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
5875 Add __data.__futex field, reshuffle __data.__clock.
5876 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
5877 Add __data.__futex field, reshuffle __data.__clock.
5878 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
5879 Increment __futex at the same time as __wakeup_seq or __total_seq.
5880 Pass address of __futex instead of address of low 32-bits of
5881 __wakeup_seq to futex syscall.
5882 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
5883 Pass __futex value from before releasing internal lock
5884 to FUTEX_WAIT.
5885 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5886 Likewise. Avoid unnecessary shadowing of variables.
5887 * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
5888 Set __futex to 2 * __total_seq. Pass __futex value from before the
5889 unlock and __futex address instead of address of low 32-bits of
5890 __wakeup_seq to futex_requeue macro, adjust for new return value
5891 meaning.
5892 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
5893 (__pthread_cond_signal): Increment __futex at the same time as
5894 __wakeup_seq or __total_seq. Pass address of __futex instead of
5895 address of low 32-bits of __wakeup_seq to futex syscall.
5896 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
5897 (__pthread_cond_wait): Likewise. Pass __futex value from before
5898 releasing internal lock to FUTEX_WAIT.
5899 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5900 (__pthread_cond_timedwait): Likewise.
5901 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
5902 (FUTEX_CMP_REQUEUE): Define.
5903 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
5904 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
5905 Pass __futex value from before the unlock and __futex address instead
5906 of address of low 32-bits of __wakeup_seq to futex syscall.
5907 Fallback to FUTEX_WAKE all on any errors.
5908
59092004-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5910
5911 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
5912 Add nop to align the end of critical section.
5913 (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
5914
fbf86dda
UD
59152004-06-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5916
5917 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
5918 Add __broadcast_seq field.
5919 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
5920 all waiters as woken with woken_seq and bump broadcast counter.
5921 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
5922 __broadcast_seq. Increment __woken_seq correctly when cleanuped.
5923 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5924 Comment typo fixes. Avoid returning -ETIMEDOUT.
5925
59262004-06-01 Ulrich Drepper <drepper@redhat.com>
5927
5928 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5929 (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
5930 Reported by Kaz Kojima.
5931
ffdd5e50
UD
59322004-05-25 Jakub Jelinek <jakub@redhat.com>
5933
5934 * sysdeps/unix/sysv/linux/aio_misc.h: New file.
5935
3abc82c8
UD
59362004-05-21 Jakub Jelinek <jakub@redhat.com>
5937
5938 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
5939 __broadcast_seq with bc_seq after acquiring internal lock instead of
5940 before it.
5941
893a3511
UD
59422004-05-18 Jakub Jelinek <jakub@redhat.com>
5943
5944 * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
5945 compilation.
5946 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5947 (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
5948 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
5949 (pthread_cond_t): Add __data.__broadcast_seq field.
5950 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5951 (FRAME_SIZE): Define.
5952 (__pthread_cond_timedwait): Use it. Store/check broadcast_seq.
5953 Comment typo fixes.
5954 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
5955 Define.
5956 (__pthread_cond_wait): Use it. Store/check broadcast_seq. Comment
5957 typo fixes.
5958 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
5959 (__pthread_cond_broadcast): Increment broadcast_seq. Comment typo
5960 fixes.
5961
59622004-05-18 Ulrich Drepper <drepper@redhat.com>
5963
5964 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
5965 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
5966 Add __broadcast_seq field.
5967 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5968 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5969 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5970 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5971 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5972 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
5973 all waiters as woken with woken_seq and bump broadcast counter.
5974 * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
5975 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
5976 __broadcast_seq field.
5977 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5978 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
5979 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
5980 * pthread_cond_init.c: Initialize __broadcast_seq field.
5981 * Makefile (tests): Add tst-cond17 and tst-cond18.
5982 Add .NOTPARALLEL goal.
5983 * tst-cond16.c: New file. From Jakub.
5984 * tst-cond17.c: New file. From Jakub.
5985 * tst-cond18.c: New file. From Jakub.
5986
4123718e
UD
59872004-05-16 Ulrich Drepper <drepper@redhat.com>
5988
5989 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
5990 unwind info.
5991
5992 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
5993 Parametrize frame size. Correct some unwind info.
5994 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5995
2d7ae210
UD
59962004-05-04 Jakub Jelinek <jakub@redhat.com>
5997
5998 * tst-stack3.c: Note testing functionality beyond POSIX.
5999
50c2b6d7
UD
60002004-05-04 Jakub Jelinek <jakub@redhat.com>
6001
6002 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
6003 Change conditional from ifdef to if.
6004
27b02589
UD
60052004-04-23 Jakub Jelinek <jakub@redhat.com>
6006
6007 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
6008 SYSDEP_CANCEL_ERROR): Define.
6009 (PSEUDO): Use it.
6010
4bb8fc33
UD
60112004-05-01 Jakub Jelinek <jakub@redhat.com>
6012
6013 * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
6014
f9a06dc1
UD
60152004-04-20 Jakub Jelinek <jakub@redhat.com>
6016
6017 * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
6018
d3b52028
UD
60192004-04-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6020
6021 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
6022 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6023 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
6024 info. Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6025
a5dd0a6c
UD
60262004-04-19 Ulrich Drepper <drepper@redhat.com>
6027
6028 * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
6029 thread has all signals blocked.
6030
620c3354
AJ
60312004-04-18 Andreas Jaeger <aj@suse.de>
6032
6033 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
6034 (SEM_VALUE_MAX): Add missing brace.
6035
1683daeb
UD
60362004-04-17 Jakub Jelinek <jakub@redhat.com>
6037
6038 * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
6039 in rt subdir.
6040 (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
6041 * sysdeps/pthread/tst-mqueue8x.c: New test.
6042 * tst-cancel4.c: Update comment about message queues.
6043
6044 * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
6045 return it_value { 0, 0 }.
6046 * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
6047 like SIGEV_SIGNAL.
6048 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
6049 assertion for SIGEV_NONE.
6050 (thread_attr_compare): Compare all attributes, not just a partial
6051 subset.
6052
60532004-04-17 Jakub Jelinek <jakub@redhat.com>
6054
6055 * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
6056
f532641d
UD
60572004-04-17 Ulrich Drepper <drepper@redhat.com>
6058
6059 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
6060 Just use a plain number.
6061 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
6062 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
6063 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
6064 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
6065 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
6066 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
6067 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
6068
7eb7fdda
UD
60692004-04-16 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6070
53392906
UD
6071 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
6072 frame info.
6073 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7eb7fdda 6074
d7ba1313
UD
60752004-04-15 Jakub Jelinek <jakub@redhat.com>
6076
6077 * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
6078 (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
6079 of calling sigwaitinfo.
6080
5adac0e4
UD
60812004-04-16 Ulrich Drepper <drepper@redhat.com>
6082
6083 * allocatestack.c (allocate_stack): Set reported_guardsize
6084 unconditionally.
6085 * pthread_getattr_np.c (pthread_getattr_np): Use
6086 reported_guardsize instead of guardsize.
6087 * descr.h (struct pthread): Add reported_guardsize field.
6088
f93fa7d4
UD
60892004-04-13 Jakub Jelinek <jakub@redhat.com>
6090
6091 * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
6092
1b82c6c7
UD
60932004-04-12 Ulrich Drepper <drepper@redhat.com>
6094
6095 * sysdeps/unix/sysv/linux/mq-notify.c: New file.
6096
60972004-04-08 Jakub Jelinek <jakub@redhat.com>
6098
6099 * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
6100 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
6101 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
6102 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
6103 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
6104 Define.
6105 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
6106 (_POSIX_MESSAGE_PASSING): Define.
6107 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
6108 (_POSIX_MESSAGE_PASSING): Define.
6109 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
6110 (_POSIX_MESSAGE_PASSING): Define.
6111
e6eb894e
UD
61122004-04-04 Ulrich Drepper <drepper@redhat.com>
6113
6114 * tst-context1.c (fct): Check whether correct stack is used.
6115
1e084487
UD
61162004-04-03 Ulrich Drepper <drepper@redhat.com>
6117
4e73e115
UD
6118 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
6119 matching constraints for asm mem parameters.
6120
1e084487
UD
6121 * tst-clock2.c (tf): Don't define unless needed.
6122
feca5e0b
UD
61232004-03-30 H.J. Lu <hongjiu.lu@intel.com>
6124
6125 * Makefile (link-libc-static): Use $(static-gnulib) instead of
6126 $(gnulib).
6127
3fa21fd8
UD
61282004-03-30 Ulrich Drepper <drepper@redhat.com>
6129
6130 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
6131 * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
6132 * pthreadP.h: Declare __nptl_deallocate_tsd.
6133 * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
6134 Adjust caller.
6135
6136 * Makefile (tests): Add tst-tsd5.
6137 * tst-tsd5.c: New file.
6138
8e32efa6
UD
61392004-03-29 Ulrich Drepper <drepper@redhat.com>
6140
6141 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
6142 (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
6143 is SHLIB_COMPAT check.
6144 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
6145 (__pthread_attr_getaffinity_old): Likewise.
6146 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6147 (__pthread_getaffinity_old): Likewise.
6148 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
6149 (__pthread_setaffinity_old): Likewise.
6150
eec8b6ca
UD
61512004-03-26 Ulrich Drepper <drepper@redhat.com>
6152
6153 * allocatestack.c (_make_stacks_executable): Call
6154 _dl_make_stack_executable first.
6155
db2f05ba
RM
61562004-03-24 Roland McGrath <roland@redhat.com>
6157
6158 * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
6159 constraint instead of "0".
6160
6abbc501
UD
61612004-03-24 Ulrich Drepper <drepper@redhat.com>
6162
68dc4dcb
UD
6163 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6164 (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
6165
6abbc501
UD
6166 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
6167 code to avoid warning.
6168
865e14d9
AJ
61692004-03-24 Andreas Jaeger <aj@suse.de>
6170
6171 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
6172 (__pthread_attr_setaffinity_old): Remove const.
6173
16b06b70
UD
61742004-03-23 Ulrich Drepper <drepper@redhat.com>
6175
2c0b891a
UD
6176 * sysdeps/unix/sysv/linux/smp.h: New file.
6177 * sysdeps/unix/sysv/linux/sh/smp.h: New file.
6178 * init.c: Define __is_smp.
6179 (__pthread_initialize_minimal_internal): Call is_smp_system to
6180 initialize __is_smp.
6181 * pthreadP.h: Declare __is_smp.
6182 Define MAX_ADAPTIVE_COUNT is necessary.
6183 * pthread_mutex_init.c: Add comment regarding __spins field.
6184 * pthread_mutex_lock.c: Implement adaptive mutex type.
6185 * pthread_mutex_timedlock.c: Likewise.
6186 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
6187 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
6188 Add __spins field.
6189 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6190 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6191 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6192 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6193 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6194 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6195 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6196 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
6197 lll_mutex_cond_trylock.
6198 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6199 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6200 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6201 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6202 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6203 Define BUSY_WAIT_NOP.
6204 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6205 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6206
6207 * tst-mutex5.c: Add support for testing adaptive mutexes.
6208 * tst-mutex7.c: Likewise.
6209 * tst-mutex5a.c: New file.
6210 * tst-mutex7a.c: New file.
6211 * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
6212
565699e4
UD
6213 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6214 (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
6abbc501 6215 vgettimeofday call might destroy the content.
565699e4 6216
7fe1586f
UD
6217 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
6218 @pause in the loop.
6219
e408880b
UD
6220 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
6221 No need to restrict type of ret. Make it int. Add comment.
6222
16b06b70
UD
6223 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
6224 Remove unnecessary setne instruction.
6225
61645263
UD
62262004-03-22 Jakub Jelinek <jakub@redhat.com>
6227
6228 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6229 (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
6230 * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
6231 If realloc fails, break out of the loop.
6232
e3d4c585
AJ
62332004-03-20 Andreas Jaeger <aj@suse.de>
6234
6235 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
6236 (__pthread_setaffinity_old): Fix interface.
6237 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6238 (__pthread_getaffinity_old): Likewise.
6239
6240 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
6241 (__pthread_setaffinity_new): Remove duplicate declaration.
6242
3abb1ff7
UD
62432004-03-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6244
6245 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
6246 the return value to a safe register.
6247 (CDISABLE): Set the function argument correctly.
6248
07bd2a3f
UD
62492004-03-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6250
6251 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
6252 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
6253 Rewrite so that only one locked memory operation per round is needed.
6254 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
6255 (pthread_barrier_wait): After wakeup, release lock only when the
6256 last thread stopped using the barrier object.
6257 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
6258 (__pthread_cond_wait): Don't store mutex address if the current
6259 value is ~0l. Add correct cleanup support and unwind info.
6260 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6261 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
6262 (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
6263 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
6264 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
6265 Add correct cleanup support and unwind info.
6266 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
6267 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
6268 information for syscall wrappers.
6269
14c35863
UD
62702004-03-18 Ulrich Drepper <drepper@redhat.com>
6271
6272 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
6273 cpusetsize field, remove next.
6274 * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
6275 parameter for size of the CPU set.
6276 (pthread_setaffinity_np): Likewise.
6277 (pthread_attr_getaffinity_np): Likewise.
6278 (pthread_attr_setaffinity_np): Likewise.
6279 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
6280 interface change, keep compatibility code.
6281 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
6282 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
6283 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
6284 * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np. Declare
6285 __pthread_getaffinity_np.
6286 * Versions: Add version for changed interfaces.
6287 * tst-attr3.c: Adjust test for interface change.
6288 * pthread_getattr_np.c: Query the kernel about the affinity mask with
6289 increasing buffer sizes.
6290 * pthread_attr_destroy.c: Remove unused list handling.
6291 * pthread_attr_init.c: Likewise.
6292
8e115d80
RM
62932004-03-17 Roland McGrath <roland@redhat.com>
6294
6295 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
6296 first argument to clock_getres so we ever enable kernel timers.
6297
e3b22ad3
UD
62982004-03-15 Ulrich Weigand <uweigand@de.ibm.com>
6299
6300 * init.c (nptl_version): Add __attribute_used__ to nptl_version.
6301
841153fa
RH
63022004-03-12 Richard Henderson <rth@redhat.com>
6303
e3b22ad3
UD
6304 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
6305 oldvalue from CENABLE to CDISABLE.
841153fa 6306
932dfea7
UD
63072004-03-12 Ulrich Drepper <drepper@redhat.com>
6308
6309 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
6310 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
6311 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
6312 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
6313
9852f6dc
RH
63142004-03-11 Richard Henderson <rth@redhat.com>
6315
6316 * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
6317 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
6318 * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
6319
43513fb7
UD
63202004-03-11 Jakub Jelinek <jakub@redhat.com>
6321
6322 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
6323 instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
6324 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
6325
63262004-03-11 Jakub Jelinek <jakub@redhat.com>
6327
6328 * forward.c (__pthread_cond_broadcast_2_0,
6329 __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
6330 __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
6331 __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
6332
8a3e10e0
UD
63332004-03-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6334
6335 * sysdeps/sh/tcb-offsets.sym: Add PID.
6336 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
6337 * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
6338
6d3a2bec
UD
63392004-03-10 Ulrich Drepper <drepper@redhat.com>
6340
6341 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
6342 include <sysdep-cancel.h>, vfork is no cancellation point.
6343 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
6344 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
6345 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
6346
d3a4a571
UD
63472004-03-10 Jakub Jelinek <jakub@redhat.com>
6348
73b4ce64
UD
6349 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
6350 libc_hidden_def.
6351 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
6352 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
6353 Likewise.
6354 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
6355 Likewise.
6356 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
6357 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
6358 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
6359 * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
6360 of DO_CALL_VIA_BREAK. Work around a gas problem.
6361
d682a515
UD
6362 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
6363 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
6364 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
6365 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
6366 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
6367 * sysdeps/powerpc/tcb-offsets.sym: Add PID.
6368
6369 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
6370 a local register for saving old PID. Negate PID in parent upon exit.
6371
d3a4a571
UD
6372 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
6373 tcb-offsets.h.
6374 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
6375 before syscall, set to the old value in the parent afterwards.
6376 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
6377 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
6378 tcb-offsets.h.
6379 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
6380 before syscall, set to the old value in the parent afterwards.
6381 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
6382 * sysdeps/s390/tcb-offsets.sym: Add PID.
6383
6384 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
6385 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
6386 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
6387 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
6388 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
6389 * sysdeps/sparc/tcb-offsets.sym: Add PID.
6390
63912004-03-10 Andreas Schwab <schwab@suse.de>
6392
6393 * sysdeps/ia64/tcb-offsets.sym: Add PID.
6394 * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
6395 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
6396
3f2fb223 63972004-03-09 Jakub Jelinek <jakub@redhat.com>
f4c024d1 6398
3f2fb223
UD
6399 * tst-cancel20.c (do_one_test): Clear in_sh_body first.
6400 * tst-cancel21.c (do_one_test): Likewise.
6401 Reported by Gordon Jin <gordon.jin@intel.com>.
f4c024d1 6402
8b9d6054
UD
64032004-02-09 Jakub Jelinek <jakub@redhat.com>
6404
6405 * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
6406 if non-zero and set to INT_MIN if zero.
6407 * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
6408 * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
6409 (SAVE_PID, RESTORE_PID): Define.
6410 (__vfork): Use it.
6411 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
6412 Use relative path to avoid including NPTL i386/vfork.S.
6413 (SAVE_PID, RESTORE_PID): Define.
6414 * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
6415 (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
6416 * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
6417 tst-vfork2x.
6418 (tests-reverse): Add tst-vfork1x and tst-vfork2x.
6419 * tst-vfork1.c: New test.
6420 * tst-vfork2.c: New test.
6421 * tst-vfork1x.c: New test.
6422 * tst-vfork2x.c: New test.
6423
02287d05
UD
64242004-03-08 Ulrich Drepper <drepper@redhat.com>
6425
c072ef6d 6426 * sysdeps/i386/tcb-offsets.sym: Add PID.
6fadea9f 6427 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
c072ef6d 6428 * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
6fadea9f 6429 * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
02287d05 6430
d4acd24b
UD
64312004-03-08 Steven Munroe <sjmunroe@us.ibm.com>
6432
6433 * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
6434
8acb4b81
UD
64352004-03-08 H.J. Lu <hongjiu.lu@intel.com>
6436
6437 * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
6438 _rtld_global_ro.
6439
4d1a02ef
UD
64402004-03-07 Ulrich Drepper <drepper@redhat.com>
6441
001836c8 6442 * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
8acb4b81 6443 _rtld_global_ro.
001836c8 6444
4d1a02ef
UD
6445 * tst-once4.c: Remove unnecessary macro definition.
6446
6447 * tst-mutex7.c (do_test): Limit thread stack size.
6448 * tst-once2.c (do_test): Likewise.
6449 * tst-tls3.c (do_test): Likewise.
6450 * tst-tls1.c (do_test): Likewise.
6451 * tst-signal3.c (do_test): Likewise.
6452 * tst-kill6.c (do_test): Likewise.
6453 * tst-key4.c (do_test): Likewise.
6454 * tst-join4.c (do_test): Likewise.
6455 * tst-fork1.c (do_test): Likewise.
6456 * tst-context1.c (do_test): Likewise.
6457 * tst-cond2.c (do_test): Likewise.
6458 * tst-cond10.c (do_test): Likewise.
6459 * tst-clock2.c (do_test): Likewise.
6460 * tst-cancel10.c (do_test): Likewise.
6461 * tst-basic2.c (do_test): Likewise.
6462 * tst-barrier4.c (do_test): Likewise.
6463
aa420660
UD
64642004-03-05 Ulrich Drepper <drepper@redhat.com>
6465
6466 * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
6467
cff08c81
UD
64682004-03-01 Ulrich Drepper <drepper@redhat.com>
6469
6470 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6471 (__pthread_cond_timedwait): Optimize wakeup test.
6472 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
6473 (__pthread_cond_wait): Likewise.
6474 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
6475 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6476 Likewise.
6477
b7fe377c
UD
64782004-02-29 Ulrich Drepper <drepper@redhat.com>
6479
6480 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6481 (__lll_mutex_lock_wait): Optimize a bit more. Just one copy of
6482 the atomic instruction needed.
6483 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6484 (__lll_mutex_lock_wait): Likewise.
6485
4c771a3b
UD
64862004-02-28 Ulrich Drepper <drepper@redhat.com>
6487
6488 * Makefile (tests): Add tst-cond14 and tst-cond15.
6489 * tst-cond14.c: New file.
6490 * tst-cond15.c: New file.
6491
a2c33d5a
UD
64922004-02-27 Ulrich Drepper <drepper@redhat.com>
6493
6494 * sysdeps/pthread/createthread.c (create_thread): Remove use of
6495 CLONE_STOPPED. We cannot use SIGCONT which means CLONE_STOPPED
6496 needs to be implemented differently to be useful.
6497
261eada2
UD
64982004-02-26 Ulrich Drepper <drepper@redhat.com>
6499
14ffbc83
UD
6500 * pthread_attr_setschedparam.c: Don't test priority against limits
6501 here. Set ATTR_FLAG_SCHED_SET flag.
6502 * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
6503 * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
6504 from parent thread to child. If attribute is used and scheduling
6505 parameters are not inherited, copy parameters from attribute or
6506 compute them. Check priority value.
6507 * pthread_getschedparam.c: If the parameters aren't known yet get
6508 them from the kernel.
6509 * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
6510 ATTR_FLAG_POLICY_SET flag for thread.
6511 * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
6512 and ATTR_FLAG_POLICY_SET.
6513
6514 * sysdeps/pthread/createthread.c: Use tgkill if possible.
6515
261eada2
UD
6516 * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
6517 fail if stack address hasn't been set. Just return 0.
6518
701d185c
UD
65192004-02-25 Ulrich Drepper <drepper@redhat.com>
6520
25b8e63c
UD
6521 * Makefile (tests-nolibpthread): Add tst-unload. Don't link with
6522 libpthread for the files in this list.
6523 (CFLAGS-tst-unload): Removed.
6524 * tst-unload.c (do_test): Don't use complete path for
6525 LIBPHREAD_SO.
6526
701d185c
UD
6527 * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
6528 tst-_res1mod2.
6529
a8fd5a02
UD
65302004-02-22 Ulrich Drepper <drepper@redhat.com>
6531
6532 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6533 (__lll_mutex_lock_wait): Rewrite so that only one locked memory
6534 operation per round is needed.
6535 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6536 (__lll_mutex_lock_wait): Likewise.
6537
dd0b7b19
UD
65382004-02-20 Ulrich Drepper <drepper@redhat.com>
6539
6540 * tst-cancel9.c (cleanup): Don't print to stderr.
6541
5990e1fe
UD
65422004-02-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6543
6544 * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
6545
33ab3b66
UD
65462004-02-20 Jakub Jelinek <jakub@redhat.com>
6547
1be3130e
UD
6548 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
6549 (__syscall_error_handler2): Call CDISABLE.
6550 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
6551 (__syscall_error_handler2): Call CDISABLE.
6552
8ba5025a
UD
6553 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
6554 Release lock before the loop, don't reacquire it.
8ba5025a 6555
33ab3b66
UD
6556 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
6557
11986c68
UD
65582004-02-19 Andreas Schwab <schwab@suse.de>
6559
6560 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
6561 Fix last change.
6562
dc391246
UD
65632004-02-18 Ulrich Drepper <drepper@redhat.com>
6564
37c054c7
UD
6565 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
6566 (pthread_barrier_wait): After wakeup, release lock only when the
6567 last thread stopped using the barrier object.
6568 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
6569 (pthread_barrier_wait): Likewise.
6570 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
6571 Likewise.
6572 * Makefile (tests): Add tst-barrier4.
6573 * tst-barrier4.c: New file.
dc391246
UD
6574
6575 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6576 (__pthread_cond_timedwait): Perform timeout test while holding
6577 internal lock to prevent wakeup race.
6578 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
6579 * sysdeps/pthread/pthread_cond_timedwait.c
6580 (__pthread_cond_timedwait): Likewise.
6581 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6582 (__pthread_cond_timedwait): Likewise.
6583
4a08113c
UD
65842004-02-18 Jakub Jelinek <jakub@redhat.com>
6585
6586 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
6587 (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
6588 * Makefile (tests): Add tst-rwlock13.
6589 * tst-rwlock13.c: New test.
6590
71b1675e
UD
65912004-02-16 Ulrich Drepper <drepper@redhat.com>
6592
6593 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6594 (__condvar_tw_cleanup): Little optimization.
6595 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
6596
cd9fdc72
UD
65972004-02-16 Steven Munroe <sjmunroe@us.ibm.com>
6598
6599 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
6600 libpthread as "lib" parameter to SHLIB_COMPAT.
6601 (__novmx_siglongjmp): Fix typo in function name.
6602 (__novmx_longjmp): Fix typo in function name.
6603
82038750
UD
66042004-02-13 Ulrich Drepper <drepper@redhat.com>
6605
b078c591
UD
6606 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
6607 __builtin_expect.
6608
82038750
UD
6609 * sysdeps/generic/pt-longjmp.c: Moved to...
6610 * sysdeps/pthread/pt-longjmp.c: ...here. New file.
6611
e2982bf0
UD
66122004-01-29 Steven Munroe <sjmunroe@us.ibm.com>
6613
6614 * Makefile (libpthread-routines): Add pt-cleanup.
6615 * pt-longjmp.c: Removed.
6616 * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
6617 * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
6618 * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
6619 Version longjmp, siglongjmp for GLIBC_2.3.4.
6620 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
6621
3730d95c
UD
66222004-02-13 Ulrich Drepper <drepper@redhat.com>
6623
219304ec
UD
6624 * sysdeps/pthread/pthread_cond_timedwait.c
6625 (__pthread_cond_timedwait): Optimize. Drop internal lock earlier.
6626 Reuse code. Add __builtin_expects.
6627
3730d95c
UD
6628 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6629 (__pthread_cond_timedwait): Get internal lock in case timeout has
6630 passed before the futex syscall.
6631 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6632
5673ccc1
UD
66332004-01-20 Ulrich Drepper <drepper@redhat.com>
6634
debddf64
UD
6635 * allocatestack.c: Pretty printing.
6636
5673ccc1
UD
6637 * sysdeps/pthread/createthread.c (create_thread): Don't add
6638 CLONE_DETACHED bit if it is not necessary.
6639
6bae8725
UD
66402004-01-16 Ulrich Drepper <drepper@redhat.com>
6641
6642 * pthread_getattr_np.c: Include ldsodefs.h.
6643
ff151400
RH
66442004-01-16 Richard Henderson <rth@redhat.com>
6645
6bae8725
UD
6646 * allocatestack.c: Don't declare __libc_stack_end.
6647 * init.c (__pthread_initialize_minimal_internal): Likewise.
6648 * pthread_getattr_np.c (pthread_getattr_np): Likewise.
ff151400 6649
ba683832
RH
66502004-01-15 Richard Henderson <rth@redhat.com>
6651
6652 * sysdeps/alpha/tls.h (tcbhead_t): Add private.
6653 (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
6654 TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
6655 GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
6656 (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
6657 (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
6658 (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
6659 * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
6660
630d93a7
UD
66612004-01-14 Ulrich Drepper <drepper@redhat.com>
6662
219304ec 6663 * init.c (pthread_functions): Make array const.
630d93a7 6664
d1fc817e
UD
66652004-01-13 Ulrich Drepper <drepper@redhat.com>
6666
6667 * allocatestack.c (__make_stacks_executable): Change interface.
6668 Check parameters. Pass parameter on to libc counterpart.
6669 * pthreadP.h: Change declaration.
6670
dc927809
RH
66712004-01-13 Richard Henderson <rth@redhat.com>
6672
10677727
UD
6673 * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
6674 prototype form.
6675 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
6676 Likewise.
6677
d1fc817e
UD
6678 * sysdeps/alpha/Makefile: New file.
6679 * sysdeps/alpha/tcb-offsets.sym: New file.
6680 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
6681 Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
dc927809 6682
d1fc817e
UD
6683 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
6684 on powerpc version.
dc927809 6685
249a3d0c
UD
66862004-01-08 Jakub Jelinek <jakub@redhat.com>
6687
6688 * Makefile (tests): Add tst-backtrace1.
6689 * tst-backtrace1.c: New test.
6690
763c0490
RM
66912003-12-11 Ulrich Weigand <uweigand@de.ibm.com>
6692
6693 * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
6694 register as second parameter to the REGISTER macro.
6695 * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
6696 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
6697 * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
6698 * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
6699 * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
6700 of thread register as second parameter to REGISTER macro in 64 case.
6701
c7baafd5
UD
67022004-01-03 Ulrich Drepper <drepper@redhat.com>
6703
6704 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
6705 (CFLAGS-getpid.o): Defined.
6706 (CFLAGS-getpid.os): Defined.
6707
25ac0258
UD
67082003-12-31 Ulrich Drepper <drepper@redhat.com>
6709
6710 * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
6711 returned for main thread does not overlap with any other VMA.
6712 Patch by Jakub Jelinek.
6713
795985e4
UD
67142003-12-29 Jakub Jelinek <jakub@redhat.com>
6715
6716 * tst-raise1.c: Include stdio.h.
6717
cb5b9388
UD
67182003-12-23 Jakub Jelinek <jakub@redhat.com>
6719
6720 * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
6721 setting with __ASSUME_TGKILL || defined __NR_tgkill.
6722 If pid is 0, set it to selftid.
6723 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
6724 Don't set self->pid but self->tid. If self->pid == 0 and self->tid
6725 != 0, return self->tid without doing a syscall.
6726 * descr.h (struct pthread): Move pid field after tid.
6727
6728 * Makefile (tests): Add tst-raise1.
6729 * tst-raise1.c: New file.
6730
432aaf5b
RM
67312003-12-23 Roland McGrath <roland@redhat.com>
6732
6733 * tst-oddstacklimit.c: New file.
6734 * Makefile (tests): Add it.
6735 (tst-oddstacklimit-ENV): New variable.
6736
6737 * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
6738 value up to page size for __default_stacksize.
6739
33ebea17
UD
67402003-12-21 Ulrich Drepper <drepper@redhat.com>
6741
6742 * Makefile (tests): Add tst-eintr5.
6743 * tst-eintr5.c: New file.
6744
6745 * eintr.c (eintr_source): Prevent sending signal to self.
6746
6747 * tst-eintr2.c (tf1): Improve error message.
6748
bbe35eb5
UD
67492003-12-20 Ulrich Drepper <drepper@redhat.com>
6750
6751 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
6752 * sysdeps/unix/sysv/linux/getpid.c: New file.
c0ecb80a
UD
6753 * pthread_cancel.c: Add comment explaining use of PID field.
6754 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
6755 * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
6756 * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
6757 temporarily to signal the field must not be relied on and updated
6758 by getpid().
6759 * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
6760 temporarily negative.
6761 * sysdeps/unix/sysv/linux/raise.c: Likewise.
bbe35eb5 6762
4efdd8d3
UD
67632003-12-19 Ulrich Drepper <drepper@redhat.com>
6764
6765 * eintr.c (setup_eintr): Add new parameter. Pass to thread function.
6766 (eintr_source): If ARG != NULL, use pthread_kill.
6767 * tst-eintr1.c: Adjust for this change.
6768 * tst-eintr2.c: Likewise.
6769 * Makefile (tests): Add tst-eintr3 and tst-eintr4.
6770 * tst-eintr3.c: New file.
6771 * tst-eintr4.c: New file.
6772
67732003-12-19 Jakub Jelinek <jakub@redhat.com>
6774
6775 * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
6776 if CANCELSTATE_BITMASK is set.
6777 * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
6778 Likewise.
6779
6780 * Makefile (tests): Add tst-cancel22 and tst-cancel23.
6781 (tests-reverse): Add tst-cancel23.
6782 * tst-cancel22.c: New test.
6783 * tst-cancel23.c: New test.
6784
675620f7
UD
67852003-12-18 Ulrich Drepper <drepper@redhat.com>
6786
6787 * tst-eintr1.c: Better error messages.
6788
6789 * Makefile (tests): Add tst-eintr2.
6790 * tst-eintr2.c: New file.
6791
67922003-12-18 Jakub Jelinek <jakub@redhat.com>
6793
6794 * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
6795 (CFLAGS-tst-cancelx21.c): Set.
6796 * tst-cancel21.c: New test.
6797 * tst-cancelx21.c: New test.
6798
6799 * unwind.c (FRAME_LEFT): Add adj argument. Subtract it from each
6800 comparison operand.
6801 (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
6802 _JMPBUF_CFA_UNWINDS. Adjust FRAME_LEFT invocations.
6803 * pt-longjmp.c: Include jmpbuf-unwind.h.
6804 (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
6805 _JMPBUF_UNWINDS. Adjust compared pointers.
6806 * init.c (__pthread_initialize_minimal_internal): Initialize
6807 pd->stackblock_size.
6808 * sysdeps/pthread/jmpbuf-unwind.h: Removed.
6809 * sysdeps/alpha/jmpbuf-unwind.h: New file.
6810 * sysdeps/i386/jmpbuf-unwind.h: New file.
6811 * sysdeps/powerpc/jmpbuf-unwind.h: New file.
6812 * sysdeps/s390/jmpbuf-unwind.h: New file.
6813 * sysdeps/sh/jmpbuf-unwind.h: New file.
6814 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
6815 * sysdeps/x86_64/jmpbuf-unwind.h: New file.
2e5e031d 6816 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
675620f7
UD
6817 (_JMPBUF_CFA_UNWINDS): Remove.
6818 (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
6819
68202003-12-12 Jakub Jelinek <jakub@redhat.com>
6821
6822 * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
6823 (CFLAGS-tst-cancelx20.c): Set.
6824 * tst-cancel20.c: New test.
6825 * tst-cancelx20.c: New test.
6826
2d951ab6
UD
68272003-12-17 Ulrich Drepper <drepper@redhat.com>
6828
6829 * init.c (__pthread_initialize_minimal_internal): Don't treat
6830 architectures with separate register stack special here when
6831 computing default stack size.
6832
f8a3a2e7
RM
68332003-12-17 Roland McGrath <roland@redhat.com>
6834
6835 * Makefile (tst-cancelx7-ARGS): New variable.
6836 Reportd by Greg Schafer <gschafer@zip.com.au>.
6837
e796f92f
UD
68382003-12-17 Jakub Jelinek <jakub@redhat.com>
6839
6840 * Makefile (tests): Add tst-stack3. Depend on $(objpfx)tst-stack3-mem.
6841 (generated): Add tst-stack3.mtrace and tst-stack3-mem.
6842 (tst-stack3-ENV): Set.
6843 ($(objpfx)tst-stack3-mem): New.
6844 * tst-stack3.c: New test.
6845
092eb73c
UD
68462003-12-10 David Mosberger <davidm@hpl.hp.com>
6847
6848 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
6849 Add unwind directives. Drop unused .regstk directive.
6850 (_fini_EPILOG_BEGINS): Add unwind directives.
6851
ff48874d
UD
68522003-12-11 Ulrich Drepper <drepper@redhat.com>
6853
6854 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
6855 Assume parameter is a pointer.
6856 (lll_futex_wake): Likewise.
20945457
UD
6857 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
6858 Likewise.
6859 (lll_futex_wake): Likewise.
ff48874d
UD
6860 Reported by Boris Hu.
6861 * sysdeps/unix/sysv/linux/unregister-atfork.c
6862 (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
6863
6864 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
6865
1d9d0b80
UD
68662003-12-10 Ulrich Drepper <drepper@redhat.com>
6867
6868 * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
6869 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
6870 __rtld_lock_initialize for ld.so lock.
6871 Patch in part by Adam Li <adam.li@intel.com>.
6872
c776b3d7
UD
68732003-12-02 David Mosberger <davidm@hpl.hp.com>
6874
6875 * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
6876 in $(gnulib). Also, remove stale comment.
6877
68782003-11-12 David Mosberger <davidm@hpl.hp.com>
6879
6880 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
6881 advantage of new syscall stub and optimize accordingly.
6882
6883 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
6884 from SYS_futex, to match expectations of
6885 sysdep.h:DO_INLINE_SYSCALL.
6886 (lll_futex_clobbers): Remove.
6887 (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
6888 (lll_futex_wake): Likewise.
6889 (lll_futex_requeue): Likewise.
6890 (__lll_mutex_trylock): Rewrite to a macro, so we can include this
6891 file before DO_INLINE_SYSCALL is defined (proposed by Jakub
6892 Jelinek).
6893 (__lll_mutex_lock): Likewise.
6894 (__lll_mutex_cond_lock): Likewise.
6895 (__lll_mutex_timed_lock): Likewise.
6896 (__lll_mutex_unlock): Likewise.
6897 (__lll_mutex_unlock_force): Likewise.
6898
6899 * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
6900 comes before the include of <sysdep.h>.
6901 (THREAD_SELF_SYSINFO): New macro.
6902 (THREAD_SYSINFO): Likewise.
6903 (INIT_SYSINFO): New macro.
6904 (TLS_INIT_TP): Call INIT_SYSINFO.
6905
6906 * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
6907
6908 * sysdeps/pthread/createthread.c (create_thread): Use
6909 THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
6910 * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
6911 THREAD_SELF_SYSINFO instead of open code.
6912 * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
6913 (THREAD_SYSINFO): Likewise.
6914
6915 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
6916
6917 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
6918
57d20ee7
UD
69192003-12-06 Ulrich Drepper <drepper@redhat.com>
6920
6921 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
6922 instead of .init. Patch by David Mosberger.
6923
67aeab2a
AJ
69242003-11-30 Thorsten Kukuk <kukuk@suse.de>
6925
6926 * sysdeps/pthread/configure.in: Remove broken declaration in C
6927 cleanup handling check.
6928
8ca203e6
AJ
69292003-11-30 Andreas Jaeger <aj@suse.de>
6930
6931 * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
6932 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
6933 Likewise.
6934
46bf9de7
UD
69352003-11-27 Jakub Jelinek <jakub@redhat.com>
6936
6937 * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
6938 * pthread_attr_destroy.c: Include shlib-compat.h.
6939 (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
6940 is set in iattr->flags.
6941 * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
6942
1d9b73ab
UD
69432003-11-21 Jakub Jelinek <jakub@redhat.com>
6944
6945 * Makefile (distribute): Add tst-cleanup4aux.c.
6946
6947 * tst-cond12.c (prepare): Add prototype. Move after test-skeleton.c
6948 include.
6949
53f9084e
UD
69502003-11-21 Ulrich Drepper <drepper@redhat.com>
6951
1d9b73ab
UD
6952 * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
6953 pthread_cond_signal.
6954
e42a990e
UD
6955 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
6956 store mutex address if the current value is ~0l.
6957 * sysdeps/pthread/pthread_cond_timedwait.c
6958 (__pthread_cond_timedwait): Likewise.
6959 * sysdeps/pthread/pthread_cond_broadcast.c
6960 (__pthread_cond_broadcast): Don't use requeue for pshared
6961 condvars.
6962
6963 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
6964 (__pthread_cond_wait): Don't store mutex address if the current
6965 value is ~0l.
6966 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6967 (__pthread_cond_timedwait): Likewise.
6968 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
6969 (__pthread_cond_broadcast): Don't use requeue for pshared
6970 condvars.
6971
6972 * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
6973 element with ~0l for pshared condvars, with NULL otherwise.
6974
6975 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
6976 (__pthread_cond_wait): Don't store mutex address if the current
6977 value is ~0l.
6978 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6979 (__pthread_cond_timedwait): Likewise.
6980 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
6981 (__pthread_cond_broadcast): Don't use requeue for pshared
6982 condvars.
6983
bf68b236 6984 * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
53f9084e 6985 * tst-cond12.c: New file.
bf68b236 6986 * tst-cond13.c: New file.
53f9084e 6987
9780c971
UD
69882003-11-17 Ulrich Drepper <drepper@redhat.com>
6989
6990 * sysdeps/pthread/configure.in: Make missing forced unwind support
6991 fatal.
6992
74e12fbc
UD
69932003-11-11 Ulrich Drepper <drepper@redhat.com>
6994
6995 * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
6996
c685b2b0
UD
69972003-11-06 Ulrich Drepper <drepper@redhat.com>
6998
6999 * Makefile: Add magic to clean up correctly.
7000
44e94149
UD
70012003-11-05 Jakub Jelinek <jakub@redhat.com>
7002
7003 * unwind.c (FRAME_LEFT): Define.
7004 (unwind_stop): Handle old style cleanups here.
7005 (__pthread_unwind): Handle old style cleanups only if
7006 !HAVE_FORCED_UNWIND.
7007 * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
7008 (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
7009 ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
7010 ($(objpfx)tst-cleanupx4): Likewise.
7011 * tst-cleanup4.c: New test.
7012 * tst-cleanup4aux.c: New.
7013 * tst-cleanupx4.c: New test.
7014
c28422b5
UD
70152003-11-04 Ulrich Drepper <drepper@redhat.com>
7016
7017 * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
7018 lll_mutex_*lock macros to skip atomic operations on some archs.
7019
27176677
UD
70202003-11-03 Ulrich Drepper <drepper@redhat.com>
7021
7022 * sysdeps/pthread/tst-timer.c (main): Initialize
7023 sigev2.sigev_value as well.
7024
026395a2
RM
70252003-10-15 Roland McGrath <roland@redhat.com>
7026
7027 * sysdeps/pthread/configure.in: Barf if visibility attribute support
7028 is missing.
7029 * sysdeps/pthread/configure: Regenerated.
7030
fa3cbe3d
UD
70312003-10-09 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7032
7033 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
7034 locking macros. No distinction between normal and mutex locking
7035 anymore.
7036 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
7037 Merge bits from lowlevelmutex.S we still need.
7038 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
7039 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
7040 * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
7041 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
7042 new mutex implementation.
7043 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
7044 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
7045 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7046 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
7047 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
7048 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7049 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7050 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
7051 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7052 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
7053 symbol for entry point to avoid cancellation.
7054
e700a908
UD
70552003-10-07 Jakub Jelinek <jakub@redhat.com>
7056
7057 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
7058 changes.
7059 (SAVE_OLDTYPE_0): Fix a typo.
7060
c70a86b6
UD
70612003-10-03 Ulrich Drepper <drepper@redhat.com>
7062
7063 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
7064 Check __sigsetjmp return value. Reported by Daniel Jacobowitz.
7065
134abcb5
UD
70662003-10-02 Ulrich Drepper <drepper@redhat.com>
7067
7068 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
7069 correct offset.
7070
b77ca0e8
UD
70712003-10-02 Jakub Jelinek <jakub@redhat.com>
7072
7073 * Makefile (tests): Add tst-cancel19.
7074 * tst-cancel19.c: New test.
7075
4d961dc7
UD
70762003-10-02 Ulrich Drepper <drepper@redhat.com>
7077
7078 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
7079 restoring of the old cancellation type.
7080
1d5b20ad 70812003-09-30 Jakub Jelinek <jakub@redhat.com>
94ae6d75 7082
1d5b20ad
UD
7083 * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
7084
4106a403
RM
70852003-09-27 Wolfram Gloger <wg@malloc.de>
7086
4d961dc7 7087 * sysdeps/pthread/malloc-machine.h: New file
94ae6d75 7088
fca9d8e4
RM
70892003-09-24 Roland McGrath <roland@redhat.com>
7090
7091 * allocatestack.c (__make_stacks_executable): Don't ignore return
7092 value from _dl_make_stack_executable.
7093
c9c60884
UD
70942003-09-24 Ulrich Drepper <drepper@redhat.com>
7095
69c9fa04
UD
7096 * allocatestack.c (__make_stacks_executable): Also change
7097 permission of the currently unused stacks.
7098
279f1143
UD
7099 * allocatestack.c (change_stack_perm): Split out from
7100 __make_stacks_executable.
7101 (allocate_stack): If the required permission changed between the time
7102 we started preparing the stack and queueing it, change the permission.
7103 (__make_stacks_executable): Call change_stack_perm.
7104
c9c60884
UD
7105 * Makefile: Build tst-execstack-mod locally.
7106 * tst-execstack-mod.c: New file.
7107
54ee14b3
UD
71082003-09-23 Jakub Jelinek <jakub@redhat.com>
7109
7110 * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
7111
71122003-09-23 Roland McGrath <roland@redhat.com>
7113
7114 * tst-execstack.c: New file.
7115 * Makefile (tests): Add it.
7116 ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
7117 (LDFLAGS-tst-execstack): New variable.
7118
7119 * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
7120 whether to use PROT_EXEC for stack mmap.
7121 (__make_stacks_executable): New function.
7122 * pthreadP.h: Declare it.
7123 * init.c (__pthread_initialize_minimal_internal): Set
7124 GL(dl_make_stack_executable_hook) to that.
7125
365b1602
UD
71262003-09-22 Ulrich Drepper <drepper@redhat.com>
7127
7128 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
7129 recommendation from AMD re avoidance of lock prefix.
7130
39358e8b
UD
71312003-09-22 Jakub Jelinek <jakub@redhat.com>
7132
7133 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
7134 lll_futex_timed_wait instead of lll_futex_wait.
7135 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
7136 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
7137 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
7138 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
7139 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
7140 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
7141 * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
7142 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
7143 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
7144 Completely revamp the locking macros. No distinction between
7145 normal and mutex locking anymore.
7146 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
7147 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
7148 __lll_lock_timedwait): Fix prototypes.
7149 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
7150 __lll_lock_timedwait): Likewise.
7151 (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
7152 macros, add __builtin_expect.
7153 (lll_mutex_timedlock): Likewise. Fix return value.
7154 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
7155 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
7156 * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
7157 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
7158 * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
7159 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
7160 * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
7161 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
7162
9d08fbbb
UD
71632003-09-22 Ulrich Drepper <drepper@redhat.com>
7164
c0df57e1
UD
7165 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
7166 (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
7167 operation if possible.
7168
9d08fbbb
UD
7169 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
7170 like jumping over the lock prefix.
7171
71451de2
UD
71722003-09-21 Ulrich Drepper <drepper@redhat.com>
7173
7174 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
7175 locking macros. No distinction between normal and mutex locking
7176 anymore.
3a226d33 7177 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
bc1989aa
UD
7178 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
7179 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
71451de2
UD
7180 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
7181 locking. Merge bits from lowlevelmutex.S we still need.
3a226d33 7182 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
bc1989aa 7183 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
71451de2 7184 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
3a226d33 7185 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
71451de2
UD
7186 * Makefile (routines): Remove libc-lowlevelmutex.
7187 (libpthread-rountines): Remove lowlevelmutex.
3a226d33
UD
7188 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
7189 for new mutex implementation.
7190 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
7191 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7192 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7193 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
7194 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7195 Likewise.
7196 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7197 Likewise.
7198 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
7199 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7200 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
7201 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
7202 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7203 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7204 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
7205 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
7206 Likewise.
7207 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
7208 Likewise.
7209 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
7210 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
7211 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
7212 Don't use requeue.
7213 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
bc1989aa 7214 * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
71451de2 7215
8f31c0ef
UD
72162003-09-20 Ulrich Drepper <drepper@redhat.com>
7217
56a4aa98
UD
7218 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
7219 in parameters of asm with output parameters.
7220
8f31c0ef
UD
7221 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
7222 type of DECR parameter to int.
7223 * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
7224
8b8074da
UD
72252003-09-18 Jakub Jelinek <jakub@redhat.com>
7226
7227 * tst-attr3.c (tf, do_test): Print stack start/end/size and
7228 guardsize for each thread.
7229
65af7e61
UD
72302003-09-17 Jakub Jelinek <jakub@redhat.com>
7231
9ba96eda
UD
7232 * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
7233 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
7234 (pthread_attr_setaffinity_np): Handle cpuset == NULL.
7235
06f6ca90
UD
7236 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
7237 (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
7238 NULL.
7239 * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
7240 * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
7241 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
7242 (pthread_getaffinity_np): Add hidden_def.
7243
7244 * Makefile (tests): Add tst-attr3.
7245 * tst-attr3.c: New test.
7246
65af7e61
UD
7247 * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
7248
3402852c
UD
72492003-09-15 Jakub Jelinek <jakub@redhat.com>
7250
7251 * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
7252 CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
7253
a4db3439
UD
72542003-09-17 Jakub Jelinek <jakub@redhat.com>
7255
7256 * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
7257 * tst-align.c: Include tst-stack-align.h.
7258 (tf, do_test): Use TEST_STACK_ALIGN macro.
7259
72602003-09-17 Ulrich Drepper <drepper@redhat.com>
7261
7262 * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
7263 variable.
7264
92ce4676
UD
72652003-09-16 Ulrich Drepper <drepper@redhat.com>
7266
7267 * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
7268 stack-related values for the initial thread.
7269
e07bb02a
UD
72702003-09-15 Jakub Jelinek <jakub@redhat.com>
7271
7272 * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
7273
d087b5dc
UD
72742003-09-11 Ulrich Drepper <drepper@redhat.com>
7275
7276 * pthread_mutex_lock.c: Minor code rearrangements.
7277
7f08f55a
RM
72782003-09-05 Roland McGrath <roland@redhat.com>
7279
7280 * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
7281 Instead, include ../nptl_db/db_info.c to do its magic.
7282 * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
7283 (__pthread_pthread_key_2ndlevel_size): Likewise.
7284 * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
7285 * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
7286 * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
7287 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
7288 * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
7289 * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
7290 * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
7291 * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
7292 * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
7293 * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
7294 * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
7295 * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
7296 * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
7297 * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
7298 * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
7299 * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
7300 * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
7301
806e4a4a
UD
73022003-09-08 Ulrich Drepper <drepper@redhat.com>
7303
7304 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
7305 of pthread_t to be compatible with LT.
7306 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
7307 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7308 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7309 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7310 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
7311 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7312 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
7313
17f83e56
UD
73142003-09-04 Ulrich Drepper <drepper@redhat.com>
7315
7316 * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
7317
58e8ec84
UD
73182003-09-04 Jakub Jelinek <jakub@redhat.com>
7319
7320 * unwind-forcedunwind.c: Move to...
7321 * sysdeps/pthread/unwind-forcedunwind.c: ...here.
7322 (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
7323 * sysdeps/pthread/jmpbuf-unwind.h: New file.
7324 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
7325 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
7326 * unwind.c: Include jmpbuf-unwind.h.
7327 (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
7328
abf1cf21
JJ
73292003-09-02 Jakub Jelinek <jakub@redhat.com>
7330
4a244f0d
UD
7331 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
7332 * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
7333 pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
7334 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
7335 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
7336 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
7337 * sysdeps/unix/sysv/linux/sparc/Versions: New file.
7338 * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
7339 (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
7340 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
7341 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
7342 function.
7343 (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
7344 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
7345 * Makefile (tests): Add tst-stack2.
7346 * tst-stack2.c: New test.
7347 * tst-stack1.c: Include limits.h and sys/param.h.
7348 (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
7349
e29ef647
UD
7350 * pthread_condattr_setpshared.c: Include errno.h.
7351 (pthread_condattr_setpshared): Return EINVAL if pshared
7352 is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
7353
5777d565
UD
7354 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
7355 defined symbol for entry point to avoid cancellation.
7356 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
7357 Likewise.
7358 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
7359 Likewise.
7360 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
7361 Likewise.
7362 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
7363 Likewise.
7364 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
7365 Likewise.
7366 * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
7367 __close_nocancel, __read_nocancel, __write_nocancel,
7368 __waitpid_nocancel): Add attribute_hidden. If not in libc.so,
7369 libpthread.so or librt.so, define to corresponding function
7370 without _nocancel suffix.
7371 * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
7372 * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
7373 * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
7374
abf1cf21
JJ
7375 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
7376
8348dcc8
UD
73772003-09-02 Ulrich Drepper <drepper@redhat.com>
7378
7379 * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
1e03e0af 7380 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
8348dcc8
UD
7381
7382 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
7383 in subsections has a symbol associated with it.
7384
7385 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
7386 defined symbol for entry point to avoid cancellation.
7387 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
7388
c874a32e
UD
73892003-09-01 Jakub Jelinek <jakub@redhat.com>
7390
7391 * Makefile (tests): Add tst-tls5.
7392 (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
7393 ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
7394 ($(objpfx)tst-tls5): New.
7395 ($(objpfx)tst-tls6.out): Likewise.
7396 (tests): Depend on $(objpfx)tst-tls6.out.
7397 * tst-tls3.c: Include stdint.h and pthreaddef.h.
7398 (do_test): Check pthread_self () return value alignment.
7399 * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
7400 (tf): Check pthread_self () return value alignment.
7401 * tst-tls5.c: New test.
7402 * tst-tls5.h: New.
7403 * tst-tls5mod.c: New.
7404 * tst-tls5moda.c: New.
7405 * tst-tls5modb.c: New.
7406 * tst-tls5modc.c: New.
7407 * tst-tls5modd.c: New.
7408 * tst-tls5mode.c: New.
7409 * tst-tls5modf.c: New.
7410 * tst-tls6.sh: New test.
7411
c503d3dc
UD
7412 * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
7413 ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
7414 * init.c (pthread_functions): Initialize them.
7415 * forward.c (pthread_cond_timedwait@GLIBC_2.0,
7416 pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
7417 * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
7418 pthread_cond_timedwait@@GLIBC_2.3.2.
7419
48614753
JJ
74202003-09-01 Jakub Jelinek <jakub@redhat.com>
7421
56a1b877
JJ
7422 * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
7423 * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
7424 * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
7425 * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
7426 * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
7427 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
7428
7429 * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
7430
48614753
JJ
7431 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
7432 _POSIX_THREAD_PRIORITY_SCHEDULING.
7433 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
7434
28c97261
UD
74352003-08-31 Ulrich Drepper <drepper@redhat.com>
7436
eef80cf8
UD
7437 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
7438 nested function, use static inline function from libio.h.
7439 Code by Richard Henderson.
7440
28c97261
UD
7441 * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
7442 weak.
7443
cd2fbe58
UD
74442003-08-30 Jakub Jelinek <jakub@redhat.com>
7445
7446 * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
7447 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
7448 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
7449 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
7450 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
7451 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
7452 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
7453 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
7454 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
7455 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
7456 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
7457 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
7458 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
7459 * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
7460 * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
7461 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
7462 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
7463 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
7464 * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
7465 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
7466 * sysdeps/sparc/sparc32/pthreaddef.h: New file.
7467 * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
7468 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
7469 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
7470 * sysdeps/sparc/sparc64/pthreaddef.h: New file.
7471 * sysdeps/sparc/tls.h: New file.
7472 * sysdeps/sparc/tcb-offsets.sym: New file.
7473 * sysdeps/sparc/Makefile: New file.
7474 * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
7475 * init.c [__sparc__] (__NR_set_tid_address): Define.
7476
feda52c0
UD
74772003-08-29 Jakub Jelinek <jakub@redhat.com>
7478
7479 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
7480 _IO_release_lock): Define.
7481
7c868816
JJ
74822003-08-29 Jakub Jelinek <jakuB@redhat.com>
7483
0261d33f 7484 * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
7c868816
JJ
7485 sigemptyset before sigaddset. Reported by jreiser@BitWagon.com.
7486
68b9e1ae
UD
74872003-08-27 Ulrich Drepper <drepper@redhat.com>
7488
7489 * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
7490 (__pthread_cleanup_class): Add missing return types of member
7491 functions.
7492
13b3edfc
UD
74932003-08-26 Steven Munroe <sjmunroe@us.ibm.com>
7494
7495 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
7496 (lll_mutex_unlock_force): Add memory barrier between store and futex
7497 syscall.
7498
bb606fbe
UD
74992003-08-25 Ulrich Drepper <drepper@redhat.com>
7500
7501 * tst-cancel4.c (do_test): Also unlink tempfname and remove
7502 tempmsg in first loop.
7503
ee4e5a3d
UD
75042003-08-18 Ulrich Drepper <drepper@redhat.com>
7505
7506 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
7507 _POSIX_THREAD_PRIORITY_SCHEDULING.
7508 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
7509
334fcf2a
UD
75102003-08-07 Jakub Jelinek <jakub@redhat.com>
7511
7512 * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
7513 (__rtld_lock_default_lock_recursive,
7514 __rtld_lock_default_unlock_recursive): Define.
7515 [_LIBC && SHARED] (__rtld_lock_lock_recursive,
7516 __rtld_lock_unlock_recursive): Define using
7517 GL(_dl_rtld_*lock_recursive).
7518 * init.c (__pthread_initialize_minimal_internal): Initialize
7519 _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
7520 Lock GL(_dl_load_lock) the same number of times as
7521 GL(_dl_load_lock) using non-mt implementation was nested.
7522
7523 * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
7524 * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
7525
a30fb2df
UD
75262003-08-06 Jakub Jelinek <jakub@redhat.com>
7527
7528 * tst-cancel17.c (do_test): Make len2 maximum of page size and
7529 PIPE_BUF.
7530
ce0d30a0
JJ
75312003-08-07 Jakub Jelinek <jakub@redhat.com>
7532
7533 * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
7534
9c988b83
UD
75352003-08-03 Jakub Jelinek <jakub@redhat.com>
7536
7537 * sysdeps/pthread/createthread.c (do_clone): Move error handling
7538 to first syscall error check. Move syscall error check for tkill
7539 into __ASSUME_CLONE_STOPPED #ifdef.
7540
5c5252bd
UD
75412003-08-02 Ulrich Drepper <drepper@redhat.com>
7542
f1205aa7
UD
7543 * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
7544 is not defined, do explicit synchronization.
7545 (create_thread): Do not lock pd->lock here. If __ASSUME_CLONE_STOPPED
7546 is not defined also unlock pd->lock for non-debugging case in case
7547 it is necessary.
7548 * pthread_create.c (start_thread): Always get and release pd->lock
7549 if __ASSUME_CLONE_STOPPED is not defined.
7550 (start_thread_debug): Removed. Adjust users.
7551 * allocatestack.c (allocate_stack): Always initialize lock if
7552 __ASSUME_CLONE_STOPPED is not defined.
7553 * Makefile (tests): Add tst-sched1.
7554 * tst-sched1.c: New file.
7555
5c5252bd
UD
7556 * sysdeps/pthread/createthread.c (do_clone): Only use
7557 sched_setschduler and pass correct parameters.
7558
973d66e4
UD
75592003-07-31 Jakub Jelinek <jakub@redhat.com>
7560
7561 * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
7562 pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
7563 PTHREAD_STACK_MIN in comments.
7564
d347a4ab
UD
75652003-07-31 Jakub Jelinek <jakub@redhat.com>
7566
7567 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
7568 Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
7569 argument.
7570 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
7571 * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
7572 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
7573 (__pthread_cleanup_upto): Fix prototype.
7574 (_longjmp_unwind): Adjust caller.
7575 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
7576 Change second argument to const struct pointer.
7577 * tst-sem8.c (main): Remove unused s2 and s3 variables.
7578 * tst-sem9.c (main): Likewise.
7579 * unwind.c: Include string.h for strlen prototype.
7580
1b26e9a5
UD
75812003-07-31 Ulrich Drepper <drepper@redhat.com>
7582
7583 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7584 (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
7585 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
7586 Define HAVE_CMOV.
7587 Patch by Nicholas Miell <nmiell@attbi.com>.
7588
adc12574
UD
75892003-07-30 Jakub Jelinek <jakub@redhat.com>
7590
7591 * init.c (__pthread_initialize_minimal_internal): Initialize
7592 GL(dl_init_static_tls).
7593 * pthreadP.h (__pthread_init_static_tls): New prototype.
7594 * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
7595 New functions.
7596 * Makefile (tests): Add tst-tls4.
7597 (modules-names): Add tst-tls4moda and tst-tls4modb.
7598 ($(objpfx)tst-tls4): Link against libdl and libpthread.
7599 ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
7600 tst-tls4modb.so.
7601 * tst-tls4.c: New file.
7602 * tst-tls4moda.c: New file.
7603 * tst-tls4modb.c: New file.
7604
a7f6c66e
RM
76052003-06-19 Daniel Jacobowitz <drow@mvista.com>
7606
7607 * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
7608 before __timer_dealloc.
7609 * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
7610 Don't call list_unlink.
7611
172ce013
RM
76122003-07-29 Roland McGrath <roland@redhat.com>
7613
7614 * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
7615
7b787f85
UD
76162003-07-25 Jakub Jelinek <jakub@redhat.com>
7617
7618 * tst-cancel17.c (do_test): Check if aio_cancel failed.
7619 Don't reuse struct aiocb A if it failed.
7620 Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
7621 not just one byte, as that does not block.
7622
0e9d6240
UD
76232003-07-22 Jakub Jelinek <jakub@redhat.com>
7624
9d79e037
UD
7625 * sysdeps/pthread/unwind-resume.c: New file.
7626 * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
7627 unwind-resume in csu subdir.
7628 (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
7629 exceptions.
7630 (librt-sysdep_routines, librt-shared-only-routines): Add
7631 rt-unwind-resume.
7632 * sysdeps/pthread/rt-unwind-resume.c: New file.
7633 * unwind-forcedunwind.c: New file.
7634 * Makefile (libpthread-routines): Add unwind-forcedunwind.
7635 (libpthread-shared-only-routines): Likewise.
7636 (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
7637 * pthreadP.h (pthread_cancel_init): New prototype.
7638 * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
7639
7640 * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
7641 attr argument const struct pthread_attr *.
7642
0e9d6240
UD
7643 * res.c (__res_state): Return __resp.
7644 * descr.h: Include resolv.h.
7645 (struct pthread): Add res field.
7646 * pthread_create.c: Include resolv.h.
7647 (start_thread): Initialize __resp.
7648 * Makefile (tests): Add tst-_res1.
7649 (module-names): Add tst-_res1mod1, tst-_res1mod2.
7650 ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
7651 ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
7652 libpthread.
7653 * tst-_res1.c: New file.
7654 * tst-_res1mod1.c: New file.
7655 * tst-_res1mod2.c: New file.
7656
1a379ea0
UD
76572003-07-21 Ulrich Drepper <drepper@redhat.com>
7658
7e939b21
UD
7659 * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
7660
1a379ea0
UD
7661 * Makefile: Define various *-no-z-defs variables for test DSOs
7662 which has undefined symbols.
7663
ca86a763
UD
76642003-07-21 Steven Munroe <sjmunroe@us.ibm.com>
7665
7666 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
7667 Retry if the stwcx fails to store once_control.
7668
80f536db
UD
76692003-07-20 Ulrich Drepper <drepper@redhat.com>
7670
7671 * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
7672 pthread_attr_setaffinity.
7673 * Versions [libpthread] (GLIBC_2.3.3): Likewise.
7674 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
7675 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
7676 * pthread_attr_destroy.c: Free cpuset element if allocated.
7677 * pthread_create.c: Pass iattr as additional parameter to
7678 create_thread.
7679 * sysdeps/pthread/createthread.c: If attribute is provided and
7680 a new thread is created with affinity set or scheduling parameters,
7681 start thread with CLONE_STOPPED.
7682 * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
7683 pthread_attr_setaffinity.
7684 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
7685 cpuset element.
7686
73299943
UD
76872003-07-15 Ulrich Drepper <drepper@redhat.com>
7688
7689 * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
7690
da35d15e
UD
76912003-07-14 Ulrich Drepper <drepper@redhat.com>
7692
7693 * sysdeps/pthread/configure.in: Require CFI directives also for
7694 ppc and s390.
7695
75540d8a
UD
76962003-07-15 Jakub Jelinek <jakub@redhat.com>
7697
7698 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
7699 Add cfi directives.
7700
4a17085f
UD
77012003-07-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7702
7703 * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
7704 CLEANUP_JMP_BUF.
7705 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
7706 registers as variables. Call __pthread_mutex_unlock_usercnt.
7707 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7708 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
7709 not self pointer in __writer. Compare with TID to determine
7710 deadlocks.
7711 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7712 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
7713 Likewise.
7714 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
7715 Likewise.
7716 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
7717 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
7718 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
7719 macros also when compiling librt.
7720
6080ecdf
UD
77212003-07-11 Jakub Jelinek <jakub@redhat.com>
7722
7723 * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
7724 -fasynchronous-unwind-tables.
7725 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
7726 (PSEUDO): Add cfi directives.
7727 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
7728 Likewise.
7729 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
7730 Likewise.
7731
da0c02ee
UD
77322003-07-08 Jakub Jelinek <jakub@redhat.com>
7733
7734 * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
7735 __pthread_unregister_cancel): Add prototypes and hidden_proto.
7736 * unwind.c (__pthread_unwind_next): Add hidden_def.
7737 * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
7738 Likewise.
7739 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
7740 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
7741 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
7742 Likewise.
7743 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
7744 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
7745 Likewise.
7746 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
7747 HIDDEN_JUMPTARGET to call __pthread_register_cancel,
7748 __pthread_unregister_cancel and __pthread_unwind_next.
7749
57a5ea02
UD
77502003-07-04 Jakub Jelinek <jakub@redhat.com>
7751
7752 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
7753 different symbol for the cancellation syscall wrapper and
7754 non-cancellation syscall wrapper.
7755 (PSEUDO_END): Define.
7756
d810b358
UD
77572003-07-05 Richard Henderson <rth@redhat.com>
7758
7759 * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
7760 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
42d86dd6
RH
7761 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
7762 return actual return value from the syscall, not 0.
d810b358 7763
db54f488
UD
77642003-07-07 Ulrich Drepper <drepper@redhat.com>
7765
7766 * descr.h (struct pthread): Add pid field.
7767 * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
7768 (__reclaim_stacks): Likewise.
7769 * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
7770 also check for PID of the signal source.
7771 (__pthread_initialize_minimal_internal): Also initialize pid field
7772 of initial thread's descriptor.
7773 * pthread_cancel.c: Use tgkill instead of tkill if possible.
7774 * sysdeps/unix/sysv/linux/fork.c: Likewise.
7775 * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
7776 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
7777 * sysdeps/unix/sysv/linux/raise.c: Likewise.
7778
5e497a41
UD
77792003-07-05 Ulrich Drepper <drepper@redhat.com>
7780
7781 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
7782 Fix use of parameter.
7783 (__libc_cleanup_pop): Likewise.
7784
86a0c4fa
UD
77852003-07-04 Ulrich Drepper <drepper@redhat.com>
7786
7787 * init.c (sigcancel_handler): Change parameters to match handler
7788 for SA_SIGACTION. Check signal number and code to recognize
7789 invalid invocations.
7790
bdbecaa3
RM
77912003-07-03 Roland McGrath <roland@redhat.com>
7792
7793 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
7794 Apply sizeof (struct pthread) bias to r13 value.
7795
56421b23
UD
77962003-07-03 Ulrich Drepper <drepper@redhat.com>
7797
fbd90f6c
UD
7798 * sysdeps/pthread/configure.in: Require CFI directives.
7799
56421b23
UD
7800 * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
7801 definition.
7802 * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
7803 libpthread compilation.
7804 * unwind.c (__pthread_unwind): Add hidden_def.
7805 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
7806
ca2b4cd7
UD
78072003-07-01 Ulrich Drepper <drepper@redhat.com>
7808
7809 * libc-cancellation.c (__libc_cleanup_routine): Define.
7810 * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
7811 (__pthread_cleanup_pop): Define.
7812
f036e569
UD
78132003-07-01 Richard Henderson <rth@redhat.com>
7814
7815 * sysdeps/alpha/elf/pt-initfini.c: New file.
7816 * sysdeps/alpha/pthread_spin_lock.S: New file.
7817 * sysdeps/alpha/pthread_spin_trylock.S: New file.
7818 * sysdeps/alpha/pthreaddef.h: New file.
7819 * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
7820 * sysdeps/alpha/tls.h: New file.
7821 * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
7822 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
7823 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
7824 * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
7825 * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
7826 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
7827 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
7828 * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
7829 * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
7830 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
7831
3b985826
UD
78322003-07-01 Ulrich Drepper <drepper@redhat.com>
7833
7834 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
7835 cleanup support and unwind info.
7836
3a4d1e1e
UD
78372003-06-30 Ulrich Drepper <drepper@redhat.com>
7838
7839 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
7840 Use correct cleanup handler registration. Add unwind info.
96c814d3
UD
7841 * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
7842 * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
3a4d1e1e
UD
7843 * tst-once3.c: Add cleanup handler and check it is called.
7844 * tst-once4.c: Likewise.
7845 * tst-oncex3.c: New file.
7846 * tst-oncex4.c: New file.
7847 * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
7848
e479cc8e
UD
78492003-06-29 Ulrich Drepper <drepper@redhat.com>
7850
7851 * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
7852
7d7ff54c
UD
78532003-06-27 Ulrich Drepper <drepper@redhat.com>
7854
483e95d0
UD
7855 * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
7856 (tf_msgsnd): Likewise.
7857
7d7ff54c
UD
7858 * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
7859 premature returns a bit more.
7860
7539c7ec
UD
78612003-06-26 Ulrich Drepper <drepper@redhat.com>
7862
7863 * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
7864 definition to the front.
7865
7866 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
7867 the cleanup functions to make the names unique. Fix dwarf opcode
7868 un unwind table.
7869 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
7870 functions to make the names unique. Fix CFA offset for two blocks.
7871
0af6a1d9
UD
78722003-06-25 Ulrich Drepper <drepper@redhat.com>
7873
7874 * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
7875 missing closing braces.
7876 Patch by Christophe Saout <christophe@saout.de>.
7877
eef4a9f3
RM
78782003-06-24 Roland McGrath <roland@redhat.com>
7879
7880 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
7881
4165d44d
UD
78822003-06-24 Ulrich Drepper <drepper@redhat.com>
7883
7f8f7b9d
UD
7884 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
7885 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
7886
4165d44d
UD
7887 * pthreadP.h: Declare __find_thread_by_id.
7888 * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
7889 * pthread_clock_gettime.c: Allow using other thread's clock.
7890 * pthread_clock_settime.c: Likewise.
7891 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
7892 * Makefile: Add rules to build and run tst-clock2.
7893 * tst-clock2.c: New file.
7894
67b78ef9
UD
78952003-06-23 Ulrich Drepper <drepper@redhat.com>
7896
7897 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
7898 to use exception-based cleanup handler.
7899 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7900
7901 * tst-cond8.c (ch): Announce that we are done.
7902
7903 * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
7904
7905 * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
7906 Also test aio_suspend with timeout value.
7907
61623643
UD
79082003-06-22 Ulrich Drepper <drepper@redhat.com>
7909
3a4f2043
UD
7910 * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
7911 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
7912 attribute_hidden.
7913
61623643
UD
7914 * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
7915 (__pthread_mutex_lock_internal): Likewise.
7916 (__pthread_mutex_unlock_internal): Likewise.
7917 (__pthread_mutex_unlock_usercnt): Declare.
7918 * pthread_mutex_destroy.c: Always fail if used in any way.
7919 * pthread_mutex_init.c: Update comment.
7920 * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
7921 * pthread_mutex_timedlock.c: Adjust __nusers.
7922 * pthread_mutex_trylock.c: Adjust __nusers.
7923 * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
7924 and public interfaces are wrapper with pass additional parameter.
7925 __pthread_mutex_unlock_usercnt does not adjust __nusers if second
7926 parameter zero.
7927 * tst-mutex8.c: New file.
7928 * Makefile (tests): Add tst-mutex8.
7929 * sysdeps/pthread/pthread_cond_timedwait.c: Call
7930 __pthread_mutex_unlock_usercnt.
7931 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
7932 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7933 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7934 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7935 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7936 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
7937 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
7938 Add __nusers.
7939 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7940 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7941 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7942 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7943 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7944
7945 * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
7946 * pthread_mutex_timedlock.c: Likewise.
7947 * pthread_mutex_trylock.c: Adjust __nusers.
7948 * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
7949 * tst-mutex9.c: New file.
7950 * Makefile (tests): Add tst-mutex9.
7951 * sysdeps/i386/tls.h: Remove THREAD_ID definition.
7952 * sysdeps/ia64/tls.h: Likewise.
7953 * sysdeps/powerpc/tls.h: Likewise.
7954 * sysdeps/s390/tls.h: Likewise.
7955 * sysdeps/sh/tls.h: Likewise.
7956 * sysdeps/x86_64/tls.h: Likewise.
7957 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
7958 Change type of __owner.
7959 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7960 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7961 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7962 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7963 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7964
9bdabb94
UD
79652003-06-19 Jakub Jelinek <jakub@redhat.com>
7966
7967 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
7968 * sysdeps/unix/sysv/linux/sem_post.c: ...here.
7969
7970 * sysdeps/unix/sysv/linux/sem_post.c: Move to...
7971 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here. Pass nr + 1
7972 instead of nr to lll_futex_wake. Only set errno and return -1
7973 if err < 0.
7974
7975 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
7976 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
7977 return actual return value from the syscall, not 0.
7978
f6c93bd9
UD
79792003-06-18 Ulrich Drepper <drepper@redhat.com>
7980
ca343e73
UD
7981 * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
7982 find a random value.
7983 (tf_msgrcv): Likewise. Also don't report msgrcv returns if
7984 errno==EIDRM.
7985
50441a98
UD
7986 * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
7987 compat_timer_settime.
7988 * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
7989 compat_timer_gettime.
7990 * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
9bdabb94 7991 compat_timer_getoverrun.
50441a98
UD
7992 * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
7993 compat_timer_delete.
7994
f6c93bd9
UD
7995 * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
7996 error-checking mutex detect busy mutexes.
7997
047aec8f
UD
79982003-06-17 Ulrich Drepper <drepper@redhat.com>
7999
1d53508d
UD
8000 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
8001 Add ax to clobber list.
8002 (lll_mutex_cond_lock): Likewise.
8003 (lll_mutex_unlock): Likewise.
8004 (lll_lock): Likewise.
8005 (lll_unlock): Likewise.
8006
f23b30e2
UD
8007 * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
8008 * tst-cancel18.c: New file.
8009 * tst-cancelx18.c: New file.
8010
8011 * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
8012 and tcdrain.
8013
8014 * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
8015 * tst-cancel17.c: New file.
8016 * tst-cancelx17.c: New file.
8017
8018 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
8019 * sysdeps/unix/sysv/linux/sigwait.c: New file.
8020 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
8021
047aec8f
UD
8022 * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
8023
bbde8527
UD
80242003-06-16 Jakub Jelinek <jakub@redhat.com>
8025
8026 * sysdeps/pthread/createthread.c (create_thread): Set
8027 header.multiple_threads unconditionally.
8028 * allocatestack.c (allocate_stack): Likewise.
8029 * descr.h (struct pthread): Add header.multiple_threads
8030 unconditionally.
8031 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
8032 Define for librt. #error if neither libpthread, libc nor librt.
8033 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
8034 Likewise.
8035 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
8036 CDISABLE): Likewise.
8037 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
8038 CDISABLE): Likewise.
8039 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
8040 CDISABLE): Likewise.
8041 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
8042 CDISABLE): Likewise. Access header.multiple_threads outside of
8043 libc and libpthread.
8044 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
8045 Likewise.
8046 * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
8047 * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
8048
26676450
UD
80492003-06-17 Ulrich Drepper <drepper@redhat.com>
8050
8051 * tst-cancel4.c: Add tests for the socket and signal functions, pause.
8052 Also test early cancellation before the thread reaches the cancellation
8053 point.
8054
8055 * Makefile: Compile forward.c with exceptions.
8056
8057 * sysdeps/unix/sysv/linux/sleep.c: New file.
8058
301a6724
UD
80592003-06-16 Ulrich Drepper <drepper@redhat.com>
8060
0e0deb03
UD
8061 * Makefile: Add CFLAGS definition to compile function wrappers
8062 duplicated from libc with exceptions.
8063 * tst-cancel4.c: Also check cancellation handlers.
8064
301a6724
UD
8065 * Makefile: Add rules to build and run tst-cancel16 and
8066 tst-cancelx16. Add missing CFLAGS definitions.
8067 * tst-cancel16.c: New file.
8068 * tst-cancelx16.c: New file.
8069
7a114794
UD
80702003-06-15 Ulrich Drepper <drepper@redhat.com>
8071
452aea84
UD
8072 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
8073 (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
8074 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
8075 (DL_SYSINFO_IMPLEMENTATION): Likewise.
8076
7a114794
UD
8077 * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
8078 (LIBC_CANCEL_RESET): Likewise.
8079 Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
8080 * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
8081 librt-cancellation.
8082 (CFLAGS-libcrt-cancellation.c): Define.
8083 * sysdeps/pthread/librt-cancellation.c: New file.
8084 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
8085 macros also when compiling librt.
8086 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
8087 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
8088 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
8089 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
8090 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
8091 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
8092 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
8093
8094 * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
8095 compat_timer_create.
8096
8ba1d429
UD
80972003-06-14 Ulrich Drepper <drepper@redhat.com>
8098
cc8fb6f3
UD
8099 * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
8100
8ba1d429
UD
8101 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
8102 __register_atfork.
8103 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
8104 Add libc_hidden_def.
8105
d4f100e2
RM
81062003-06-13 Roland McGrath <roland@redhat.com>
8107
8108 * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
8109 constant from <sys/reg.h> to ps_get_thread_area, not register contents.
8110
dd9423a6
UD
81112003-06-11 Ulrich Drepper <drepper@redhat.com>
8112
8113 * allocatestack.c (queue_stack): Always inline.
8114 * ptreadhP.h (__do_cancel): Likewise.
8115
ed24330d
JJ
81162003-06-10 Jakub Jelinek <jakub@redhat.com>
8117
8118 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
8119 a typo.
8120
06120d79
UD
81212003-06-10 Ulrich Drepper <drepper@redhat.com>
8122
8123 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8124 (__pthread_cond_signal): Remove incorrect second addition for
8125 cond_lock!=0.
8126
b1720346
UD
81272003-06-09 Ulrich Drepper <drepper@redhat.com>
8128
5b318f85
UD
8129 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8130 (__pthread_cond_signal): Use correct futex pointer in
8131 __lll_mutex_lock_wait call.
8132
b1720346
UD
8133 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8134 (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
8135
3e36c37d
UD
81362003-06-08 Ulrich Drepper <drepper@redhat.com>
8137
ecf7955d
UD
8138 * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
8139 cancelable.
ed24330d 8140 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
ecf7955d
UD
8141 Likewise.
8142
3e36c37d
UD
8143 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
8144 hand-written CFI generation code. Since ENTRY/END also initiated
8145 CFI frames this caused two CFI sets to be generated.
8146
7726edc2
UD
81472003-06-07 Ulrich Drepper <drepper@redhat.com>
8148
8149 * cleanup_routine.c: New file.
8150 * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
8151 * sysdeps/pthread/pthread.h: Add support for fully exception-based
8152 cleanup handling.
8153 * Makefile (libpthread-routines): Add cleanup_routine.
8154 Add more CFLAGS variables to compile with exceptions. Add comments
8155 why which file needs unwind tables.
8156 (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
8157 tests.
8158 * tst-cancelx1.c: New file.
8159 * tst-cancelx2.c: New file.
8160 * tst-cancelx3.c: New file.
8161 * tst-cancelx4.c: New file.
8162 * tst-cancelx5.c: New file.
8163 * tst-cancelx6.c: New file.
8164 * tst-cancelx7.c: New file.
8165 * tst-cancelx8.c: New file.
8166 * tst-cancelx9.c: New file.
8167 * tst-cancelx10.c: New file.
8168 * tst-cancelx11.c: New file.
8169 * tst-cancelx12.c: New file.
8170 * tst-cancelx13.c: New file.
8171 * tst-cancelx14.c: New file.
8172 * tst-cancelx15.c: New file.
8173 * tst-cleanupx0.c: New file.
8174 * tst-cleanupx0.expect: New file.
8175 * tst-cleanupx1.c: New file.
8176 * tst-cleanupx2.c: New file.
8177 * tst-cleanupx3.c: New file.
8178
8179 * tst-cleanup0.c: Make standard compliant.
8180 * tst-cleanup1.c: Likewise.
8181
8182 * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
8183 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
8184 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8185 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
8186 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8187 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8188 * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
8189 CLEANUP_JMP_BUF.
8190 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
8191 * tst-cancel12.c: New file.
8192 * tst-cancel13.c: New file.
8193 * tst-cancel14.c: New file.
8194 * tst-cancel15.c: New file.
8195 * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
8196 and tst-cancel15.
8197
8198 * tst-cancel1.c: Add some comments.
8199
8200 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
8201 timeout correctly.
8202
7a8a8e21
UD
82032003-06-06 Ulrich Drepper <drepper@redhat.com>
8204
8205 * Makefile (CFLAGS-pthread_cancel.c): Define.
8206
4ad0bbf4
UD
82072003-06-05 Ulrich Drepper <drepper@redhat.com>
8208
8209 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
8210 Change type of __writer element to int.
8211 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8212 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8213 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8214 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8215 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8216 * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
8217 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
8218 * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
8219 Compare with TID to determine deadlocks.
8220 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
8221 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
8222 * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
8223 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
8224 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8225 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8226 Likewise.
8227 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8228 Likewise.
8229 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8230 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
8231 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
8232 Likewise.
8233 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
8234 Likewise.
8235 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
8236 * Makefile (tests): Add tst-rwlock12.
8237 * tst-rwlock12.c: New file.
8238
332faa96
JJ
82392003-06-05 Jakub Jelinek <jakub@redhat.com>
8240
8241 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
8242 __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
8243 Remove bogus hidden_proto.
8244 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
8245 Likewise.
8246 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
8247 lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
8248 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
8249 ___lll_mutex_timedlock): Likewise.
8250
29d9e2fd
UD
82512003-06-04 Ulrich Drepper <drepper@redhat.com>
8252
8253 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8254 (__pthread_cond_signal): Add some code to eventually handle
8255 cond_lock!=0.
8256
6f1acb30
UD
82572003-06-01 Ulrich Drepper <drepper@redhat.com>
8258
8259 * Makefile (tests): Add tst-exec4.
8260 (tst-exec4-ARGS): Define.
8261 * tst-exec4.c: New file.
8262
49b65043
UD
82632003-05-31 Ulrich Drepper <drepper@redhat.com>
8264
31195be2
UD
8265 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
8266 Also fail if tv_nsec < 0.
8267 (__lll_timedwait_tid): Likewise.
8268 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
8269 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
8270 Likewise.
8271 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
8272 Likewise.
8273 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
8274 Likewise.
8275 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
8276 Likewise.
80b54217
UD
8277 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
8278 Likewise.
8279 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
8280 Likewise.
31195be2 8281
dcfc8224
UD
8282 * Makefile (tests): Add tst-sem8 and tst-sem9.
8283 * tst-sem8.c: New file.
8284 * tst-sem9.c: New file.
8285 * sem_open.c: Fix creation of in_use record if the file exists but
8286 no internal record.
8287
49b65043
UD
8288 * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
8289 definitions.
8290
8291 * sysdeps/pthread/timer_create.c (timer_create): In case
8292 evp==NULL, assign timer ID to sival_ptr.
8293
8294 * descr.h (struct pthread_unwind_buf): Change type of prev element to
8295 struct pthread_unwind_buf *.
8296 (struct pthread): Likewise for cleanup_jmp_buf element.
8297
8298 * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
8299 * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
8300 * unwind.c (__pthread_unwind_next): Likewise.
8301
50794a45
UD
83022003-05-30 Ulrich Drepper <drepper@redhat.com>
8303
5d4f57bd
UD
8304 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8305 (lll_futex_timed_wait): Use int for futex value parameter.
8306 (lll_futex_wake): Likewise.
8307 (lll_futex_requeue): Likewise.
8308
8309 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
8310 Replace one memory operation with one register operation.
8311
8312 * tst-join4.c (do_test): Fix error message.
8313
7ab7ea33
UD
8314 * tst-rwlock6.c (do_test): Use correct format specifier.
8315
8316 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8317 (__lll_mutex_lock_wait): Replace one memory operation with one
8318 register operation.
8319 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
8320 (__lll_mutex_lock_wait): Likewise.
8321
50794a45
UD
8322 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8323 (__lll_mutex_cond_lock): Add one to value parameter of
8324 __lll_lock_wait to reflect reality in the futex syscall.
8325 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
8326 (lll_mutex_cond_lock): Likewise.
8327
5a70784e
JJ
83282003-05-30 Jakub Jelinek <jakub@redhat.com>
8329
8330 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
8331 New function.
8332 (lll_mutex_cond_lock): Define.
8333
e7c5ac68
UD
83342003-05-29 Ulrich Drepper <drepper@redhat.com>
8335
586d1748
UD
8336 * Makefile (tests): Add tst-signal6.
8337 * tst-signal6.c: New file.
8338
b8ba4a27
UD
8339 * sysdeps/unix/sysv/linux/s390/lowlevellock.h
8340 (__lll_mutex_unlock_force): New function
8341 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
8342
65d46efe
UD
8343 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8344 (__lll_mutex_unlock_force): New function.
8345 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
8346
8347 * tst-rwlock7.c (do_test): Use correct format specifier.
8348
e7c5ac68
UD
8349 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
8350 Find break parameter in correct asm argument.
8351
284bdc42
UD
83522003-05-27 Jakub Jelinek <jakub@redhat.com>
8353
8354 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
8355 Remove out4.
8356 (lll_futex_requeue): Fix __o3 constraint, return negative errno if
8357 error occured.
8358 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
8359 Add __mutex.
8360 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
8361 lll_futex_requeue, lll_mutex_unlock_force): Define.
8362
e7c5ac68
UD
83632003-05-30 Jakub Jelinek <jakub@redhat.com>
8364
8365 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
8366 (pthread_cond_t): Add __mutex.
8367 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
8368 lll_futex_requeue, lll_mutex_unlock_force): Define.
8369
ea2630c6
UD
83702003-05-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
8371
8372 * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
8373 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
42d86dd6 8374 Add __mutex field.
ea2630c6
UD
8375 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
8376 Define.
8377 (lll_futex_wait, lll_futex_wake): Define.
8378 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
8379 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
8380 FUTEX_REQUEUE instead of FUTEX_WAIT.
8381 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
8382 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
8383 mutex which was used in condvar structure. Call
8384 __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
8385 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
8386
8387 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
8388 include tcb-offsets.h. Read wakeup value in locked region.
8389 Use the value of gbr register as THREAD_ID.
8390 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8391 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
8392 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
8393
8394 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
8395 macros.
8396
5a77f150
UD
83972003-05-28 Ulrich Drepper <drepper@redhat.com>
8398
8399 * sysdeps/pthread/pthread_cond_broadcast.c
8400 (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
8401
7661d9f7
UD
84022003-05-26 Ulrich Drepper <drepper@redhat.com>
8403
8404 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
8405 typo in register name.
8406 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
8407 correctly. Actually use requeue. Little optimization.
8408 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
8409 mutex address early. Handle cancellation state as 32-bit value.
8410 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8411 Remove unnecessary label.
8412
69431c9a
UD
84132003-05-25 Ulrich Drepper <drepper@redhat.com>
8414
8415 * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
8416 instead of FUTEX_WAIT.
8417 * sysdeps/pthread/pthread_cond_signal.c: Likewise.
8418 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8419 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8420 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
8421 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
8422 * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
8423 used in condvar structure. Call __pthread_mutex_cond_lock instead
8424 of __pthread_mutex_lock_internal.
8425 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8426 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8427 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
8428 (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
8429 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8430 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8431 * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
8432 Add pthread_mutex_cond_lock.
8433 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
8434 * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
8435 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
8436 lll_mutex_cond_lock.
8437 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
8438 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
248a3490 8439 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
69431c9a 8440 Add __mutex field.
248a3490 8441 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
69431c9a
UD
8442 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8443
8444 * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
8445 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
8446
8447 * pthreadP.h: Declare __pthread_mutex_cond_lock.
8448 * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
8449 Use it instead of lll_mutex_lock. If __pthread_mutex_lock is a
8450 macro don't define aliases.
8451
8452 * cancellation.c: Remove __pthread_enable_asynccancel_2.
8453 * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
8454 * sysdeps/pthread/pthread_cond_timedwait.c: Use
8455 __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
8456 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8457 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8458 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
8459 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8460 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8461
fddfebbd
UD
84622003-05-17 Ulrich Drepper <drepper@redhat.com>
8463
8464 * sem_open.c: Fix one endless loop. Implement correct semantics
8465 wrt opening the same semaphore more then once.
8466 * sem_close.c: Adjust for sem_open change.
8467 * semaphoreP.h: Include <semaphore.h>. Define struct inuse_sem.
8468 Declare __sem_mappings, __sem_mappings_lock, __sem_search.
8469 * Makefile (tests): Add tst-sem7.
8470 * tst-sem7.c: New file.
8471
1eefffb0
RM
84722003-05-16 Roland McGrath <roland@redhat.com>
8473
8474 * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
8475 uninitialized variable braino.
8476
6e66dc78
UD
84772003-05-16 Ulrich Drepper <drepper@redhat.com>
8478
23ae6451
UD
8479 * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
8480 test for syscall availability.
8481
8482 * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
8483 __no_posix_timers to -1 if the syscalls don't exist.
8484
7ac5b8e2
UD
8485 * pthread_join.c (pthread_join): Set tid field of the joined
8486 thread to -1. This isn't necessary but helps to recognize some
8487 error conditions with almost no cost.
8488
8489 * allocatestack.c (FREE_P): Also negative values indicate an
8490 unused stack.
8491
6e66dc78
UD
8492 * unwind.c: Include <unistd.h>.
8493
855dba3c
UD
84942003-05-14 Ulrich Drepper <drepper@redhat.com>
8495
8496 * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
8497
81f3ac4c
UD
84982003-05-14 Jakub Jelinek <jakub@redhat.com>
8499
8500 * Makefile (crti-objs, crtn-objs): New variables.
8501 (omit-deps, extra-objs): Add crtn.
8502 ($(objpfx)libpthread.so): Depend on both crti and crtn
8503 and links to them in multidir.
8504 ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
8505
7158eae4
UD
85062003-05-12 Steven Munroe <sjmunroe@us.ibm.com>
8507
8508 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
8509 (lll_mutex_unlock): Use atomic_exchange_rel.
8510
edf205d5
UD
85112003-05-11 Ulrich Drepper <drepper@redhat.com>
8512
8513 * cond-perf.c (cons): Add missing locking around setting of alldone.
8514
a3f979a7
UD
85152003-05-10 Ulrich Drepper <drepper@redhat.com>
8516
8517 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
8518 related macros.
8519 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8520
880867a4
UD
85212003-05-09 Ulrich Drepper <drepper@redhat.com>
8522
949ec764
UD
8523 * tst-sem6.c: New file.
8524 * Makefile (tests): Add tst-sem6.
8525
8526 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
8527 Use atomic_exchange_rel instead of atomic_exchange.
8528 * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
8529 Likewise.
8530
8531 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
8532 code for lll_futex_wait and lll_futex_wake in static apps. Use
8533 vsyscall is possible.
8534
8535 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
8536 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
8537 * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
8538 pthread_setaffinity_np.
8539 * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
8540 and pthread_setaffinity_np.
8541 * Makefile (libpthread-routines): Add pthread_getaffinity and
8542 pthread_setaffinity.
8543
880867a4
UD
8544 * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
8545 use it in case mmap to allocate the stack fails.
8546 * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
8547 ARCH_MAP_FLAGS here.
8548 * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
8549 ARCH_RETRY_MMAP.
8550
92d83c72
UD
85512003-05-08 Ulrich Drepper <drepper@redhat.com>
8552
8553 * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
8554 handler implementation. It is now lockless in fork().
8555 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
8556 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
8557 * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>. Don't
8558 declare the __fork_*_lists.
8559 (struct fork_handler): Include pointers to all three functions.
8560 Add next, refcntr and need_signal elements.
8561 (__fork_handlers): New declaration.
8562 (__register_atfork_malloc): Remove declaration.
8563 (HAVE_register_atfork_malloc): Remove definition.
8564 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
8565 __pthread_child_handler variable.
8566 (__libc_pthread_init): Use __register_atfork instead of explicitly
8567 adding to the list.
8568 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
8569 and lll_futex_wake.
8570 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
8571
8572 * unwind.c (unwind_cleanup): Print error message and then abort. This
8573 function must never be reached.
8574
8575 * cond-perf.c: New file.
8576
be4d8038
UD
85772003-05-05 Ulrich Drepper <drepper@redhat.com>
8578
8579 * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
8580
c6696b79
RM
85812003-05-04 Roland McGrath <roland@redhat.com>
8582
8583 * Makefile ($(objpfx)../libc.so): New target.
8584
7da168bf
UD
85852003-05-02 Ulrich Drepper <drepper@redhat.com>
8586
8587 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
8588 (pthread_condattr_t): Size is only an int, don't use long for
8589 alignment.
8590 (pthread_mutexattr_t): Likewise.
7da168bf
UD
8591 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8592 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8593 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8594
9a7178d6
UD
85952003-05-01 Ulrich Drepper <drepper@redhat.com>
8596
8597 * sysdeps/i386/tls.h: Define THREAD_ID.
8598 * sysdeps/ia64/tls.h: Likewise.
8599 * sysdeps/powerpc/tls.h: Likewise.
8600 * sysdeps/s390/tls.h: Likewise.
8601 * sysdeps/sh/tls.h: Likewise.
8602 * sysdeps/x86_64/tls.h: Likewise.
8603 * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
8604 record ownership.
8605 * pthread_mutex_timedlock.c: Likewise.
8606 * pthread_mutex_trylock.c: Likewise.
8607 * pthread_mutex_unlock.c: Likewise.
8608 * pthread_rwlock_trywrlock.c: Likewise.
8609 * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
8610 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
8611 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
8612 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
8613
8614 * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
8615 flag.
8616
a234e27d
UD
86172003-04-29 Jakub Jelinek <jakub@redhat.com>
8618
8619 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
8620 (__SIZEOF_PTHREAD_COND_T): Define to 48.
8621 (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
8622 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
8623 Make __align long long instead of long.
8624 (pthread_rwlock_t): Formatting.
8625 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
8626 (pthread_rwlock_t): Formatting.
8627 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
8628 (pthread_cond_t): Make __align long long instead of long.
8629 (pthread_rwlock_t): Move __flags field to the same position as in
8630 linuxthreads.
8631
f025c136
UD
86322003-04-30 Ulrich Drepper <drepper@redhat.com>
8633
8634 * tst-rwlock6.c (do_test): Use correct printf format specifiers.
8635 * tst-rwlock7.c (do_test): Likewise.
8636
7531ab9e
RM
86372003-04-26 Roland McGrath <roland@redhat.com>
8638
8639 * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
8640
299601a1
UD
86412003-04-22 Jakub Jelinek <jakub@redhat.com>
8642
299601a1
UD
8643 * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
8644 sizeof (struct pthread).
8645 (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
468777e1 8646 1 struct pthread.
299601a1
UD
8647 * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
8648 to 0.
8649 (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
8650 struct pthread.
8651 (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
8652 to 32-bit bytes.
8653 (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
8654 tcbp.
8655 (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
8656 unneccessarily.
8657 (NO_TLS_OFFSET): Define.
299601a1
UD
8658 * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
8659 add TLS_TCB_SIZE unnecessarily.
299601a1 8660
950094f8
RM
86612003-04-22 Roland McGrath <roland@redhat.com>
8662
8663 * Makeconfig (shared-thread-library): Reverse link order to work
8664 around linker bug.
8665
dc2f6455
UD
86662003-04-22 Ulrich Drepper <drepper@redhat.com>
8667
8668 * semaphore.h: Fix typo in comment.
8669
e7608d77
UD
86702003-04-21 Ulrich Drepper <drepper@redhat.com>
8671
6a87ee19
UD
8672 * sysdeps/pthread/sigfillset.c: New file.
8673
e7608d77
UD
8674 * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
8675 * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
8676 * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
8677 * sysdeps/pthread/sigaction.c: Likewise.
8678 * sysdeps/pthread/sigprocmask.c: New file.
8679 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
8680 __SIGRTMIN+1.
8681 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
8682 Block SIGTIMER. Also handle SI_TKILL events and terminate thread
8683 in this case.
8684
0b3df49e
UD
86852003-04-19 Ulrich Drepper <drepper@redhat.com>
8686
58a7a325
UD
8687 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
8688 (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
8689
0b3df49e
UD
8690 * sysdeps/unix/sysv/linux/unregister-atfork.c
8691 (__unregister_atfork): Don't free memory not allocated dynamically.
8692
8693 * semaphore.h: Remove __THROW marker from cancellation points.
8694 * nptl/sysdeps/pthread/pthread.h: Likewise.
8695
7d74651e
UD
86962003-04-18 Ulrich Drepper <drepper@redhat.com>
8697
76a67697
UD
8698 * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
8699 pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
7d74651e
UD
8700 __THROW.
8701
dd9d6538
JJ
87022003-04-16 Jakub Jelinek <jakub@redhat.com>
8703
8704 * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
8705
4ab6f47c
RM
87062003-04-15 Roland McGrath <roland@redhat.com>
8707
8708 * forward.c (__pthread_unwind): Tweak to avoid warning.
8709
162434a6
UD
87102003-04-15 Ulrich Drepper <drepper@redhat.com>
8711
8712 * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
8713
35909161
UD
87142003-04-14 Ulrich Drepper <drepper@redhat.com>
8715
18ddd3aa 8716 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
35909161
UD
8717 overflow CFA advance instructions.
8718 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8719
18a8e730
UD
87202003-04-14 Jakub Jelinek <jakub@redhat.com>
8721
bd4f43b4
UD
8722 * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
8723 * sysdeps/i386/pthread_spin_lock.c: Likewise.
8724 * sysdeps/x86_64/tls.h: Likewise. Define LOCK_PREFIX if not already
8725 defined.
8726
18a8e730
UD
8727 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
8728 DW_CFA_advance_loc2 for .Laddl-.Lsubl.
8729 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
8730 DW_CFA_advance_loc for .Laddl-.Lsubl.
8731
08c765fa
UD
87322003-04-13 Ulrich Drepper <drepper@redhat.com>
8733
18a8e730
UD
8734 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
8735 position-independent unwind data for static libraries.
8736 Add missing unwind info. Add comments.
8737
ad2be852
UD
8738 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
8739 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8740 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
08c765fa
UD
8741 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8742
177d1ad3
UD
87432003-04-12 Ulrich Drepper <drepper@redhat.com>
8744
08c765fa
UD
8745 * Makefile: Make sure all cancellation points are compiled with
8746 exception and asynchronous unwind tables.
8747
177d1ad3
UD
8748 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
8749 which mishandles loading of global object addresses in PIC.
8750 (THREAD_SETMEM_NC): Likewise.
8751
09d65ff3
UD
87522003-04-11 Ulrich Drepper <drepper@redhat.com>
8753
8754 * pthread.h: Define new data structure for cleanup buffer. Declare
8755 new cleanup handler interfaces.
8756 * descr.h: Include <unwind.h> if necessary. Define pthread_unwind_buf.
8757 (struct pthread): Add cleanup_jmp_buf pointer. Define
8758 HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
8759 * pthreadP.h: Declare __pthread_unwind. Define __do_cancel to use
8760 it. Declare old cleanup handler installation functions.
8761 * cleanup.c: Rewrite. Install handler for unwind-based cleanup
8762 handling.
8763 * cleanup_defer.c: Likewise.
8764 * cleanup_compat.c: New file. Old cleanup code.
8765 * cleanup_def_compat.c: New file. Old cleanup code.
8766 * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
8767 if own thread descriptor.
8768 * unwind.c: New file.
8769 * forward.c: Add __pthread_unwind.
8770 * init.c (pthread_functions): Add __pthread_unwind.
8771 * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
8772 Add ptr___pthread_unwind.
8773 * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
8774 and unwind function.
8775 * Makefile (libpthread-routines): Add cleanup_compat,
8776 cleanup_def_compat, and unwind. Define CFLAGS to enable unwind
8777 table generation if necessary.
8778 * version.c: Record whether unwind support is compiled in.
8779 * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
8780 * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
8781 handler interfaces.
8782 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
8783 complication to generate unwind information for syscall wrappers.
68107ec0 8784 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
09d65ff3
UD
8785 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
8786 __cleanup_fct_attribute.
8787
8788 * Makefile: Add rules to build and run tst-cleanup0.
8789 * tst-cleanup0.c: New file.
8790 * tst-cleanup0.expect: New file.
8791
8792 * pthread_create.c (deallocate_tsd): Don't take parameter. Adjust
8793 caller. Optimize to avoid often unecessary local variable.
8794
0dc44b51
RM
87952003-04-11 Roland McGrath <roland@redhat.com>
8796
8797 * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
8798 sets variable `multidir'; include that.
8799 (generated): Add it.
8800 ($(objpfx)$(multidir)/crti.o): New target.
8801 [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
8802
84a80719
UD
88032003-04-11 Ulrich Drepper <drepper@redhat.com>
8804
8805 * tst-attr2.c (do_test): Add cast to avoid warning.
8806 * tst-mutex4.c (do_test): Likewise.
8807
88ff4759
UD
88082003-04-10 Ulrich Drepper <drepper@redhat.com>
8809
8810 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
8811 in child.
8812
b2041097
UD
88132003-04-09 Ulrich Drepper <drepper@redhat.com>
8814
8815 * Makefile (tests): Add tst-detach1.
8816 * tst-detach1.c: New file.
8817
f9657e88
UD
88182003-04-08 Ulrich Drepper <drepper@redhat.com>
8819
9afe4964
UD
8820 * sysdeps/pthread/pthread.h: Remove duplicate
8821 pthread_cleanup_{push,pop} definitions.
8822
f9657e88
UD
8823 * tst-barrier2.c: Eliminate warnings.
8824 * tst-cancel4.c: Likewise.
8825 * tst-cond4.c: Likewise.
8826 * tst-cond6.c: Likewise.
8827 * tst-detach1.c: Likewise.
8828 * tst-rwlock4.c: Likewise.
8829 * tst-rwlock6.c: Likewise.
8830 * tst-rwlock7.c: Likewise.
8831 * tst-sem3.c: Likewise.
8832 * tst-spin2.c: Likewise.
8833 * tst-umask1.c: Likewise.
8834
69b35e86
UD
88352003-04-07 Ulrich Drepper <drepper@redhat.com>
8836
8837 * pthread_detach.c (pthread_detach): Fix test for invalid TID.
8838
c70ad7d7
UD
88392003-04-06 Ulrich Drepper <drepper@redhat.com>
8840
8841 * descr.h (struct pthread): Move cancelhandling member to the front.
8842
54e0138f
UD
88432003-04-05 Ulrich Drepper <drepper@redhat.com>
8844
8845 * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
8846 malloc_parent, and malloc_child statically.
8847 (__register_atfork_malloc): New function.
8848 (free_mem): Don't free any of the malloc_* variables on the list.
8849 * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
8850 Define HAVE_register_atfork_malloc.
8851
b22d701b
UD
88522003-04-04 Ulrich Drepper <drepper@redhat.com>
8853
8854 * sysdeps/pthread/createthread.c (create_thread): Add some more
8855 comments explaining when to set multiple_threads and when not.
8856
8857 * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
8858 THREAD_ATOMIC_BIT_SET if not already defined.
8859 * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
8860 THREAD_ATOMIC_BIT_SET:
8861 * sysdeps/x86_64/tls.h: Likewise.
8862 * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
8863 THREAD_ATOMIC_CMPXCHG_VAL.
8864 (_pthread_cleanup_pop_restore): Likewise.
8865 * cancellation.c (__pthread_enable_asynccancel): Likewise.
8866 (__pthread_enable_asynccancel_2): Likewise.
8867 (__pthread_disable_asynccancel): Likewise.
8868 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
8869 (__libc_disable_asynccancel): Likewise.
8870 * init.c (sigcancel_handler): Likewise.
8871 * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
8872 * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
8873
86246935
UD
88742003-04-03 Ulrich Drepper <drepper@redhat.com>
8875
8876 * init.c (sigcancel_handler): Don't set EXITING_BIT here.
8877 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
8878 * pthreadP.h (__do_cancel): Set EXITING_BIT here.
8879 * Makefile (tests): Add tst-cancel11.
8880 * tst-cancel11.c: New file.
8881
6b4686a5
UD
88822003-04-01 Ulrich Drepper <drepper@redhat.com>
8883
8884 * pthread_create.c (deallocate_tsd): Clear/free memory after the last
8885 round, not the first. Use specific_used flag instead of local
8886 found_nonzero variable. Use THREAD_[SG]ETMEM where possible.
8887 (__free_tcb): Don't call deallocate_tsd here.
8888 (start_thread): Call deallocate_tsd here.
8889 * pthread_setspecific.c: Set specific_used flag really only when
8890 needed.
0d73a73b 8891 * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
6b4686a5 8892 * tst-tsd3.c: New file.
0d73a73b 8893 * tst-tsd4.c: New file.
6b4686a5 8894
42b2395d
UD
88952003-03-31 Ulrich Drepper <drepper@redhat.com>
8896
211d90c5
UD
8897 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
8898 Use atomic_exchange_and_add instead of __lll_add.
8899 (__lll_mutex_timedlock): Likewise.
8900 Patch by Ian Wienand.
8901
89022003-03-24 Steven Munroe <sjmunroe@us.ibm.com>
8903
8904 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
8905 (SINGLE_THREAD_P): Fix typo.
8906 * tst-cancel-wrappers.sh: Handle '.'ed symbols.
8907
89082003-03-31 Ulrich Drepper <drepper@redhat.com>
8909
8910 * Makefile (tests): Add tst-align.
8911 * tst-align.c: New file.
8912 * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
211d90c5 8913
42b2395d
UD
8914 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
8915 function correctly.
8916
211d90c5
UD
8917 * tst-tsd2.c: Add casts to avoid warnings.
8918
163b180f
UD
89192003-03-30 Ulrich Drepper <drepper@redhat.com>
8920
8921 * descr.h (struct pthread): Move most often used elements to the front.
8922
ea473bad
UD
89232003-03-29 Ulrich Drepper <drepper@redhat.com>
8924
8925 * Makefile (libpthread-routines): Add pthread_atfork.
8926 (libpthread-static-only-routines): Add pthread_atfork.
8927
dd731d53
UD
89282003-03-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
8929
8930 * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
8931 of TLS_DTV_AT_TP.
8932 (INSTALL_DTV): Add parens.
8933 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
8934 Use passed descr instead of THREAD_SELF.
8935 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
8936 (__lll_mutex_timedlock_wait): Correct expected value after
8937 spurious wakeup.
8938 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
8939 Release lock before waking up the waiters.
8940 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
8941 criteria. Reorderstruct passed to cleanup handler. Fix
8942 handling of cancellation and failung pthread_mutex_unlock call.
8943 Use __pthread_enable_asynccancel_2 instead of
8944 __pthread_enable_asynccancel.
8945 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
8946 Return result of lock re-get if it fails.
8947 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
8948 for __pthread_cleanup_push.
8949 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
8950 completely broken rwlock implementation.
8951 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8952 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
8953 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
8954 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
8955 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8956 * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value. Use
8957 versioned_symbol macro.
8958 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
8959 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
8960
c75d02f0
UD
89612003-03-27 Ulrich Drepper <drepper@redhat.com>
8962
5f5004df
UD
8963 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
8964 __timer_helper_thread. Declare __start_helper_thread, __helper_once,
8965 and __helper_tid.
8966 (struct timer): Remove th and bar field.
8967 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
8968 debugging code. Create only one helper thread.
8969 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
8970 helper thread.
8971 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
8972 Renamed. Define statically. Use thread info from siginfo.
8973 (__helper_once): New variable.
8974 (__helper_tid): New variable.
8975 (__reset_helper_control): New function.
8976 (__start_helper_thread): New function.
8977
18d009ca
UD
8978 * pthread_create.c (start_thread): Don't use setjmp inside
8979 __builtin_expect to work around gcc bug.
8980
c75d02f0
UD
8981 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
8982 timer_delete syscall fails, but not with ENOSYS, set
8983 __no_posix_timers.
8984
8985 * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
8986 (timer_settime): Fix typo.
28cf3058
UD
8987 * sysdeps/unix/sysv/linux/timer_getoverr.c
8988 [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
c75d02f0 8989
049ac259
JJ
89902003-03-27 Jakub Jelinek <jakub@redhat.com>
8991
8992 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
8993 offset of cleanupbuf.__prev.
8994
f93d39dd
JJ
89952003-03-26 Jakub Jelinek <jakub@redhat.com>
8996
8997 * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
8998 of included file.
8999
f064e4c5
UD
90002003-03-26 Ulrich Drepper <drepper@redhat.com>
9001
9002 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
9003 NULL provide default definition to syscall.
9004
83e886a3
RM
90052003-03-25 Roland McGrath <roland@redhat.com>
9006
9007 * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
9008 (timer_id2ptr): Fix typo.
9009
09402f5b
UD
90102003-03-25 Ulrich Drepper <drepper@redhat.com>
9011
9012 * pthreadP.h: Define SIGCANCEL and SIGTIMER.
9013 * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
9014 * sysdeps/ia64/pthreaddef.h: Likewise.
9015 * sysdeps/powerpc/pthreaddef.h: Likewise.
9016 * sysdeps/s390/pthreaddef.h: Likewise.
9017 * sysdeps/sh/pthreaddef.h: Likewise.
9018 * sysdeps/x86_64/pthreaddef.h: Likewise.
9019 * init.c (__pthread_initialize_minimal): Block SIGTIMER.
9020 * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
9021 being changed.
9022 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
9023 SIGTIMER is not unblocked.
9024 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
9025 RT signal taken.
9026 * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
9027 be send.
9028 * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
9029 pass pointer through as ID.
9030 * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
9031 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
9032 * sysdeps/unix/sysv/linux/timer_create.c: New file.
9033 * sysdeps/unix/sysv/linux/timer_delete.c: New file.
9034 * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
9035 * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
9036 * sysdeps/unix/sysv/linux/timer_routines.c: New file.
9037 * sysdeps/unix/sysv/linux/timer_settime.c: New file.
9038 * sysdeps/unix/sysv/linux/ia64/Versions: New file.
9039 * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
9040 * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
9041 * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
9042 * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
9043 * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
9044 * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
9045 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
9046 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
9047 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
9048 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
9049 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
9050 * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
9051 * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
9052 * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
9053 * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
9054 * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
9055 * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
9056 * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
9057 * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
9058 * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
9059 * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
9060 * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
9061 * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
9062 * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
9063
9064 * pthreadP.h: Remove FRAME_LEFT definition.
9065 * cleanup.c (_pthread_cleanup_push): Don't check for reference to
9066 already left frame. Programs which have this problem are not POSIX
9067 compliant.
9068 * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
9069
5e826ab5
UD
90702003-03-24 Ulrich Drepper <drepper@redhat.com>
9071
9072 * sysdeps/pthread/tst-timer.c: Check return values of the
9073 functions we test.
9074
b910f788
RM
90752003-03-23 Roland McGrath <roland@redhat.com>
9076
3045a1fe
RM
9077 * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
9078 * tst-tls3mod.c: Likewise.
9079 * tst-tls1.c: Likewise.
9080 * tst-tls2.c: Likewise.
9081
85047fe3
RM
9082 * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
9083 undefined behavior.
9084
b910f788
RM
9085 * tst-join5.c (tf1, tf2): Add a cast.
9086
9087 * Makeconfig (includes): Append -I$(..)nptl to this variable.
9088
9089 * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
9090 Don't test anything.
9091 * tst-cond4.c: Likewise.
9092 * tst-cond6.c: Likewise.
9093 * tst-flock2.c: Likewise.
9094 * tst-mutex4.c: Likewise.
9095 * tst-rwlock4.c: Likewise.
9096 * tst-signal1.c: Likewise.
9097 * tst-spin2.c: Likewise.
9098 * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
9099
9100 * tst-mutex4.c: Use test-skeleton.c.
9101 * tst-spin2.c: Likewise.
9102 * tst-sysconf.c: Likewise.
9103 * tst-barrier2.c: Likewise.
9104 * tst-cond4.c: Likewise.
9105 * tst-cond6.c: Likewise.
9106 * tst-rwlock4.c: Likewise.
9107 * tst-unload.c: Likewise.
9108 * tst-flock2.c (do_test): Use return instead of exit.
9109
4baa087a
RM
91102003-03-22 Jakub Jelinek <jakub@redhat.com>
9111
9112 * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
9113
5a3ab2fc
UD
91142003-03-21 Ulrich Drepper <drepper@redhat.com>
9115
9f07eae2
UD
9116 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
9117 (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
9118 instead of __lll_compare_and_swap.
9119 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
9120 Likewise.
9121 Removed definition if __lll_compare_and_swap.
9122
5a3ab2fc
UD
9123 * cancellation.c: Adjust for new form of compare&exchange macros.
9124 * cleanup_defer.c: Likewise.
9125 * init.c: Likewise.
9126 * libc-cancellation.c: Likewise.
9127 * old_pthread_cond_broadcast.c: Likewise.
9128 * old_pthread_cond_signal.c: Likewise.
9129 * old_pthread_cond_timedwait.c: Likewise.
9130 * old_pthread_cond_wait.c: Likewise.
9131 * pthread_cancel.c: Likewise.
9132 * pthread_create.c: Likewise.
9133 * pthread_detach.c: Likewise.
9134 * pthread_join.c: Likewise.
9135 * pthread_key_delete.c: Likewise.
9136 * pthread_setcancelstate.c: Likewise.
9137 * pthread_setcanceltype.c: Likewise.
9138 * pthread_timedjoin.c: Likewise.
9139 * pthread_tryjoin.c: Likewise.
9140 * sysdeps/pthread/createthread.c: Likewise.
9141
b1aea098
UD
91422003-03-20 Ulrich Drepper <drepper@redhat.com>
9143
9144 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
4baa087a 9145 Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
b1aea098
UD
9146 definitions. Replace uses with calls to atomic_* functions.
9147 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
9148 * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
9149 __lll_test_and_set calls with atomic_exchange_and_add and
9150 atomic_exchange calls respectively.
9151 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
9152 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
9153 * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
9154 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
9155 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
9156 * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
9157 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
9158
9159 * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
9160 returns the old value.
9161
100a7100
RM
91622003-03-20 Martin Schwidefsky <sky@mschwid3.boeblingen.de.ibm.com>
9163
9164 * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
9165 int for variable OLDVAL and correct inline assembler contraint.
9166 * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
9167 type int for variable OLD.
9168
9169 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
9170 only for s390-32.
9171 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
9172 (SINGLE_THREAD_P): Use global variable __local_multiple_threads
9173 instead of multiple_threads field in the TCB.
9174
95767b36
UD
91752003-03-19 Ulrich Drepper <drepper@redhat.com>
9176
4009bf40
UD
9177 * sysdeps/i386/i686/bits/atomic.h: Removed.
9178 * sysdeps/i386/i586/bits/atomic.h: Removed.
9179 * sysdeps/i386/i486/bits/atomic.h: Removed. Moved to glibc.
9180 * sysdeps/x86_64/bits/atomic.h: Removed. Moved to glibc.
9181 * sysdeps/s390/bits/atomic.h: Removed. Moved to glibc.
9182 * sysdeps/sh/bits/atomic.h: Removed. Moved to glibc.
9183 * sysdeps/ia64/bits/atomic.h: Removed. Moved to glibc.
9184 * sysdeps/powerpc/bits/atomic.h: Removed. Moved to glibc.
9185 * atomic.h: Removed. Moved to glibc.
9186
560a784f
UD
9187 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
9188 support for clock selection.
9189
95767b36
UD
9190 * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
9191 signalling waiters.
9192
043ad426
RM
91932003-03-18 Roland McGrath <roland@redhat.com>
9194
94659495
RM
9195 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
9196 Add __lll_rel_instr first. Add memory clobber.
9197 (lll_mutex_unlock): Use __lll_test_and_set.
9198 From Paul Mackerras <paulus@samba.org>.
9199
9200 * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
9201 unconditionally.
9202 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
9203 (SINGLE_THREAD_P): Add `header.' prefix.
9204 From Paul Mackerras <paulus@samba.org>.
9205
043ad426
RM
9206 * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
9207 pthread_timedjoin_np to ...
9208 (libpthread: GLIBC_2.3.3): ... here.
9209 (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
9210
9211 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
9212 Avoid shadowing VAL variable.
9213
9214 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
9215 New macro.
9216
86a9ee5e
UD
92172003-03-18 Ulrich Drepper <drepper@redhat.com>
9218
ac9e0aa1
UD
9219 * Makefile (tests): Add tst-cond11.
9220 * tst-cond11.c: New file.
9221
a14b373c
UD
9222 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
9223 struct passed to cleanup handler to eliminate one more
9224 instruction.
9225 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9226
24a49f38
UD
9227 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
9228 (pthrad_cond_t): Replace __unused field with __clock.
9229
9230 * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
9231 waken all waiters in cleanup handler.
9232 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9233 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9234
86a9ee5e
UD
9235 * pthread_condattr_getclock.c: New file.
9236 * pthread_condattr_setclock.c: New file.
9237 * sysdeps/pthread/pthread.h: Declare these new functions.
9238 * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
9239 * Makefile (libpthread-routines): Add the new functions.
9240 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
9241 Renamed field to value. Document use of the bits.
9242 * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
9243 change.
9244 * pthread_condattr_setpshared.c: Likewise.
d5cb8389 9245 * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
86a9ee5e
UD
9246 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
9247 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
9248 Add __clock field.
9249 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9250 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
9251 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
9252 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
9253 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
9254 Implement clock selection.
9255 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
9256 * pthread-errnos.sym: Add ENOSYS.
9257 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
9258 _POSIX_CLOCK_SELECTION.
9259 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
9260
9261 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
9262 invalid .size directive.
9263
98054a05
RM
92642003-03-17 Roland McGrath <roland@redhat.com>
9265
9266 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
9267 Formatting tweaks.
9268
001bea71
UD
92692003-03-17 Ulrich Drepper <drepper@redhat.com>
9270
4773086e
UD
9271 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
9272 Use __lll_add instead of spelling it out. Use protected symbol names.
9273 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
9274 Use __lll_add.
9275 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
9276 Renamed from lll_compare_and_swap. Use new name where necessary.
9277 (__lll_add): Defined.
9278 (__lll_dec_if_positive): Defined.
9279 (__lll_test_and_set): Defined.
9280 * sysdeps/ia64/pthread_spin_init.c: Removed.
9281 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
9282 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
9283 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
9284 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
9285 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
9286 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
9287 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
001bea71
UD
9288 * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
9289 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
9290 __sync_lock_release_si.
9291 Patch by Jakub Jelinek.
9292
9293 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
9294 Fix timeout handling.
9295 (__lll_timedwait_tid): Likewise.
9296 (lll_unlock_wake_cb): Wake up other waiters if necessary.
9297 Patch by Jakub Jelinek.
9298
9299 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
9300
de4471dd
RM
93012003-03-17 Roland McGrath <roland@redhat.com>
9302
9303 PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
9304 * sysdeps/pthread/pthread_spin_init.c: New file.
9305 * sysdeps/pthread/pthread_spin_unlock.c: New file.
9306 * sysdeps/powerpc/Makefile: New file.
9307 * sysdeps/powerpc/pthread_spin_lock.c: New file.
9308 * sysdeps/powerpc/pthread_spin_trylock.c: New file.
9309 * sysdeps/powerpc/pthreaddef.h: New file.
9310 * sysdeps/powerpc/tcb-offsets.sym: New file.
9311 * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
9312 * sysdeps/powerpc/tls.h: New file.
9313 * sysdeps/powerpc/bits/atomic.h: New file.
9314 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
9315 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
9316 * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
98054a05 9317
de4471dd
RM
9318 * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
9319 * sysdeps/unix/sysv/linux/sem_post.c: New file.
9320 * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
9321 * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
9322 * sysdeps/unix/sysv/linux/sem_wait.c: New file.
9323 * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
9324 * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
9325 * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
9326 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
9327 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
9328 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
9329 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
9330 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
9331 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
9332 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
9333
9334 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
9335 not gettimeofday.
9336 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
9337 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
9338 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
9339 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
9340 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
9341
5778033f
UD
93422003-03-17 Ulrich Drepper <drepper@redhat.com>
9343
9344 * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
9345 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
9346 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9347 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9348 Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
9349
796038f8
RM
93502003-03-16 Roland McGrath <roland@redhat.com>
9351
9352 * tst-fork4.c: Include <string.h>.
9353 * tst-signal2.c: Likewise.
9354 * tst-mutex5.c (do_test): exit -> return.
9355 * tst-mutex2.c: Include <stdlib.h>.
9356
51d0678c
UD
93572003-03-16 Ulrich Drepper <drepper@redhat.com>
9358
5778033f
UD
9359 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
9360 (__lll_mutex_timedlock_wait): Correct expected value after
9361 spurious wakeup. Otherwise we would never wait again.
9362
b6e2f87a
UD
9363 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
9364 zone versus inline asm stupidity. Use correct instructions.
9365
51d0678c
UD
9366 * tst-rwlock6.c: Add some more status output.
9367
8112cc70
RM
93682003-03-15 Roland McGrath <roland@redhat.com>
9369
9370 * sysdeps/pthread/configure.in: New file.
9371 * sysdeps/pthread/configure: New file (generated).
9372
49773c19
UD
93732003-03-15 Ulrich Drepper <drepper@redhat.com>
9374
9375 * allocatestack.c (allocate_stack): Store the exact stack size of
9376 user allocated stacks.
9377
eec0ca9f
JJ
93782003-03-15 Jakub Jelinek <jakub@redhat.com>
9379
9380 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
9381 (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
9382 * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
9383 * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
9384 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
9385 Use `header.' prefix.
9386 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
9387
a87731e2
UD
93882003-03-15 Ulrich Drepper <drepper@redhat.com>
9389
9390 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
9391 __builtin_frame_address, use stack pointer.
9392
9393 * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
9394 instead of __builtin_frame_pointer.
9395
e22a221d
UD
93962003-03-14 Ulrich Drepper <drepper@redhat.com>
9397
92ed3daf
UD
9398 * tst-basic1.c (do_test): Add cast to avoid warning.
9399 * tst-basic2.c (do_test): Likewise.
9400
9b89567d
UD
9401 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
9402 amount of stack correction.
9403
e22a221d
UD
9404 * tst-fork4.c: Use test-skeleton.c.
9405
2e49caba
RM
94062003-03-14 Roland McGrath <roland@redhat.com>
9407
9408 * init.c: Fix typo "#eli" for "#else".
9409
415ef7d8
RM
94102003-03-14 Steven Munroe <sjmunroe@us.ibm.com>
9411
9412 * allocatestack.c (__stack_user): Use hidden_data_def.
9413 * pthread_create.c (__pthread_keys): Likewise.
9414
9415 * init.c [__powerpc__] (__NR_set_tid_address): Define it.
9416
52287505
RM
94172003-03-14 Roland McGrath <roland@redhat.com>
9418
415ef7d8
RM
9419 * tst-fork4.c: New file.
9420 * Makefile (tests): Add it.
9421
52287505
RM
9422 * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
9423 we always define the padding space.
9424 [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
9425 stopped supporting its own extensions fully.
9426 [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
9427 struct also called `header', so `header.multiple_threads' is the field
9428 name to use on all machines.
9429 * allocatestack.c (allocate_stack): Use `header.' prefix.
9430 * sysdeps/pthread/createthread.c (create_thread): Likewise.
9431 * pthread_create.c (__pthread_create_2_1): Likewise.
9432 * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
9433 (THREAD_SELF): Likewise.
9434 * sysdeps/x86_64/tls.h: Likewise.
9435 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
9436 (SINGLE_THREAD_P): Likewise.
9437 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
9438 (SINGLE_THREAD_P): Likewise.
9439 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
9440 (SINGLE_THREAD_P): Likewise.
9441
9442 * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
9443 value directly.
9444
c44bf9aa
UD
94452003-03-14 Ulrich Drepper <drepper@redhat.com>
9446
e22a221d
UD
9447 * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
9448 * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
9449
0eb18281
UD
9450 * pthread_create.c (start_thread): setjmp is expected to return 0.
9451
c44bf9aa
UD
9452 * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
9453 (THREAD_GETMEM_NC): Likewise.
9454
564cd8b6
UD
94552003-03-13 Ulrich Drepper <drepper@redhat.com>
9456
9457 * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
9458 and the size of the stack which must be allocated is a multiple,
9459 allocate one more page.
9460 * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
9461 MULTI_PAGE_ALIASING.
9462
6461e577
RM
94632003-03-13 Roland McGrath <roland@redhat.com>
9464
9465 * pthread_create.c (start_thread): Set EXITING_BIT after the
9466 event-reporting (and destructors), not before.
9467
b5ec5617
UD
94682003-03-13 Jakub Jelinek <jakub@redhat.com>
9469
6461e577
RM
9470 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
9471 lll_futex_wake): Declare register variables as long int instead of
9472 unsigned long int. Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
9473 Make syscall arguments clobbered by the syscall.
9474 (lll_futex_wait): Define using lll_futex_timed_wait.
9475
9476 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
9477 to void *.
9478
9479 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
9480 PPID if [! NDEBUG].
9481
9482 * allocatestack.c (nptl_ncreated): Only declare if
9483 COLORING_INCREMENT != 0.
9484
9485 * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
9486 (__libc_enable_asynccancel_2): Remove prototype.
9487
b5ec5617
UD
9488 * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
9489 ctid to match kernel.
9490
d0369fb8
UD
94912003-03-12 Ulrich Drepper <drepper@redhat.com>
9492
7588880f
UD
9493 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
9494 libc_multiple_threads.
9495 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
9496 __libc_multiple_threads to...
9497 * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here. New file.
9498
9499 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
9500 versioning.
9501 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
9502 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
9503
9504 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
9505 (__pthread_once_internal): Define.
9506
9507 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
9508 macros instead of .symver directly.
9509 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
9510 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
9511
d0369fb8
UD
9512 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
9513 * sysdeps/x86_64/tcb-offsets.sym: New file.
9514 * sysdeps/x86_64/Makefile: New file.
9515
9516 * sysdeps/i386/tcb-offsets.sym: Add SELF.
9517 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
9518 to access own pthread_t in TCB.
9519 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9520 Likewise.
9521 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9522 Likewise.
9523 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
9524
0bb2ac85
RM
95252003-03-12 Roland McGrath <roland@redhat.com>
9526
9527 * pthread-errnos.sym: New file.
9528 * Makefile (gen-as-const-headers): New variable, list that file.
9529 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
9530 header <pthread-errnos.h> instead of defining errno values here.
9531 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
9532 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
9533 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
9534 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
9535 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9536 Likewise.
9537 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9538 Likewise.
9539 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
9540 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9541 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
9542 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
9543 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
9544 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
9545 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
9546 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
9547 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9548 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
9549 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
9550 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
9551 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
9552 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
9553 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
9554 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9555 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
9556 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
9557 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
9558 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
9559 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
9560 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
9561 * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
9562 * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
9563 * sysdeps/sh/pthread_spin_trylock.S: Likewise.
9564 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
9565 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
9566
9567 * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
9568 CLONE_CHILD_SETTID worked.
9569
35e148cb
UD
95702003-03-12 Ulrich Drepper <drepper@redhat.com>
9571
d0369fb8
UD
9572 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
9573 file.
9574 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
9575 file.
9576
9577 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
9578 (pthread_cond_t): Add padding.
9579
da49194d
UD
9580 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
9581 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
9582 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
9583
35e148cb
UD
9584 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
9585 (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
9586 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
9587 (__pthread_rwlock_timedrdlock): Likewise.
9588 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
9589 (__pthread_rwlock_wrlock): Likewise.
9590 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
9591 (__pthread_rwlock_rdlock): Likewise.
9592
9593 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
9594
9595 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
9596 result of lock re-get if it fails.
9597
3e976b96
UD
95982003-03-11 Ulrich Drepper <drepper@redhat.com>
9599
5a03acfe
UD
9600 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
9601 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
9602 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
9603 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
9604 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9605 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
9606 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
9607 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
9608 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
9609 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
9610
9611 * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
9612 THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
9613
9614 * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
9615 Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
9616 * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
9617 (create_thread): Likewise.
9618 Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
9619 * init.c (__pthread_initialize_minimal_internal): Initialize
9620 __libc_multiple_threads_ptr if necessary.
9621 * pthreadP.h: Adjust prototype for __libc_pthread_init. Declare
9622 __pthread_multiple_threads and __libc_multiple_threads_ptr.
9623 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
9624 __libc_multiple_threads.
9625 (__libc_pthread_init): Return pointer to __libc_pthread_init if
9626 necessary.
9627
9628 * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
9629 (THREAD_SETMEM_NC): Likewise.
9630
9631 * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
9632 * sysdeps/x86_64/pthread_spin_trylock.S: New file.
9633 * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
9634 * sysdeps/x86_64/pthread_spin_unlock.S: New file.
9635
9636 * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
9637 Eliminate one entire instruction.
9638
32a589b1
UD
9639 * cancellation.c (__pthread_enable_asynccancel_2): New function.
9640 * pthreadP.h: Declare __pthread_enable_asynccancel_2.
9641 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
9642 (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
9643 instead of __pthread_enable_asynccancel.
9644 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
9645 (__pthread_cond_wait): Likewise.
9646 * sysdeps/pthread/pthread_cond_timedwait.c
9647 (__pthread_cond_timedwait): Likewise.
9648 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
9649
3e976b96
UD
9650 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
9651 (__condvar_cleanup): Wake up all waiters in case we got signaled
9652 after being woken up but before disabling asynchronous
9653 cancellation.
9654 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
9655 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
9656 (__condvar_cleanup): Likewise.
9657
9658 * init.c (__NR_set_tid_address): If already defined, don't redefine.
9659 Make it an error if architecture has no #if case. Add x86-64.
9660
9661 * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
9662 pt-initfini.s generation.
9663
9664 * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
9665 (TLS_INIT_TP): Fix typo.
9666
6c477888
UD
96672003-03-11 Jakub Jelinek <jakub@redhat.com>
9668
9669 * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
9670 3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
9671
9672 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
9673 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
9674 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
9675 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
9676 * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
9677 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
9678 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
9679 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
9680
ea694823
UD
96812003-03-11 Ulrich Drepper <drepper@redhat.com>
9682
6c477888
UD
9683 * sysdeps/pthread/pthread_cond_timedwait.c
9684 (__pthread_cond_timedwait): Return the result of the final
9685 locking. If it succeeds, the regular function return value.
9686
9687 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
9688 Return result of the final locking.
9689 * version.c (__nptl_main): Work around problems with the strange
9690 INTERNAL_SYSCALL macro on ppc32.
9691 * init.c (__pthread_initialize_minimal_internal): Unblock
9692 SIGCANCEL in case the parent blocked it.
9693 Reported by Paul Mackerras <paulus@samba.org>.
9694
ea694823
UD
9695 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
9696 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
9697 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
9698
b33e6163
RM
96992003-03-11 Jakub Jelinek <jakub@redhat.com>
9700
9701 * sysdeps/pthread/pthread_cond_timedwait.c
9702 (__pthread_cond_timedwait): Unlock and fail if
9703 __pthread_mutex_unlock_internal failed.
9704
9705 * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
9706 (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
9707 Use ARCH_CLONE.
9708 * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
9709 [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
9710 STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
9711 ALLOCATE_STACK): New macros.
9712 (TLS_TPADJ): New macro.
9713 (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
9714 (allocate_stack): Handle TLS_DTV_AT_TP and
9715 NEED_SEPARATE_REGISTER_STACK. Use TLS_TPADJ.
9716 * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
9717 Don't set PD->self.
9718 * init.c [__ia64__] (__NR_set_tid_address): Define.
9719
9720 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
9721 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
9722 * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
9723 * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
9724 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
9725 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
9726 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
9727 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
9728 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
9729 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
9730 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
9731 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
9732 * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
9733 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
9734 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
9735 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
9736 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
9737 * sysdeps/ia64/bits/atomic.h: New file.
9738 * sysdeps/ia64/Makefile: New file.
9739 * sysdeps/ia64/pthread_spin_init.c: New file.
9740 * sysdeps/ia64/pthread_spin_lock.c: New file.
9741 * sysdeps/ia64/pthread_spin_trylock.c: New file.
9742 * sysdeps/ia64/pthread_spin_unlock.c: New file.
9743 * sysdeps/ia64/pthreaddef.h: New file.
9744 * sysdeps/ia64/tcb-offsets.sym: New file.
9745 * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
9746 * sysdeps/ia64/tls.h: New file.
9747
9748 * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
9749 to syscall instead of no arguments.
9750
2b30b2e5
UD
97512003-03-10 Ulrich Drepper <drepper@redhat.com>
9752
db5f2fc9
UD
9753 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
9754 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
9755 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
9756 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
9757
9758 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
9759 unused code.
9760
6a4263e3
UD
9761 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
9762
3de7c2a9
UD
9763 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
9764 lowlevelbarrier.sym.
9765 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
9766 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
9767 Include lowlevelbarrier.h and don't define offsets locally.
6a4263e3 9768 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
3de7c2a9 9769
2a544d82
UD
9770 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
9771 (__lll_mutex_lock_wait): Reverse order of first two parameters.
9772 (__lll_mutex_timedlock_wait): Likewise.
9773 (lll_mutex_lock): Adjust asm for that.
9774 (lll_mutex_timedlock): Likewise. Mark cx, cc, r10 as clobbered.
9775 (lll_lock): Adjust asm for operand order change.
9776 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
9777 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
9778
ec06436c
UD
9779 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
9780 Reverse order of parameters.
9781 (__lll_timedwait_tid): Remove regparms attribute.
9782 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
9783 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
9784
3273832c
UD
9785 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
9786 (__lll_timedwait_tid): Remove one unnecessary instruction.
9787
51f32ab8
UD
9788 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
9789 __lll_mutex_timedlock_wait only for NOT_IN_libc.
9790 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
9791 lowlevelmutex.S.
9792
9793 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
9794 lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
9795 for NOT_IN_libc.
9796 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
9797 lowlevellock.S.
9798
fad48d9e
UD
9799 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
9800 LOCK is already defined. Don't define __lll_mutex_timedlock_wait
9801 for libc.so.
9802 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
9803 define LOCK here (if UP is not defined). The actual code is in
9804 lowlevelmutex.S.
9805
9356d063
UD
9806 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
9807 LOCK is already defined. Don't define lll_unlock_wake_cb and
9808 __lll_timedwait_tid for libc.so.
9809 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
9810 define LOCK here (if UP is not defined). The actual code is in
9811 lowlevellock.S.
9812
ebf0cbc5 9813 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
106f6f9d
UD
9814 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
9815 * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
9816 instead of lowlevelsem.h.
9817 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
9818 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
9819 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
0be8ee21 9820
c915e5ad
UD
9821 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
9822 lowlevelrwlock.sym.
9823 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
9824 * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
146fa1ee 9825 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
c915e5ad 9826
4c3c2e8a
UD
9827 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
9828 register loading.
9829 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
9830 last changed. D'oh.
9831
2b30b2e5
UD
9832 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
9833
9834 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
9835 of __libc_locking_needed.
9836 (lll_trylock): Initialize %eax to zero.
9837
2b30b2e5
UD
9838 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
9839 pthread_cond_t definition.
9840
e48f9638
RM
98412003-03-10 Roland McGrath <roland@redhat.com>
9842
9843 * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
9844 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
9845 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
9846 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
9847 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
9848
9849 * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
9850 Instead of setting PD->multiple_threads, set globals
9851 __pthread_multiple_threads and __libc_multiple_threads.
9852 * sysdeps/pthread/createthread.c (create_thread): Likewise.
9853 * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
9854 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
9855
9856 * descr.h (struct pthread): Conditionalize first member on
9857 [!TLS_DTV_AT_TP]. Replace the `header' member with an anonymous union
9858 containing an anonymous tcbhead_t. Move `list' member out.
9859 [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
9860 * allocatestack.c: Remove use of `header.data.' prefix.
9861 * pthread_create.c: Likewise.
9862 * init.c (__pthread_initialize_minimal_internal): Likewise.
9863 * sysdeps/pthread/createthread.c (create_thread): Likewise.
9864 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
9865 (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
9866 * sysdeps/x86_64/tls.h: Likewise.
9867 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
9868 (SINGLE_THREAD_P): Likewise.
9869 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
9870 (SINGLE_THREAD_P): Likewise.
9871 * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
9872 * sysdeps/s390/tls.h (tcbhead_t): Likewise.
9873
c37cae9e
UD
98742003-03-09 Ulrich Drepper <drepper@redhat.com>
9875
d38c777e
RM
9876 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
9877
7b44a5e0 9878 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
2b30b2e5 9879 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
7b44a5e0 9880
c2e5e085
UD
9881 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
9882 leftovers from the ia32 code.
9883
9884 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
9885 memory load.
9886 (clear_once_control): Don't load %esi.
9887
9888 * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
9889 handling.
9890
9891 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
9892
cd4b2a55
UD
9893 * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
9894 * sysdeps/unix/sysv/linux/createthread.c: ...here.
9895
c37cae9e
UD
9896 * Makefile (tests): Add tst-cond10.
9897 * tst-cond10.c: New file.
9898
d130a341
UD
98992003-03-08 Ulrich Drepper <drepper@redhat.com>
9900
ccf1d573
UD
9901 * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
9902 * tst-signal3.c (do_test): Likewise.
9903 * tst-sem5.c (do_test): Likewise.
9904 * tst-kill6.c (do_test): Likewise.
9905 * tst-tls3.c (do_test): Likewise. Include <errno.h>.
9906
9907 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
9908 of inc/dec.
9909 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
9910 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
9911 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
9912 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
9913 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
9914 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
9915 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9916 Likewise.
9917 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9918 Likewise.
9919 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
9920 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9921 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9922 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
9923 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
9924 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
9925 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
9926 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
9927
d130a341
UD
9928 * allocatestack.c (allocate_stack): If mprotect() fails free the
9929 TLS memory.
9930
bc6389ad
UD
99312003-03-07 Ulrich Drepper <drepper@redhat.com>
9932
41d4d223
UD
9933 * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
9934
9935 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
9936 lll_wake_tid. This was used only to work around kernel limits in
9937 the early days.
9938 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
9939 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
9940 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
9941 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
9942
bc6389ad
UD
9943 * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
9944 (__pthread_initialize_minimal_internal): Change initialization of
9945 __static_tls_align_m1 appropriately.
9946 * pthreadP.h (__static_tls_align_m1): Renamed from
9947 __static_tls_align.
9948 * allocatestack.c (allocate_stack): Use __static_tls_align_m1
9949 instead of __static_tls_align-1.
9950
cc775edf
UD
99512003-03-04 Ulrich Drepper <drepper@redhat.com>
9952
0de28d5c 9953 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
6245b6ae 9954
518b5308
UD
9955 * pthread_create.c: Define __pthread_keys using nocommon
9956 attribute, not by placing it explicitly in bss.
9957 Remove DEFINE_DEALLOC definition. Not needed anymore.
9958
9959 * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
9960 Use it in mmap call to allocate stacks.
9961
9962 * sysdeps/pthread/createthread.c (create_thread): Fix comment.
9963
cc775edf
UD
9964 * pthread_create.c (start_thread): Use THREAD_SETMEM to store
9965 result of the thread function.
9966
4f6f0a8f
UD
99672003-03-03 Ulrich Drepper <drepper@redhat.com>
9968
f04a2721
UD
9969 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed. The generic
9970 version is just fine.
9971
4f6f0a8f
UD
9972 * sysdeps/unix/sysv/linux/libc_pthread_init.c
9973 (__pthread_child_handler): Renamed from pthread_child_handler,
9974 exported, and marked hidden. Change all users.
9975 * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
9976 free __pthread_child_handler from child list.
9977
7ce5c164
UD
99782003-03-03 Martin Schwidefsky <schwidefsky@de.ibm.com>
9979
9980 * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
9981
9982 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
9983 Fix handling of cancellation and failing pthread_mutex_unlock call.
9984 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
9985 (__pthread_cond_wait): Likewise.
9986
9987 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
9988 (pthread_rwlock_timedrdlock): Fix clobber of result variable by
9989 lll_futex_timed_wait call.
9990 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
9991 (pthread_rwlock_timedwrlock): Likewise.
9992
9993 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
9994 Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
9995 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
9996
9997 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
9998 check of lll_futex_wake return value.
9999
ea6a015b
RM
100002003-03-03 Roland McGrath <roland@redhat.com>
10001
10002 * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
10003
10004 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
10005 Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
10006 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
10007
4adacf57
UD
100082003-03-02 Ulrich Drepper <drepper@redhat.com>
10009
1be3d664
UD
10010 * sysdeps/pthread/timer_create.c (timer_create): Return correct
10011 error for CPU clocks.
10012
885bafa1
UD
10013 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
10014 _POSIX_MONOTONIC_CLOCK.
10015 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
10016
4adacf57
UD
10017 * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
10018 recent kernels.
10019
86bfff4d
UD
100202003-03-01 Ulrich Drepper <drepper@redhat.com>
10021
10022 * descr.h (struct pthread): Move cleanup field to the front.
10023
d1149385
RM
100242003-03-01 Roland McGrath <roland@redhat.com>
10025
10026 * sem_open.c (sem_open): Braino fix.
10027
bd8bb78b
UD
100282003-03-01 Ulrich Drepper <drepper@redhat.com>
10029
748bec08
UD
10030 * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
10031 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
10032 __pthread_cleanup_pop functionality.
10033 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10034
bd8bb78b
UD
10035 * descr.h (struct pthread): Move tid field to the front now that
10036 it is often used.
10037
10038 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
10039 (__lll_mutex_timedlock_wait): Remove.
10040 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
10041 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
10042 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
10043 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
10044 (lll_unlock_wake_cb): Don't save and restore %esi.
10045 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
10046 %esi.
10047 (__lll_timedwait_tid): Add alignment.
10048 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
10049 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
10050 %esi.
10051 (__lll_timedwait_tid): Removed.
10052 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
10053 (__pthread_cond_broadcast): Don't save, load, and restore %esi.
10054 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
10055 (pthread_barrier_wait): Don't save, load, and restore %esi for
10056 last thread.
10057 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
10058 (__pthread_cond_signal): Don't save, load, and restore %esi.
10059 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
10060 (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
10061 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
10062 Don't save, load, and restore %esi.
10063
d2637c70
UD
100642003-02-27 Ulrich Drepper <drepper@redhat.com>
10065
567fb22a
UD
10066 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
10067 Release lock before waking up the waiters.
10068
427f5fa1
UD
10069 * tst-exit1.c (do_test): Don't start more than one thread in parallel.
10070
a2d83cfb
UD
10071 * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
10072 (reader_thread): Likewise.
10073
d2637c70
UD
10074 * sysdeps/pthread/pthread_rwlock_unlock.c
10075 (__pthread_rwlock_unlock): Release internal lock early. Don't try
10076 to wake up readers if there are none.
10077
10078 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
10079 Release internal lock before wake threads.
10080
b1531183
UD
100812003-02-26 Ulrich Drepper <drepper@redhat.com>
10082
dbf6131c
UD
10083 * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
10084 * tst-rwlock8.c: Initialize lock with INIT. Allow INIT to be
10085 predefined.
10086 * tst-rwlock9.c: Likewise.
10087 * tst-rwlock10.c: New file.
10088 * tst-rwlock11.c: New file.
10089
695799fe
UD
10090 * Makefile (tests): Add tst-dlsym1.
10091 * tst-dlsym1.c: New file.
10092
b1531183
UD
10093 * init.c (__pthread_initialize_minimal_internal): Set
10094 GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
10095 * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
10096
3724f268
UD
100972003-02-24 Ulrich Drepper <drepper@redhat.com>
10098
3857ca78
UD
10099 * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
10100
80d80779
UD
10101 * tst-cond2.c: Fix sychronization with child.
10102
86371308
UD
10103 * tst-rwlock8.c (reader_thread): Remove unused variable.
10104
ffeb4481
UD
10105 * Makefile: Add rules to build and run tst-tls3.
10106 * tst-tls3.c: New file.
10107 * tst-tls3mod.c: New file.
10108
3724f268
UD
10109 * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
10110 * tst-rwlock8.c: New file.
10111 * tst-rwlock9.c: New file.
10112 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
10113 complete broken rwlock implementation.
10114 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10115 Likewise.
10116 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10117 Likewise.
10118 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
10119 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
18a53579
UD
10120 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
10121 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
10122 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
10123 * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
10124 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
3724f268 10125
8915cc40
RM
101262003-02-23 Roland McGrath <roland@redhat.com>
10127
10128 * Makefile (nptl-version): Change regexp so case sensitivity is ok.
10129
fd1a0d0c
UD
101302003-02-23 Ulrich Drepper <drepper@redhat.com>
10131
ecf28959
UD
10132 * Makefile (tests): Add tst-context1.
10133 * tst-context1.c: New file.
10134
5e47b76b
UD
10135 * Makefile (tests): Add tst-tls1 and tst-tls2.
10136 * tst-tls1.c: New file.
10137 * tst-tls2.c: New file.
10138
5a6bbb41
UD
10139 * libc-cancellation.c (__libc_enable_asynccancel): Correct test
10140 for failed cmpxchg.
10141
fd1a0d0c
UD
10142 * pthread_create.c (start_thread): Set EXITING_BIT early.
10143
10144 * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
10145 (THREAD_GETMEM_NC): Likewise.
10146
757f9fcb
UD
101472003-02-22 Ulrich Drepper <drepper@redhat.com>
10148
b1b8e747
UD
10149 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
10150 off 3 more bytes by using offset-less instructions when possible.
10151
c780aa21 10152 * Makefile: Add dependency for $(objpfx)version.d.
757f9fcb
UD
10153
10154 * eintr.c (eintr_source): Add unnecessary return but the compiler
10155 insists.
10156
10157 * tst-kill3.c: Include <unistd.h>.
10158
5148559c
RM
101592003-02-21 Roland McGrath <roland@redhat.com>
10160
10161 * pthread_create.c (start_thread): Call __libc_thread_freeres.
10162
ab2d98e3
UD
101632003-02-21 Ulrich Drepper <drepper@redhat.com>
10164
71028edd
UD
10165 * Makefile (tests): Add tst-eintr1.
10166 (distribute): Add eintr.c.
10167 * tst-eintr1.c: New file.
10168 * eintr.c: New file.
10169
e814f748
UD
10170 * pthread_cancel.c (pthread_cancel): Use tkill directly.
10171
10172 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
10173 Disallow sending SIGCANCEL.
10174
ab2d98e3 10175 * Makefile (tests): Remove tst-basic7. Add tst-kill1, tst-kill2,
9c03686d 10176 tst-kill3, tst-kill4, tst-kill5, tst-kill6.
e814f748
UD
10177 * tst-kill1.c: New file.
10178 * tst-kill2.c: New file.
10179 * tst-kill3.c: New file.
10180 * tst-kill5.c: New file.
9c03686d 10181 * tst-kill6.c: New file.
e814f748
UD
10182 * tst-basic7.c: Renamed to...
10183 * tst-kill4.c: ...this.
ab2d98e3 10184
59fed0e2
RM
101852003-02-21 Roland McGrath <roland@redhat.com>
10186
10187 * Makefile (install-lib-ldscripts): New variable.
10188
49dc759f
UD
101892003-02-21 Ulrich Drepper <drepper@redhat.com>
10190
8c2e9a29
UD
10191 * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
10192 * pthread_cancel.c: Use INVALID_TD_P.
10193 * pthread_detach.c: Likewise.
10194 * pthread_getschedparam.c: Likewise.
10195 * pthread_setschedparam.c: Likewise.
10196 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
10197 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
10198 * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
10199 * pthread_timedjoin.c: Likewise.
10200
10201 * tst-basic7.c: Include <signal.h>.
10202
49dc759f
UD
10203 * pthread_join.c (pthread_join): Limited checking for invalid
10204 descriptors.
10205 * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
10206
df5803bf
UD
102072003-02-20 Ulrich Drepper <drepper@redhat.com>
10208
c5acd3d7
UD
10209 * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
10210 beginning of the loop. Clear the entire first block of TSD.
df5803bf
UD
10211 * Makefile (tests): Add tst-key4.
10212 * tst-key4.c: New file.
10213
729924a0
UD
102142003-02-18 Ulrich Drepper <drepper@redhat.com>
10215
2f7dc594
UD
10216 * Makefile (tests): Add tst-basic7.
10217 * tst-basic7.c: New file.
10218
ba25bb0f
UD
10219 * pthread_create.c (deallocate_tsd): Mark as internal_function.
10220 Add some more __builtin_expect.
10221
12fd3c5f 10222 * pthreadP.h: Define dummy version of DEBUGGING_P.
729924a0 10223
5430d926
UD
102242003-02-17 Ulrich Drepper <drepper@redhat.com>
10225
b0db7fbe
UD
10226 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
10227 _POSIX_THREAD_PRIORITY_SCHEDULING.
10228 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
10229 _XOPEN_REALTIME_THREADS.
10230 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
10231
10232 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
10233 kernel returns EINVAL for PID <= 0, work around it.
10234
ecfda9bd
UD
10235 * Makefile (tests): Add tst-signal5.
10236 * tst-signal5.c: New file.
10237
7d78ab99
UD
10238 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
10239 and LOGIN_NAME_MAX.
10240
371a2972
UD
10241 * tst-cancel1.c (tf): Block all signals.
10242
5430d926
UD
10243 * Makefile (tests): Add tst-basic6.
10244 * tst-basic6.c: New file.
10245
10246 * tst-basic1.c: Add test for process ID.
10247
10248 * Makefile (tests): Add tst-cancel10.
10249 * tst-cancel10.c: New file.
10250
10251 * Makefile (tests): Add tst-signal4.
10252 * tst-signal4.c: New file.
10253
10254 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
10255 __sigismember instead of sigismember. Add __builtin_expect.
10256
1564916a
UD
102572003-02-16 Ulrich Drepper <drepper@redhat.com>
10258
179ff175
UD
10259 * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
10260 pthread_setcancelstate, and pthread_rwlock_setpshared.
10261
e4335f9a
UD
10262 * tst-cancel7.c (do_test): Make sure the pid file exists before
10263 canceling the thread.
10264
0a37669a
UD
10265 * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
10266 pthread_rwlock_timedrdlock tests.
10267 * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
10268 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10269 Check for invalid tv_nsec field.
10270 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10271 Likewise.
10272
10273 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
10274 recursive mutex of overflow.
10275
10276 * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
10277
e4335f9a 10278 * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
1564916a
UD
10279 going into an endless loop.
10280 * Makefile (tests): Add tst-cancel9.
10281 * tst-cancel9.c: New file.
10282
10283 * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
10284
b270b548
UD
102852003-02-15 Ulrich Drepper <drepper@redhat.com>
10286
1c82b97f
UD
10287 * tst-mutex5.c (do_test): Add more timedlock tests.
10288
b2f05465 10289 * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
c3bb9ee1
UD
10290 * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
10291
e798b60f
UD
10292 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
10293 use INLINE_SYSCALL. Error number is returned, not -1.
10294
90491dc4
UD
10295 * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
10296 and __deallocate_stack with internal_function.
10297 * pthread_create.c: Adjust definitions appropriately.
10298 * allocatestack.c: Likewise.
10299
10300 * pthread_join.c: Add one more __builtin_expect.
10301 * pthread_timedjoin.c: Likewise.
10302
10303 * pthread_getspecific.c (__pthread_getspecific): Clear data->data
10304 not data of sequence number does not match.
10305 Add one __builtin_expect.
10306
c6247c9d
UD
10307 * Makefile (tests): Add tst-clock1.
10308 * tst-clock1.c: New file.
10309
b270b548
UD
10310 * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
10311 negative arguments.
10312 * Makefile (tests): Add tst-basic5.
10313 * tst-basic5.c: New file.
10314
700bf7af
UD
103152003-02-14 Ulrich Drepper <drepper@redhat.com>
10316
757de559
UD
10317 * Makefile (tests): Add tst-basic4.
10318 * tst-basic4.c: New file.
10319
47202270
UD
10320 * pthreadP.h: Add declaraction for __nptl_nthreads.
10321 * pthread_create.c: Define __nptl_nthreads
10322 (start_thread): Increment __nptl_nthreads at beginning. Decrement
b270b548 10323 after thread is done. If then zero, call exit(0).
47202270
UD
10324 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
10325 Add ptr_nthreads. Define HAVE_PTR_NTHREADS.
10326 * init.c (pthread_functions): Initialize ptr_nthreads.
10327 * allocatestack.c (nptl_nthreads): Remove definition and all uses.
10328 (__reclaim_stacks): Decrement __nptl_nthreads.
10329 * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
10330 Define.
10331 * Makefile (tests): Add tst-basic3.
10332 * tst-basic3.c: New file.
10333
e320ef46
UD
10334 * descr.h: Define CANCELING_BIT and CANCELING_BITMASK. Introduce
10335 after CANCELTYPE_BIT, move the other bits up. Update CANCEL_RESTMASK.
10336 * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
10337 * pthread_cancel.c (pthread_cancel): Likewise. Also set CANCELING_BIT
10338 if asynchronous canceling is enabled.
10339 * pthread_join.c (pthread_join): When recognizing circular joins,
10340 take into account the other thread might be already canceled.
10341 * Makefile (tests): Add tst-join5.
10342 * tst-join5.c: New file.
10343
700bf7af
UD
10344 * Makefile (tests): Add tst-join4.
10345 * tst-join4.c: New file.
10346
103472003-02-13 Ulrich Drepper <drepper@redhat.com>
10348
10349 * tst-cond4.c (main): Add test of pthread_attr_getpshared.
10350
dac0f772
UD
103512003-02-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
10352
10353 * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
10354 THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
10355 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
10356 warning.
10357 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
10358 to avoid warning.
10359 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
10360 error if lll_futex_wake failed.
10361
e8cda341
UD
103622003-02-13 Ulrich Drepper <drepper@redhat.com>
10363
a7720b5e
UD
10364 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
10365 handling of cancellation and failung pthread_mutex_unlock call.
10366 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10367 * Makefile (tests): Add tst-cond8 and tst-cond9.
10368 * tst-cond8.c: New file.
10369 * tst-cond9.c: New file.
10370
a1ea4c06
UD
10371 * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
10372
10373 * sysdeps/pthread/pthread.h: Add missing initializers. Protect
10374 non-standard initializers with __USE_GNU.
10375
e8cda341
UD
10376 * Makefile (tests): Add tst-cleanup3.
10377 * tst-cleanup3.c: New file.
10378
2067577c
UD
103792003-02-12 Ulrich Drepper <drepper@redhat.com>
10380
89e78a95
UD
10381 * Makefile (tests): Add tst-attr1 and tst-attr2.
10382 * tst-attr1.c: New file.
10383 * tst-attr2.c: New file.
10384
dfdd294a
UD
10385 * Makefile: Add rules to build and run tst-atfork2 test.
10386 * tst-atfork2.c: New file.
10387 * tst-atfork2mod.c: New file.
10388
10389 * sysdeps/unix/sysv/linux/unregister-atfork.c
10390 (__unregister_atfork): Free the memory allocated for the handlers
10391 after removing them from the lists.
10392
10393 * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
10394 cleanup function.
10395
10396 * tst-atfork1.c (do_test): Wait for the child we forked.
10397 Report error in child.
10398
10399 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
10400
2067577c
UD
10401 * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
10402
2a8a8a84
UD
104032003-02-10 Ulrich Drepper <drepper@redhat.com>
10404
d9dd121e
UD
10405 * Makefile (tests): Add tst-cancel8.
10406 * tst-cancel8.c: New file.
10407
2a8a8a84
UD
10408 * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
10409 clearing of control variable.
defd1870 10410 * Makefile (tests): Add tst-once3 and tst-once4.
2a8a8a84 10411 * tst-once3.c: New file.
defd1870 10412 * tst-once4.c: New file.
2a8a8a84 10413
a54e8d33
UD
104142003-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
10415
10416 * sysdeps/sh/Makefile: New file.
10417 * sysdeps/sh/bits/atomic.h: New file.
10418 * sysdeps/sh/pthread_spin_init.c: New file.
10419 * sysdeps/sh/pthread_spin_lock.c: New file.
10420 * sysdeps/sh/pthread_spin_trylock.S: New file.
10421 * sysdeps/sh/pthread_spin_unlock.S: New file.
10422 * sysdeps/sh/pthreaddef.h: New file.
10423 * sysdeps/sh/tcb-offsets.sym: New file.
10424 * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
10425 * sysdeps/sh/tls.h: New file.
10426 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
10427 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
10428 * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
10429 * sysdeps/unix/sysv/linux/sh/fork.c: New file.
10430 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
10431 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
10432 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
10433 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
10434 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
10435 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
10436 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
10437 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
10438 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
10439 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
10440 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
10441 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
10442 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
10443 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
10444 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
10445 * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
10446 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
10447 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
10448 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
10449 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
10450 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
10451 * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
10452 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
10453 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
10454 * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
10455 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
10456
696e556e
UD
104572003-02-08 Ulrich Drepper <drepper@redhat.com>
10458
10459 * tst-cond2.c: Rearrange code to not rely on behavior undefined
10460 according to POSIX.
10461
10462 * tst-basic2.c (do_test): Lock mutex before creating the thread.
10463
fef710d6
UD
104642003-02-07 Ulrich Drepper <drepper@redhat.com>
10465
c6180643
UD
10466 * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
10467 (TLS_GET_FS): New #define.
10468 (TLS_SET_FS): New #define.
10469 Correct value of __NR_set_thread_area.
10470
fef710d6
UD
10471 * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
10472
11090a99
UD
104732003-02-06 Ulrich Drepper <drepper@redhat.com>
10474
65c68990
UD
10475 * Makefile (tests): Add tst-popen1.
10476 * tst-popen1.c: New file.
10477
11090a99
UD
10478 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
10479 but inactive generalization.
10480 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10481 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
10482 Minor optimization, remove one instruction.
10483 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
10484
a88c9263
UD
104852003-02-04 Martin Schwidefsky <schwidefsky@de.ibm.com>
10486
10487 * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
10488
104892003-01-31 Martin Schwidefsky <schwidefsky@de.ibm.com>
10490
10491 * init.c (__NR_set_tid_address): Add #ifdef for s390.
10492 * sysdeps/pthread/pthread_barrier_wait.c: New file.
10493 * sysdeps/pthread/pthread_cond_broadcast.c: New file.
10494 * sysdeps/pthread/pthread_cond_signal.c: New file.
10495 * sysdeps/pthread/pthread_cond_timedwait.c: New file.
10496 * sysdeps/pthread/pthread_cond_wait.c: New file.
10497 * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
10498 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
10499 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
10500 * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
10501 * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
10502 * sysdeps/s390/Makefile: New file.
10503 * sysdeps/s390/bits/atomic.h: New file.
10504 * sysdeps/s390/pthread_spin_init.c: New file.
10505 * sysdeps/s390/pthread_spin_lock.c: New file.
10506 * sysdeps/s390/pthread_spin_trylock.c: New file.
10507 * sysdeps/s390/pthread_spin_unlock.c: New file.
10508 * sysdeps/s390/pthreaddef.h: New file.
10509 * sysdeps/s390/tcb-offsets.sym: New file.
10510 * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
10511 * sysdeps/s390/tls.h: New file.
10512 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
10513 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
10514 * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
10515 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
10516 * sysdeps/unix/sysv/linux/s390/fork.c: New file.
10517 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
10518 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
10519 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
10520 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
10521 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
10522 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
10523 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
10524 * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
10525 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
10526 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
10527 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
10528 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
10529 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
10530 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
10531 * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
10532 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
10533 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
10534 * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
10535
6f1cff95
UD
105362003-02-04 Ulrich Drepper <drepper@redhat.com>
10537
ec609a8e
UD
10538 * atomic.h: Add a couple more default implementations.
10539 (atomic_compare_and_exchange_acq): Use
d45e8740
UD
10540 __arch_compare_and_exchange_32_acq in return value definition. It
10541 always exists.
10542 (atomic_bit_set): Renamed from atomic_set_bit.
0289bef9 10543 Add missing atomic_ prefixes.
e3ec8904 10544
6f1cff95
UD
10545 * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
10546 thread library is available, use correct value to mark initialized
10547 once variable.
10548
4f088329
UD
105492003-02-03 Ulrich Drepper <drepper@redhat.com>
10550
6f1cff95
UD
10551 * allocatestack.c (allocate_stack): Use __getpagesize instead of
10552 __sysconf to determine pagesize.
10553
3e4fc359 10554 * pthread_create.c: Include <atomic.h>.
4f088329
UD
10555 * allocatestack.c (allocate_stack): Implement coloring of the
10556 allocated stack memory. Rename pagesize to pagesize_m1. It's the
10557 size minus one. Adjust users.
3e4fc359 10558 * sysdeps/i386/i686/Makefile: New file.
4f088329 10559
2f42e8be
UD
105602003-02-02 Ulrich Drepper <drepper@redhat.com>
10561
4301f7e2
UD
10562 * allocatestack.c: Improve comment throughout the file.
10563
2f42e8be 10564 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
a37818b3 10565 (__lll_lock_wait): Add branch prediction.
2f42e8be
UD
10566 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
10567 (__lll_lock_wait): Likewise.
10568 (lll_unlock_wake_cb): Removed.
10569
4a7d6545
UD
105702003-01-31 Ulrich Drepper <drepper@redhat.com>
10571
10572 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
10573 _POSIX_THREAD_PRIORITY_SCHEDULING.
10574
886d5973
UD
105752003-01-30 Jakub Jelinek <jakub@redhat.com>
10576
10577 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
10578 Fix return type of ptr___pthread_getspecific.
10579
e474ca78
UD
105802003-01-29 Ulrich Drepper <drepper@redhat.com>
10581
10582 * Makefile (tests): Add tst-umask1.
10583 (tst-umask1-ARGS): Define.
10584 * tst-umask1.c: New file.
10585
e6ebd2e4
UD
105862003-01-28 Ulrich Drepper <drepper@redhat.com>
10587
6cf26f41
UD
10588 * Makefile (libpthread-routines): Remove lowlevelrwlock. Add
10589 pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
10590 pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
10591 pthread_rwlock_unlock.
10592 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
10593 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
10594 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
10595 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
10596 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10597 New file.
10598 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
10599 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10600 New file.
10601 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
10602 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
10603 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
10604 New file.
10605 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
10606 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
10607 New file.
10608 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
10609 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
10610 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
10611 New file.
10612 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
10613 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
10614 New file.
10615 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
10616
1d087a7e
UD
10617 * Makefile (libpthread-routines): Remove lowlevelcond and
10618 lowlevelsem. Add sem_wait, sem_trywait, sem_timedwait, sem_post,
10619 pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
10620 and pthread_cond_broadcast.
4a99d160
UD
10621 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
10622 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
10623 * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
10624 * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
10625 * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
10626 * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
10627 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
10628 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
10629 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
10630 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
10631 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
10632 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
10633 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
10634 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
10635 * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
10636 * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
10637 * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
10638 * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
10639 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
10640 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
10641 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
10642 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
10643 * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
10644 * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
10645 * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
10646 * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
10647 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
10648 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
10649 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
10650 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
10651 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
1d087a7e 10652
e6ebd2e4
UD
10653 * sysdeps/unix/sysv/linux/i386/createthread.c: Define
10654 PREPARE_CREATE and TLS_VALUE with x86-specific bits. All the rest
10655 of the code is moved to ...
10656 * sysdeps/pthread/createthread.c: ...here. New file.
10657
a15698cb
UD
106582003-01-27 Ulrich Drepper <drepper@redhat.com>
10659
0566b130
UD
10660 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
10661 (__new_sem_post): Clear %eax before returning.
10662 Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
10663
e6fb8846
UD
10664 * Makefile (tests): Add tst-cleanup2.
10665 * tst-cleanup2.c: New file.
10666
a15698cb
UD
10667 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
10668 Interpret first parameter correctly.
10669
8824b0a1
UD
106702003-01-17 Ulrich Drepper <drepper@redhat.com>
10671
10672 * Makefile (headers): Add bits/semaphore.h.
10673
850dcfca
UD
106742003-01-16 Jakub Jelinek <jakub@redhat.com>
10675
10676 * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
10677 if not SHARED.
10678
574b892e
UD
106792003-01-14 Ulrich Drepper <drepper@redhat.com>
10680
a8d87c92
UD
10681 * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
10682 must be used and mapping failed.
10683 Reported by Luke Elliott <luke.elliott@activfinancial.com>.
10684
574b892e
UD
10685 * Makefile (CFLAGS-pthread_self.os): Define this, not
10686 CFLAGS-pthread_self.c.
10687
fb48047a
UD
106882003-01-13 Ulrich Drepper <drepper@redhat.com>
10689
47805511
UD
10690 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
10691 lll_unlock_wake_cb.
10692
fb48047a
UD
10693 * Makefile (libpthread-routines): Add version. Add rules to build
10694 version.os and banner.h.
10695 * version.c: New file.
10696
115bb61d
UD
106972003-01-13 Jakub Jelinek <jakub@redhat.com>
10698
10699 * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
10700 the alias unconditional.
10701 * pthread_mutex_unlock.c (__pthread_mutex_unlock_internal): Likewise.
10702
107032003-01-13 Ulrich Drepper <drepper@redhat.com>
10704
10705 * Makefile (CFLAGS-pthread_self.c): New definition.
10706
6aca81bb
UD
107072003-01-06 Jakub Jelinek <jakub@redhat.com>
10708
10709 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
10710 INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
10711 * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
10712 * init.c (__pthread_initialize_minimal_internal): Likewise.
10713
e9c7764e
UD
107142003-01-07 Jakub Jelinek <jakub@redhat.com>
10715
b5facfda
UD
10716 * pthreadP.h (__pthread_cond_timedwait): Add prototype.
10717
e9c7764e
UD
10718 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
10719 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
10720 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
10721 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
10722 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
10723 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
10724
bef1e42f
UD
107252003-01-06 Jakub Jelinek <jakub@redhat.com>
10726
10727 * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
10728 * pt-system.c (LIBC_CANCEL_HANDLED): Add.
10729 * tst-cancel-wrappers.sh: Remove all exceptions.
10730
bbd17455
UD
107312003-01-05 Ulrich Drepper <drepper@redhat.com>
10732
a73ab6df
UD
10733 * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
10734 features. Reported by Marijn Ros <marijn@mad.scientist.com>.
10735
bbd17455
UD
10736 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
10737 Use __libc_pthread_functions array if SHARED.
10738
10739 * pthreadP.h: Move pthread_cond_2_0_t definition to...
10740 * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
10741
10742 * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
10743 (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
10744 __libc_key_create, __libc_getspecific, __libc_setspecific): Use
10745 __libc_ptf_call instead of __libc_maybe_call.
10746 (PTF): New #define.
10747 (__libc_cleanup_region_start): Wrap function name with PTF call.
10748 (__libc_cleanup_region_end): Likewise.
10749 (__libc_cleanup_end): Likewise.
10750
10751 * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
10752 * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
10753 * pthread_key_create.c: Add __pthread_key_create_internal alias.
10754 * pthreadP.h: Add prototypes.
10755
10756 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
10757 __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
10758 __pthread_rwlock_unlock aliases.
10759 * pthreadP.h: Add prototypes for new aliases.
10760
10761 * pthreadP.h (struct pthead_functions): Moved to...
10762 * sysdeps/pthread/pthread-functions.h: ...here. New file.
10763 * init.c (pthread_functions): Add initializers for new elements.
10764
10765 * cleanup_defer.c: Add __pthread_cleanup_push_defer and
10766 __pthread_cleanup_pop_restore aliases.
10767 * pthreadP.h: Add prototypes.
10768
10769 * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
10770 and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
10771 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
10772 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
10773 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
10774 * pthreadP.h: Adjust prototypes and callers.
10775
d27a78be
UD
107762003-01-04 Ulrich Drepper <drepper@redhat.com>
10777
b74121ae
UD
10778 * Makefile (tests): Add tst-cancel7.
10779 (tst-cancel7-ARGS): New variable.
bbd17455 10780 * tst-cancel7.c: New file.
b74121ae 10781
29bc410c
UD
10782 * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
10783 around gcc defficiencies.
10784 * old_pthread_cond_signal.c: Likewise.
10785 * old_pthread_cond_timedwait.c: Likewise.
10786 * old_pthread_cond_wait.c: Likewise.
10787
d27a78be
UD
10788 * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
10789
733f25e6
UD
107902003-01-03 Ulrich Drepper <drepper@redhat.com>
10791
7edb2ae3
UD
10792 * Makefile (tests): Add tst-cond7.
10793 * tst-cond7.c: New file.
10794
b1151300
UD
10795 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
10796 (condvar_cleanup): Get condvar address from the right place.
10797
733f25e6
UD
10798 * atomic.h: Correct definitions of atomic_full_barrier,
10799 atomic_read_barrier, atomic_write_barrier.
10800
10801 * old_pthread_cond_broadcast.c: Make memory allocate and initialization
10802 race-free.
10803 * old_pthread_cond_signal.c: Likewise.
10804 * old_pthread_cond_timedwait.c: Likewise.
10805 * old_pthread_cond_wait.c: Likewise.
10806
686b7223
UD
108072003-01-03 Jakub Jelinek <jakub@redhat.com>
10808
10809 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
10810
0e07706e
UD
108112003-01-03 Ulrich Drepper <drepper@redhat.com>
10812
997256dd
UD
10813 * pthreadP.h (pthread_cond_2_0_t): New type.
10814 (struct pthread_functions): Use new type for 2.0 condvar callbacks.
10815 Use new type for the 2.0 condvar function prototypes.
10816 * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
10817 * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
10818 parameter.
10819 * old_pthread_cond_destroy.c: Likewise.
10820 * old_pthread_cond_broadcast.c: Likewise. Lock appropriately.
10821 * old_pthread_cond_signal.c: Likewise.
10822 * old_pthread_cond_timedwait.c: Likewise.
10823 * old_pthread_cond_wait.c: Likewise.
10824
842d2817
UD
10825 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
10826 (__pthread_cond_wait): Don't save cancellation mode and seq value
10827 in same location.
10828
0e07706e
UD
10829 * herrno.c (__h_errno_location): Don't define as weak.
10830
bf293afe
UD
108312003-01-02 Jakub Jelinek <jakub@redhat.com>
10832
10833 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
10834 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
10835 and pthread_cond_wait.
10836 * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
10837 Renamed to...
10838 (__pthread_cond_broadcast_2_0): ... this.
10839 * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
10840 Renamed to...
10841 (__pthread_cond_destroy_2_0): ... this.
10842 * old_pthread_cond_init.c (__old_pthread_cond_init):
10843 Renamed to...
10844 (__pthread_cond_init_2_0): ... this.
10845 * old_pthread_cond_signal.c (__old_pthread_cond_signal):
10846 Renamed to...
10847 (__pthread_cond_signal_2_0): ... this.
10848 * old_pthread_cond_wait.c (__old_pthread_cond_wait):
10849 Renamed to...
10850 (__pthread_cond_wait_2_0): ... this.
10851 * pthread_cond_destroy.c: Include shlib-compat.h.
10852 (pthread_cond_destroy): Change strong_alias into versioned_symbol.
10853 * pthread_cond_init.c: Include shlib-compat.h.
10854 (pthread_cond_init): Change strong_alias into versioned_symbol.
10855 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
10856 fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
10857 fields.
10858 (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
10859 __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
10860 __pthread_cond_wait_2_0): New prototypes.
10861 (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
10862 __old_pthread_cond_init, __old_pthread_cond_signal,
10863 __old_pthread_cond_wait): Removed.
10864 * init.c: Include shlib-compat.h.
10865 (pthread_functions): Guard ptr___pthread_attr_init_2_0
10866 initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
10867 Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
10868 ptr___pthread_cond_*_2_0 fields.
10869 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
10870 pthread_cond_*@GLIBC_2.0 compatibility symbols.
10871
10872 * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
10873 LIBC_SIGACTION was not yet defined.
10874 [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
10875 [!defined LIBC_SIGACTION] (__sigaction): New function and
10876 libc_hidden_weak.
10877 [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
10878 [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
10879
108802003-01-02 Jakub Jelinek <jakub@redhat.com>
10881
10882 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
10883
05df18c3
UD
108842003-01-02 Ulrich Drepper <drepper@redhat.com>
10885
10886 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
10887 New, larger type definition.
10888 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
10889 implementation.
10890 * Versions [libpthread]: Add definitions for new pthread_cond_*
10891 interfaces for version GLIBC_2.3.2.
10892 * pthread_cond_init.c: Update initialization for new type definition.
10893 * Makefile (libpthread-routines): Remove pthread_cond_wait,
10894 pthread_cond_timedwait, pthread_cond_signal, and
10895 pthread_cond_broadcast. Add old_pthread_cond_init,
10896 old_pthread_cond_destroy, old_pthread_cond_wait,
10897 old_pthread_cond_timedwait, old_pthread_cond_signal, and
10898 old_pthread_cond_broadcast.
10899 * old_pthread_cond_broadcast.c: New file.
10900 * old_pthread_cond_destroy.c: New file.
10901 * old_pthread_cond_init.c: New file.
10902 * old_pthread_cond_signal.c: New file.
10903 * old_pthread_cond_timedwait.c: New file.
10904 * old_pthread_cond_wait.c: New file.
10905 * pthreadP.h: Add prototypes for the compatibility interfaces.
10906
10907 * pthread_cond_destroy.c: Don't include <errno.h>.
10908
fd8979e4
UD
109092003-01-01 Ulrich Drepper <drepper@redhat.com>
10910
10911 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
10912 unnecessary zero offset when addressing MUTEX.
10913
6d6ee629
UD
109142002-12-31 Ulrich Drepper <drepper@redhat.com>
10915
10916 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
10917 __register_atfork.
10918 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
10919 for __register_atfork.
10920
a4baf360
UD
109212002-12-31 Jakub Jelinek <jakub@redhat.com>
10922
10923 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
10924 instead of ASSEMBLER test macro.
10925
10926 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
10927 __libc_current_sigrtmax): Add libc_hidden_def.
10928
10929 * sysdeps/pthread/list.h: Remove assert.h include.
10930
e9395a94
UD
109312002-12-31 Ulrich Drepper <drepper@redhat.com>
10932
10933 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
10934 __pthread_initialize_minimal_internal not
10935 __pthread_initialize_minimal.
10936
89d6e444
UD
109372002-12-30 Ulrich Drepper <drepper@redhat.com>
10938
416d2de6
UD
10939 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
10940 __pthread_initialize_minimal as hidden.
10941
89d6e444
UD
10942 * init.c (__pthread_initialize_minimal_internal): Don't mark as
10943 constructor.
10944
109452002-12-31 Jakub Jelinek <jakub@redhat.com>
10946
10947 * Makefile ($(inst_libdir)/libpthread.so): Depend on
10948 $(common-objpfx)format.lds, include that into the output script.
10949 Fix comment.
10950 (extra-B-pthread.so): Change linuxthreads/ into nptl/.
10951
8cac677c
UD
109522002-12-28 Andreas Jaeger <aj@suse.de>
10953
10954 * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
10955 nsec resolution changes.
10956 (xstat64_conv): Likewise.
10957 (xstat32_conv): Likewise.
10958 * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
10959 struct kernel_stat.
10960 * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
10961 structs stat and stat64.
10962 * time/time.h (__timespec_defined): Define for __USE_MISC.
89d6e444 10963 * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
8cac677c 10964
49e9f864
UD
109652002-12-30 Jakub Jelinek <jakub@redhat.com>
10966
10967 * forward.c (FORWARD2): Renamed from FORWARD3. Remove unused export
10968 argument.
10969 (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
10970 (pthread_exit): Use strong_alias to avoid warnings.
10971 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
10972 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
10973 ptr___pthread_attr_init_2_*.
10974 * init.c (pthread_functions): Adjust.
10975
bab09b26
UD
109762002-12-29 Ulrich Drepper <drepper@redhat.com>
10977
598d7a42
UD
10978 * forward.c: Make all functions available by default again. It
10979 caused too much trouble.
10980
bab09b26
UD
10981 * pt-siglongjmp.c: Removed.
10982
3b7ed871
UD
109832002-12-28 Jakub Jelinek <jakub@redhat.com>
10984
10985 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
10986 (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
10987 * sysdeps/i386/Makefile: New file.
10988 * sysdeps/i386/tcb-offsets.sym: New file.
10989 * sysdeps/pthread/tcb-offsets.h: New file.
10990 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
10991 Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
10992
10993 * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
10994 __register_atfork...
10995 (GLIBC_2.3.2): ...here.
10996
109972002-12-28 Ulrich Drepper <drepper@redhat.com>
10998
10999 * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
11000 pthread_attr_setstackaddr with __attribute_deprecated__.
11001
270d9d47
UD
110022002-12-27 Jakub Jelinek <jakub@redhat.com>
11003
11004 * pt-system.c (system): Remove cancellation handling.
11005 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
11006 cancellation routines.
11007
131fd126
UD
110082002-12-28 Ulrich Drepper <drepper@redhat.com>
11009
afb2e954
UD
11010 * descr.h: Include <dl-sysdep.h>.
11011 (struct pthread): Move header.data.list to the back of the struct.
131fd126
UD
11012 * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
11013 (MULTIPLE_THREADS_OFFSET): Adjust offset.
11014 (SYSINFO_OFFSEET): Likewise.
11015
110162002-12-27 Jakub Jelinek <jakub@redhat.com>
11017
11018 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
11019 Define.
11020 (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
11021 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
11022 DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
11023 (USE_DL_SYSINFO): Undef.
11024
110252002-12-22 Jakub Jelinek <jakub@redhat.com>
11026
11027 * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
11028 $(common-objpfx)libc.so.
11029 * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
11030 it is bigger than pipe buffer size even on arches with bigger
11031 page size.
11032 (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
11033
a218c9cf
UD
110342002-12-25 Ulrich Drepper <drepper@redhat.com>
11035
11036 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
11037 correct errno access for case that USE___THREAD is not defined.
11038
015a2dc9
UD
110392002-12-24 Ulrich Drepper <drepper@redhat.com>
11040
11041 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
11042 Patch by Marijn Ros <marijn@mad.scientist.com>.
11043
5220f9ac
RM
110442002-12-22 Roland McGrath <roland@redhat.com>
11045
11046 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
11047
1561bf63
UD
110482002-12-20 Ulrich Drepper <drepper@redhat.com>
11049
11050 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
11051
3325198e
UD
110522002-12-19 Ulrich Drepper <drepper@redhat.com>
11053
057c823f
UD
11054 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
11055 NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
11056 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
11057
097eca29
UD
11058 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
11059 of int $0x80.
11060 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
11061 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
11062 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
11063 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
11064 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
11065 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
11066 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
11067 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
11068
11069 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
11070 sysenter.
11071 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
11072
11073 * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
11074
5f5843e3
UD
11075 * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
11076 in new TCB.
11077 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
11078 that sysinfo is properly initialized.
11079 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
11080 to 1 only for ld.so.
11081
3325198e
UD
11082 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
11083 RTLD_CORRECT_DYNAMIC_WEAK.
11084
74e8f2dc
UD
110852002-12-19 Jakub Jelinek <jakub@redhat.com>
11086
11087 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
11088 Use return 0 as 6th argument to FORWARD4.
11089 * pthread_equal.c: Include pthreadP.h instead of pthread.h.
11090
df45b31e
UD
110912002-12-18 Ulrich Drepper <drepper@redhat.com>
11092
11093 * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
11094 * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
11095 Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
11096 (INIT_SYSINFO): New #define.
11097 (TLS_TP_INIT): Use INIT_SYSINFO.
11098 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
11099 At test to make sure SYSINFO_OFFSET value is correct.
11100 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
11101
3d539579
UD
111022002-12-18 Jakub Jelinek <jakub@redhat.com>
11103
11104 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
11105 * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
11106 * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
11107 [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
11108 __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
11109 __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
11110 __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
11111
d7913e0e
UD
111122002-12-18 Ulrich Drepper <drepper@redhat.com>
11113
f051627f
UD
11114 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
11115 macro instead of using int $0x80 directly.
11116
d7913e0e
UD
11117 * sysdeps/pthread/bits/stdio-lock.h: New file.
11118 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
11119 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
11120 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
11121 * Makefile (routines): Add libc-lowlevelmutex.
11122
11123 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
11124 __i686.get_pc_thunk.dx.
11125
f077a4a9
UD
111262002-12-17 Jakub Jelinek <jakub@redhat.com>
11127
11128 * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
11129 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
11130 ($(objpfx)tst-cancel-wrappers.out): New rule.
11131 * tst-cancel-wrappers.sh: New test.
11132 * tst-locale1.c: Include signal.h.
11133 (uselocale): Test static linking of __libc_current_sigrt*.
11134
111352002-12-17 Ulrich Drepper <drepper@redhat.com>
11136
11137 * Makefile (tests): Add tst-cancel6.
11138 * tst-cancel6.c: New file
11139
bd499a3b
UD
111402002-12-17 Jakub Jelinek <jakub@redhat.com>
11141
11142 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
11143 Define meaningfully for assembler as well.
11144 * pthreadP.h (struct pthread_functions): Remove
11145 ptr_pthread_attr_init field. Add ptr_pthread_attr_init_2_0
11146 and ptr_pthread_attr_init_2_1 fields.
11147 * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
11148 and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
11149 * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
11150 (FORWARD3): Define using FORWARD4.
11151 (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
11152 versions.
11153 * pt-system.c: Remove duplicate stdlib.h include.
11154
0a1063f4
UD
111552002-12-16 Ulrich Drepper <drepper@redhat.com>
11156
87d60668
UD
11157 * sem_init.c: Define sem_init@GLIBC_2.0.
11158 * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
11159 * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
11160
0a1063f4
UD
11161 * flockfile.c: Moved to...
11162 * sysdeps/pthread/flockfile.c: ...here. New file.
11163 * funlockfile.c: Moved to...
11164 * sysdeps/pthread/funlockfile.c: ...here. New file.
11165 * ftrylockfile.c: Moved to...
11166 * sysdeps/pthread/ftrylockfile.c: ...here. New file.
11167
9634cf9d
UD
111682002-12-16 Jakub Jelinek <jakub@redhat.com>
11169
11170 * libc-cancellation.c: Guard both function with
11171 #if !defined NOT_IN_libc.
11172 * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
11173 automatically provided pthread wrappers.
11174 * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
11175 CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
11176 nor in libpthread.
11177 * pt-open.c: Removed.
11178 * pt-fcntl.c: Removed.
11179 * pt-fsync.c: Removed.
11180 * pt-lseek.c: Removed.
11181 * pt-msgrcv.c: Removed.
11182 * pt-msgsnd.c: Removed.
11183 * pt-msync.c: Removed.
11184 * pt-nanosleep.c: Removed.
11185 * pt-open64.c: Removed.
11186 * pt-pause.c: Removed.
11187 * pt-pread.c: Removed.
11188 * pt-pread64.c: Removed.
11189 * pt-pwrite.c: Removed.
11190 * pt-pwrite64.c: Removed.
11191 * pt-read.c: Removed.
11192 * pt-recv.c: Removed.
11193 * pt-recvfrom.c: Removed.
11194 * pt-recvmsg.c: Removed.
11195 * pt-send.c: Removed.
11196 * pt-sendto.c: Removed.
11197 * pt-sigtimedwait.c: Removed.
11198 * pt-sigwait.c: Removed.
11199 * pt-wait.c: Removed.
11200 * pt-waitpid.c: Removed.
11201 * pt-write.c: Removed.
11202 * pt-accept.c: Removed.
11203 * pt-close.c: Removed.
11204 * pt-connect.c: Removed.
11205 * pt-lseek64.c: Removed.
11206 * pt-sendmsg.c: Removed.
11207 * pt-tcdrain.c: Removed.
11208
6ee8d334
UD
112092002-12-15 Ulrich Drepper <drepper@redhat.com>
11210
81fa9371
UD
11211 * init.c (__pthread_initialize_minimal_internal): Renamed from
11212 __pthread_initialize_minimal. Make old name an alias. This
11213 converts a normal relocation into a relative relocation.
11214
f3015aa5
UD
11215 * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
11216
4cbc1950
UD
11217 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
11218 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
11219 * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
11220 pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
11221 pt-sigwaitinfo, pt-waitid, and pt-writev.
11222 * pt-creat.c: Removed.
11223 * pt-poll.c: Removed.
11224 * pt-pselect.c: Removed.
11225 * pt-readv.c: Removed.
11226 * pt-select.c: Removed.
11227 * pt-sigpause.c: Removed.
11228 * pt-sigsuspend.c: Removed.
11229 * pt-sigwaitinfo.c: Removed.
11230 * pt-waitid.c: Removed.
11231 * pt-writev.c: Removed.
11232
8454830b
UD
11233 * init.c (pthread_functions): New variable.
11234 (__pthread_initialize_minimal): Pass pointer to pthread_functions
11235 (or NULL) to __libc_pthread_init.
11236 * forward.c: Rewrite to use __libc:pthread_functions array to get
11237 function addresses.
11238 * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
11239 prototype.
11240 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
11241 Take new parameter. Copy content of variable pointed to by it
11242 to __libc_pthread_init.
11243
11244 * pthreadP.h (struct pthread_functions): New type.
11245 (__libc_pthread_init): Declare.
11246
11247 * pthread_attr_destroy.c: Add namespace protected alias.
11248 * pthread_attr_getdetachstate.c: Likewise.
11249 * pthread_attr_getinheritsched.c: Likewise.
11250 * pthread_attr_getschedparam.c: Likewise.
11251 * pthread_attr_getschedpolicy.c: Likewise.
11252 * pthread_attr_getscope.c: Likewise.
11253 * pthread_attr_setdetachstate.c: Likewise.
11254 * pthread_attr_setinheritsched.c: Likewise.
11255 * pthread_attr_setschedparam.c: Likewise.
11256 * pthread_attr_setschedpolicy.c: Likewise.
11257 * pthread_attr_setscope.c: Likewise.
11258 * pthread_cond_broadcast.c: Likewise.
11259 * pthread_cond_destroy.c: Likewise.
11260 * pthread_cond_init.c: Likewise.
11261 * pthread_cond_signal.c: Likewise.
11262 * pthread_cond_wait.c: Likewise.
11263 * pthread_condattr_destroy.c: Likewise.
11264 * pthread_condattr_init.c: Likewise.
11265 * pthread_equal.c: Likewise.
11266 * pthread_exit.c: Likewise.
11267 * pthread_getschedparam.c: Likewise.
11268 * pthread_self.c: Likewise.
11269 * pthread_setcancelstate.c: Likewise.
11270 * pthread_setschedparam.c: Likewise.
11271 * pthread_mutex_destroy.c: Likewise.
11272 * pthread_mutex_init.c: Likewise.
11273 * pthreadP.h: Add prototypes for the aliases.
11274
0d5f4929
UD
11275 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
11276 multiple_threads member in correct TCB to 1.
11277
6ee8d334
UD
11278 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
11279 SINGLE_THREAD_P. If in libc or libpthread examine multiple_thread
11280 member of thread decriptor, otherwise return unconditionally 1.
11281
2fb6444d
UD
112822002-12-14 Ulrich Drepper <drepper@redhat.com>
11283
11284 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
11285 regular Linux version. Remove file.
11286 * sysdeps/unix/sysv/linux/connect.S: Likewise. Remove file.
11287 * sysdeps/unix/sysv/linux/llseek.c: Likewise. Remove file.
11288 * sysdeps/unix/sysv/linux/msgrcv.c: Likewise. Remove file.
11289 * sysdeps/unix/sysv/linux/msgsnd.c: Likewise. Remove file.
11290 * sysdeps/unix/sysv/linux/open64.c: Likewise. Remove file.
11291 * sysdeps/unix/sysv/linux/poll.c: Likewise. Remove file.
11292 * sysdeps/unix/sysv/linux/pread.c: Likewise. Remove file.
11293 * sysdeps/unix/sysv/linux/pread64.c: Likewise. Remove file.
11294 * sysdeps/unix/sysv/linux/pselect.c: Likewise. Remove file.
11295 * sysdeps/unix/sysv/linux/pwrite.c: Likewise. Remove file.
11296 * sysdeps/unix/sysv/linux/pwrite64.c: Likewise. Remove file.
11297 * sysdeps/unix/sysv/linux/readv.c: Likewise. Remove file.
11298 * sysdeps/unix/sysv/linux/recv.S: Likewise. Remove file.
11299 * sysdeps/unix/sysv/linux/recvfrom.S: Likewise. Remove file.
11300 * sysdeps/unix/sysv/linux/recvmsg.S: Likewise. Remove file.
11301 * sysdeps/unix/sysv/linux/send.S: Likewise. Remove file.
11302 * sysdeps/unix/sysv/linux/sendmsg.S: Likewise. Remove file.
11303 * sysdeps/unix/sysv/linux/sendto.S: Likewise. Remove file.
11304 * sysdeps/unix/sysv/linux/sigpause.c: Likewise. Remove file.
11305 * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise. Remove file.
11306 * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise. Remove file.
11307 * sysdeps/unix/sysv/linux/sigwait.c: Likewise. Remove file.
11308 * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise. Remove file.
11309 * sysdeps/unix/sysv/linux/system.c: Likewise. Remove file.
11310 * sysdeps/unix/sysv/linux/tcdrain.c: Likewise. Remove file.
11311 * sysdeps/unix/sysv/linux/wait.c: Likewise. Remove file.
11312 * sysdeps/unix/sysv/linux/waitid.c: Likewise. Remove file.
11313 * sysdeps/unix/sysv/linux/waitpid.c: Likewise. Remove file.
11314 * sysdeps/unix/sysv/linux/writev.c: Likewise. Remove file.
11315 * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise. Remove file.
11316
86b2dc40
UD
113172002-12-14 Jakub Jelinek <jakub@redhat.com>
11318
11319 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
11320 * sysdeps/unix/sysv/linux/open.c: Removed.
11321 * sysdeps/unix/sysv/linux/fsync.c: Removed.
11322 * sysdeps/unix/sysv/linux/lseek.c: Removed.
11323 * sysdeps/unix/sysv/linux/msync.c: Removed.
11324 * sysdeps/unix/sysv/linux/read.c: Removed.
11325 * sysdeps/unix/sysv/linux/close.c: Removed.
11326 * sysdeps/unix/sysv/linux/creat.c: Removed.
11327 * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
11328 * sysdeps/unix/sysv/linux/pause.c: Removed.
11329 * sysdeps/unix/sysv/linux/select.c: Removed.
11330 * sysdeps/unix/sysv/linux/write.c: Removed.
11331
9d263d72
UD
113322002-12-14 Ulrich Drepper <drepper@redhat.com>
11333
11334 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
11335 element in TCB to see whether locking is needed.
11336
11337 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
11338 MULTIPLE_THREADS_OFFSET value is correct.
11339
11340 * sysdeps/unix/sysv/linux/close.c: New file.
11341 * sysdeps/unix/sysv/linux/connect.S: New file.
11342 * sysdeps/unix/sysv/linux/creat.c: New file.
11343 * sysdeps/unix/sysv/linux/fsync.c: New file.
11344 * sysdeps/unix/sysv/linux/llseek.c: New file.
11345 * sysdeps/unix/sysv/linux/lseek.c: New file.
11346 * sysdeps/unix/sysv/linux/msgrcv.c: New file.
11347 * sysdeps/unix/sysv/linux/msgsnd.c: New file.
11348 * sysdeps/unix/sysv/linux/msync.c: New file.
11349 * sysdeps/unix/sysv/linux/nanosleep.c: New file.
11350 * sysdeps/unix/sysv/linux/open.c: New file.
11351 * sysdeps/unix/sysv/linux/open64.c: New file.
11352 * sysdeps/unix/sysv/linux/pause.c: New file.
11353 * sysdeps/unix/sysv/linux/poll.c: New file.
11354 * sysdeps/unix/sysv/linux/pread.c: New file.
11355 * sysdeps/unix/sysv/linux/pread64.c: New file.
11356 * sysdeps/unix/sysv/linux/pselect.c: New file.
11357 * sysdeps/unix/sysv/linux/pwrite.c: New file.
11358 * sysdeps/unix/sysv/linux/pwrite64.c: New file.
11359 * sysdeps/unix/sysv/linux/readv.c: New file.
11360 * sysdeps/unix/sysv/linux/recv.S: New file.
11361 * sysdeps/unix/sysv/linux/recvfrom.S: New file.
11362 * sysdeps/unix/sysv/linux/recvmsg.S: New file.
11363 * sysdeps/unix/sysv/linux/select.c: New file.
11364 * sysdeps/unix/sysv/linux/send.S: New file.
11365 * sysdeps/unix/sysv/linux/sendmsg.S: New file.
11366 * sysdeps/unix/sysv/linux/sendto.S: New file.
11367 * sysdeps/unix/sysv/linux/sigpause.c: New file.
11368 * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
11369 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
11370 * sysdeps/unix/sysv/linux/sigwait.c: New file.
11371 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
11372 * sysdeps/unix/sysv/linux/system.c: New file.
11373 * sysdeps/unix/sysv/linux/tcdrain.c: New file.
11374 * sysdeps/unix/sysv/linux/wait.c: New file.
11375 * sysdeps/unix/sysv/linux/waitid.c: New file.
11376 * sysdeps/unix/sysv/linux/waitpid.c: New file.
11377 * sysdeps/unix/sysv/linux/writev.c: New file.
11378 * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
11379
11380 * pt-readv.c: Fix comment.
11381
113822002-12-14 Jakub Jelinek <jakub@redhat.com>
11383
11384 * tst-cleanup1.c: Include stdlib.h.
11385
11386 * tst-cancel5.c: New test.
11387 * Makefile (tests): Add tst-cancel5.
11388 (tst-cancel5): Link against libc.so libpthread.so in that order.
11389
9ae0909b
UD
113902002-12-13 Ulrich Drepper <drepper@redhat.com>
11391
b7bdd9c4
UD
11392 * forward.c (test_loaded): Prevent recursive calls.
11393
9ae0909b
UD
11394 * Makefile (routines): Add libc-cancellation.
11395 * libc-cancellation.c: New file.
11396 * descr.h (struct pthread): Add multiple_threads field.
11397 * allocatestack.c (allocate_stack): Initialize multiple_header field of
11398 new thread descriptor to 1.
11399 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
11400 Initialize multiple_thread field after successful thread creation.
11401 * cancellation.c (__do_cancel): Move to pthreadP.h.
11402 (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
11403 (__pthread_disable_asynccancel): Add internal_function attribute.
11404 * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
11405 * pthread_setcancelstate.c: Likewise.
11406 * pthread_setcanceltype.c: Likewise.
11407 * pthread_exit.c: Likewise.
11408 * pthreadP.h (CANCELLATION_P): Likewise.
11409 (__do_cancel): Define as static inline.
11410 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
11411 (__libc_enable_asynccancel, __libc_disable_asynccancel): New
11412 declarations.
11413 * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
11414 fields. Define MULTIPLE_THREADS_OFFSET.
11415 * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
11416 declaration.
11417 * sysdeps/unix/sysv/linux/accept.S: New file.
11418 * sysdeps/unix/sysv/linux/read.c: New file.
11419 * sysdeps/unix/sysv/linux/write.c: New file.
11420 * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
11421 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
11422 initialization of __libc_locking_needed.
11423 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
11424 __libc_locking_needed, use multiple_threads field in TCB.
11425 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
11426
22f20674
UD
114272002-12-12 Ulrich Drepper <drepper@redhat.com>
11428
2ad2e1e7
UD
11429 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
11430 version.
11431 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
11432
22f20674
UD
11433 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
11434 access to __libc_locking_needed for PIC.
11435
aa80bf86
UD
114362002-12-12 Jakub Jelinek <jakub@redhat.com>
11437
11438 * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
11439 declare for libc.so.
11440 (__libc_lock_init, __libc_lock_init_recursive): Change into comma
11441 expression.
11442 (__libc_lock_lock): Put into statement expression.
11443 (__libc_lock_unlock): Remove trailing semicolon.
11444 * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
11445
24021373
RM
114462002-12-12 Roland McGrath <roland@redhat.com>
11447
11448 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
11449 "m" constraint to refer to __libc_locking_needed. Declare it here.
11450
14e7aece
UD
114512002-12-12 Ulrich Drepper <drepper@redhat.com>
11452
11453 * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
11454 * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
11455 Initialize __libc_locking_needed.
11456 * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
11457 instead of __register_pthread_fork_handler.
11458 * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
11459 * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
11460 fork-gen with libc_pthread_init.
11461 * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
11462 of __register_pthread_fork_handler.
11463 * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
11464 of __register_pthread_fork_handler.
11465 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
11466 __libc_locking_needed to determine whether lock prefix can be avoided.
11467 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
11468
85631c8e
UD
114692002-12-11 Ulrich Drepper <drepper@redhat.com>
11470
da63009e
UD
11471 * Makefile (tests): Add tst-cleanup1.
11472 * tst-cleanup1.c: New file.
11473 * cancellation.c (__cleanup_thread): Removed.
11474 (__do_cancel): Remove call to __cleanup_thread.
11475 * pthreadP.h: Remove __cleanup_thread prorotype.
11476
000160a2
UD
11477 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
11478 Remember function and argument even if cancellation handler
11479 function is not available.
11480 (__libc_cleanup_region_end): Execute registered function directly if
11481 pthread functions are not available.
11482 (__libc_cleanup_end): Likewise.
11483
85631c8e
UD
11484 * init.c (__pthread_initialize_minimal): Fix initialization in
11485 static lib by preventing gcc from being too clever.
11486
dce8f2b6
UD
114872002-12-10 Ulrich Drepper <drepper@redhat.com>
11488
34a075be
UD
11489 * init.c (__pthread_initialize_minimal): Remove unneccesary
11490 sigaddset call.
11491
dce8f2b6
UD
11492 * Makefile (tests): We can run tst-locale2 now.
11493
e5e45b53
UD
114942002-12-09 Ulrich Drepper <drepper@redhat.com>
11495
11496 * Versions: Remove duplicated sigwait entry.
11497
bdb04f92
UD
114982002-12-08 Ulrich Drepper <drepper@redhat.com>
11499
1e506629
UD
11500 * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
11501 inside libpthread.
11502
a3957dd5
UD
11503 * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
11504
bdb04f92
UD
11505 * pthreadP.h: Declare __pthread_enable_asynccancel and
11506 __pthread_disable_asynccancel.
11507 (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
11508 (CANCEL_RESET): Use __pthread_disable_asynccancel.
11509 * cancellation.c (__pthread_enable_asynccancel): New function.
11510 (__pthread_disable_asynccancel): New function.
11511 * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
11512 * pt-close.c: Likewise.
11513 * pt-connect.c: Likewise.
11514 * pt-creat.c: Likewise.
11515 * pt-fcntl.c: Likewise.
11516 * pt-fsync.c: Likewise.
11517 * pt-lseek.c: Likewise.
11518 * pt-lseek64.c: Likewise.
11519 * pt-msgrcv.c: Likewise.
11520 * pt-msgsnd.c: Likewise.
11521 * pt-msync.c: Likewise.
11522 * pt-nanosleep.c: Likewise.
11523 * pt-open.c: Likewise.
11524 * pt-open64.c: Likewise.
11525 * pt-pause.c: Likewise.
11526 * pt-poll.c: Likewise.
11527 * pt-pread.c: Likewise.
11528 * pt-pread64.c: Likewise.
11529 * pt-pselect.c: Likewise.
11530 * pt-pwrite.c: Likewise.
11531 * pt-pwrite64.c: Likewise.
11532 * pt-read.c: Likewise.
11533 * pt-readv.c: Likewise.
11534 * pt-recv.c: Likewise.
11535 * pt-recvfrom.c: Likewise.
11536 * pt-recvmsg.c: Likewise.
11537 * pt-select.c: Likewise.
11538 * pt-send.c: Likewise.
11539 * pt-sendmsg.c: Likewise.
11540 * pt-sendto.c: Likewise.
11541 * pt-sigpause.c: Likewise.
11542 * pt-sigsuspend.c: Likewise.
11543 * pt-sigtimedwait.c: Likewise.
11544 * pt-sigwait.c: Likewise.
11545 * pt-sigwaitinfo.c: Likewise.
11546 * pt-system.c: Likewise.
11547 * pt-tcdrain.c: Likewise.
11548 * pt-wait.c: Likewise.
11549 * pt-waitid.c: Likewise.
11550 * pt-waitpid.c: Likewise.
11551 * pt-write.c: Likewise.
11552 * pt-writev.c: Likewise.
a3957dd5
UD
11553 * pthread_join.c: Likewise.
11554 * pthread_timedjoin.c: Likewise.
bdb04f92
UD
11555
11556 * pt-sigpause.c (sigsuspend): Call __sigsuspend.
11557 (__xpg_sigpause): New function.
11558 * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
11559
6ccb3834
UD
115602002-12-07 Ulrich Drepper <drepper@redhat.com>
11561
09efc3ba
UD
11562 * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
11563
11564 * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
11565 _GI_pthread_cleanup_pop to pthreadP.h.
11566
11567 * ftrylockfile.c: Use _IO_lock_trylock instead of
11568 pthread_mutex_trylock.
11569
11570 * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
11571 (CANCEL_RESET): Likewise.
11572 (__pthread_setcanceltype_): Declare.
11573 (__pthread_mutex_lock_internal): Declare.
11574 (__pthread_mutex_unlock_internal): Declare.
11575 (__pthread_once_internal): Declare.
11576 (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
11577 (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
11578
11579 * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
11580 and pthread_mutex_unlock.
11581 * pthread_cond_wait.c: Likewise.
11582 * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
11583 * pthread_mutex_unlock.c: Likewise.
11584
11585 * pthread_setcanceltype.c: Add additional alias
11586 __pthread_setcanceltype.
11587
11588 * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
11589 * sem_open.c (sem_open): Likewise.
11590 Use __libc_open, __libc_write, and __libc_close instead of
11591 open, write, and close respectively.
11592
11593 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
11594 Rewrite as statement expression since it must return a value.
11595
11596 * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
11597 * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
11598 __pthread_kill.
11599
11600 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
11601 alias __pthread_once_internal.
11602
6ccb3834
UD
11603 * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
11604
d3c9f895
UD
116052002-12-06 Ulrich Drepper <drepper@redhat.com>
11606
4614167a
UD
11607 * Makefile (tests): Add tst-stdio1 and tst-stdio2.
11608 * tst-stdio1.c: New file.
11609 * tst-stdio2.c: New file.
11610
a4548cea
UD
11611 * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
11612
d3c9f895
UD
11613 * Makefile (tests): Comment out tst-locale2 for now.
11614 (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
11615
11616 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
11617 -D_IO_MTSAFE_IO.
11618 * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
11619 Use _IO_lock_init instead of explicit assignment.
11620
11621 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
11622 Define __libc_lock_* and __libc_lock_recursive macros with
11623 lowlevellock macros, not pthread mutexes.
11624
11625 * flockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_lock instead
11626 of pthread_mutex_lock.
11627 * funlockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_unlock
11628 instead of pthread_mutex_unlock.
11629
fde89ad0
RM
116302002-12-06 Roland McGrath <roland@redhat.com>
11631
11632 * allocatestack.c (__stack_user): Use uninitialized defn.
11633 * init.c (__pthread_initialize_minimal): Initialize it here.
11634
11767d47
RM
116352002-12-05 Roland McGrath <roland@redhat.com>
11636
fde89ad0
RM
11637 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
11638 string.
11639 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
11640
11767d47
RM
11641 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
11642 missing & here too.
11643
440d8bc2
UD
116442002-12-05 Ulrich Drepper <drepper@redhat.com>
11645
11646 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
11647 lowlevellock.
11648 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
11649 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
11650 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
11651 * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
11652 for __libc_lock_* macros.
11653 * Makefile (routines): Add libc-lowlevellock.
11654
116552002-10-09 Roland McGrath <roland@redhat.com>
11656
11657 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
11658 Under [__PIC__], call the function via the pointer fetched for
11659 comparison rather than a call by name that uses the PLT.
11660 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
11661 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
11662 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
11663 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
11664 (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
11665
d5ed0118
RM
116662002-12-04 Roland McGrath <roland@redhat.com>
11667
11668 * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
11669
11670 * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
11671 * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
11672
11673 * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
11674
eaa4099f
UD
116752002-12-04 Ulrich Drepper <drepper@redhat.com>
11676
11677 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
11678 a completely opaque, non-integer type.
11679 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
11680
33b5d0cc
UD
116812002-12-05 Jakub Jelinek <jakub@redhat.com>
11682
11683 * sysdeps/i386/tls.h: Include stdlib.h.
11684 * sysdeps/x86_64/tls.h: Likewise.
11685
7a5cdb30
UD
116862002-12-04 Ulrich Drepper <drepper@redhat.com>
11687
c4a6d859
UD
11688 * Makefile (tests): Add tst-locale2.
11689 (tests-static): Likewise.
11690 * tst-locale2.c: New file.
11691
7a5cdb30
UD
11692 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
11693 volatile and add memory clobbers to lock operations.
11694
d82d5d12
UD
116952002-12-03 Ulrich Drepper <drepper@redhat.com>
11696
69cae3cf
UD
11697 * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
11698 * sysdeps/i386/i486/bits/atomic.h: New file.
11699 * sysdeps/i386/i586/bits/atomic.h: New file.
11700 * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
11701 include i486 version.
11702 * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
11703 * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
c97c64de 11704 Patch by Marijn Ros <marijn@mad.scientist.com>.
69cae3cf 11705
e4044c01
UD
11706 * allocatestack.c (get_cached_stack): Don't crash if we first
11707 found a stack with a larger size then needed.
11708 Reported by Hui Huang <hui.huang@sun.com>.
11709
d82d5d12
UD
11710 * Makefile (tests): Add tst-sysconf.
11711 * tst-sysconf.c: New file.
11712
11713 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
11714 PTHREAD_THREADS_MAX.
11715
fa9a4ff0
RM
117162002-12-02 Roland McGrath <roland@redhat.com>
11717
11718 * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
11719 Declare using hidden_proto instead of attribute_hidden, so there are
11720 non-.hidden static symbols for gdb to find.
11721 (__pthread_keys): Likewise.
11722 * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
11723 * allocatestack.c (__stack_user): Likewise.
11724 * pthread_create.c (__pthread_keys): Likewise.
11725 (__nptl_threads_events, __nptl_last_event): Make these static instead
11726 of hidden.
11727 * pthread_key_create.c (__pthread_pthread_keys_max,
11728 __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
11729
91949a33
UD
117302002-12-02 Ulrich Drepper <drepper@redhat.com>
11731
c22b52fa
UD
11732 * Makefile (tests): Add tst-locale1. If buid-static is yes link
11733 statically.
11734 * tst-locale1.c: New file.
11735
beb6aa41
UD
11736 * pthread_cond_timedwait.c: Include <stdlib.h>.
11737
91949a33
UD
11738 * Makefile (tests): Add tst-fork2 and tst-fork3.
11739 * tst-fork2.c: New file.
11740 * tst-fork3.c: New file.
11741
654dff90
UD
117422002-11-28 Ulrich Drepper <drepper@redhat.com>
11743
cb0e76b4
UD
11744 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
11745
11746 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
11747 require it to 200112L.
11748
11749 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
11750 instruction only if HAVE_CMOV is defined.
11751 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
11752
975aa229
UD
11753 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
11754
654dff90
UD
11755 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
11756
11757 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
11758
11759 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
11760
a3931336
UD
117612002-11-27 Ulrich Drepper <drepper@redhat.com>
11762
c10c099c
UD
11763 * sysdeps/x86_64/bits/atomic.h: New file.
11764
11765 * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
11766 16-bit operations.
11767
dca99d27
UD
11768 * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
11769 possible since gettid cannot fail.
11770
f78deea6
UD
11771 * sysdeps/x86_64/pthreaddef.h: New file.
11772
11773 * sysdeps/i386/pthreaddef.h (gettid): Removed.
11774
11775 * sysdeps/x86_64/pthread_spin_init.c: New file.
11776 * sysdeps/x86_64/pthread_spin_lock.c: New file.
11777 * sysdeps/x86_64/pthread_spin_trylock.c: New file.
11778 * sysdeps/x86_64/pthread_spin_unlock.c: New file.
11779
11780 * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
11781 Add missing lock prefix. Minute optimization.
11782
11783 * tst-spin2.c (main): Also check successful trylock call.
11784
11785 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
11786 syscall. Fix typo in case INTERNAL_SYSCALL is not used.
11787
11788 * sysdeps/i386/pthread_spin_destroy.c: Moved to...
11789 * sysdeps/pthread/pthread_spin_destroy.c: ...here. New file.
11790
11791 * sysdeps/i386/pthread_sigmask.c: Removed. Use the generic code.
11792 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
11793 value in case of an error. Add support for INTERNAL_SYSCALL.
b54e18eb
UD
11794
11795 * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
11796 value in case of an error.
11797
a3931336
UD
11798 * sysdeps/x86_64/tls.h: New file.
11799
76a50749
UD
118002002-11-26 Ulrich Drepper <drepper@redhat.com>
11801
117c452c
UD
11802 * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface. It now
11803 takes the array member name and the index as parameters.
11804 (THREAD_SETMEM_NC): Likewise.
11805 * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
11806 * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
11807 interfaces.
11808
11809 * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
11810 to decide which code to use.
11811 (THREAD_SETMEM_NC): Likewise.
11812
76a50749
UD
11813 * allocatestack.c (queue_stack): Don't remove stack from list here.
11814 Do it in the caller. Correct condition to prematurely terminate
11815 loop to free stacks.
11816 (__deallocate_stack): Remove stack from list here.
11817
118182002-11-26 Ulrich Drepper <drepper@redhat.com>
11819
11820 * Makefile (tests): Add tst-stack1.
11821 * tst-stack1.c: New file.
11822
11823 * allocatestack.c (allocate_stack): Initialize the TCB on a user
11824 provided stack.
11825
11826 * pthread_attr_getstack.c: Return bottom of the thread area.
11827
118282002-11-25 Ulrich Drepper <drepper@redhat.com>
11829
11830 * Makefile (libpthread-routines): Add pt-allocrtsig and
11831 pthread_kill_other_threads.
11832 * pt-allocrtsig.c: New file.
11833 * pthread_kill_other_threads.c: New file.
11834 * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
11835 all three functions.
11836 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
11837 allocrtsig.
11838 * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
11839 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
11840 and __libc_allocate_rtsig_private.
11841 * Versions (libpthread): Export pthread_kill_other_threads_np,
11842 __libc_current_sigrtmin, and __libc_current_sigrtmax.
11843
118442002-11-24 Ulrich Drepper <drepper@redhat.com>
11845
11846 * allocatestack.c (allocate_stack): stackaddr in attribute points to
11847 the end of the stack. Adjust computations.
11848 When mprotect call fails dequeue stack and free it.
11849 * pthread_attr_setstack.c: Store top of the stack in stackaddr
11850 attribute.
11851 * pthread_getattr_np.c: Likewise.
11852
11853 * descr.h (IS_DETACHED): Add some more parenthesis to prevent
11854 surprises.
11855
118562002-11-23 Ulrich Drepper <drepper@redhat.com>
11857
11858 * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
11859 attribute definitions. Patch by Luca Barbieri <ldb@ldb.ods.org>.
11860
118612002-11-22 Ulrich Drepper <drepper@redhat.com>
11862
11863 * pthread_getspecific.c: Optimize access to first 2nd-level array.
11864 * pthread_setspecific.c: Likewise.
11865
118662002-11-21 Ulrich Drepper <drepper@redhat.com>
11867
11868 * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
11869 definitions. Get them from the official place.
11870 * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
11871
11872 * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
11873 Use new CLONE_ flags in clone() calls.
11874
11875 * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
11876 * sysdeps/unix/sysv/linux/i386/fork.c: New file.
11877
11878 * Versions: Add pthread_* functions for libc.
11879 * forward.c: New file.
11880
11881 * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
11882 errno-loc.
11883 * herrno.c: New file.
11884 * res.c: New file.
11885
11886 * Makefile (libpthread-routines): Remove sem_post, sem_wait,
11887 sem_trywait, and sem_timedwait. Add herrno and res.
11888 * sem_init.c: Don't initialize lock and waiters members.
11889 * sem_open.c: Likewise.
11890 * sem_post.c: Removed.
11891 * sem_wait.c: Removed.
11892 * sem_trywait.c: Removed.
11893 * sem_timedwait.c: Removed.
11894 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
11895 Includes full implementations of sem_post, sem_wait, sem_trywait,
11896 and sem_timedwait.
11897 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
11898 for new implementation.
11899 * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
11900 and waiters fields.
11901
11902 * tst-sem3.c: Improve error message.
11903 * tst-signal3.c: Likewise.
11904
11905 * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
11906 to tell the kernel about the termination futex and to initialize tid
11907 member. Don't initialize main_thread.
11908 * descr.h (struct pthread): Remove main_thread member.
11909 * cancelllation.c (__do_cancel): Remove code handling main thread.
11910 The main thread is not special anymore.
11911
11912 * allocatestack.c (__reclaim_stacks): Mark stacks as unused. Add
11913 size of the stacks to stack_cache_actsize.
11914
11915 * pt-readv.c: Add missing "defined".
11916 * pt-sigwait.c: Likewise.
11917 * pt-writev.c: Likewise.
11918
119192002-11-09 Ulrich Drepper <drepper@redhat.com>
11920
11921 * Versions: Export __connect from libpthread.
11922 Patch by Luca Barbieri <ldb@ldb.ods.org>.
11923
11924 * Makefile (libpthread-routines): Add pt-raise.
11925 * sysdeps/unix/sysv/linux/raise.c: New file.
11926 * sysdeps/unix/sysv/linux/pt-raise.c: New file.
11927 * sysdeps/generic/pt-raise.c: New file.
11928
11929 * pthread_cond_init.c: Initialize all data elements of the condvar
11930 structure. Patch by Luca Barbieri <ldb@ldb.ods.org>.
11931
11932 * pthread_attr_init.c: Actually implement 2.0 compatibility version.
11933 * pthread_create.c: Likewise.
11934
11935 * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
11936 * tst-key1.c: New file.
11937 * tst-key2.c: New file.
11938 * tst-key3.c: New file.
11939
11940 * Versions: Export pthread_detach for version GLIBC_2.0.
11941 Reported by Saurabh Desai <sdesai@austin.ibm.com>.
11942
119432002-11-08 Ulrich Drepper <drepper@redhat.com>
11944
11945 * pthread_key_create.c: Terminate search after an unused key was found.
11946 Patch by Luca Barbieri <ldb@ldb.ods.org>.
11947
11948 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
11949 Patch by Luca Barbieri <ldb@ldb.ods.org>.
11950
119512002-10-10 Ulrich Drepper <drepper@redhat.com>
11952
11953 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
11954 dynamic lookup for errno in PIC.
11955
11956 * allocatestack.c (get_cached_stack): Rearrange code slightly to
11957 release the stack lock as soon as possible.
11958 Call _dl_allocate_tls_init for TCB from the cache to re-initialize
11959 the static TLS block.
11960 (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
11961
11962 * cancellation.c: Renamed from cancelation.c.
11963 * Makefile: Adjust accordingly.
11964 * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
11965 * cleanup_defer.c: Use CANCELLATION_P.
11966 * pthread_testcancel.c: Likewise.
11967 * descr.h: Fix spelling in comments.
11968 * init.c: Likewise.
11969 * pthread_getattr_np.c: Likewise.
11970 * pthread_getschedparam.c: Likewise.
11971 * pthread_setschedparam.c: Likewise.
11972 * Versions: Likewise.
11973
11974 * pt-pselect.c: New file.
11975 * Makefile (libpthread-routines): Add pt-pselect.
11976 * Versions: Add pselect.
11977
11978 * tst-cancel4.c: New file.
11979 * Makefile (tests): Add tst-cancel4.
11980
119812002-10-09 Ulrich Drepper <drepper@redhat.com>
11982
11983 * pthread_mutex_lock.c: Always record lock ownership.
11984 * pthread_mutex_timedlock.c: Likewise.
11985 * pthread_mutex_trylock.c: Likewise.
11986
11987 * pt-readv.c: New file.
11988 * pt-writev.c: New file.
11989 * pt-creat.c: New file.
11990 * pt-msgrcv.c: New file.
11991 * pt-msgsnd.c: New file.
11992 * pt-poll.c: New file.
11993 * pt-select.c: New file.
11994 * pt-sigpause.c: New file.
11995 * pt-sigsuspend.c: New file.
11996 * pt-sigwait.c: New file.
11997 * pt-sigwaitinfo.c: New file.
11998 * pt-waitid.c: New file.
11999 * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
12000 pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
12001 pt-sigwait, pt-sigwaitinfo, and pt-waitid.
12002 * Versions: Add all the new functions.
12003
12004 * tst-exit1.c: New file.
12005 * Makefile (tests): Add tst-exit1.
12006
12007 * sem_timedwait.c: Minor optimization for more optimal fastpath.
12008
120092002-10-08 Ulrich Drepper <drepper@redhat.com>
12010
12011 * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
12012
12013 * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
12014 call. pthread_join is an official cancellation point.
12015 * pthread_timedjoin.c: Likewise.
12016
12017 * pthread_cond_wait.c: Revert order in which internal lock are dropped
12018 and the condvar's mutex are retrieved.
12019 * pthread_cond_timedwait.c: Likewise.
12020 Reported by dice@saros.East.Sun.COM.
12021
120222002-10-07 Ulrich Drepper <drepper@redhat.com>
12023
12024 * pthreadP.h: Cut out all type definitions and move them...
12025 * sysdeps/unix/sysv/linux/internaltypes.h: ...here. New file.
12026 * pthreadP.h: Include <internaltypes.h>.
12027
12028 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
12029 performance tweaks.
12030
12031 * sem_trywait.c: Shuffle #includes around to get right order.
12032 * sem_timedwait.c: Likewise.
12033 * sem_post.c: Likewise.
12034 * sem_wait.c: Likewise.
12035
12036 * nptl 0.3 released.
12037
12038 * Makefile (tests): Add tst-signal3.
12039 * tst-signal3.c: New file.
12040
120412002-10-05 Ulrich Drepper <drepper@redhat.com>
12042
12043 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
12044 the asms modify the sem object.
12045 (__lll_sem_timedwait): Now takes struct sem* as first parameter.
12046
12047 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
12048 the actual members.
12049 * pthreadP.h (struct sem): New type. Actual semaphore type.
12050 * semaphoreP.h: Include pthreadP.h.
12051 * sem_getvalue.c: Adjust to sem_t change.
12052 * sem_init.c: Likewise.
12053 * sem_open.c: Likewise.
12054 * sem_post.c: Likewise.
12055 * sem_timedwait.c: Likewise.
12056 * sem_trywait.c: Likewise.
12057 * sem_wait.c: Likewise.
12058
120592002-10-04 Ulrich Drepper <drepper@redhat.com>
12060
12061 * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
12062 * tst-basic2.c: New file.
12063 * tst-exec1.c: New file.
12064 * tst-exec2.c: New file.
12065 * tst-exec3.c: New file.
12066
12067 * tst-fork1.c: Remove extra */.
12068
12069 * nptl 0.2 released. The API for IA-32 is complete.