]> git.ipfire.org Git - thirdparty/glibc.git/blob - nptl/ChangeLog
Remove unused pseudo_end label
[thirdparty/glibc.git] / nptl / ChangeLog
1 2012-07-25 Andreas Schwab <schwab@linux-m68k.org>
2
3 * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Remove pseudo_end
4 label.
5 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Likewise.
6 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO):
7 Likewise.
8
9 2012-07-25 Siddhesh Poyarekar <siddhesh@redhat.com>
10
11 * tst-pthread-getattr.c: Revert last change.
12
13 2012-07-20 Siddhesh Poyarekar <siddhesh@redhat.com>
14
15 * tst-pthread-getattr.c (MAX_STACK_SIZE): New max cap for stack
16 size.
17 (_MIN): New macro.
18 (allocate_and_test): Return STACKADDR. Access STACKADDR instead
19 of MEM to test.
20 (check_stack_top): Read valued written into STACKADDR in
21 allocate_and_test. Cap stack size to MAX_STACK_SIZE.
22
23 2012-07-19 Siddhesh Poyarekar <siddhesh@redhat.com>
24
25 * nptl-init.c (sighandler_setxid): Fix the comment that
26 describes it.
27
28 2012-06-23 Thomas Schwinge <thomas@codesourcery.com>
29
30 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S
31 (__lll_robust_timedlock_wait): Simplify CFI directives.
32
33 2012-06-20 Siddhesh Poyarekar <siddhesh@redhat.com>
34
35 [BZ #12416]
36 * Makefile (tests): Add test case.
37 * pthread_getattr_np.c (pthread_getattr_np): Deduct pages below
38 the __libc_stack_end page from stacksize. Truncate stacksize to
39 make it page aligned when it is computed from RLIMIT_STACK.
40 * tst-pthread-getattr.c: New test case. Verify that stackaddr is
41 accessible.
42
43 2012-06-07 Carlos Sánchez de La Lama <csanchezdll@gmail.com>
44
45 [BZ #14205]
46 * sysdeps/sparc/sparc32/pthread_spin_lock.S: Do not use v9
47 branches.
48
49 2012-06-04 Siddhesh Poyarekar <siddhesh@redhat.com>
50 Jakub Jelinek <jakub@redhat.com>
51
52 [BZ #14188]
53 * sysdeps/pthread/pthread.h
54 [!(defined __GNUC__ && defined __EXCEPTIONS)]
55 (pthread_cleanup_push, pthread_cleanup_push_defer_np): Use
56 __libc_unlikely instead of __builtin_expect.
57
58 2012-05-30 H.J. Lu <hongjiu.lu@intel.com>
59
60 [BZ #14117]
61 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Removed.
62 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
63 * sysdeps/unix/sysv/linux/i386/Implies: New file.
64 * sysdeps/unix/sysv/linux/x86_64/Implies: Likewise.
65 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Renamed
66 to ...
67 * sysdeps/unix/sysv/linux/x86/bits/pthreadtypes.h: This.
68 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Renamed
69 to ...
70 * sysdeps/unix/sysv/linux/x86/bits/semaphore.h: This.
71
72 2012-05-30 Andreas Schwab <schwab@linux-m68k.org>
73
74 [BZ #14132]
75 * nptl-init.c (pthread_functions): Remove use of INTUSE and
76 _internal aliases.
77 (__pthread_initialize_minimal_internal): Likewise.
78 * sem_open.c: Likewise.
79 * sem_unlink.c: Likewise.
80 * pthreadP.h: Replace _internal aliases by hidden_proto
81 declarations.
82 * pthread_getspecific.c: Replace _internal alias by hidden_def.
83 * pthread_key_create.c: Likewise.
84 * pthread_mutex_destroy.c: Likewise.
85 * pthread_mutex_init.c: Likewise.
86 * pthread_mutex_lock.c: Likewise.
87 * pthread_mutex_unlock.c: Likewise.
88 * pthread_once.c: Likewise.
89 * pthread_rwlock_rdlock.c: Likewise.
90 * pthread_rwlock_unlock.c: Likewise.
91 * pthread_rwlock_wrlock.c: Likewise.
92 * pthread_setspecific.c: Likewise.
93 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
94 Likewise.
95 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
96 Likewise.
97 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
98 Likewise.
99 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
100 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
101 * sysdeps/unix/sysv/linux/s390/pthread_once.c: Likewise.
102 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Likewise.
103 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
104 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
105 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
106 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
107 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
108 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
109 Likewise.
110 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
111 Likewise.
112 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
113 Likewise.
114
115 2012-05-27 Chung-Lin Tang <cltang@codesourcery.com>
116
117 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO, LOAD_ARGS_1)
118 (LOAD_ARGS_2 ,LOAD_ARGS_3 ,LOAD_ARGS_4): Add CFI restores.
119
120 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_lock_wait_private)
121 (__lll_lock_wait, __lll_timedlock_wait, __lll_timedwait_tid): Add CFI
122 directives.
123 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S
124 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Likewise.
125 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
126 (pthread_barrier_wait): Likewise.
127 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
128 (__pthread_cond_broadcast): Likewise.
129 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
130 (__pthread_cond_signal): Likewise.
131 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
132 (__pthread_cond_timedwait): Likewise.
133 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S (__pthread_cond_wait):
134 Likewise.
135 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S
136 (__pthread_rwlock_rdlock): Likewise.
137 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
138 (pthread_rwlock_timedrdlock): Likewise.
139 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
140 (pthread_rwlock_timedwrlock): Likewise.
141 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S
142 (__pthread_rwlock_unlock): Likewise.
143 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S
144 (__pthread_rwlock_wrlock): Likewise.
145 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post): Likewise.
146 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Likewise.
147 * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
148 Likewise.
149 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
150
151 2012-05-26 Siddhesh Poyarekar <siddhesh@redhat.com>
152
153 [BZ #12416]
154 * nptl/pthread_getattr_np.c (pthread_getattr_np): Use
155 __libc_stack_end rounded to the end of containing page as the
156 real stack end.
157
158 2012-05-25 Rayson Ho <rho@redhat.com>
159
160 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Low-level SystemTap
161 probes for i386.
162 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
163 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
164 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
165 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
166 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
167 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
168 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
169 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
170
171 2012-05-25 Rayson Ho <rho@redhat.com>
172 Roland McGrath <roland@hack.frob.com>
173
174 * DESIGN-systemtap-probes.txt: New file.
175 * pthread_cond_broadcast.c: SystemTap probes.
176 * pthread_cond_init.c: Likewise.
177 * pthread_cond_signal.c: Likewise.
178 * pthread_cond_wait.c: Likewise.
179 * pthread_cond_destroy.c: Likewise.
180 * pthread_create.c: Likewise.
181 * pthread_join.c: Likewise.
182 * pthread_mutex_destroy.c: Likewise.
183 * pthread_mutex_init.c: Likewise.
184 * pthread_mutex_lock.c: Likewise.
185 * pthread_mutex_timedlock.c: Likewise.
186 * pthread_mutex_unlock.c: Likewise.
187 * pthread_rwlock_destroy.c: Likewise.
188 * pthread_rwlock_rdlock.c: Likewise.
189 * pthread_rwlock_unlock.c: Likewise.
190 * pthread_rwlock_wrlock.c: Likewise.
191 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
192 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
193 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
194 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
195 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
196 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
197 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
198 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
199
200 2012-05-24 Roland McGrath <roland@hack.frob.com>
201
202 * pthread_create.c (start_thread): Define pthread_start LIBC_PROBE.
203
204 2012-05-17 Andreas Jaeger <aj@suse.de>
205
206 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
207 (HAVE_DL_DISCOVER_OSVERSION): Don't declare _dl_discover_osversion
208 only for older kernels.
209
210 2012-05-15 Joseph Myers <joseph@codesourcery.com>
211
212 * pthreadP.h [!__NR_set_robust_list] (__NR_set_robust_list): Do
213 not define.
214
215 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
216
217 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_lock): Load
218 futex pointer into RDI_LP. Use RSP_LP to operate on stack.
219 (lll_robust_lock): Likewise.
220 (lll_cond_lock): Likewise.
221 (lll_robust_cond_lock): Likewise.
222 (lll_timedlock): Likewise.
223 (lll_robust_timedlock): Likewise.
224 (lll_unlock): Likewise.
225 (lll_robust_unlock): Likewise.
226
227 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
228
229 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use
230 LP_OP(cmp) and RCX_LP on dep_mutex pointer.
231
232 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
233
234 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Use LP_OP(op)
235 on NWAITERS.
236 (__gcc_personality_v0): Replace 8-byte data alignment with
237 LP_SIZE alignment and .quad with ASM_ADDR.
238
239 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
240
241 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Use LP_OP(op)
242 on NWAITERS.
243 (__gcc_personality_v0): Replace 8-byte data alignment with
244 LP_SIZE alignment and .quad with ASM_ADDR.
245
246 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
247
248 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Use LP_OP(cmp) on
249 NWAITERS, which is unsigned long int.
250
251 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
252
253 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
254 (__gcc_personality_v0): Replace 8-byte data alignment with
255 LP_SIZE alignment and .quad with ASM_ADDR.
256
257 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
258
259 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Use
260 LP_OP(cmp), RSI_LP and R8_LP on dep_mutex pointer. Load
261 __vdso_clock_gettime pointer into RAX_LP.
262 (__gcc_personality_v0): Replace 8-byte data alignment with
263 LP_SIZE alignment and .quad with ASM_ADDR.
264
265 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
266
267 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Use
268 LP_OP(cmp), RSI_LP and R8_LP on dep_mutex pointer. Load
269 __vdso_clock_gettime pointer into RAX_LP.
270 (__gcc_personality_v0): Replace 8-byte data alignment with
271 LP_SIZE alignment and .quad with ASM_ADDR.
272
273 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
274
275 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Use
276 LP_OP(cmp) and R8_LP on dep_mutex pointer.
277
278 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
279
280 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Use LP_OP(mov)
281 to update pointer in memory. Load pointer into RDI_LP.
282
283 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
284
285 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
286 (LLL_STUB_UNWIND_INFO_START): Align label to LP_SIZE instead
287 of 8.
288 (LLL_STUB_UNWIND_INFO_END): Likewise.
289 (lll_timedlock): Load timeout pointer into RDX_LP.
290 (lll_robust_timedlock): Likewise.
291
292 2012-05-15 Siddhesh Poyarekar <siddhesh@redhat.com>
293 Jakub Jelinek <jakub@redhat.com>
294
295 [BZ #13613]
296 * Makefile (tests): Add test cases.
297 * descr.h (struct pthread): Add a comment describing multiple_threads.
298 * pthreadP.h (__pthread_multiple_threads): Expand comment to include
299 single-process case.
300 * pthread_cancel.c (pthread_cancel): Enable multiple_threads
301 before setting cancelstate of the thread.
302 * sysdeps/unix/sysv/linux/libc_multiple_threads.c
303 (__libc_multiple_threads): Add explanatory comment.
304 * tst-cancel-self-cancelstate.c: New test case.
305 * tst-cancel-self-canceltype.c: Likewise.
306 * tst-cancel-self-cleanup.c: Supporting file for test cases.
307 * tst-cancel-self-testcancel.c: New test case.
308 * tst-cancel-self.c: Likewise.
309 * vars.c: Expand comment to include single-process case.
310
311 2012-05-14 H.J. Lu <hongjiu.lu@intel.com>
312
313 * sysdeps/x86_64/tls.h: Don't include <bits/wordsize.h>.
314 (tcbhead_t): Remove __x86_64__ check. Align rtld_savespace_sse
315 to 32 bytes.
316
317 2012-05-14 H.J. Lu <hongjiu.lu@intel.com>
318
319 * sysdeps/pthread/pthread.h (__PTHREAD_RWLOCK_INT_FLAGS_SHARED):
320 New.
321 (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Check
322 __PTHREAD_RWLOCK_INT_FLAGS_SHARED instead of __WORDSIZE.
323
324 2012-05-14 H.J. Lu <hongjiu.lu@intel.com>
325
326 * shlib-versions: Move x86_64-.*-linux.* entry to ...
327 * sysdeps/x86_64/64/shlib-versions: Here. New file.
328 * sysdeps/x86_64/x32/shlib-versions: New file.
329
330 2012-05-14 H.J. Lu <hongjiu.lu@intel.com>
331
332 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Define x32
333 __SIZEOF_PTHREAD_XXX_T.
334 (__pthread_internal_list): Check __x86_64__ instead of __WORDSIZE.
335 (pthread_mutex_t): Likewise.
336 (pthread_rwlock_t): Likewise.
337 (__PTHREAD_RWLOCK_INT_FLAGS_SHARED): New. Defined if __x86_64__
338 is defined.
339
340 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
341
342 * sysdeps/x86_64/x32/tls.h: New file.
343
344 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
345
346 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Use uint64_t on 64-bit
347 integer.
348 (THREAD_SETMEM_NC): Likewise.
349
350 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
351
352 * sysdeps/x86_64/tls.h (THREAD_SELF): Replace movq/%q0 with
353 mov/%0.
354
355 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
356
357 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
358 (__cleanup_fct_attribute): Check __x86_64__ instead of
359 __WORDSIZE.
360
361 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
362
363 * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER): Check
364 __PTHREAD_MUTEX_HAVE_PREV instead of __WORDSIZE.
365 (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Likewise.
366 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
367 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
368
369 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
370
371 * pthread_create.c (start_thread): Check __PTHREAD_MUTEX_HAVE_PREV
372 instead of __WORDSIZE.
373
374 2012-05-10 Thomas Schwinge <thomas@schwinge.name>
375
376 [BZ #3748]
377 * sysdeps/pthread/bits/libc-lockP.h (__libc_once_get): New macro.
378
379 2012-05-09 Chung-Lin Tang <cltang@codesourcery.com>
380
381 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
382 (__pthread_cond_timedwait): Use CFI directives.
383 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
384 (__pthread_cond_wait): Likewise.
385 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Likewise.
386 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
387
388 2012-05-03 David S. Miller <davem@davemloft.net>
389
390 * sysdeps/sparc/sparc64/pthread_spin_unlock.S: Fix thinko, we
391 always have to return 0, especially for the pthread_spin_init
392 alias.
393 * sysdeps/sparc/sparc32/pthread_spin_lock.S: Add missing trailing
394 newline.
395 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S: Likewise.
396 * sysdeps/sparc/sparc64/pthread_spin_lock.S: Likewise.
397
398 2012-05-02 David S. Miller <davem@davemloft.net>
399
400 * sysdeps/sparc/sparc64/pthread_spin_lock.S: New.
401 * sysdeps/sparc/sparc64/pthread_spin_lock.c: Delete.
402 * sysdeps/sparc/sparc64/pthread_spin_unlock.S: New.
403 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: Delete.
404 * sysdeps/sparc/sparc64/pthread_spin_trylock.S: New.
405 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: Delete.
406 * sysdeps/sparc/sparc64/pthread_spin_init.c: New.
407 * sysdeps/sparc/sparc32/pthread_spin_lock.S: New.
408 * sysdeps/sparc/sparc32/pthread_spin_lock.c: Delete.
409 * sysdeps/sparc/sparc32/pthread_spin_trylock.S: New.
410 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: Delete.
411 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S: New.
412 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: Delete.
413 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.S: New.
414 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: Delete.
415 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.S: New.
416 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: Delete.
417 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_init.c: New.
418
419 2012-05-02 Allan McRae <allan@archlinux.org>
420
421 * Makefile: (LDFLAGS-tst-tls5): Use $(no-as-needed).
422 (LDFLAGS-tst-cancel24): Likewise.
423
424 2012-05-02 Paul Pluzhnikov <ppluzhnikov@google.com>
425
426 * sysdeps/i386/pthread_spin_lock.S: New.
427 * sysdeps/i386/pthread_spin_lock.c: Delete.
428 * sysdeps/x86_64/pthread_spin_lock.S: New.
429 * sysdeps/x86_64/pthread_spin_lock.c: Delete.
430
431 2012-04-28 Andreas Schwab <schwab@linux-m68k.org>
432
433 * Makefile ($(objpfx)tst-stack3-mem, $(objpfx)tst-tls6.out): Don't
434 run when cross-compiling.
435
436 2012-04-26 Siddhesh Poyarekar <siddhesh@redhat.com>
437
438 * sysdeps/pthread/unwind-forcedunwind.c: Include gnu/lib-names.h
439 instead of libgcc_s.h.
440
441 2012-04-20 Paul Pluzhnikov <ppluzhnikov@google.com>
442
443 * sysdeps/x86_64/tls.h (TLS_GET_FS, TLS_SET_FS): Delete.
444
445 2012-03-27 David S. Miller <davem@davemloft.net>
446
447 * tst-cond16.c (do_test): Use a thread stack size which is either
448 PTHREAD_STACK_MIN or the page size, whichever is larger.
449 * tst-cond18.c (do_test): Likewise.
450
451 2012-03-19 H.J. Lu <hongjiu.lu@intel.com>
452
453 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Use
454 register char * __asm__("rsp") to get stack frame.
455
456 2012-03-19 H.J. Lu <hongjiu.lu@intel.com>
457
458 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (SYS_futex): Use
459 __NR_futex directly.
460
461 2012-03-19 H.J. Lu <hongjiu.lu@intel.com>
462
463 * unwind.c (unwind_stop): Cast _Unwind_GetCFA return to
464 _Unwind_Ptr first.
465
466 2012-03-16 David S. Miller <davem@davemloft.net>
467
468 [BZ #13844]
469 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: Include using <..>
470 instead of "...".
471 * sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c:
472 Delete, not needed.
473
474 2012-03-15 David S. Miller <davem@davemloft.net>
475
476 [BZ #13844]
477 * sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c: New file.
478
479 2012-03-09 Paul Eggert <eggert@cs.ucla.edu>
480
481 [BZ #13673]
482 * pt-crti.S: Replace FSF snail mail address with URL.
483
484 2012-03-09 Joseph Myers <joseph@codesourcery.com>
485
486 * sysdeps/pthread/pthread.h (__need_clockid_t, __need_timespec):
487 Do not define before including <time.h>.
488
489 2012-03-08 David S. Miller <davem@davemloft.net>
490
491 * sysdeps/unix/sysv/linux/sparc/sem_post.c: Update copyright year.
492
493 2012-03-08 Thomas Schwinge <thomas@codesourcery.com>
494
495 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
496 Check for timestamp before the Epoch.
497
498 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Fix
499 updating nwaiters.
500
501 * tst-sem13.c (do_test): Add another test case.
502 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
503 Fix updating nwaiters.
504
505 2012-03-07 Joseph Myers <joseph@codesourcery.com>
506
507 [BZ #10545]
508 * sysdeps/pthread/configure.in (libc_cv_forced_unwind): Change
509 link test to a compile test.
510 (libc_cv_c_cleanup): Likewise. Declare puts rather than including
511 <stdio.h>.
512 * sysdeps/pthread/configure: Regenerated.
513
514 2012-03-07 Ulrich Drepper <drepper@gmail.com>
515
516 * Makefile (distribute): Remove variable.
517
518 2012-01-23 Thomas Schwinge <thomas@codesourcery.com>
519
520 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Get rid of
521 superfluous assignment.
522 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c (sem_timedwait):
523 Likewise.
524 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
525 (sem_timedwait): Likewise.
526
527 2012-03-06 Ulrich Drepper <drepper@gmail.com>
528
529 * sysdeps/pthread/bits/libc-lock.h: Move information not needed in
530 installed headers to...
531 * sysdeps/pthread/bits/libc-lockP.h: ...here. New file.
532
533 2012-03-06 David S. Miller <davem@davemloft.net>
534
535 * sysdeps/unix/sysv/linux/sparc/sem_post.c (__new_sem_post): Use
536 atomic_increment and remove unused local variable.
537 (__old_sem_post): Likewise.
538
539 2012-02-27 David S. Miller <davem@davemloft.net>
540
541 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Don't refer to
542 non-existing __pthread_attr.
543 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
544 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
545 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
546 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
547 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
548
549 2012-02-26 Ulrich Drepper <drepper@gmail.com>
550
551 * sysdeps/pthread/pthread.h: Define __need_clockid_t for __USE_XOPEN2K.
552
553 * sysdeps/pthread/pthread.h: Define __need_timespec before including
554 <time.h>.
555 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Name pthread_attr_t
556 union.
557 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
558 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
559 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
560 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
561 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
562
563 2012-02-21 Joseph Myers <joseph@codesourcery.com>
564
565 [BZ #13695]
566 * Makefile (generated): Remove crti.S, crtn.S, defs.h and
567 pt-initfini.s.
568 [crti.S not in sysdirs] (omit-deps): Do not append.
569 [crti.S not in sysdirs] (CFLAGS-pt-initfini.s): Remove variable.
570 [crti.S not in sysdirs] (pt-initfini.c): Remove vpath directive.
571 [crti.S not in sysdirs] ($(objpfx)crti.S): Remove rule.
572 [crti.S not in sysdirs] ($(objpfx)crtn.S): Likewise.
573 [crti.S not in sysdirs] ($(objpfx)defs.h): Likewise.
574 [crti.S not in sysdirs] ($(objpfx)crti.o): Likewise.
575 [crti.S not in sysdirs] ($(objpfx)crtn.o): Likewise.
576 [crti.S in sysdirs] (extra-objs): Append unconditionally.
577 [crti.S in sysdirs] ($(objpfx)crti.o): Define rule
578 unconditionally.
579 * sysdeps/pthread/pt-initfini.c: Remove file.
580
581 2012-02-16 Richard Henderson <rth@twiddle.net>
582
583 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: Remove file.
584 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: Remove file.
585
586 2012-02-15 Kaz Kojima <kkojima@rr.iij4u.or.jp>
587
588 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Remove file.
589
590 2012-02-16 David S. Miller <davem@davemloft.net>
591
592 * sysdeps/sparc/Makefile: Add -fPIC when building pt-crti.S and crtn.S
593
594 2012-02-15 Marek Polacek <polacek@redhat.com>
595
596 * sysdeps/unix/sysv/linux/x86_64/Makefile: Remove file.
597
598 2012-02-09 Paul Eggert <eggert@cs.ucla.edu>
599
600 Replace FSF snail mail address with URLs, as per GNU coding standards.
601
602 2012-02-08 Andreas Schwab <schwab@linux-m68k.org>
603
604 * Makefile (extra-objs) [crti.S in sysdirs]: Add pt-crti.o.
605
606 2012-02-08 Joseph Myers <joseph@codesourcery.com>
607
608 Support crti.S and crtn.S provided directly by architectures.
609 * Makefile [crti.S in sysdirs] (omit-deps): Do not append.
610 [crti.S in sysdirs] (CFLAGS-pt-initfini.s): Do not define variable.
611 [crti.S in sysdirs] ($(objpfx)pt-initfini.s): Disable rule.
612 [crti.S in sysdirs] ($(objpfx)crti.S): Likewise.
613 [crti.S in sysdirs] ($(objpfx)crtn.S): Likewise.
614 [crti.S in sysdirs] ($(objpfx)defs.h): Likewise.
615 [crti.S in sysdirs] ($(objpfx)crti.o): Likewise.
616 [crti.S in sysdirs] ($(objpfx)crtn.o): Likewise.
617 [crti.S in sysdirs] (pt-initfini.c): Remove vpath directive.
618 [crti.S in sysdirs] ($(objpfx)crti.o): New rule.
619 * pt-crti.S: New file.
620 * sysdeps/unix/sysv/linux/i386/Makefile: Remove file.
621
622 2012-02-03 Joseph Myers <joseph@codesourcery.com>
623
624 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
625 macros for PIC register setup.
626 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
627 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
628 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
629 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
630 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
631
632 2012-01-11 Marek Polacek <polacek@redhat.com>
633
634 * forward.c (FORWARD_NORETURN): Define macro.
635 (__pthread_unwind): Use FORWARD_NORETURN macro to avoid warning.
636 (__pthread_exit): Likewise.
637
638 2012-01-10 Ulrich Drepper <drepper@gmail.com>
639
640 * sysdeps/pthread/pthread.h: Add const attribute to pthread_equal.
641
642 * pthreadP.h: Add noreturn to __pthread_exit.
643 * sysdeps/pthread/pthread-functions.h: Likewise for ptr___pthread_exit.
644
645 2011-12-30 Adhemerval Zanella <azanella@linux.vnet.ibm.com>
646
647 * sysdeps/unix/sysv/linux/aio_misc.h (__aio_create_helper_thread):
648 Call pthread_attr_setstacksize() with result of
649 __pthread_get_minstack() to account for application TLS usage.
650
651 2012-01-08 Marek Polacek <polacek@redhat.com>
652
653 * sysdeps/unix/sysv/linux/mq_notify.c: Include <nptl/pthreadP.h>.
654
655 2012-01-07 Ulrich Drepper <drepper@gmail.com>
656
657 [BZ #13553]
658 * pthreadP.h: Use const instead of __const.
659 * semaphore.h: Likewise.
660 * sysdeps/pthread/bits/libc-lock.h: Likewise.
661 * sysdeps/pthread/bits/sigthread.h: Likewise.
662 * sysdeps/pthread/pthread.h: Likewise.
663
664 * Makefile: Remove elf=yes test, only ELF is supported.
665
666 * shlib-versions: Remove entries for ports architectures.
667
668 In case anyone cares, the IA-64 architecture could move to ports.
669 * sysdeps/ia64/*: Removed.
670 * sysdeps/unix/sysv/linux/ia64/*: Removed.
671
672 2011-12-22 Ulrich Drepper <drepper@gmail.com>
673
674 * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread): Use
675 __pthread_get_minstack.
676 * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Likewise.
677
678 [BZ #13088]
679 * sysdeps/unix/sysv/linux/timer_routines.c: Get minimum stack size
680 through __pthread_get_minstack.
681 * nptl-init.c (__pthread_initialize_minimal_internal): Get page size
682 directly from _rtld_global_ro.
683 (__pthread_get_minstack): New function.
684 * pthreadP.h: Declare __pthread_get_minstack.
685 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_get_minstack.
686
687 2011-12-21 Ulrich Drepper <drepper@gmail.com>
688
689 [BZ #13515]
690 * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
691 Correct reading name from file.
692
693 2011-12-14 Carlos O'Donell <carlos@systemhalted.org>
694
695 * allocatestack.c (allocate_stack): Return errno on failure.
696
697 2011-12-14 Jeff Law <law@redhat.com>
698
699 [BZ #5245]
700 * pthread_create.c (__pthread_create_2_1): Translate ENOMEM to EAGAIN.
701
702 2011-11-28 Andreas Schwab <schwab@redhat.com>
703
704 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Handle
705 EAGAIN from FUTEX_WAIT_REQUEUE_PI.
706 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
707
708 2011-11-15 Ulrich Drepper <drepper@gmail.com>
709
710 * pthread_getattr_np.c (pthread_getattr_np): Set FD_CLOEXEC for
711 /proc/self/maps.
712
713 2011-10-29 Ulrich Drepper <drepper@gmail.com>
714
715 [BZ #13358]
716 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
717 (__pthread_cond_timedwait): Initialize %r15 correctly also for code
718 path for kernels with FUTEX_CLOCK_REALTIME.
719 Debugged by H.J. Lu <hjl.tools@gmail.com>.
720
721 2011-10-27 Andreas Schwab <schwab@redhat.com>
722
723 [BZ #13344]
724 * sysdeps/pthread/pthread.h: Use __THREADNL instead of __THREAD
725 for memory synchronization functions.
726 * semaphore.h: Likewise.
727
728 2011-10-24 Ulrich Drepper <drepper@gmail.com>
729
730 * tst-cancel7.c: Avoid warning.
731 * tst-mutex6.c: Likewise.
732 * tst-mutex9.c: Likewise.
733 * tst-mutexpi6.c: Likewise.
734
735 2011-10-23 Ulrich Drepper <drepper@gmail.com>
736
737 * sysdeps/i386/tls.h: Remove #include <list.h>.
738
739 2011-10-15 Ulrich Drepper <drepper@gmail.com>
740
741 * pthread_create.c (start_thread): Call __ctype_init.
742
743 2011-09-15 Andreas Schwab <schwab@redhat.com>
744
745 * sysdeps/pthread/list.h: Define only list_t if __need_list_t is
746 defined.
747 (list_add): Add atomic_write_barrier.
748 * descr.h: Define __need_list_t before including <list.h>.
749 * nptl-init.c: Include <list.h>
750 * allocatestack.c: Likewise.
751
752 2011-09-11 Ulrich Drepper <drepper@gmail.com>
753
754 * sysdeps/i386/tls.h: Remove HAVE_TLS_SUPPORT test.
755 * sysdeps/ia64/tls.h: Likewise.
756 * sysdeps/powerpc/tls.h: Likewise.
757 * sysdeps/s390/tls.h: Likewise.
758 * sysdeps/sh/tls.h: Likewise.
759 * sysdeps/sparc/tls.h: Likewise.
760 * sysdeps/x86_64/tls.h: Likewise.
761
762 2011-09-10 Ulrich Drepper <drepper@gmail.com>
763
764 * sysdeps/pthread/malloc-machine.h: Define MUTEX_INITIALIZER.
765
766 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Don't handle
767 !USE___THREAD.
768 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
769 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
770 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
771 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
772 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
773 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
774 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
775 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
776 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
777 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
778 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
779 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
780
781 * tst-tls1.c: Support for __thread is now mandatory.
782 * tst-tls2.c: Likewise.
783 * tst-tls3.c: Likewise.
784 * tst-tls3mod.c: Likewise.
785 * tst-tls4.c: Likewise.
786 * tst-tls4moda.c: Likewise.
787 * tst-tls4modb.c: Likewise.
788 * tst-tls5.h: Likewise.
789
790 2011-09-08 Ulrich Drepper <drepper@gmail.com>
791
792 [BZ #12403]
793 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
794 (pthread_rwlock_timedwrlock): Use correct macro in test.
795 Patch by H.J. Lu <hongjiu.lu@intel.com>.
796
797 2011-09-06 Ulrich Drepper <drepper@gmail.com>
798
799 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait): Don't
800 use gettimeofday vsyscall, just call gettimeofday.
801 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
802 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
803 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
804 Likewise.
805 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
806 Likewise.
807 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
808 Simplify __vdso_clock_gettime use.
809
810 2011-09-05 David S. Miller <davem@davemloft.net>
811
812 * sysdeps/unix/sysv/linux/sem_timedwait.c (do_futex_timed_wait):
813 New function.
814 (sem_timedwait): Call it to force an exception region around
815 the async cancel enable and the futex operation.
816 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: Likewise.
817 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: Likewise.
818 * sysdeps/unix/sysv/linux/sem_wait.c (do_futex_wait): New function.
819 (__new_sem_wait): Call it to force an exception region around
820 the async cancel enable and the futex operation.
821 * sysdeps/unix/sysv/linux/sparc/sem_wait.c: Likewise.
822 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: Likewise.
823
824 2011-08-31 Andreas Schwab <schwab@redhat.com>
825
826 * allocatestack.c (setxid_mark_thread): Ensure that the exiting
827 thread is woken up.
828
829 2011-08-20 David S. Miller <davem@davemloft.net>
830
831 * Makefile (tst-cleanup0.out): Fix typo in output redirection.
832
833 2011-08-14 Roland McGrath <roland@hack.frob.com>
834
835 * sysdeps/i386/pthreaddef.h (TCB_ALIGNMENT): Set to 64, optimal on Atom.
836 * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Likewise.
837
838 2011-08-08 Andreas Schwab <schwab@redhat.com>
839
840 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Maintain aligned
841 stack.
842 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
843 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
844
845 2011-07-22 Ulrich Drepper <drepper@gmail.com>
846
847 * sysdeps/pthread/unwind-forcedunwind.c (_Unwind_Resume): Add read
848 barrier.
849 (__gcc_personality_v0): Likewise.
850 (_Unwind_ForcedUnwind): Likewise.
851 (_Unwind_GetCFA): Likewise.
852
853 2011-07-14 Roland McGrath <roland@hack.frob.com>
854
855 * allocatestack.c (__reclaim_stacks): Use uintptr_t cast rather than
856 UINTMAX_C.
857
858 2011-06-30 Ulrich Drepper <drepper@gmail.com>
859
860 * nptl-init.c (__nptl_set_robust): New function.
861 (pthread_functions): Add reference.
862 * npthreadP.h: Declare __nptl_set_robust.
863 * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
864 ptr_set_robust member.
865 * sysdeps/unix/sysv/linux/fork.c: Call set_robust_list syscall in
866 child if threads are used.
867
868 2011-06-14 Andreas Jaeger <aj@suse.de>
869
870 * pthread_rwlock_init.c: Include <string.h> for memset declaration.
871
872 2011-05-11 Ulrich Drepper <drepper@gmail.com>
873
874 [BZ #386]
875 * allocatestack.c (allocate_stack): Convert ENOMEM error to EAGAIN.
876
877 2011-04-10 Ulrich Drepper <drepper@gmail.com>
878
879 [BZ #12650]
880 * allocatestack.c (get_cached_stack): Deallocate DTV entries before
881 clearing memory.
882 Patch partly by Robert Rex <robert.rex@exasol.com>.
883
884 2011-01-19 Roland McGrath <roland@redhat.com>
885
886 * pthread_cond_wait.c (__pthread_cond_wait): Fix comment typo.
887 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
888 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Likewise.
889 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
890 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock): Likewise.
891 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock): Likewise.
892
893 2011-01-16 Andreas Schwab <schwab@linux-m68k.org>
894
895 * Makefile (test-extras): Add tst-cleanup4aux.
896
897 2011-01-14 Ulrich Drepper <drepper@gmail.com>
898
899 [BZ #10563]
900 * sysdeps/pthread/setxid.h (__SETXID_1): Add cast to assignment.
901 (__SETXID_2): Likewise.
902 (__SETXID_3): Likewise.
903
904 2011-01-13 Ulrich Drepper <drepper@gmail.com>
905
906 [BZ #10484]
907 * Versions [libc] (GLIBC_PRIVATE): Export __libc_alloca_cutoff.
908 * alloca_cutoff.c: Add libc_hidden_def.
909
910 2010-10-13 H.J. Lu <hongjiu.lu@intel.com>
911
912 [BZ #12113]
913 * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Changed to 32.
914 * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Defined with alignment
915 of "struct pthread".
916
917 2010-09-21 Andreas Schwab <schwab@redhat.com>
918
919 * sysdeps/pthread/pthread.h (pthread_cleanup_push)
920 [!__EXCEPTIONS]: Mangle local variable not_first_call.
921 (pthread_cleanup_push_defer_np): Likewise.
922
923 2010-09-03 Ulrich Drepper <drepper@redhat.com>
924
925 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Expect blocks are
926 small.
927
928 2010-08-10 Dinakar Guniguntala <dino@in.ibm.com>
929 Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
930
931 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: If
932 FUTEX_WAKE_OP fails make sure to call FUTEX_WAKE instead.
933
934 2010-08-12 H.J. Lu <hongjiu.lu@intel.com>
935
936 * sysdeps/unix/sysv/linux/i386/Makefile: New file.
937
938 2010-05-01 Alan Modra <amodra@gmail.com>
939
940 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
941 (PSEUDO): Use correct cr save. Don't use wrong parm save area
942 to save temps. Correct cfi for possible later frame manipulation.
943 (DOCARGS_1, UNDOCARGS_1): Use the correct parm save area.
944 (DOCARGS_2, UNDOCARGS_2, DOCARGS_3, UNDOCARGS_3): Likewise.
945 (DOCARGS_4, UNDOCARGS_4, DOCARGS_5, UNDOCARGS_5): Likewise.
946 (DOCARGS_6, UNDOCARGS_6): Likewise.
947 (CENABLE, CDISABLE): Add nops for non-shared calls.
948
949 2010-07-06 Andreas Schwab <schwab@redhat.com>
950
951 * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
952 Fix type mismatch.
953
954 2010-07-03 Ulrich Drepper <drepper@redhat.com>
955
956 * tst-abstime.c (do_test): Some more cleanups
957
958 2010-07-02 Ulrich Drepper <drepper@redhat.com>
959
960 * tst-abstime.c: Correct testing and add test for sem_timedwait.
961
962 2010-07-01 Andreas Schwab <schwab@redhat.com>
963 Ulrich Drepper <drepper@redhat.com>
964
965 * Makefile (tests): Add tst-abstime.
966 * tst-abstime.c: New file.
967 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
968 (__lll_timedlock_wait): Check for timestamp before the Epoch.
969 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
970 (__lll_timedlock_wait): Likewise.
971 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
972 (__lll_robust_timedlock_wait): Likewise.
973 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
974 (__pthread_cond_timedwait): Likewise.
975 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
976 (pthread_rwlock_timedrdlock): Likewise.
977 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
978 (pthread_rwlock_timedwrlock): Likewise.
979 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
980 Likewise.
981
982 2010-07-01 Ulrich Drepper <drepper@redhat.com>
983
984 * Makefile (tst-_res1): Add tst-_res1mod1 to dependency list.
985
986 2010-06-01 Takashi Yoshii <takashi.yoshii.zj@renesas.com>
987
988 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Fix incorrect
989 location of ifndef __ASSUME_FUTEX_CLOCK_REALTIME.
990
991 2010-04-09 Ulrich Drepper <drepper@redhat.com>
992
993 [BZ #11390]
994 * sysdeps/unix/sysv/linux/pthread_getname.c: New file.
995 * sysdeps/unix/sysv/linux/pthread_setname.c: New file.
996 * nptl/sysdeps/pthread/pthread.h: Declare pthread_getname and
997 pthread_setname.
998 * Makefile (libpthread-routines): Add pthread_getname and
999 pthread_setname.
1000 * Versions: Export pthread_getname and pthread_setname for GLIBC_2.12.
1001
1002 2010-04-05 Thomas Schwinge <thomas@schwinge.name>
1003
1004 * sysdeps/pthread/unwind-resume.c: Moved to main tree sysdeps/gnu/.
1005 * sysdeps/pthread/rt-unwind-resume.c: Likewise.
1006 * sysdeps/pthread/Makefile: Remove csu section and rt section's
1007 unwind-resume bits, now in main tree sysdeps/gnu/Makefile instead.
1008
1009 2010-03-23 Luis Machado <luisgpm@br.ibm.com>
1010
1011 * pthread_cond_timedwait.c: Add check for
1012 HAVE_CLOCK_GETTIME_VSYSCALL to use VDSO whenever possible.
1013 (pthread_cond_timedwait): Use INTERNAL_VSYSCALL instead of
1014 INTERNAL_SYSCALL.
1015
1016 2010-03-09 Ulrich Drepper <drepper@redhat.com>
1017
1018 * pthread_create.c (__pthread_create_2_1): If priorities are incorrect
1019 and the call fails wake eventually waiting setxid threads. Don't free
1020 stack here if we try starting a thread.
1021 * sysdeps/pthread/createthread.c (do_clone): Only wake setxid waiter
1022 if the clone call failed.
1023
1024 2010-03-08 Andreas Schwab <schwab@redhat.com>
1025
1026 * pthread_create.c (__pthread_create_2_1): Don't set setxid_futex.
1027 * allocatestack.c (get_cached_stack): Set setxid_futex.
1028 (allocate_stack): Likewise.
1029
1030 2010-03-05 Andreas Schwab <schwab@redhat.com>
1031 Ulrich Drepper <drepper@redhat.com>
1032
1033 * allocatestack.c (setxid_mark_thread): Delay handling of thread if
1034 it is creating a thread or it is just being created.
1035 * pthread_create.c (start_thread): Wake setxid thread if it is
1036 waiting.
1037 (__pthread_create_2_1): Initialize setxid_futex.
1038 * sysdeps/pthread/createthread.c (do_clone): Wake setxid thread if it
1039 is waiting.
1040
1041 2010-01-15 Ulrich Drepper <drepper@redhat.com>
1042
1043 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1044 Fix unwind info.
1045 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1046
1047 2010-01-15 Michal Schmidt <mschmidt@redhat.com>
1048
1049 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1050 Fix pthread_cond_timedwait with requeue-PI.
1051 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
1052 Fix pthread_cond_wait with requeue-PI.
1053
1054 2010-01-14 Ulrich Drepper <drepper@redhat.com>
1055
1056 * Versions: Add pthread_mutex_consistent, pthread_mutexattr_getrobust,
1057 and pthread_mutexattr_setrobust for GLIBC_2.12.
1058 * pthread_mutex_consistent.c: Define alias pthread_mutex_consistent.
1059 * pthread_mutexattr_getrobust.c: Define alias
1060 pthread_mutexattr_getrobust.
1061 * pthread_mutexattr_setrobust.c: Define alias
1062 pthread_mutexattr_setrobust.
1063
1064 2010-01-12 Ulrich Drepper <drepper@redhat.com>
1065
1066 * sysdeps/pthread/pthread.h: Cleanup. Fix up for XPG7.
1067
1068 2010-01-08 Ulrich Drepper <drepper@redhat.com>
1069
1070 * sysdeps/pthread/pthread.h: Fix pthread_mutex_consistent declaration.
1071
1072 2009-12-18 Thomas Schwinge <thomas@codesourcery.com>
1073
1074 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c (_init): Don't
1075 call __gmon_start__.
1076 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c (_init): Likewise.
1077
1078 2009-12-17 Ulrich Drepper <drepper@redhat.com>
1079
1080 * pthread_rwlock_init.c (__pthread_rwlock_init): Simplify code by
1081 using memset.
1082
1083 2009-12-01 Dinakar Guniguntala <dino@in.ibm.com>
1084
1085 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.h: Define
1086 FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
1087 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: If mutex
1088 is a non robust PI mutex, then use FUTEX_CMP_REQUEUE_PI.
1089 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
1090 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: If mutex
1091 is a non robust PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
1092 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1093
1094 2009-12-12 Ulrich Drepper <drepper@redhat.com>
1095
1096 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1097 Don't update nwaiters after invalid timeout is recognized.
1098
1099 2009-11-27 Thomas Schwinge <thomas@codesourcery.com>
1100
1101 * sysdeps/unix/sysv/linux/sh/pt-initfini.c (_init): Don't call
1102 __gmon_start__.
1103
1104 2009-11-27 Andreas Schwab <schwab@redhat.com>
1105
1106 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Reload
1107 THREAD_SELF->cancelhandling after returning from futex call.
1108
1109 2009-11-24 Ulrich Drepper <drepper@redhat.com>
1110
1111 * tst-sem13.c: New file.
1112 * Makefile (tests): Add tst-sem13.
1113
1114 2009-11-22 Roland McGrath <roland@redhat.com>
1115
1116 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: # include "i686/dl-sysdep.h"
1117 instead of recapitulating its contents.
1118
1119 2009-11-18 Ulrich Drepper <drepper@redhat.com>
1120
1121 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Minor
1122 optimizations and cleanups.
1123
1124 2009-11-18 Dinakar Guniguntala <dino@in.ibm.com>
1125
1126 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
1127 Remove redundant code. Fix cfi offsets.
1128 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
1129 Fix cfi offsets.
1130
1131 2009-11-17 Ulrich Drepper <drepper@redhat.com>
1132
1133 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Minimally
1134 reduce size of unwind info.
1135
1136 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Convert to use
1137 cfi directives.
1138 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1139 Based on a patch by Dinakar Guniguntala <dino@in.ibm.com>.
1140
1141 2009-11-03 Andreas Schwab <schwab@linux-m68k.org>
1142
1143 [BZ #4457]
1144 * sysdeps/pthread/unwind-resume.c: Include <libgcc_s.h> and use
1145 LIBGCC_S_SO.
1146 * sysdeps/pthread/unwind-forcedunwind.c: Likewise.
1147
1148 2009-10-30 Ulrich Drepper <drepper@redhat.com>
1149
1150 * tst-sem11.c (main): Rewrite to avoid aliasing problems.
1151
1152 [BZ #3270]
1153 * allocatestack.c (__nptl_setxid): Perform the operation in multiple
1154 steps to avoid races with creation and terminations.
1155 * nptl-init.c (sighandler_setxid): Adjust.
1156 Patch by Daniel Jacobowitz.
1157
1158 2009-09-07 Andreas Schwab <schwab@redhat.com>
1159
1160 * sysdeps/pthread/bits/libc-lock.h (BP_SYM): Remove space before paren.
1161
1162 2009-09-02 Suzuki K P <suzuki@in.ibm.com>
1163 Joseph Myers <joseph@codesourcery.com>
1164
1165 [BZ #7094]
1166 * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
1167 Initialize the sigev_notify field for newly created timer to make sure
1168 the timer gets deleted from the active timer's list upon timer_delete.
1169
1170 2009-08-27 Andrew Stubbs <ams@codesourcery.com>
1171
1172 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
1173 Correct a logic error.
1174
1175 2009-08-25 Ulrich Drepper <drepper@redhat.com>
1176
1177 * sysdeps/x86_64/tls.h (RTLD_ENABLE_FOREIGN_CALL): Store old value
1178 of the field in local variables.
1179 (RTLD_FINALIZE_FOREIGN_CALL): Restore rtld_must_xmm_save from local
1180 variable and don't unconditionally clear it.
1181
1182 2009-08-24 Ulrich Drepper <drepper@redhat.com>
1183
1184 * pthread_create.c (start_thread): Hint to the kernel that memory for
1185 the stack can be reused. We do not mark all the memory. The part
1186 still in use and some reserve are kept.
1187
1188 2009-08-23 Ulrich Drepper <drepper@redhat.com>
1189
1190 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Clean up namespace.
1191
1192 2009-08-11 Ulrich Drepper <drepper@redhat.com>
1193
1194 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Add CFI
1195 directives.
1196
1197 2009-08-10 Ulrich Drepper <drepper@redhat.com>
1198
1199 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Add CFI
1200 directives.
1201 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1202
1203 2009-08-10 Andreas Schwab <schwab@redhat.com>
1204
1205 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
1206 (__pthread_cond_signal): Don't clobber register used for syscall
1207 number.
1208
1209 2009-08-08 Ulrich Drepper <drepper@redhat.com>
1210
1211 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1212 Optimize code path used when FUTEX_CLOCK_REALTIME is supported.
1213
1214 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1215 (__pthread_cond_wait): Optimize by avoiding use of callee-safe
1216 register.
1217
1218 2009-08-07 Ulrich Drepper <drepper@redhat.com>
1219
1220 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Little optimizations
1221 enabled by the special *_asynccancel functions.
1222 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1223 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1224
1225 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Include lowlevellock.h.
1226
1227 2009-08-04 Ulrich Drepper <drepper@redhat.com>
1228
1229 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: New file.
1230 * sysdeps/unix/sysv/linux/x86_64/libc-cancellation.S: New file.
1231 * sysdeps/unix/sysv/linux/x86_64/librt-cancellation.S: New file.
1232 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Optimize
1233 since we can assume the special __*_{en,dis}able_asynccancel
1234 functions.
1235 (PUSHARGS_*, POPARGS_*, SAVESTK_*, RESTSTK_*): Removed.
1236 * sysdeps/x86_64/tcb-offsets.sym: Add cancellation-related bits
1237 and PTHREAD_CANCELED.
1238
1239 2009-07-31 Ulrich Drepper <drepper@redhat.com>
1240
1241 * descr.h: Better definition of *_BITMASK macros for cancellation.
1242
1243 2009-07-29 Ulrich Drepper <drepper@redhat.com>
1244
1245 * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Define explicitly to 32.
1246
1247 * sysdeps/x86_64/tls.h (tcbhead_t): Add room for SSE registers the
1248 dynamic linker might have to save.
1249 Define RTLD_CHECK_FOREIGN_CALL, RTLD_ENABLE_FOREIGN_CALL,
1250 RTLD_PREPARE_FOREIGN_CALL, and RTLD_FINALIZE_FOREIGN_CALL. Pretty
1251 printing.
1252
1253 * sysdeps/x86_64/tcb-offsets.sym: Add RTLD_SAVESPACE_SSE.
1254
1255 2009-07-28 Ulrich Drepper <drepper@redhat.com>
1256
1257 * pthread_mutex_lock.c [NO_INCR] (__pthread_mutex_cond_lock_adjust):
1258 New function.
1259 * pthreadP.h: Declare __pthread_mutex_cond_lock_adjust.
1260 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add ROBUST_BIT.
1261 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Don't use
1262 requeue_pi for robust mutexes.
1263 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
1264 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1265 Don't only skip __pthread_mutex_cond_lock. Call instead
1266 __pthread_mutex_cond_lock_adjust.
1267 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1268
1269 * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Minor
1270 optimization of PI mutex handling.
1271
1272 2009-07-27 Ulrich Drepper <drepper@redhat.com>
1273
1274 [BZ #10418]
1275 * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Use _rel
1276 instead of of _acq variants of cmpxchg.
1277
1278 2009-07-23 Ulrich Drepper <drepper@redhat.com>
1279
1280 * sysdeps/x86_64/configure.in: New file.
1281
1282 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix error
1283 path when not using absolute timeout futex.
1284
1285 2009-07-20 Ulrich Drepper <drepper@redhat.com>
1286
1287 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Minor
1288 optimizations of last changes.
1289 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1290
1291 2009-07-19 Ulrich Drepper <drepper@redhat.com>
1292
1293 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
1294 FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
1295 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: If mutex
1296 is a PI mutex, then use FUTEX_CMP_REQUEUE_PI.
1297 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
1298 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: If mutex
1299 is a PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
1300 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1301
1302 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1303 (__pthread_cond_timedwait): Make more robust.
1304
1305 2009-07-18 Ulrich Drepper <drepper@redhat.com>
1306
1307 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
1308 (__lll_robust_timedlock_wait): If possible use FUTEX_WAIT_BITSET to
1309 directly use absolute timeout.
1310
1311 * tst-sem5.c (do_test): Add test for premature timeout.
1312 * Makefile: Linu tst-sem5 with librt.
1313
1314 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
1315 (pthread_rwlock_timedwrlock): If possible use FUTEX_WAIT_BITSET to
1316 directly use absolute timeout.
1317 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
1318 (pthread_rwlock_timedrdlock): Likewise.
1319
1320 * tst-cond11.c (run_test): Add test to check that the timeout is
1321 long enough.
1322
1323 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1324 (__pthread_cond_timedwait): If possible use FUTEX_WAIT_BITSET to
1325 directly use absolute timeout.
1326
1327 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1328 (__pthread_cond_wait): Convert to using exception handler instead of
1329 registered unwind buffer.
1330 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1331 (__pthread_cond_timedwait): Likewise.
1332
1333 2009-07-17 Ulrich Drepper <drepper@redhat.com>
1334
1335 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1336 If possible use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME to directly
1337 use absolute timeout.
1338
1339 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Optimize
1340 handling of uncontested semaphore.
1341
1342 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1343 (__condvar_cleanup): Rewrite to use cfi directives instead of
1344 hand-coded unwind tables.
1345 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S (__pthread_once):
1346 Likewise.
1347 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
1348 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1349 Likewise.
1350
1351 2009-06-12 Ulrich Drepper <drepper@redhat.com>
1352
1353 * Makefile (libpthread-routines): Add pthread_sigqueue.
1354 * Versions: Add pthread_sigqueue for GLIBC_2.11.
1355 * sysdeps/pthread/bits/sigthread.h: Declare pthread_sigqueue.
1356 * sysdeps/unix/sysv/linux/pthread_sigqueue.c: New file.
1357
1358 2009-06-11 Ulrich Drepper <drepper@redhat.com>
1359
1360 [BZ #10262]
1361 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1362 (LOAD_FUTEX_WAIT_ABS): Fix futex parameter in case private futexes
1363 cannot be assumed.
1364 Patch by Bryan Kadzban <bz-glibc@kdzbn.homelinux.net>.
1365
1366 2009-05-16 Ulrich Drepper <drepper@redhat.com>
1367
1368 * libc-cancellation.c: Move __libc_cleanup_routine to...
1369 * libc-cleanup.c: ...here. New file.
1370 * Makefile (routines): Add libc-cleanup.
1371
1372 * cancellation.c (__pthread_disable_asynccancel): Remove unnecessary
1373 test.
1374 * libc-cancellation.c: Use <nptl/cancellation.c: to define the code.
1375 * sysdeps/pthread/librt-cancellation.c: Likewise.
1376
1377 [BZ #9924]
1378 * nptl-init.c: Renamed from init.c.
1379 * Makefile: Change all occurences of init.c to nptl-init.c.
1380
1381 2009-05-15 Ulrich Drepper <drepper@redhat.com>
1382
1383 * cancellation.c (__pthread_disable_asynccancel): Correct the bits
1384 to test when deciding on the delay.
1385 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
1386 * pthread_cancel.c: Close race between deciding on sending a signal
1387 and setting the CANCELING_BIT bit.
1388
1389 * cancellation.c (__pthread_disable_asynccancel): Don't return if
1390 thread is canceled.
1391 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
1392
1393 2009-04-27 Ulrich Drepper <drepper@redhat.com>
1394
1395 * cancellation.c (__pthread_disable_asynccancel): Use THREAD_ATOMIC_AND
1396 is available.
1397 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
1398 * sysdeps/x86_64/tls.h: Define THREAD_ATOMIC_AND.
1399 * sysdeps/i386/tls.h: Likewise.
1400 (tcbhead_t): Add __private_tm member.
1401
1402 2009-04-26 Ulrich Drepper <drepper@redhat.com>
1403
1404 * sem_open.c (sem_open): Rewrite initialization of initsem to
1405 avoid warnings.
1406
1407 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1408 Avoid warning by using may_alias attribute on ptrhack.
1409
1410 2009-04-22 Ulrich Drepper <drepper@redhat.com>
1411
1412 [BZ #10090]
1413 * pthread_attr_setschedparam.c (__pthread_attr_setschedparam):
1414 Check policy and priority for validity.
1415 Patch mostly by Zhang Xiliang <zhangxiliang@cn.fujitsu.com>.
1416
1417 2009-03-15 Ulrich Drepper <drepper@redhat.com>
1418
1419 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1420 (__pthread_cond_timedwait): Change to use cfi directives instead of
1421 hand-coded unwind sections.
1422
1423 2009-03-10 Ulrich Drepper <drepper@redhat.com>
1424
1425 * init.c (nptl_freeres): Compile only for SHARED.
1426
1427 2009-03-09 Jakub Jelinek <jakub@redhat.com>
1428
1429 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Define
1430 FUTEX_WAIT_BITSET, FUTEX_WAKE_BITSET, FUTEX_CLOCK_REALTIME and
1431 FUTEX_BITSET_MATCH_ANY.
1432
1433 2009-02-27 Roland McGrath <roland@redhat.com>
1434
1435 * init.c (__nptl_initial_report_events): Mark __attribute_used__.
1436 * pthread_create.c (__nptl_threads_events, __nptl_last_event): Likewise.
1437
1438 2009-02-26 Ulrich Drepper <drepper@redhat.com>
1439
1440 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1441 _POSIX_THREAD_ROBUST_PRIO_INHERIT and
1442 _POSIX_THREAD_ROBUST_PRIO_PROTECT. Reset value of macros from
1443 200112L to 200809L.
1444
1445 2009-02-25 Ulrich Drepper <drepper@redhat.com>
1446
1447 * sysdeps/pthread/pthread.h: The robust mutex functions are in
1448 POSIX 2008.
1449
1450 2009-02-24 Ulrich Drepper <drepper@redhat.com>
1451
1452 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_BITS_POSIX_OPT_H):
1453 Unify name of include protector macro.
1454
1455 2009-02-14 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
1456
1457 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
1458 LOAD_FUTEX_WAIT_ABS even if (FUTEX_WAIT == 0).
1459
1460 2009-01-29 Ulrich Drepper <drepper@redhat.com>
1461
1462 * sysdeps/pthread/unwind-forcedunwind.c: Encrypt all function
1463 pointer variables.
1464
1465 * allocatestack.c (__free_stacks): Renamed from free_stacks.
1466 (__free_stack_cache): Removed. Change callers to call __free_stacks.
1467 * init.c (nptl_freeres): New function.
1468 (pthread_functions): Initialize ptr_freeres to nptl_freeres.
1469 * pthreadP.h: Don't declare __free_stack_cache. Declare __free_stacks.
1470 * sysdeps/pthread/unwind-forcedunwind.c (libgcc_s_handle): New
1471 variable.
1472 (pthread_cancel_init): Depend in libgcc_s_handle for decision to
1473 load DSO. Assign last.
1474 (__unwind_freeres): New function.
1475
1476 * allocatestack.c (__reclaim_stacks): Reset in_flight_stack later
1477 for better debugging. No need to use stack_list_add here.
1478
1479 2009-01-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1480
1481 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
1482 (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
1483 instead of computing relative timeout.
1484 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
1485 FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
1486
1487 2009-01-25 Ulrich Drepper <drepper@redhat.com>
1488
1489 * pthread_mutex_lock.c (__pthread_mutex_lock): Remove unused label out.
1490
1491 2009-01-08 Ulrich Drepper <drepper@redhat.com>
1492
1493 * sysdeps/pthread/list.h (list_add): Initialize new element first.
1494 (list_add_tail): Removed.
1495
1496 2009-01-07 Ulrich Drepper <drepper@redhat.com>
1497
1498 * (in_flight_stack): New variable.
1499 (stack_list_del): New function. Use instead of list_del.
1500 (stack_list_add): New function. Use instead of list_add when adding to
1501 stack_cache and stack_used lists.
1502 (__reclaim_stacks): Complete operations on stack_cache and stack_used lists
1503 when the fork call interrupted another thread.
1504
1505 2009-01-04 Ulrich Drepper <drepper@redhat.com>
1506
1507 * init.c (__pthread_initialize_minimal_internal): Optimize test
1508 FUTEX_CLOCK_REALTIME a bit.
1509
1510 2009-01-03 Ulrich Drepper <drepper@redhat.com>
1511
1512 * init.c (__pthread_initialize_minimal_internal): Cheat a bit by
1513 only passing five parameters to FUTEX_WAIT_BITSET call.
1514
1515 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1516 (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
1517 instead of computing relative timeout.
1518
1519 2009-01-02 Ulrich Drepper <drepper@redhat.com>
1520
1521 * init.c (__pthread_initialize_minimal_internal): Check for
1522 FUTEX_CLOCK_REALTIME flag.
1523 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
1524 Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME instead of computing
1525 relative timeout.
1526
1527 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
1528 FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
1529 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1530 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1531 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1532 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1533
1534 2008-12-09 Ulrich Drepper <drepper@redhat.com>
1535
1536 * sysdeps/pthread/pthread.h (pthread_cleanup_pop): Use { } as empty
1537 loop body instead of ; to avoid gcc warnings.
1538 (pthread_cleanup_pop_restore_np): Likewise.
1539 Patch by Caolán McNamara <caolanm@redhat.com>.
1540
1541 2008-12-09 Jakub Jelinek <jakub@redhat.com>
1542
1543 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle only the
1544 fast path here, for robust/PI/PP mutexes call
1545 __pthread_mutex_lock_full. Don't use switch, instead use a series
1546 of ifs according to their probability.
1547 (__pthread_mutex_lock_full): New function.
1548 * pthread_mutex_unlock.c: Include assert.h.
1549 (__pthread_mutex_unlock_usercnt): Handle only the
1550 fast path here, for robust/PI/PP mutexes call
1551 __pthread_mutex_unlock_full. Don't use switch, instead use a series
1552 of ifs according to their probability.
1553 (__pthread_mutex_unlock_full): New function.
1554 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c
1555 (__pthread_mutex_lock_full): Define.
1556
1557 2008-12-08 Ulrich Drepper <drepper@redhat.com>
1558
1559 * sysdeps/x86_64/tls.h (tcbhead_t): Add fields reserved for TM
1560 implementation. Add necessary padding and.
1561 * descr.h (struct pthread): Increase padding for tcbhead_t to 24
1562 words.
1563
1564 2008-12-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1565
1566 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define FUTEX_WAIT_BITSET
1567 and FUTEX_WAKE_BITSET.
1568
1569 2008-12-02 Ulrich Drepper <drepper@redhat.com>
1570
1571 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_WAIT_BITSET
1572 and FUTEX_WAKE_BITSET.
1573 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1574 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1575 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1576 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1577
1578 2008-11-25 Roland McGrath <roland@redhat.com>
1579
1580 * sysdeps/alpha, sysdeps/unix/sysv/linux/alpha:
1581 Subdirectories moved to ports repository as
1582 sysdeps/.../nptl subdirectories.
1583
1584 2008-11-12 Jakub Jelinek <jakub@redhat.com>
1585
1586 [BZ #7008]
1587 * pthread_condattr_setclock.c (pthread_condattr_setclock): Fix masking
1588 of old value.
1589 * pthread_cond_init.c (__pthread_cond_init): Fix
1590 cond->__data.__nwaiters initialization.
1591 * Makefile (tests): Add tst-cond23.
1592 * tst-cond23.c: New test.
1593
1594 2008-11-07 Jakub Jelinek <jakub@redhat.com>
1595
1596 * sysdeps/pthread/malloc-machine.h (MALLOC): Adjust __libc_tsd_define
1597 arguments.
1598 (tsd_setspecific, tsd_getspecific): Adjust __libc_tsd_{set,get}
1599 arguments.
1600
1601 2008-11-01 Ulrich Drepper <drepper@redhat.com>
1602
1603 [BZ #6955]
1604 * pthread_mutex_lock.c: Add support for private PI mutexes.
1605 * pthread_mutex_timedlock.c: Likewise.
1606 * pthread_mutex_trylock.c: Likewise.
1607 * pthread_mutex_unlock.c: Likewise.
1608 Patch mostly by Ben Jackson <ben@ben.com>.
1609
1610 2008-10-31 Ulrich Drepper <drepper@redhat.com>
1611
1612 [BZ #6843]
1613 * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread):
1614 Increase stack size for helper thread.
1615
1616 2008-10-06 Martin Schwidefsky <schwidefsky@de.ibm.com>
1617
1618 * sysdeps/s390/tls.h (THREAD_SET_STACK_GUARD): Add empty inline
1619 assembly with a clobber list for access registers a0 and a1.
1620
1621 2008-09-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
1622
1623 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Add memory barrier
1624 to force runp->refcntr to be read from memory.
1625
1626 2008-09-08 Richard Guenther <rguenther@suse.de>
1627
1628 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_lock,
1629 lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
1630 lll_timedlock, lll_robust_timedlock, lll_unlock,
1631 lll_robust_unlock): Promote private to int.
1632
1633 2008-08-15 Ulrich Drepper <drepper@redhat.com>
1634
1635 * sysdeps/x86_64/pthreaddef.h: Remove ARCH_MAP_FLAGS and
1636 ARCH_RETRY_MMAP definitions.
1637 * allocatestack.c: Remove definition of ARCH_MAP_FLAGS.
1638 Define MAP_STACK when not defined.
1639 (allocate_stack): Use MAP_STACK instead of ARCH_MAP_FLAGS. Remove
1640 handling of ARCH_RETRY_MMAP.
1641
1642 2008-07-30 Ulrich Drepper <drepper@redhat.com>
1643
1644 * tst-align2.c (f): Print message that f is reached.
1645
1646 2008-04-28 Hiroki Kaminaga <kaminaga@sm.sony.co.jp>
1647
1648 [BZ #6740]
1649 * sysdeps/powerpc/tcb-offsets.sym (PRIVATE_FUTEX_OFFSET): Guard symbol
1650 definition with #ifndef __ASSUME_PRIVATE_FUTEX.
1651
1652 2008-07-25 Ulrich Drepper <drepper@redhat.com>
1653
1654 * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Use
1655 SOCK_CLOEXEC if possible.
1656
1657 2008-05-29 Ulrich Drepper <drepper@redhat.com>
1658
1659 * Makefile (tests): Add tst-rwlock2a.
1660 * tst-rwlock2.c: Use TYPE macro to decide what rwlock type to use.
1661 * tst-rwlock2a.c: New file.
1662
1663 2008-06-12 Ulrich Drepper <drepper@redhat.com>
1664
1665 * sysdeps/pthread/pthread.h: Remove inadvertant checkin.
1666
1667 2008-05-17 Samuel Thibault <samuel.thibault@ens-lyon.org>
1668
1669 * sysdeps/pthread/pthread.h: Fix typo in comment.
1670
1671 2008-05-28 Ulrich Drepper <drepper@redhat.com>
1672
1673 * sysdeps/pthread/createthread.c (do_clone): Pass accurate length
1674 of CPU set to the kernel.
1675
1676 2008-05-23 Paul Pluzhnikov <ppluzhnikov@google.com>
1677
1678 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Add
1679 cfi directives.
1680 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
1681 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
1682 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1683 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1684 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1685 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1686
1687 2008-05-22 Paul Pluzhnikov <ppluzhnikov@google.com>
1688
1689 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: Add
1690 cfi directives.
1691 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1692 Likewise.
1693 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1694 Likewise.
1695 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1696 Likewise.
1697
1698 2008-05-26 Ulrich Drepper <drepper@redhat.com>
1699
1700 * tst-typesizes.c: Explicitly check __SIZEOF_PTHREAD_* constants.
1701
1702 2008-05-20 Jakub Jelinek <jakub@redhat.com>
1703
1704 David S. Miller <davem@davemloft.net>
1705
1706 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
1707
1708 2008-05-10 Ulrich Drepper <drepper@redhat.com>
1709
1710 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Access
1711 __pshared correctly.
1712 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1713 Likewise.
1714 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1715 Likewise.
1716 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
1717 Likewise.
1718 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
1719 Likewise.
1720 Reported by Clemens Kolbitsch <clemens.kol@gmx.at>.
1721
1722 2008-04-14 David S. Miller <davem@davemloft.net>
1723
1724 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
1725 (__old_sem_wait): Fix argument to lll_futex_wait().
1726
1727 2007-11-26 Daniel Jacobowitz <dan@codesourcery.com>
1728
1729 * pthread_create.c: Require pthread_mutex_trylock and
1730 pthread_key_delete for libgcc.
1731
1732 2008-04-08 Jakub Jelinek <jakub@redhat.com>
1733
1734 [BZ #6020]
1735 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
1736 (lll_futex_wake_unlock): Add private argument to the pre-v9 macro.
1737 Patch by Sunil Amitkumar Janki <devel.sjanki@gmail.com>.
1738
1739 2008-03-27 Ulrich Drepper <drepper@redhat.com>
1740
1741 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine ARG_MAX if
1742 <linux/limits.h> has defined it.
1743 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
1744 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
1745 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
1746 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
1747
1748 2008-03-18 Jakub Jelinek <jakub@redhat.com>
1749
1750 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Use __ASSEMBLER__ instead
1751 of ASSEMBLER.
1752 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
1753 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Likewise.
1754
1755 2008-03-14 Ulrich Drepper <drepper@redhat.com>
1756
1757 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
1758 HAVE_DL_DISCOVER_OSVERSION.
1759 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
1760 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Likewise.
1761
1762 2008-03-07 Ulrich Drepper <drepper@redhat.com>
1763
1764 [BZ #5778]
1765 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Change
1766 _POSIX_CHOWN_RESTRICTED value to zero.
1767
1768 2008-01-31 Roland McGrath <roland@redhat.com>
1769
1770 * Makefile (omit-deps): Variable removed.
1771
1772 2008-01-30 Ulrich Drepper <drepper@redhat.com>
1773
1774 * sysdeps/unix/sysv/linux/x86_64/sem_post.S (sem_post): Avoid
1775 unnecessary addr32 prefix.
1776
1777 2008-01-29 Roland McGrath <roland@redhat.com>
1778
1779 * Makeconfig (ptw-CPPFLAGS, sysd-rules-patterns): New variables.
1780
1781 2008-01-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1782
1783 * sysdeps/unix/sysv/linux/sh/sem_post.S: Don't overflow value field.
1784
1785 2008-01-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1786
1787 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XADD): Use
1788 a scratch register.
1789 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
1790 (__lll_lock_wait_private): Fix typo.
1791 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
1792 (pthread_barrier_wait): Likewise. Adjust XADD use.
1793 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
1794 Adjust XADD use.
1795 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
1796 (pthread_rwlock_timedrdlock): Return correct return value.
1797 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
1798 (pthread_rwlock_timedwrlock): Likewise.
1799
1800 2008-01-15 Ulrich Drepper <drepper@redhat.com>
1801
1802 * tst-eintr2.c (do_test): make sure that if mutex_lock in main
1803 thread returns the program exits with an error code.
1804
1805 2008-01-10 Ulrich Drepper <drepper@redhat.com>
1806
1807 * pthread-errnos.sym: Add EOVERFLOW.
1808 * sysdeps/unix/sysv/linux/structsem.sym: Add SEM_VALUE_MAX.
1809 * sysdeps/unix/sysv/linux/sem_post.c: Don't overflow value field.
1810 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1811 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1812
1813 2007-12-14 Ulrich Drepper <drepper@redhat.com>
1814
1815 * sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
1816 parameter. Passed it as permission to mmap.
1817 * allocatestack.c (allocate_stack): Pass prot as second parameter
1818 to ARCH_RETRY_MMAP.
1819
1820 2007-12-12 Ulrich Drepper <drepper@redhat.com>
1821
1822 * tst-basic7.c: Allocate memory for the stack.
1823
1824 [BZ #5465]
1825 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
1826 (__pthread_cond_timedwait): Don't use VDSO.
1827 Patch by Michal Januszewski.
1828
1829 2007-12-07 Ulrich Drepper <drepper@redhat.com>
1830
1831 [BZ #5455]
1832 * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
1833 Allow label before pthread_cleanup_pop.
1834 (pthread_cleanup_pop_restore_np): Likewise.
1835
1836 2007-12-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1837
1838 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
1839 Store 2 before returning ETIMEDOUT.
1840
1841 2007-11-23 Ulrich Drepper <drepper@redhat.com>
1842
1843 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
1844 Store 2 before returning ETIMEDOUT.
1845 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
1846 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
1847 (__lll_lock_wait_private): Optimize.
1848 (__lll_lock_wait): Likewise.
1849
1850 2007-11-20 Jakub Jelinek <jakub@redhat.com>
1851
1852 * sysdeps/pthread/pthread.h (pthread_cleanup_push,
1853 pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
1854 g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
1855
1856 2007-11-08 Ulrich Drepper <drepper@redhat.com>
1857
1858 [BZ #5240]
1859 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
1860 If we time out, try one last time to lock the futex to avoid
1861 losing a wakeup signal.
1862 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1863 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1864
1865 [BZ #5245]
1866 * sysdeps/pthread/createthread.c (do_clone): Translate clone error
1867 if necessary.
1868
1869 2007-11-07 Ulrich Drepper <drepper@redhat.com>
1870
1871 [BZ #5245]
1872 * allocatestack.c (allocate_stack): Change ENOMEM error in case
1873 mmap failed to EAGAIN.
1874 * Makefile (tests): Add tst-basic7.
1875 * tst-basic7.c: New file.
1876
1877 2007-11-05 Ulrich Drepper <drepper@redhat.com>
1878
1879 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
1880 Use __linkin_atfork.
1881
1882 2007-11-03 Mike Frysinger <vapier@gentoo.org>
1883
1884 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
1885 missing line continuations.
1886 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
1887 LOAD_FUTEX_WAKE): Likewise. Also add missing 3rd parameter.
1888
1889 2007-10-28 Ulrich Drepper <drepper@redhat.com>
1890
1891 [BZ #5220]
1892 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
1893 __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
1894 (struct timer): Add next element.
1895 * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
1896 enqueue timer structure into __active_timer_sigev_thread list.
1897 * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
1898 remove timer struct from __active_timer_sigev_thread.
1899 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
1900 Before using timer structure make sure it is still on the
1901 __active_timer_sigev_thread list. Keep lock until done.
1902 Define __active_timer_sigev_thread and
1903 __active_timer_sigev_thread_lock.
1904
1905 2007-10-27 Ulrich Drepper <drepper@redhat.com>
1906
1907 * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
1908 Redefine thread_atfork for use of ATFORK_MEM.
1909 * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
1910 * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
1911 function.
1912 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
1913 Use atomic operation when removing first element of list.
1914
1915 2007-10-17 Jakub Jelinek <jakub@redhat.com>
1916
1917 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
1918 routine instead of an alias to __new_sem_post.
1919
1920 2007-10-15 Jakub Jelinek <jakub@redhat.com>
1921
1922 * init.c (__pthread_initialize_minimal): Initialize word to appease
1923 valgrind.
1924
1925 2007-10-10 Jakub Jelinek <jakub@redhat.com>
1926
1927 * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
1928 libc.so just clear NAME.
1929 (__libc_rwlock_fini): Nop inside of libc.so.
1930 * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
1931 all zeros.
1932
1933 2007-09-02 Ulrich Drepper <drepper@redhat.com>
1934
1935 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1936 (__pthread_cond_wait): Fix unlocking of internal lock after mutex
1937 unlocking failed.
1938 Patch by Luca Barbieri <luca.barbieri@gmail.com>.
1939
1940 2007-08-21 Ulrich Drepper <drepper@redhat.com>
1941
1942 [BZ #4938]
1943 * allocatestack.c (__reclaim_stacks): Clear the TSD in the
1944 reclaimed stack if necessary.
1945 * Makefile (tests): Add tst-tsd6.
1946 * tst-tsd6.c: New file.
1947
1948 2007-08-21 Jakub Jelinek <jakub@redhat.com>
1949
1950 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
1951 Add private argument.
1952
1953 2007-08-20 Ulrich Drepper <drepper@redhat.com>
1954
1955 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1956 (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
1957
1958 2007-08-16 Jakub Jelinek <jakub@redhat.com>
1959
1960 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
1961 (__lll_robust_timedlock): Pass private as last argument to
1962 __lll_robust_timedlock_wait.
1963 (__lll_unlock): Fix a pasto.
1964
1965 2007-08-15 Jakub Jelinek <jakub@redhat.com>
1966
1967 * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
1968 sparc_old_sem): New structs.
1969 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
1970 (__sem_wait_cleanup): New function.
1971 (__new_sem_wait): Use sparc_new_sem structure. Bump and afterwards
1972 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
1973 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
1974 lll_futex_wait.
1975 (__old_sem_wait): New function.
1976 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
1977 nptl/sysdeps/unix/sysv/linux/sparc version.
1978 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
1979 Likewise.
1980 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
1981 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
1982 (__new_sem_trywait): Use sparc_old_sem structure.
1983 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
1984 (sem_timedwait): Use sparc_new_sem structure. Bump and afterwards
1985 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
1986 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
1987 lll_futex_timed_wait.
1988 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
1989 Use sparc_new_sem structure. Only wake if nwaiters > 0. Pass
1990 isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
1991 lll_futex_wake.
1992 (__old_sem_post): New function.
1993 * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
1994 * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
1995 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
1996 * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
1997 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
1998 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
1999
2000 2007-08-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2001
2002 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
2003 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
2004 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2005 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
2006 * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
2007 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
2008 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2009 Use FUTEX_WAKE_OP.
2010 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
2011 kernel-features.h and tcb-offsets.h.
2012 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
2013 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2014 process private.
2015 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
2016 tcb-offsets.h.
2017 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
2018 to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2019 process private.
2020 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
2021 __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
2022 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
2023 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
2024 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
2025 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
2026 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
2027
2028 2007-08-14 Jakub Jelinek <jakub@redhat.com>
2029
2030 * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
2031 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
2032 (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
2033 lll_futex_timed_wait.
2034
2035 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
2036 __lll_robust_unlock): Rewrite as macros instead of inline functions.
2037 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
2038 __lll_robust_unlock, __lll_wait_tid): Likewise.
2039
2040 2007-08-13 Jakub Jelinek <jakub@redhat.com>
2041
2042 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
2043 Fix a pasto.
2044 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
2045 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
2046 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2047 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
2048 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
2049 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
2050 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2051 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
2052 kernel-features.h.
2053 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
2054 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2055 process private. Switch DW_CFA_advance_loc1 and some
2056 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
2057 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2058 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
2059 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2060 process private. Switch DW_CFA_advance_loc{1,2} and some
2061 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
2062 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
2063 #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
2064 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2065 Likewise.
2066 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2067 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2068 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2069 Likewise.
2070 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2071 (__pthread_cond_broadcast): Compare %r8 instead of
2072 dep_mutex-cond_*(%rdi) with $-1.
2073 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2074 (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
2075 of oring.
2076
2077 2007-08-13 Ulrich Drepper <drepper@redhat.com>
2078
2079 * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
2080
2081 2007-08-13 Jakub Jelinek <jakub@redhat.com>
2082
2083 * allocatestack.c: Include kernel-features.h.
2084 * pthread_create.c: Likewise.
2085 * pthread_mutex_init.c: Likewise.
2086 * init.c: Likewise.
2087 * pthread_cond_timedwait.c: Likewise.
2088 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
2089 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2090 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2091 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2092 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2093 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2094 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2095 Likewise.
2096 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2097 Likewise.
2098 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2099 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2100 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2101 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2102
2103 2007-08-12 Jakub Jelinek <jakub@redhat.com>
2104
2105 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
2106 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
2107 byte elements. One of them is the new __shared element.
2108 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
2109 adjust names of other padding elements.
2110 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
2111 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
2112 byte elements. One of them is the new __shared element.
2113 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
2114 adjust names of other padding elements.
2115 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
2116 Renamed __pad1 element to __shared, adjust names of other padding
2117 elements.
2118 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
2119 (pthread_rwlock_t): Likewise.
2120 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
2121 typo.
2122
2123 2007-08-09 Anton Blanchard <anton@samba.org>
2124
2125 * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
2126
2127 2007-08-12 Ulrich Drepper <drepper@redhat.com>
2128
2129 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
2130 <kernel-features.h>.
2131 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2132
2133 2007-08-11 Ulrich Drepper <drepper@redhat.com>
2134
2135 * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
2136 * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
2137 dealing with robust mutexes.
2138 * pthread_mutex_timedlock.c: Likewise.
2139 * pthread_mutex_trylock.c: Likewise.
2140 * pthread_mutex_unlock.c: Likewise.
2141 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
2142
2143 2007-08-06 Jakub Jelinek <jakub@redhat.com>
2144
2145 * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
2146 (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
2147 (PTHREAD_MUTEX_PSHARED): Define.
2148 * pthread_mutex_init.c (__pthread_mutex_init): Set
2149 PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
2150 mutexes.
2151 * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
2152 instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
2153 as second argument to lll_lock.
2154 (LLL_MUTEX_TRYLOCK): Take mutex as argument
2155 instead of its __data.__lock field.
2156 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
2157 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
2158 to lll_robust_lock.
2159 (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
2160 LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
2161 instead of mutex->__data.__kind directly, pass
2162 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
2163 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
2164 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
2165 directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
2166 (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
2167 to lll_timedlock, lll_robust_timedlock, lll_unlock and
2168 lll_futex_timed_wait. Use PTHREAD_MUTEX_TYPE (mutex) instead
2169 of mutex->__data.__kind directly.
2170 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
2171 PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
2172 lll_robust_timedlock, lll_unlock and lll_futex_timed_wait. Use
2173 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
2174 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
2175 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
2176 and lll_futex_wake.
2177 * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
2178 PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
2179 Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
2180 directly.
2181 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
2182 Take mutex as argument instead of its __data.__lock field, pass
2183 PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
2184 (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
2185 __data.__lock field.
2186 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
2187 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
2188 to lll_robust_cond_lock.
2189 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
2190 variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
2191 lll_futex_wake. Don't use lll_futex_requeue if dependent mutex
2192 has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
2193 * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
2194 variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
2195 lll_futex_wait.
2196 * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
2197 variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
2198 lll_futex_wake.
2199 * pthread_cond_timedwait.c (__pthread_cond_wait): Add
2200 pshared variable, pass it to lll_lock, lll_unlock,
2201 lll_futex_timedwait and lll_futex_wake.
2202 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
2203 pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
2204 and lll_futex_wake.
2205 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
2206 lll_futex_wake_unlock): Add private argument, use __lll_private_flag
2207 macro.
2208 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
2209 lll_futex_wake_unlock): Likewise.
2210 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
2211 Likewise.
2212 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
2213 lll_futex_wake_unlock): Likewise.
2214 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
2215 Likewise.
2216 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
2217 lll_futex_wake_unlock): Likewise.
2218 (lll_futex_wake): Fix a typo.
2219 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
2220 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2221 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
2222 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2223 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
2224 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2225 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
2226 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2227 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2228 (__pthread_cond_timedwait): Likewise.
2229 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
2230 (__condvar_cleanup, __pthread_cond_wait): Likewise.
2231
2232 2007-08-05 Jakub Jelinek <jakub@redhat.com>
2233
2234 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
2235 Don't use CGOTSETUP and CGOTRESTORE macros.
2236 (CGOTSETUP, CGOTRESTORE): Remove.
2237 <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
2238 @local symbol.
2239
2240 2007-08-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2241
2242 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
2243 definitions for private futexes.
2244 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
2245 kernel-features.h and lowlevellock.h. Use private futexes if
2246 they are available.
2247 (__lll_lock_wait_private, __lll_unlock_wake_private): New.
2248 (__lll_mutex_lock_wait): Rename to
2249 (__lll_lock_wait): ... this. Don't compile in for libc.so.
2250 (__lll_mutex_timedlock_wait): Rename to ...
2251 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday.
2252 Don't compile in for libc.so.
2253 (__lll_mutex_unlock_wake): Rename to ...
2254 (__lll_unlock_wake): ... this. Don't compile in for libc.so.
2255 (__lll_timedwait_tid): Use __NR_gettimeofday.
2256 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
2257 the header from assembler. Renamed all lll_mutex_* resp.
2258 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
2259 Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
2260 (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
2261 Define.
2262 (__lll_lock_wait_private): Add prototype.
2263 (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
2264 __lll_robust_timedlock_wait, __lll_unlock_wake_private,
2265 __lll_unlock_wake): Likewise.
2266 (lll_lock): Add private argument. Call __lll_lock_wait_private
2267 if private is constant LLL_PRIVATE.
2268 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
2269 lll_timedlock, lll_robust_timedlock): Add private argument.
2270 (lll_unlock): Add private argument. Call __lll_unlock_wake_private
2271 if private is constant LLL_PRIVATE.
2272 (lll_robust_unlock, lll_robust_dead): Add private argument.
2273 (lll_lock_t): Remove.
2274 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
2275 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
2276 lll_cond_wake, lll_cond_broadcast): Remove.
2277 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
2278 kernel-features.h and lowlevellock.h.
2279 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
2280 (LOAD_FUTEX_WAIT): Define.
2281 (__lll_robust_mutex_lock_wait): Rename to ...
2282 (__lll_robust_lock_wait): ... this. Add private argument.
2283 Use LOAD_FUTEX_WAIT macro.
2284 (__lll_robust_mutex_timedlock_wait): Rename to ...
2285 (__lll_robust_timedlock_wait): ... this. Add private argument.
2286 Use __NR_gettimeofday. Use LOAD_FUTEX_WAIT macro.
2287 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
2288 lowlevellock.h.
2289 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
2290 (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
2291 __lll_mutex_{lock,unlock}_*.
2292 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
2293 lowlevellock.h and pthread-errnos.h.
2294 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
2295 FUTEX_CMP_REQUEUE, EINVAL): Remove.
2296 (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
2297 __lll_mutex_{lock,unlock}_*.
2298 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
2299 lowlevellock.h and pthread-errnos.h.
2300 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
2301 (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
2302 __lll_mutex_{lock,unlock}_*.
2303 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
2304 lowlevellock.h.
2305 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
2306 (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
2307 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
2308 (__condvar_tw_cleanup): Likewise.
2309 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
2310 lowlevellock.h.
2311 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
2312 (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
2313 __lll_mutex_{lock,unlock}_*.
2314 ( __condvar_w_cleanup): Likewise.
2315 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
2316 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2317 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
2318 lowlevellock.h.
2319 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2320 (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
2321 __lll_mutex_{lock,unlock}_*.
2322 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
2323 lowlevellock.h.
2324 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
2325 FUTEX_PRIVATE_FLAG): Remove.
2326 (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
2327 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
2328 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
2329 lowlevellock.h.
2330 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
2331 FUTEX_PRIVATE_FLAG): Remove.
2332 (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
2333 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
2334 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
2335 lowlevellock.h.
2336 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2337 (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
2338 __lll_mutex_{lock,unlock}_*.
2339 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
2340 lowlevellock.h.
2341 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2342 (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
2343 __lll_mutex_{lock,unlock}_*.
2344 * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
2345 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2346 (__new_sem_post): Use standard initial exec code sequences.
2347 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
2348 lowlevellock.h.
2349 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
2350 FUTEX_PRIVATE_FLAG): Remove.
2351 (sem_timedwait): Use __NR_gettimeofday. Use standard initial
2352 exec code sequences.
2353 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
2354 (__new_sem_trywait): Use standard initial exec code sequences.
2355 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
2356 (__new_sem_wait): Use standard initial exec code sequences.
2357
2358 2007-07-31 Anton Blanchard <anton@samba.org>
2359
2360 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
2361 Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
2362 atomic_full_barrier.
2363
2364 2007-07-31 Jakub Jelinek <jakub@redhat.com>
2365
2366 * allocatestack.c (stack_cache_lock): Change type to int.
2367 (get_cached_stack, allocate_stack, __deallocate_stack,
2368 __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
2369 __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
2370 as second argument to lll_lock and lll_unlock macros on
2371 stack_cache_lock.
2372 * pthread_create.c (__find_in_stack_list): Likewise.
2373 (start_thread): Similarly with pd->lock. Use lll_robust_dead
2374 macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
2375 as second argument.
2376 * descr.h (struct pthread): Change lock and setxid_futex field
2377 type to int.
2378 * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
2379 LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
2380 * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
2381 * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
2382 Likewise.
2383 * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
2384 * pthread_cond_init.c (__pthread_cond_init): Likewise.
2385 * pthreadP.h (__attr_list_lock): Change type to int.
2386 * pthread_attr_init.c (__attr_list_lock): Likewise.
2387 * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
2388 ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
2389 lll_{,un}lock.
2390 * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
2391 also for lll_futex_{wake,wait}.
2392 * pthread_barrier_init.c (pthread_barrier_init): Make iattr
2393 a pointer to const.
2394 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
2395 LLL_SHARED as second argument to lll_{,un}lock.
2396 * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
2397 * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
2398 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
2399 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
2400 Likewise.
2401 * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
2402 as second argument to lll_{,un}lock macros on pd->lock.
2403 * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
2404 * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
2405 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
2406 * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
2407 Likewise.
2408 * sysdeps/pthread/createthread.c (do_clone, create_thread):
2409 Likewise.
2410 * pthread_once.c (once_lock): Change type to int.
2411 (__pthread_once): Pass LLL_PRIVATE as second argument to
2412 lll_{,un}lock macros on once_lock.
2413 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
2414 lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
2415 rwlock->__data.__shared as second argument to them and similarly
2416 for lll_futex_w*.
2417 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
2418 Likewise.
2419 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
2420 Likewise.
2421 * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
2422 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
2423 * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
2424 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
2425 * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
2426 to lll_{,un}lock macros on __sem_mappings_lock.
2427 * sem_open.c (check_add_mapping): Likewise.
2428 (__sem_mappings_lock): Change type to int.
2429 * semaphoreP.h (__sem_mappings_lock): Likewise.
2430 * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
2431 LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
2432 instead of lll_*mutex_*, pass LLL_SHARED as last
2433 argument.
2434 (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
2435 pass LLL_SHARED as last argument.
2436 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
2437 LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
2438 lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
2439 pass LLL_SHARED as last argument.
2440 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
2441 lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
2442 LLL_SHARED as last argument.
2443 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
2444 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
2445 Similarly.
2446 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
2447 __libc_lock_lock_recursive, __libc_lock_unlock,
2448 __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
2449 argument to lll_{,un}lock.
2450 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
2451 _IO_lock_unlock): Likewise.
2452 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
2453 compound literal.
2454 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
2455 Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
2456 __fork_lock.
2457 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
2458 free_mem): Likewise.
2459 (__fork_lock): Change type to int.
2460 * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
2461 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
2462 isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
2463 lll_futex_wake.
2464 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
2465 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
2466 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
2467 New function.
2468 (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
2469 pass it through to lll_futex_*wait, only compile in when
2470 IS_IN_libpthread.
2471 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
2472 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
2473 argument and pass it through to lll_futex_*wait.
2474 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
2475 lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
2476 lll_robust_*. Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
2477 inline functions to __lll_* resp. __lll_robust_*.
2478 (LLL_MUTEX_LOCK_INITIALIZER): Remove.
2479 (lll_mutex_dead): Add private argument.
2480 (__lll_lock_wait_private): New prototype.
2481 (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
2482 __lll_robust_lock_timedwait): Add private argument to prototypes.
2483 (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
2484 call __lll_lock_wait_private, otherwise pass private to
2485 __lll_lock_wait.
2486 (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
2487 __lll_robust_timedlock): Add private argument, pass it to
2488 __lll_*wait functions.
2489 (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
2490 call __lll_unlock_wake_private, otherwise pass private to
2491 __lll_unlock_wake.
2492 (__lll_robust_unlock): Add private argument, pass it to
2493 __lll_robust_unlock_wake.
2494 (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
2495 lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
2496 argument, pass it through to __lll_* inline function.
2497 (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
2498 (lll_lock_t): Remove.
2499 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
2500 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
2501 lll_cond_wake, lll_cond_broadcast): Remove.
2502 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2503 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2504 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2505 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2506 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
2507 the header from assembler. Renamed all lll_mutex_* resp.
2508 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
2509 (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
2510 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2511 (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
2512 LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
2513 (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
2514 __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
2515 Remove prototype.
2516 (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
2517 (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
2518 rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
2519 (lll_trylock): Likewise, use __lll_trylock_asm, pass
2520 MULTIPLE_THREADS_OFFSET as another asm operand.
2521 (lll_lock): Add private argument, use __lll_lock_asm_start, pass
2522 MULTIPLE_THREADS_OFFSET as last asm operand, call
2523 __lll_lock_wait_private if private is constant LLL_PRIVATE,
2524 otherwise pass private as another argument to __lll_lock_wait.
2525 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
2526 lll_timedlock, lll_robust_timedlock): Add private argument, pass
2527 private as another argument to __lll_*lock_wait call.
2528 (lll_unlock): Add private argument, use __lll_unlock_asm, pass
2529 MULTIPLE_THREADS_OFFSET as another asm operand, call
2530 __lll_unlock_wake_private if private is constant LLL_PRIVATE,
2531 otherwise pass private as another argument to __lll_unlock_wake.
2532 (lll_robust_unlock): Add private argument, pass private as another
2533 argument to __lll_unlock_wake.
2534 (lll_robust_dead): Add private argument, use __lll_private_flag
2535 macro.
2536 (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
2537 LLL_MUTEX_LOCK_INITIALIZER.
2538 (lll_lock_t): Remove.
2539 (LLL_LOCK_INITIALIZER_WAITERS): Define.
2540 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
2541 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
2542 lll_cond_wake, lll_cond_broadcast): Remove.
2543 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2544 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
2545 2007-05-2{3,9} changes.
2546 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
2547 kernel-features.h and lowlevellock.h.
2548 (LOAD_PRIVATE_FUTEX_WAIT): Define.
2549 (LOAD_FUTEX_WAIT): Rewritten.
2550 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
2551 define.
2552 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
2553 (__lll_mutex_lock_wait): Rename to ...
2554 (__lll_lock_wait): ... this. Take futex addr from %edx instead of
2555 %ecx, %ecx is now private argument. Don't compile in for libc.so.
2556 (__lll_mutex_timedlock_wait): Rename to ...
2557 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday. %esi
2558 contains private argument. Don't compile in for libc.so.
2559 (__lll_mutex_unlock_wake): Rename to ...
2560 (__lll_unlock_wake): ... this. %ecx contains private argument.
2561 Don't compile in for libc.so.
2562 (__lll_timedwait_tid): Use __NR_gettimeofday.
2563 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
2564 kernel-features.h and lowlevellock.h.
2565 (LOAD_FUTEX_WAIT): Define.
2566 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
2567 define.
2568 (__lll_robust_mutex_lock_wait): Rename to ...
2569 (__lll_robust_lock_wait): ... this. Futex addr is now in %edx
2570 argument, %ecx argument contains private. Use LOAD_FUTEX_WAIT
2571 macro.
2572 (__lll_robust_mutex_timedlock_wait): Rename to ...
2573 (__lll_robust_timedlock_wait): ... this. Use __NR_gettimeofday.
2574 %esi argument contains private, use LOAD_FUTEX_WAIT macro.
2575 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
2576 lowlevellock.h.
2577 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2578 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
2579 PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
2580 __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
2581 to __lll_lock_wait in %edx.
2582 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
2583 Include lowlevellock.h and pthread-errnos.h.
2584 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
2585 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
2586 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
2587 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
2588 pass LLL_SHARED in %ecx to both __lll_lock_wait and
2589 __lll_unlock_wake.
2590 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
2591 Include lowlevellock.h and pthread-errnos.h.
2592 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
2593 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
2594 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
2595 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
2596 pass LLL_SHARED in %ecx to both __lll_lock_wait and
2597 __lll_unlock_wake.
2598 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
2599 Include lowlevellock.h.
2600 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
2601 Don't define.
2602 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
2603 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
2604 pass LLL_SHARED in %ecx to both __lll_lock_wait and
2605 __lll_unlock_wake. Use __NR_gettimeofday.
2606 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
2607 Include lowlevellock.h.
2608 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2609 (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
2610 to __lll_*, pass cond_lock address in %edx rather than %ecx to
2611 __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
2612 and __lll_unlock_wake.
2613 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
2614 Include lowlevellock.h.
2615 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2616 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
2617 MUTEX(%ebx) address in %edx rather than %ecx to
2618 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
2619 and __lll_unlock_wake. Move return value from %ecx to %edx
2620 register.
2621 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2622 Include lowlevellock.h.
2623 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
2624 Don't define.
2625 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
2626 MUTEX(%ebp) address in %edx rather than %ecx to
2627 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
2628 and __lll_unlock_wake. Move return value from %ecx to %edx
2629 register. Use __NR_gettimeofday.
2630 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2631 Include lowlevellock.h.
2632 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
2633 Don't define.
2634 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
2635 MUTEX(%ebp) address in %edx rather than %ecx to
2636 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
2637 and __lll_unlock_wake. Move return value from %ecx to %edx
2638 register. Use __NR_gettimeofday.
2639 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
2640 Include lowlevellock.h.
2641 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2642 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
2643 MUTEX(%edi) address in %edx rather than %ecx to
2644 __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
2645 and __lll_unlock_wake.
2646 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
2647 Include lowlevellock.h.
2648 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2649 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
2650 MUTEX(%ebx) address in %edx rather than %ecx to
2651 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
2652 and __lll_unlock_wake. Move return value from %ecx to %edx
2653 register.
2654 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
2655 lowlevellock.h.
2656 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
2657 define.
2658 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
2659 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
2660 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
2661 lowlevellock.h.
2662 (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
2663 (sem_timedwait): Use __NR_gettimeofday.
2664 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
2665 lowlevellock.h.
2666 (LOCK): Don't define.
2667 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
2668 lowlevellock.h.
2669 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
2670 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
2671 are waiters.
2672 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
2673 2007-05-2{3,9} changes.
2674 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
2675 kernel-features.h and lowlevellock.h.
2676 (LOAD_PRIVATE_FUTEX_WAIT): Define.
2677 (LOAD_FUTEX_WAIT): Rewritten.
2678 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
2679 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
2680 (__lll_mutex_lock_wait): Rename to ...
2681 (__lll_lock_wait): ... this. %esi is now private argument.
2682 Don't compile in for libc.so.
2683 (__lll_mutex_timedlock_wait): Rename to ...
2684 (__lll_timedlock_wait): ... this. %esi contains private argument.
2685 Don't compile in for libc.so.
2686 (__lll_mutex_unlock_wake): Rename to ...
2687 (__lll_unlock_wake): ... this. %esi contains private argument.
2688 Don't compile in for libc.so.
2689 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
2690 kernel-features.h and lowlevellock.h.
2691 (LOAD_FUTEX_WAIT): Define.
2692 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
2693 (__lll_robust_mutex_lock_wait): Rename to ...
2694 (__lll_robust_lock_wait): ... this. %esi argument contains private.
2695 Use LOAD_FUTEX_WAIT macro.
2696 (__lll_robust_mutex_timedlock_wait): Rename to ...
2697 (__lll_robust_timedlock_wait): ... this. %esi argument contains
2698 private, use LOAD_FUTEX_WAIT macro.
2699 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
2700 lowlevellock.h.
2701 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2702 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
2703 PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
2704 __lll_lock_wait and __lll_unlock_wake.
2705 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
2706 Include lowlevellock.h and pthread-errnos.h.
2707 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
2708 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
2709 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
2710 pass LLL_SHARED in %esi to both __lll_lock_wait and
2711 __lll_unlock_wake.
2712 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
2713 Include lowlevellock.h and pthread-errnos.h.
2714 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
2715 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
2716 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
2717 pass LLL_SHARED in %esi to both __lll_lock_wait and
2718 __lll_unlock_wake.
2719 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
2720 Include lowlevellock.h.
2721 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2722 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
2723 pass LLL_SHARED in %esi to both __lll_lock_wait and
2724 __lll_unlock_wake.
2725 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
2726 Include lowlevellock.h.
2727 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2728 (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
2729 to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
2730 and __lll_unlock_wake.
2731 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
2732 Include lowlevellock.h.
2733 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2734 Don't define.
2735 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
2736 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
2737 and __lll_unlock_wake.
2738 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
2739 Include lowlevellock.h.
2740 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2741 Don't define.
2742 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
2743 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
2744 and __lll_unlock_wake.
2745 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2746 Include lowlevellock.h.
2747 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2748 Don't define.
2749 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
2750 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
2751 and __lll_unlock_wake.
2752 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
2753 Include lowlevellock.h.
2754 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2755 Don't define.
2756 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
2757 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
2758 and __lll_unlock_wake.
2759 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
2760 Include lowlevellock.h.
2761 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2762 Don't define.
2763 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
2764 pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
2765 and __lll_unlock_wake.
2766 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
2767 lowlevellock.h.
2768 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
2769 define.
2770 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
2771 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
2772 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
2773 lowlevellock.h.
2774 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
2775 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
2776 lowlevellock.h.
2777 (LOCK): Don't define.
2778 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
2779 lowlevellock.h.
2780 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
2781 * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
2782 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
2783 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
2784 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
2785 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
2786 (__lll_lock_wait_private): New function.
2787 (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
2788 it to lll_futex_*wait. Don't compile in for libc.so.
2789 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
2790 Remove.
2791 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
2792 (struct sparc_pthread_barrier): Remove.
2793 (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
2794 struct sparc_pthread_barrier. Pass
2795 ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
2796 and lll_futex_wait macros.
2797 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
2798 Remove.
2799 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
2800 Include sparc pthread_barrier_wait.c instead of generic one.
2801
2802 2007-07-30 Jakub Jelinek <jakub@redhat.com>
2803
2804 * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
2805
2806 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
2807 (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
2808 %ecx.
2809 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
2810 (pthread_rwlock_timedwrlock): Likewise.
2811 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
2812 (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
2813
2814 2007-07-31 Jakub Jelinek <jakub@redhat.com>
2815
2816 * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
2817
2818 2007-07-26 Jakub Jelinek <jakub@redhat.com>
2819
2820 * tst-locale2.c (useless): Add return statement.
2821
2822 2007-07-24 Jakub Jelinek <jakub@redhat.com>
2823
2824 * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
2825 lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
2826 * pthread_create.c (start_thread): Likewise.
2827 * init.c (sighandler_setxid): Likewise.
2828 * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2829 * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2830 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2831 * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2832 * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2833 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2834 * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2835 * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2836 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
2837 Likewise.
2838 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
2839 Likewise.
2840 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
2841 Likewise.
2842 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
2843 __rtld_notify): Likewise.
2844 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
2845 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
2846 __pthread_once): Likewise.
2847 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
2848 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
2849 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
2850 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
2851 (lll_futex_wait): Add private argument, define as wrapper around
2852 lll_futex_timed_wait.
2853 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
2854 use __lll_private_flag macro.
2855 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
2856 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
2857 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
2858 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
2859 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
2860 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
2861 (lll_futex_wait): Add private argument, define as wrapper around
2862 lll_futex_timed_wait.
2863 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
2864 use __lll_private_flag macro.
2865 (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
2866 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
2867 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
2868 Define.
2869 (lll_futex_timed_wait, lll_futex_wake): Use it.
2870 (lll_private_futex_wait, lll_private_futex_timed_wait,
2871 lll_private_futex_wake): Removed.
2872 * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
2873 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
2874 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
2875 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
2876 (lll_futex_wait): Add private argument, define as wrapper around
2877 lll_futex_timed_wait.
2878 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
2879 use __lll_private_flag macro.
2880 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
2881 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
2882 to lll_futex_*.
2883 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
2884 (lll_private_futex_wait, lll_private_futex_timed_wait,
2885 lll_private_futex_wake): Removed.
2886 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
2887 Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
2888 (lll_private_futex_wait, lll_private_futex_timed_wait,
2889 lll_private_futex_wake): Removed.
2890 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
2891 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
2892 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
2893 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
2894 (lll_futex_wait): Add private argument, define as wrapper around
2895 lll_futex_timed_wait.
2896 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
2897 use __lll_private_flag macro.
2898 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
2899 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
2900 to lll_futex_*.
2901 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
2902 Define.
2903 (lll_futex_timed_wait, lll_futex_wake): Use it.
2904 (lll_private_futex_wait, lll_private_futex_timed_wait,
2905 lll_private_futex_wake): Removed.
2906
2907 2007-07-27 Jakub Jelinek <jakub@redhat.com>
2908
2909 * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
2910 of the structure for sparc32.
2911
2912 2007-07-26 Aurelien Jarno <aurelien@aurel32.net>
2913
2914 * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
2915
2916 2007-07-23 Ulrich Drepper <drepper@redhat.com>
2917
2918 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
2919 code used when private futexes are assumed.
2920 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2921 Likewise.
2922
2923 2007-07-23 Jakub Jelinek <jakub@redhat.com>
2924
2925 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
2926 (__lll_private_flag): Define.
2927 (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
2928 (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
2929 __lll_private_flag.
2930 (lll_private_futex_wait, lll_private_futex_timedwait,
2931 lll_private_futex_wake): Define as wrapper around non-_private
2932 macros.
2933 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2934 (__lll_private_flag): Define.
2935 (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
2936 (lll_private_futex_wait, lll_private_futex_timedwait,
2937 lll_private_futex_wake): Define as wrapper around non-_private
2938 macros.
2939
2940 2007-07-10 Steven Munroe <sjmunroe@us.ibm.com>
2941
2942 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
2943 parameter to lll_futex_wait call.
2944 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
2945
2946 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
2947 Replace lll_futex_wait with lll_private_futex_wait.
2948 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
2949 Add LLL_SHARED parameter to lll_futex_wake().
2950
2951 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
2952 LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
2953 lll_private_futex_wake.
2954 (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
2955 bit from private parm before syscall.
2956 (lll_futex_timed_wait): Likewise.
2957 (lll_futex_wake): Likewise.
2958 (lll_futex_wake_unlock): Likewise.
2959 (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
2960 (lll_robust_mutex_unlock): Likewise.
2961 (lll_mutex_unlock_force): Likewise.
2962 (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
2963
2964 2007-07-23 Ulrich Drepper <drepper@redhat.com>
2965
2966 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
2967 compilation when unconditionally using private futexes.
2968 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
2969 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2970 Likewise.
2971 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
2972 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
2973
2974 2007-07-17 Jakub Jelinek <jakub@redhat.com>
2975
2976 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
2977 Define.
2978
2979 2007-07-06 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2980
2981 * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
2982 kernel-features.h.
2983
2984 2007-05-16 Roland McGrath <roland@redhat.com>
2985
2986 * init.c (__nptl_initial_report_events): New variable.
2987 (__pthread_initialize_minimal_internal): Initialize pd->report_events
2988 to that.
2989
2990 2007-06-22 Jakub Jelinek <jakub@redhat.com>
2991
2992 * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
2993 cpusetsize if pthread_getaffinity_np failed with ENOSYS.
2994
2995 2007-06-19 Ulrich Drepper <drepper@redhat.com>
2996
2997 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
2998 implementation.
2999
3000 2007-06-18 Ulrich Drepper <drepper@redhat.com>
3001
3002 * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
3003 * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
3004 * pthread_mutex_timedlock.c: Likewise.
3005 * pthread_mutex_trylock.c: Likewise.
3006 * pthread_mutex_unlock.c: Likewise.
3007
3008 2007-06-17 Andreas Schwab <schwab@suse.de>
3009
3010 * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
3011 sections.
3012
3013 2007-06-17 Ulrich Drepper <drepper@redhat.com>
3014
3015 * allocatestack.c (allocate_stack): Make code compile if
3016 __ASSUME_PRIVATE_FUTEX is set.
3017
3018 2007-06-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3019
3020 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
3021 (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
3022 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
3023 (__pthread_rwlock_wrlock): Likewise.
3024 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
3025 (pthread_rwlock_timedrdlock): Likewise.
3026 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
3027 (pthread_rwlock_timedwrlock): Likewise.
3028 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
3029 (__pthread_rwlock_unlock): Likewise.
3030
3031 2007-06-10 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3032
3033 * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
3034 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
3035 Split __flags into __flags, __shared, __pad1 and __pad2.
3036 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
3037 futexes if they are available.
3038 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
3039 in libc-lowlevellock.S allow using private futexes.
3040 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
3041 FUTEX_PRIVATE_FLAG. Add additional parameter to lll_futex_wait,
3042 lll_futex_timed_wait and lll_futex_wake. Change lll_futex_wait
3043 to call lll_futex_timed_wait. Add lll_private_futex_wait,
3044 lll_private_futex_timed_wait and lll_private_futex_wake.
3045 (lll_robust_mutex_unlock): Fix typo.
3046 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
3047 field in futex command setup.
3048 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
3049 COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
3050 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
3051 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
3052 if they are available. Remove clear_once_control.
3053 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
3054 futexes if they are available.
3055 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
3056 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
3057 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
3058 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
3059 * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
3060 Wake only when there are waiters.
3061 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
3062 support. Indicate that there are waiters. Remove unnecessary
3063 extra cancellation test.
3064 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise. Removed
3065 left-over duplication of __sem_wait_cleanup.
3066
3067 2007-06-07 Ulrich Drepper <drepper@redhat.com>
3068
3069 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
3070 parameter to lll_futex_wait, lll_futex_timed_wait, and
3071 lll_futex_wake. Change lll_futex_wait to call lll_futex_timed_wait.
3072 Add lll_private_futex_wait, lll_private_futex_timed_wait, and
3073 lll_private_futex_wake.
3074 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
3075 * allocatestack.c: Adjust use of lll_futex_* macros.
3076 * init.c: Likewise.
3077 * lowlevellock.h: Likewise.
3078 * pthread_barrier_wait.c: Likewise.
3079 * pthread_cond_broadcast.c: Likewise.
3080 * pthread_cond_destroy.c: Likewise.
3081 * pthread_cond_signal.c: Likewise.
3082 * pthread_cond_timedwait.c: Likewise.
3083 * pthread_cond_wait.c: Likewise.
3084 * pthread_create.c: Likewise.
3085 * pthread_mutex_lock.c: Likewise.
3086 * pthread_mutex_setprioceiling.c: Likewise.
3087 * pthread_mutex_timedlock.c: Likewise.
3088 * pthread_mutex_unlock.c: Likewise.
3089 * pthread_rwlock_timedrdlock.c: Likewise.
3090 * pthread_rwlock_timedwrlock.c: Likewise.
3091 * pthread_rwlock_unlock.c: Likewise.
3092 * sysdeps/alpha/tls.h: Likewise.
3093 * sysdeps/i386/tls.h: Likewise.
3094 * sysdeps/ia64/tls.h: Likewise.
3095 * sysdeps/powerpc/tls.h: Likewise.
3096 * sysdeps/pthread/aio_misc.h: Likewise.
3097 * sysdeps/pthread/gai_misc.h: Likewise.
3098 * sysdeps/s390/tls.h: Likewise.
3099 * sysdeps/sh/tls.h: Likewise.
3100 * sysdeps/sparc/tls.h: Likewise.
3101 * sysdeps/unix/sysv/linux/fork.c: Likewise.
3102 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
3103 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
3104 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
3105 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
3106 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
3107 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
3108 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
3109 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
3110 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
3111 Likewise.
3112 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
3113 * sysdeps/x86_64/tls.h: Likewise.
3114
3115 2007-05-29 Ulrich Drepper <drepper@redhat.com>
3116
3117 * pthread_getattr_np.c: No need to install a cancellation handler,
3118 this is no cancellation point.
3119 * pthread_getschedparam.c: Likewise.
3120 * pthread_setschedparam.c: Likewise.
3121 * pthread_setschedprio.c: Likewise.
3122 * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
3123 lll_unlock_wake_cb.
3124 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
3125 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
3126 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
3127 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3128 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3129 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3130 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
3131 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
3132 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
3133 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
3134 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
3135 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3136
3137 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
3138 whether there are more than one thread makes no sense here since
3139 we only call the slow path if the locks are taken.
3140 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
3141
3142 * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
3143 COND_NWAITERS_SHIFT.
3144 * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
3145 COND_CLOCK_BITS.
3146 * pthread_cond_init.c: Likewise.
3147 * pthread_cond_timedwait.c: Likewise.
3148 * pthread_cond_wait.c: Likewise.
3149 * pthread_condattr_getclock.c: Likewise.
3150 * pthread_condattr_setclock.c: Likewise.
3151 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
3152 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3153 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3154 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3155 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3156
3157 2007-05-28 Jakub Jelinek <jakub@redhat.com>
3158
3159 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
3160 unistd.h.
3161
3162 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
3163 insn suffix.
3164 (THREAD_GSCOPE_GET_FLAG): Remove.
3165 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
3166 * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
3167 changes.
3168 * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
3169 (THREAD_GSCOPE_GET_FLAG): Remove.
3170 (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
3171 instead of THREAD_GSCOPE_GET_FLAG.
3172 (THREAD_GSCOPE_SET_FLAG): Likewise. Add atomic_write_barrier after
3173 it.
3174 * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3175 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3176 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3177 THREAD_GSCOPE_WAIT): Define.
3178 * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3179 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3180 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3181 THREAD_GSCOPE_WAIT): Define.
3182 * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3183 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3184 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3185 THREAD_GSCOPE_WAIT): Define.
3186 * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3187 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3188 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3189 THREAD_GSCOPE_WAIT): Define.
3190
3191 2007-05-24 Richard Henderson <rth@redhat.com>
3192
3193 * descr.h (struct pthread): Add header.gscope_flag.
3194 * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3195 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3196 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3197 THREAD_GSCOPE_WAIT): Define.
3198
3199 2007-05-27 Ulrich Drepper <drepper@redhat.com>
3200
3201 * init.c: Make it compile with older kernel headers.
3202
3203 * tst-initializers1.c: Show through exit code which test failed.
3204
3205 * pthread_rwlock_init.c: Also initialize __shared field.
3206 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
3207 element in rwlock structure into four byte elements. One of them is
3208 the new __shared element.
3209 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
3210 Likewise.
3211 [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
3212 __shared, adjust names of other padding elements.
3213 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3214 * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
3215 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
3216 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
3217 FUTEX_PRIVATE_FLAG.
3218 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
3219 futex to use private operations if possible.
3220 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3221 Likewise.
3222 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3223 Likewise.
3224 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
3225 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3226 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
3227 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3228 Likewise.
3229 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3230 Likewise.
3231 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
3232 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
3233
3234 2007-05-26 Ulrich Drepper <drepper@redhat.com>
3235
3236 * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
3237 * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
3238 * pthread_rwlock_timedrdlock.c: Likewise.
3239 * pthread_rwlock_tryrdlock.c: Likewise.
3240
3241 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
3242 optimization.
3243
3244 * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
3245 * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
3246 duplication of __sem_wait_cleanup.
3247
3248 * allocatestack.c: Revert last change.
3249 * init.c: Likewise.
3250 * sysdeps/i386/tls.h: Likewise.
3251 * sysdeps/x86_64/tls.h: Likewise.
3252 * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
3253 header structure.
3254 * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
3255
3256 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
3257 Add private field.
3258 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
3259 * pthread_barrier_init.c: Set private flag if pshared and private
3260 futexes are supported.
3261 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
3262 private field in futex command setup.
3263 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
3264
3265 2007-05-25 Ulrich Drepper <drepper@redhat.com>
3266
3267 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
3268 support.
3269 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
3270 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
3271 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3272 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3273 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3274
3275 * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
3276 * sem_init.c (__new_sem_init): Rewrite to initialize all three
3277 fields in the structure.
3278 (__old_sem_init): New function.
3279 * sem_open.c: Initialize all fields of the structure.
3280 * sem_getvalue.c: Adjust for renamed element.
3281 * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
3282 (gen-as-const-headers): Add structsem.sym.
3283 * sysdeps/unix/sysv/linux/structsem.sym: New file.
3284 * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
3285 struct new_sem. Add struct old_sem.
3286 * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
3287 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
3288 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3289 * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
3290 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
3291 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3292 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
3293 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
3294 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3295 * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
3296 * tst-sem10.c: New file.
3297 * tst-sem11.c: New file.
3298 * tst-sem12.c: New file.
3299 * tst-typesizes.c: Test struct new_sem and struct old_sem instead
3300 of struct sem.
3301
3302 2007-05-25 Ulrich Drepper <drepper@redhat.com>
3303 Jakub Jelinek <jakub@redhat.com>
3304
3305 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
3306 Move __pthread_enable_asynccancel right before futex syscall.
3307 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
3308 Likewise.
3309
3310 2007-05-24 Jakub Jelinek <jakub@redhat.com>
3311
3312 * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
3313 THREAD_COPY_PRIVATE_FUTEX): Define.
3314 * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
3315 THREAD_COPY_PRIVATE_FUTEX): Define.
3316 * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
3317 * init.c (__pthread_initialize_minimal_internal): Use
3318 THREAD_SET_PRIVATE_FUTEX.
3319
3320 * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
3321 (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
3322 THREAD_GSCOPE_FLAG_WAIT): Define.
3323 (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
3324 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
3325 * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
3326 PTR_DEMANGLE.
3327 (THREAD_GSCOPE_GET_FLAG): Define.
3328 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
3329 * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
3330 instead of ->header.gscope_flag directly.
3331
3332 2007-05-23 Ulrich Drepper <drepper@redhat.com>
3333
3334 * init.c (__pthread_initialize_minimal_internal): Check whether
3335 private futexes are available.
3336 * allocatestack.c (allocate_stack): Copy private_futex field from
3337 current thread into the new stack.
3338 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
3339 futexes if they are available.
3340 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
3341 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
3342 in libc-lowlevellock.S allow using private futexes.
3343 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
3344 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
3345 FUTEX_PRIVATE_FLAG.
3346 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
3347 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
3348 if they are available.
3349 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
3350 * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
3351 * sysdeps/i386/tcb-offsets.sym: Likewise.
3352 * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
3353 * sysdeps/i386/tls.h (tcbhead_t): Likewise.
3354
3355 2007-05-21 Ulrich Drepper <drepper@redhat.com>
3356
3357 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3358 Remove ptr_wait_lookup_done again.
3359 * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
3360 (__pthread_initialize_minimal_internal): Initialize
3361 _dl_wait_lookup_done pointer in _rtld_global directly.
3362 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
3363 Remove code to code _dl_wait_lookup_done.
3364 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
3365 encrypted for now.
3366
3367 2007-05-21 Jakub Jelinek <jakub@redhat.com>
3368
3369 * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
3370 pthread_mutex_init failed with ENOTSUP.
3371
3372 2007-05-19 Ulrich Drepper <drepper@redhat.com>
3373
3374 * allocatestack.c (__wait_lookup_done): New function.
3375 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3376 Add ptr_wait_lookup_done.
3377 * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
3378 * pthreadP.h: Declare __wait_lookup_done.
3379 * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
3380 Define macros to implement reference handling of global scope.
3381 * sysdeps/x86_64/tls.h: Likewise.
3382 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
3383 Initialize GL(dl_wait_lookup_done).
3384
3385 2007-05-17 Ulrich Drepper <drepper@redhat.com>
3386
3387 [BZ #4512]
3388 * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
3389 is detected.
3390 * pthread_mutex_timedlock.c: Likewise.
3391 * pthread_mutex_trylock.c: Likewise.
3392 Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
3393
3394 * Makefile (tests): Add tst-robust9 and tst-robustpi9.
3395 * tst-robust9.c: New file.
3396 * tst-robustpi9.c: New file.
3397
3398 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
3399 unnecessary extra cancellation test.
3400
3401 2007-05-14 Ulrich Drepper <drepper@redhat.com>
3402
3403 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
3404 extra cancellation test.
3405 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3406
3407 2007-05-10 Ulrich Drepper <drepper@redhat.com>
3408
3409 * descr.h (struct pthread): Rearrange members to fill hole in
3410 64-bit layout.
3411
3412 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
3413 (__pthread_setaffinity_new): If syscall was successful and
3414 RESET_VGETCPU_CACHE is defined, use it before returning.
3415 * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
3416
3417 2007-05-10 Jakub Jelinek <jakub@redhat.com>
3418
3419 [BZ #4455]
3420 * tst-align2.c: Include stackinfo.h.
3421 * tst-getpid1.c: Likewise.
3422
3423 2007-05-02 Carlos O'Donell <carlos@systemhalted.org>
3424
3425 [BZ #4455]
3426 * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
3427 * tst-getpid1.c (do_test): Likewise.
3428
3429 [BZ #4456]
3430 * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
3431 (allocate_stack): Likewise.
3432
3433 2007-05-07 Ulrich Drepper <drepper@redhat.com>
3434
3435 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
3436 (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
3437 (__lll_robust_timedlock_wait): Likewise.
3438 Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
3439
3440 2007-05-06 Mike Frysinger <vapier@gentoo.org>
3441
3442 [BZ #4465]
3443 * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
3444 * tst-cancel4.c (tf_fdatasync): New test.
3445
3446 2007-04-27 Ulrich Drepper <drepper@redhat.com>
3447
3448 [BZ #4392]
3449 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
3450 check mutexes like normal mutexes.
3451
3452 [BZ #4306]
3453 * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
3454 Initialize the whole sigevent structure to appease valgrind.
3455
3456 2007-04-25 Ulrich Drepper <drepper@redhat.com>
3457
3458 * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
3459 * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
3460
3461 2007-04-06 Ulrich Drepper <drepper@redhat.com>
3462
3463 * tst-locale1.c: Avoid warnings.
3464 * tst-locale2.c: Likewise.
3465
3466 2007-03-19 Steven Munroe <sjmunroe@us.ibm.com>
3467
3468 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3469 (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
3470
3471 2007-03-16 Jakub Jelinek <jakub@redhat.com>
3472
3473 * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
3474 __extern_always_inline where appropriate.
3475 * sysdeps/pthread/pthread.h: Likewise.
3476
3477 2007-03-13 Richard Henderson <rth@redhat.com>
3478
3479 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
3480 separate cfi regions for the two subsections.
3481
3482 2007-02-25 Ulrich Drepper <drepper@redhat.com>
3483
3484 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
3485 new thread, don't just decrement it.
3486 Patch by Suzuki K P <suzuki@in.ibm.com>.
3487
3488 2007-02-21 Ulrich Drepper <drepper@redhat.com>
3489
3490 * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
3491 PTHFCT_CALL definition.
3492
3493 2007-02-18 Ulrich Drepper <drepper@redhat.com>
3494
3495 * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
3496 available, don't use it.
3497
3498 2007-02-09 Jakub Jelinek <jakub@redhat.com>
3499
3500 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3501 (__lll_mutex_timedlock_wait): Use correct pointer when we don't
3502 call into the kernel to delay.
3503
3504 2007-01-18 Ulrich Drepper <drepper@redhat.com>
3505
3506 * tst-initializers1.c: We want to test the initializers as seen
3507 outside of libc, so undefined _LIBC.
3508
3509 * pthread_join.c (cleanup): Avoid warning.
3510
3511 2007-01-17 Ulrich Drepper <drepper@redhat.com>
3512
3513 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3514 (__lll_timedwait_tid): Add unwind info.
3515
3516 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
3517 function table, mangle the pointers.
3518 * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
3519 * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
3520 * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
3521 demangle pointers before use.
3522 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
3523 demangle pointer.
3524 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
3525 * sysdeps/pthread/setxid.h: Likewise.
3526
3527 2007-01-12 Ulrich Drepper <drepper@redhat.com>
3528
3529 * tst-rwlock7.c: Show some more information in case of correct
3530 behavior.
3531
3532 2007-01-11 Ulrich Drepper <drepper@redhat.com>
3533
3534 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3535 (lll_futex_timed_wait): Undo part of last change, don't negate
3536 return value.
3537
3538 2007-01-10 Ulrich Drepper <drepper@redhat.com>
3539
3540 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups. Define
3541 FUTEX_CMP_REQUEUE and lll_futex_requeue.
3542
3543 2006-12-28 David S. Miller <davem@davemloft.net>
3544
3545 * shlib-versions: Fix sparc64 linux target specification.
3546
3547 2007-01-10 Jakub Jelinek <jakub@redhat.com>
3548
3549 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
3550 Adjust include path for pthread_barrier_wait.c move.
3551
3552 2006-12-21 Jakub Jelinek <jakub@redhat.com>
3553
3554 * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
3555 tid isn't reread from pd->tid in between ESRCH test and the syscall.
3556
3557 2006-12-06 Jakub Jelinek <jakub@redhat.com>
3558
3559 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
3560 6 argument cancellable syscalls.
3561 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
3562 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
3563 6 argument cancellable syscalls.
3564 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
3565
3566 2006-12-09 Ulrich Drepper <drepper@redhat.com>
3567
3568 * sysdeps/unix/sysv/linux/rtld-lowlevel.h
3569 (__rtld_mrlock_initialize): Add missing closing parenthesis.
3570
3571 2006-10-30 Jakub Jelinek <jakub@redhat.com>
3572
3573 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
3574 __sync_lock_release instead of __sync_lock_release_si.
3575
3576 2006-10-29 Jakub Jelinek <jakub@redhat.com>
3577
3578 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
3579 Define.
3580 (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
3581 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
3582 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
3583 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
3584 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
3585 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
3586 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
3587 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3588 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
3589 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
3590 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
3591
3592 2006-10-27 Ulrich Drepper <drepper@redhat.com>
3593
3594 * sysdeps/pthread/pthread_barrier_wait.c: Move to...
3595 * pthread_barrier_wait.c: ...here.
3596 * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
3597 * pthread_cond_broadcast.c: ...here.
3598 * sysdeps/pthread/pthread_cond_signal.c: Move to...
3599 * pthread_cond_signal.c: ...here.
3600 * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
3601 * pthread_cond_timedwait.c: ...here.
3602 * sysdeps/pthread/pthread_cond_wait.c: Move to...
3603 * pthread_cond_wait.c: ...here.
3604 * sysdeps/pthread/pthread_once.c: Move to...
3605 * pthread_once.c: ...here.
3606 * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
3607 * pthread_rwlock_rdlock.c: ...here.
3608 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
3609 * pthread_rwlock_timedrdlock.c: ...here.
3610 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
3611 * pthread_rwlock_timedwrlock.c: ...here.
3612 * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
3613 * pthread_rwlock_unlock.c: ...here.
3614 * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
3615 * pthread_rwlock_wrlock.c: ...here.
3616 * sysdeps/pthread/pthread_spin_destroy.c: Move to...
3617 * pthread_spin_destroy.c: ...here.
3618 * sysdeps/pthread/pthread_spin_init.c: Move to...
3619 * pthread_spin_init.c: ...here.
3620 * sysdeps/pthread/pthread_spin_unlock.c: Move to...
3621 * pthread_spin_unlock.c: ...here.
3622 * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
3623 * pthread_getcpuclockid.c: ...here.
3624
3625 * init.c: USE_TLS support is now always enabled.
3626 * tst-tls5.h: Likewise.
3627 * sysdeps/alpha/tls.h: Likewise.
3628 * sysdeps/i386/tls.h: Likewise.
3629 * sysdeps/ia64/tls.h: Likewise.
3630 * sysdeps/powerpc/tls.h: Likewise.
3631 * sysdeps/s390/tls.h: Likewise.
3632 * sysdeps/sh/tls.h: Likewise.
3633 * sysdeps/sparc/tls.h: Likewise.
3634 * sysdeps/x86_64/tls.h: Likewise.
3635
3636 2006-10-27 Jakub Jelinek <jakub@redhat.com>
3637
3638 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
3639 __rtld_mrlock_change): Update oldval if atomic compare and exchange
3640 failed.
3641
3642 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
3643 Define to THREAD_SELF->header.multiple_threads.
3644 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
3645 Likewise.
3646 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
3647 Likewise.
3648 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
3649 (SINGLE_THREAD_P): Likewise.
3650 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
3651 (SINGLE_THREAD_P): Likewise.
3652 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3653 (SINGLE_THREAD_P): Likewise.
3654 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
3655 (SINGLE_THREAD_P): Likewise.
3656 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
3657 Likewise.
3658 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
3659 (SINGLE_THREAD_P): Likewise.
3660 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
3661 (SINGLE_THREAD_P): Likewise.
3662 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
3663 Likewise.
3664
3665 2006-10-26 Jakub Jelinek <jakub@redhat.com>
3666
3667 * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
3668 by default rather than 2_3_3.
3669
3670 2006-10-17 Jakub Jelinek <jakub@redhat.com>
3671
3672 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
3673 __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
3674 atomic_* instead of catomic_* macros.
3675
3676 2006-10-12 Ulrich Drepper <drepper@redhat.com>
3677
3678 [BZ #3285]
3679 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
3680 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
3681 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
3682 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
3683 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
3684 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
3685 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
3686 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
3687 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
3688 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
3689 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
3690 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
3691 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
3692
3693 2006-10-11 Ulrich Drepper <drepper@redhat.com>
3694
3695 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
3696 cancelable syscalls with six parameters.
3697
3698 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
3699 operations instead of atomic_*.
3700
3701 2006-10-09 Ulrich Drepper <drepper@redhat.com>
3702
3703 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
3704
3705 2006-10-07 Ulrich Drepper <drepper@redhat.com>
3706
3707 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
3708 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
3709 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
3710 New file.
3711 * pthread_attr_setstack.c: Allow overwriting the version number of the
3712 new symbol.
3713 * pthread_attr_setstacksize.c: Likewise.
3714 (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
3715 it.
3716 * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
3717 pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
3718
3719 2006-09-24 Ulrich Drepper <drepper@redhat.com>
3720
3721 [BZ #3251]
3722 * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
3723 Patch by Petr Baudis.
3724
3725 2006-09-18 Jakub Jelinek <jakub@redhat.com>
3726
3727 * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
3728
3729 * tst-cancel2.c (tf): Loop as long as something was written.
3730
3731 2006-09-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3732
3733 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
3734 mutexes wake all mutexes.
3735 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
3736 WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
3737 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
3738
3739 2006-09-12 Ulrich Drepper <drepper@redhat.com>
3740
3741 * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
3742 to guarantee the thread is always canceled.
3743
3744 2006-09-08 Jakub Jelinek <jakub@redhat.com>
3745
3746 * tst-cond22.c: Include pthread.h instead of pthreadP.h.
3747 Include stdlib.h.
3748 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
3749 increase FUTEX if increasing WAKEUP_SEQ. Fix comment typo.
3750 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3751 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3752 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3753
3754 2006-09-08 Ulrich Drepper <drepper@redhat.com>
3755
3756 [BZ #3123]
3757 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
3758 increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
3759 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3760 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3761 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3762 * Makefile (tests): Add tst-cond22.
3763 * tst-cond22.c: New file.
3764
3765 2006-09-05 Ulrich Drepper <drepper@redhat.com>
3766
3767 [BZ #3124]
3768 * descr.h (struct pthread): Add parent_cancelhandling.
3769 * sysdeps/pthread/createthread.c (create_thread): Pass parent
3770 cancelhandling value to child.
3771 * pthread_create.c (start_thread): If parent thread was canceled
3772 reset the SIGCANCEL mask.
3773 * Makefile (tests): Add tst-cancel25.
3774 * tst-cancel25.c: New file.
3775
3776 2006-09-05 Jakub Jelinek <jakub@redhat.com>
3777 Ulrich Drepper <drepper@redhat.com>
3778
3779 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
3780 counterp if it is already zero.
3781 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
3782
3783 2006-03-04 Jakub Jelinek <jakub@redhat.com>
3784 Roland McGrath <roland@redhat.com>
3785
3786 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
3787 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
3788 LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
3789 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
3790 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
3791 lll_robust_mutex_timedlock, lll_mutex_unlock,
3792 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
3793 Add _L_*_ symbols around the subsection.
3794 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
3795 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
3796
3797 2006-03-03 Jakub Jelinek <jakub@redhat.com>
3798 Roland McGrath <roland@redhat.com>
3799
3800 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3801 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
3802 LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
3803 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
3804 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
3805 lll_robust_mutex_timedlock, lll_mutex_unlock,
3806 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
3807 Add _L_*_ symbols around the subsection.
3808 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
3809 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
3810
3811 2006-08-31 Ulrich Drepper <drepper@redhat.com>
3812
3813 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
3814 change because it can disturb too much existing code. If real hard
3815 reader preference is needed we'll introduce another type.
3816 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
3817 (pthread_rwlock_timedwrlock): Likewise.
3818 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
3819 Likewise.
3820
3821 2006-08-30 Ulrich Drepper <drepper@redhat.com>
3822
3823 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
3824 reader preference.
3825 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
3826 (pthread_rwlock_timedwrlock): Likewise.
3827 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
3828 Likewise.
3829
3830 2006-08-25 Jakub Jelinek <jakub@redhat.com>
3831
3832 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
3833 Only define ifdef SHARED.
3834
3835 2006-08-23 Ulrich Drepper <drepper@redhat.com>
3836
3837 * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
3838 (free_stacks): ...here.
3839 (__free_stack_cache): New function.
3840 * pthreadP.h: Declare __free_stack_cache.
3841 * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
3842 ptr_freeres.
3843 * init.c (pthread_functions): Initialize ptr_freeres.
3844 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
3845 New freeres function.
3846
3847 2006-07-30 Joseph S. Myers <joseph@codesourcery.com>
3848
3849 [BZ #3018]
3850 * Makefile (extra-objs): Add modules to extra-test-objs instead.
3851
3852 2006-08-20 Ulrich Drepper <drepper@redhat.com>
3853
3854 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
3855 _XOPEN_REALTIME_THREADS.
3856
3857 2006-08-15 Jakub Jelinek <jakub@redhat.com>
3858
3859 * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
3860 HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
3861 HAVE_CLOCK_GETTIME_VSYSCALL.
3862 (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
3863
3864 2006-08-14 Jakub Jelinek <jakub@redhat.com>
3865
3866 * sysdeps/unix/sysv/linux/bits/posix_opt.h
3867 (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
3868 * descr.h (struct priority_protection_data): New type.
3869 (struct pthread): Add tpp field.
3870 * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
3871 PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
3872 PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
3873 * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
3874 TPP mutexes.
3875 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
3876 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
3877 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
3878 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
3879 * tpp.c: New file.
3880 * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
3881 boosted by TPP.
3882 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
3883 * pthread_mutexattr_getprioceiling.c
3884 (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
3885 in the SCHED_FIFO priority range.
3886 * pthread_mutexattr_setprioceiling.c
3887 (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
3888 * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
3889 if mutex is not TPP. Ceiling is now in __data.__lock.
3890 * pthread_mutex_setprioceiling.c: Include stdbool.h.
3891 (pthread_mutex_setprioceiling): Fix prioceiling validation. Ceiling
3892 is now in __data.__lock. Add locking.
3893 * pthread_create.c (__free_tcb): Free pd->tpp structure.
3894 * Makefile (libpthread-routines): Add tpp.
3895 (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
3896 * tst-tpp.h: New file.
3897 * tst-mutexpp1.c: New file.
3898 * tst-mutexpp6.c: New file.
3899 * tst-mutexpp10.c: New file.
3900 * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
3901 * tst-mutex6.c (TEST_FUNCTION): Likewise.
3902
3903 2006-08-12 Ulrich Drepper <drepper@redhat.com>
3904
3905 [BZ #2843]
3906 * pthread_join.c (pthread_join): Account for self being canceled
3907 when checking for deadlocks.
3908 * tst-join5.c: Cleanups. Allow to be used in tst-join6.
3909 (tf1): Don't print anything after pthread_join returns, this would be
3910 another cancellation point.
3911 (tf2): Likewise.
3912 * tst-join6.c: New file.
3913 * Makefile (tests): Add tst-join6.
3914
3915 2006-08-03 Ulrich Drepper <drepper@redhat.com>
3916
3917 [BZ #2892]
3918 * pthread_setspecific.c (__pthread_setspecific): Check
3919 out-of-range index before checking for unused key.
3920
3921 * sysdeps/pthread/gai_misc.h: New file.
3922
3923 2006-08-01 Ulrich Drepper <drepper@redhat.com>
3924
3925 * sysdeps/unix/sysv/linux/i386/smp.h: New file. Old Linux-specific
3926 file. Don't use sysctl.
3927 * sysdeps/unix/sysv/linux/smp.h: Always assume SMP. Archs can
3928 overwrite the file if this is likely not true.
3929
3930 2006-07-31 Daniel Jacobowitz <dan@codesourcery.com>
3931
3932 * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
3933 * Makefile (tests): Add tst-getpid3.
3934 * tst-getpid3.c: New file.
3935
3936 2006-07-30 Roland McGrath <roland@redhat.com>
3937
3938 * Makefile (libpthread-routines): Add ptw-sigsuspend.
3939
3940 * sysdeps/unix/sysv/linux/i386/not-cancel.h
3941 (pause_not_cancel): New macro.
3942 (nanosleep_not_cancel): New macro.
3943 (sigsuspend_not_cancel): New macro.
3944 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
3945 nanosleep_not_cancel macro from <not-cancel.h>.
3946 * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
3947 macro from <not-cancel.h>.
3948
3949 2006-07-28 Ulrich Drepper <drepper@redhat.com>
3950 Jakub Jelinek <jakub@redhat.com>
3951
3952 * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
3953 notification of PI mutex. Add ENQUEUE_MUTEX_PI.
3954 * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
3955 * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
3956 * pthread_mutex_init.c: Add support for priority inheritance mutex.
3957 * pthread_mutex_lock.c: Likewise.
3958 * pthread_mutex_timedlock.c: Likewise.
3959 * pthread_mutex_trylock.c: Likewise.
3960 * pthread_mutex_unlock.c: Likewise.
3961 * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
3962 all mutexes.
3963 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
3964 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
3965 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
3966 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
3967 pthread-pi-defines.sym.
3968 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
3969 FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
3970 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3971 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
3972 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3973 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3974 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3975 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
3976 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
3977 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
3978 _POSIX_THREAD_PRIO_INHERIT to 200112L.
3979 * tst-mutex1.c: Adjust to allow use in PI mutex test.
3980 * tst-mutex2.c: Likewise.
3981 * tst-mutex3.c: Likewise.
3982 * tst-mutex4.c: Likewise.
3983 * tst-mutex5.c: Likewise.
3984 * tst-mutex6.c: Likewise.
3985 * tst-mutex7.c: Likewise.
3986 * tst-mutex7a.c: Likewise.
3987 * tst-mutex8.c: Likewise.
3988 * tst-mutex9.c: Likewise.
3989 * tst-robust1.c: Likewise.
3990 * tst-robust7.c: Likewise.
3991 * tst-robust8.c: Likewise.
3992 * tst-mutexpi1.c: New file.
3993 * tst-mutexpi2.c: New file.
3994 * tst-mutexpi3.c: New file.
3995 * tst-mutexpi4.c: New file.
3996 * tst-mutexpi5.c: New file.
3997 * tst-mutexpi6.c: New file.
3998 * tst-mutexpi7.c: New file.
3999 * tst-mutexpi7a.c: New file.
4000 * tst-mutexpi8.c: New file.
4001 * tst-mutexpi9.c: New file.
4002 * tst-robust1.c: New file.
4003 * tst-robust2.c: New file.
4004 * tst-robust3.c: New file.
4005 * tst-robust4.c: New file.
4006 * tst-robust5.c: New file.
4007 * tst-robust6.c: New file.
4008 * tst-robust7.c: New file.
4009 * tst-robust8.c: New file.
4010 * Makefile (tests): Add the new tests.
4011
4012 * pthread_create.c (start_thread): Add some casts to avoid warnings.
4013 * pthread_mutex_destroy.c: Remove unneeded label.
4014
4015 2006-07-01 Ulrich Drepper <drepper@redhat.com>
4016
4017 * pthread_mutex_init.c (__pthread_mutex_init): Move some
4018 computations to compile time.
4019
4020 2006-06-04 Ulrich Drepper <drepper@redhat.com>
4021
4022 * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
4023
4024 2006-05-15 Ulrich Drepper <drepper@redhat.com>
4025
4026 * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
4027
4028 2006-05-11 Ulrich Drepper <drepper@redhat.com>
4029
4030 * pthread_key_create.c (__pthread_key_create): Do away with
4031 __pthread_keys_lock.
4032
4033 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4034 (__kernel_cpumask_size): Mark as hidden.
4035 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
4036
4037 * sem_open.c (__sem_mappings_lock): Mark as hidden.
4038 * semaphoreP.h (__sem_mappings_lock): Likewise.
4039
4040 2006-05-10 Ulrich Drepper <drepper@redhat.com>
4041
4042 * pthread_atfork.c: Mark __dso_handle as hidden.
4043
4044 2006-05-09 Ulrich Drepper <drepper@redhat.com>
4045
4046 [BZ #2644]
4047 * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
4048 the reload problem. Change the one path in pthread_cancel_init
4049 which causes the problem. Force gcc to reload. Simplify callers.
4050 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
4051 (_Unwind_GetBSP): Undo last patch.
4052
4053 2006-05-07 Ulrich Drepper <drepper@redhat.com>
4054
4055 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
4056 function pointer is reloaded after pthread_cancel_init calls.
4057
4058 [BZ #2644]
4059 * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
4060 pointers are reloaded after pthread_cancel_init calls.
4061
4062 2006-05-01 Ulrich Drepper <drepper@redhat.com>
4063
4064 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
4065 __always_inline.
4066
4067 2006-04-27 Ulrich Drepper <drepper@redhat.com>
4068
4069 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
4070 Allocate new object which is passed to timer_sigev_thread so that
4071 the timer can be deleted before the new thread is scheduled.
4072
4073 2006-04-26 Roland McGrath <roland@redhat.com>
4074
4075 * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
4076
4077 2006-04-08 Ulrich Drepper <drepper@redhat.com>
4078
4079 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
4080 suffix for conditional jumps.
4081 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
4082 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
4083 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
4084 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
4085 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
4086 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
4087
4088 * init.c (sigcancel_handler): Compare with correct PID even if the
4089 thread is in the middle of a fork call.
4090 (sighandler_setxid): Likewise.
4091 Reported by Suzuki K P <suzuki@in.ibm.com> .
4092
4093 2006-04-07 Jakub Jelinek <jakub@redhat.com>
4094
4095 * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
4096
4097 2006-04-06 Ulrich Drepper <drepper@redhat.com>
4098
4099 * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
4100 fails [Coverity CID 105].
4101
4102 2006-04-05 Ulrich Drepper <drepper@redhat.com>
4103
4104 * sysdeps/pthread/pthread.h: Add nonnull attributes.
4105
4106 2006-04-03 Steven Munroe <sjmunroe@us.ibm.com>
4107
4108 [BZ #2505]
4109 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
4110 Define __lll_rel_instr using lwsync.
4111
4112 2006-03-27 Ulrich Drepper <drepper@redhat.com>
4113
4114 * allocatestack.c (allocate_stack): Always initialize robust_head.
4115 * descr.h: Define struct robust_list_head.
4116 (struct pthread): Use robust_list_head in robust mutex list definition.
4117 Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
4118 * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
4119 (__pthread_initialize_minimal_internal): Register robust_list with
4120 the kernel.
4121 * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
4122 Declare __set_robust_list_avail.
4123 * pthread_create.c (start_thread): Register robust_list of new thread.
4124 [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
4125 waiters.
4126 * pthread_mutex_destroy.c: For robust mutexes don't look at the
4127 number of users, it's unreliable.
4128 * pthread_mutex_init.c: Allow use of pshared robust mutexes if
4129 set_robust_list syscall is available.
4130 * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
4131 * pthread_mutex_lock.c: Simplify robust mutex code a bit.
4132 Set robust_head.list_op_pending before trying to lock a robust mutex.
4133 * pthread_mutex_timedlock.c: Likewise.
4134 * pthread_mutex_trylock.c: Likewise.
4135 * pthread_mutex_unlock.c: Likewise for unlocking.
4136 * Makefile (tests): Add tst-robust8.
4137 * tst-robust8.c: New file.
4138
4139 2006-03-08 Andreas Schwab <schwab@suse.de>
4140
4141 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
4142 (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
4143
4144 2006-03-05 Roland McGrath <roland@redhat.com>
4145
4146 * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
4147 and $config_os doesn't match *linux*.
4148
4149 2006-03-05 David S. Miller <davem@sunset.davemloft.net>
4150
4151 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
4152 Use __syscall_error.
4153 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
4154 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
4155 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
4156 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
4157 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
4158 * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
4159
4160 2006-03-02 Ulrich Drepper <drepper@redhat.com>
4161
4162 * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
4163
4164 2006-03-01 Ulrich Drepper <drepper@redhat.com>
4165
4166 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
4167 (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
4168 mutex.
4169 (__lll_robust_timedlock_wait): Likewise.
4170 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
4171 (__lll_robust_lock_wait): Likewise.
4172 (__lll_robust_timedlock_wait): Likewise.
4173 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
4174 (__lll_robust_lock_wait): Likewise.
4175 (__lll_robust_timedlock_wait): Likewise.
4176
4177 2006-03-01 Jakub Jelinek <jakub@redhat.com>
4178
4179 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
4180 lll_robust_mutex_trylock, lll_robust_mutex_lock,
4181 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
4182 lll_robust_mutex_unlock): Define.
4183 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
4184
4185 2006-02-28 H.J. Lu <hongjiu.lu@intel.com>
4186
4187 * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
4188 instead of <clone.S>.
4189
4190 2006-02-27 Jakub Jelinek <jakub@redhat.com>
4191
4192 * Makefile (libpthread-routines): Add
4193 pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
4194 and pthread_mutex_[sg]etprioceiling.
4195 * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
4196 pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
4197 pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
4198 pthread_mutex_setprioceiling.
4199 * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
4200 PTHREAD_PRIO_PROTECT): New enum values.
4201 (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
4202 pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
4203 pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
4204 prototypes.
4205 * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
4206 PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
4207 (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
4208 Define.
4209 (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
4210 PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
4211 PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
4212 (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
4213 and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
4214 * pthread_mutex_init.c (__pthread_mutex_init): For the time being
4215 return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
4216 protocol mutexes.
4217 * pthread_mutex_getprioceiling.c: New file.
4218 * pthread_mutex_setprioceiling.c: New file.
4219 * pthread_mutexattr_getprioceiling.c: New file.
4220 * pthread_mutexattr_setprioceiling.c: New file.
4221 * pthread_mutexattr_getprotocol.c: New file.
4222 * pthread_mutexattr_setprotocol.c: New file.
4223
4224 2006-02-27 Daniel Jacobowitz <dan@codesourcery.com>
4225
4226 * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
4227
4228 2006-02-27 Roland McGrath <roland@redhat.com>
4229
4230 * sysdeps/pthread/Subdirs: List nptl here too.
4231 * configure (libc_add_on_canonical): New variable.
4232
4233 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
4234
4235 * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
4236 self to get main source tree's file.
4237 * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
4238 * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
4239 * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
4240 * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
4241 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
4242 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
4243 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
4244 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
4245 * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
4246 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
4247 * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
4248 * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
4249 * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
4250
4251 * Makefile: Use $(sysdirs) in vpath directive.
4252
4253 * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
4254 (CPPFLAGS-timer_routines.c): Likewise.
4255
4256 * Makeconfig (includes): Variable removed.
4257
4258 2006-02-26 Roland McGrath <roland@redhat.com>
4259
4260 * sysdeps/generic/pt-raise.c: Moved to ...
4261 * pt-raise.c: ... here.
4262 * sysdeps/generic/lowlevellock.h: Moved to ...
4263 * lowlevellock.h: ... here.
4264
4265 2006-02-23 Roland McGrath <roland@redhat.com>
4266
4267 * descr.h (struct pthread): Add final member `end_padding'.
4268 (PTHREAD_STRUCT_END_PADDING): Use it.
4269
4270 2006-02-20 Roland McGrath <roland@redhat.com>
4271
4272 * sysdeps/mips: Directory removed, saved in ports repository.
4273 * sysdeps/unix/sysv/linux/mips: Likewise.
4274
4275 2006-02-18 Ulrich Drepper <drepper@redhat.com>
4276
4277 * tst-robust1.c: Add second mutex to check that the mutex list is
4278 handled correctly.
4279
4280 2006-02-17 Jakub Jelinek <jakub@redhat.com>
4281
4282 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
4283 lll_robust_mutex_trylock, lll_robust_mutex_lock,
4284 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
4285 lll_robust_mutex_unlock): New macros.
4286 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
4287 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
4288 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
4289 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
4290 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
4291
4292 2006-02-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4293
4294 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
4295 definitions.
4296 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
4297
4298 2006-02-17 Ulrich Drepper <drepper@redhat.com>
4299
4300 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
4301 (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
4302 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
4303 (lll_robust_mutex_unlock): Likewise.
4304
4305 2006-02-13 Jakub Jelinek <jakub@redhat.com>
4306
4307 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
4308 Set robust_list.__next rather than robust_list.
4309 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
4310 (__pthread_list_t): New typedef.
4311 (pthread_mutex_t): Replace __next and __prev fields with __list.
4312 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
4313 (__pthread_list_t): New typedef.
4314 (pthread_mutex_t): Replace __next and __prev fields with __list.
4315 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4316 (__pthread_list_t, __pthread_slist_t): New typedefs.
4317 (pthread_mutex_t): Replace __next and __prev fields with __list.
4318 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
4319 (__pthread_list_t, __pthread_slist_t): New typedefs.
4320 (pthread_mutex_t): Replace __next and __prev fields with __list.
4321 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
4322 (__pthread_list_t, __pthread_slist_t): New typedefs.
4323 (pthread_mutex_t): Replace __next and __prev fields with __list.
4324 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
4325 (__pthread_slist_t): New typedef.
4326 (pthread_mutex_t): Replace __next field with __list.
4327
4328 2006-02-15 Ulrich Drepper <drepper@redhat.com>
4329
4330 * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
4331 PTHREAD_MUTEX_OWNERDEAD.
4332 (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
4333 Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
4334 * Makefile (libpthread-routines): Add lowlevelrobustlock.
4335 * pthread_create.c (start_thread): Very much simplify robust_list loop.
4336 * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
4337 to PTHREAD_MUTEX_INCONSISTENT.
4338 * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
4339 * pthread_mutex_lock.c: Reimplement robust mutex handling.
4340 * pthread_mutex_trylock.c: Likewise.
4341 * pthread_mutex_timedlock.c: Likewise.
4342 * pthread_mutex_unlock.c: Likewise.
4343 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
4344 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
4345 lowlevelrobustlock.sym.
4346 * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
4347 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
4348 definitions.
4349 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4350 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
4351 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
4352 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
4353 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
4354
4355 2006-02-12 Ulrich Drepper <drepper@redhat.com>
4356
4357 * allocatestack.c (allocate_stack): Initialize robust_list.
4358 * init.c (__pthread_initialize_minimal_internal): Likewise.
4359 * descr.h (struct xid_command): Pretty printing.
4360 (struct pthread): Use __pthread_list_t or __pthread_slist_t for
4361 robust_list. Adjust macros.
4362 * pthread_create.c (start_thread): Adjust robust_list handling.
4363 * phtread_mutex_unlock.c: Don't allow unlocking from any thread
4364 but the owner for all robust mutex types.
4365 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
4366 __pthread_list_t and __pthread_slist_t. Use them in pthread_mutex_t.
4367 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4368 * sysdeps/pthread/pthread.h: Adjust mutex initializers.
4369
4370 * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
4371 openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
4372
4373 2006-02-08 Jakub Jelinek <jakub@redhat.com>
4374
4375 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
4376 lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
4377
4378 2006-01-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4379
4380 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
4381 Return status.
4382 (lll_futex_timed_wait): Define.
4383
4384 2006-01-19 Ulrich Drepper <drepper@redhat.com>
4385
4386 * tst-cancel4.c: Test ppoll.
4387
4388 2006-01-18 Andreas Jaeger <aj@suse.de>
4389
4390 [BZ #2167]
4391 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
4392 (pthread_mutex_t): Follow changes for other archs. Based on patch
4393 by Jim Gifford <patches@jg555.com>.
4394
4395 2006-01-13 Richard Henderson <rth@redhat.com>
4396
4397 * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
4398
4399 2006-01-10 Roland McGrath <roland@redhat.com>
4400
4401 * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
4402 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
4403 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
4404 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
4405 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
4406 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
4407 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
4408 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
4409 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
4410 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
4411
4412 2006-01-09 Roland McGrath <roland@redhat.com>
4413
4414 * tst-initializers1-c89.c: New file.
4415 * tst-initializers1-c99.c: New file.
4416 * tst-initializers1-gnu89.c: New file.
4417 * tst-initializers1-gnu99.c: New file.
4418 * Makefile (tests): Add them.
4419 (CFLAGS-tst-initializers1-c89.c): New variable.
4420 (CFLAGS-tst-initializers1-c99.c): New variable.
4421 (CFLAGS-tst-initializers1-gnu89.c): New variable.
4422 (CFLAGS-tst-initializers1-gnu99.c): New variable.
4423
4424 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
4425 Use __extension__ on anonymous union definition.
4426 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4427 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4428 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4429 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4430 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4431
4432 2006-01-08 Jakub Jelinek <jakub@redhat.com>
4433
4434 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
4435 Don't give the union a name because it changes the mangled name.
4436 Instead name the struct for __data.
4437 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
4438 Likewise.
4439 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
4440 Likewise.
4441
4442 2006-01-09 Jakub Jelinek <jakub@redhat.com>
4443
4444 * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
4445 stack bias to mc_ftp field.
4446
4447 2006-01-07 Ulrich Drepper <drepper@redhat.com>
4448
4449 * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
4450 being too clever and reloading the futex value where it shouldn't.
4451
4452 2006-01-06 Ulrich Drepper <drepper@redhat.com>
4453
4454 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
4455 correct type.
4456
4457 2006-01-06 Jakub Jelinek <jakub@redhat.com>
4458
4459 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
4460 Add cfi directives.
4461
4462 2006-01-06 Ulrich Drepper <drepper@redhat.com>
4463
4464 * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
4465 * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
4466 rename in tcbhead_t.
4467
4468 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
4469 Don't give the union a name because it changes the mangled name.
4470 Instead name the struct for __data.
4471 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4472 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4473 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4474 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4475 * pthread_create.c (start_thread): Adjust robust mutex free loop.
4476 * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
4477
4478 2006-01-05 Ulrich Drepper <drepper@redhat.com>
4479
4480 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
4481 Return status.
4482 (lll_futex_timed_wait): Define.
4483 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4484 * sysdeps/pthread/aio_misc.h: New file.
4485
4486 2006-01-03 Joseph S. Myers <joseph@codesourcery.com>
4487
4488 * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
4489
4490 2006-01-03 Steven Munroe <sjmunroe@us.ibm.com>
4491
4492 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
4493 (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
4494 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4495
4496 2006-01-04 Ulrich Drepper <drepper@redhat.com>
4497
4498 * tst-cancel24.cc: Use C headers instead of C++ headers.
4499
4500 2006-01-03 Jakub Jelinek <jakub@redhat.com>
4501
4502 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
4503 sparc-linux configured glibc.
4504 (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
4505 (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
4506 __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
4507 atomic_compare_and_exchange_val_24_acq instead of
4508 atomic_compare_and_exchange_val_acq.
4509 (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
4510 instead of atomic_exchange_rel.
4511 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
4512 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
4513 file.
4514 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
4515 file.
4516 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
4517 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
4518 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
4519 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
4520 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
4521 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
4522 New file.
4523 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
4524 New file.
4525 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
4526 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
4527 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
4528 file.
4529 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
4530 file.
4531 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
4532
4533 2006-01-03 Ulrich Drepper <drepper@redhat.com>
4534
4535 * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
4536 mutex initializers.
4537
4538 2006-01-02 Jakub Jelinek <jakub@redhat.com>
4539
4540 * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
4541 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
4542 THREAD_COPY_POINTER_GUARD): Define.
4543 * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
4544 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
4545
4546 2006-01-01 Ulrich Drepper <drepper@redhat.com>
4547
4548 * version.c: Update copyright year.
4549
4550 2005-12-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4551
4552 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
4553 .eh_frame section, use cfi_* directives.
4554 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
4555
4556 2005-12-30 Ulrich Drepper <drepper@redhat.com>
4557
4558 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
4559 now.
4560
4561 2005-12-29 Ulrich Drepper <drepper@redhat.com>
4562
4563 * sysdeps/pthread/sigaction.c: Removed.
4564 * sigaction.c: New file.
4565 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
4566
4567 2005-12-28 Ulrich Drepper <drepper@redhat.com>
4568
4569 * Makefile (tests): Add tst-signal7.
4570 * tst-signal7.c: New file.
4571
4572 2005-12-27 Roland McGrath <roland@redhat.com>
4573
4574 * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
4575 (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
4576 * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
4577 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
4578 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
4579 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
4580 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
4581 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
4582 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
4583 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
4584 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
4585
4586 2005-12-27 Jakub Jelinek <jakub@redhat.com>
4587
4588 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
4589 and __prev field to pthread_mutex_t.
4590 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4591 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4592 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4593 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4594 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
4595 to pthread_mutex_t.
4596
4597 2005-12-26 Ulrich Drepper <drepper@redhat.com>
4598
4599 * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
4600 PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
4601 PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
4602 PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
4603 PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
4604 and PTHREAD_MUTEXATTR_FLAG_BITS.
4605 * descr.h (struct pthread): Add robust_list field and define
4606 ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
4607 * pthread_mutexattr_getrobust.c: New file.
4608 * pthread_mutexattr_setrobust.c: New file.
4609 * pthread_mutex_consistent.c: New file.
4610 * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
4611 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
4612 Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
4613 Adjust pthread_mutex_t initializers.
4614 * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
4615 field to pthread_mutex_t.
4616 * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
4617 and __prev field to pthread_mutex_t.
4618 * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
4619 pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
4620 * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
4621 and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
4622 * pthread_mutexattr_gettype.c: Likewise.
4623 * pthread_mutexattr_setpshared.c: Likewise.
4624 * pthread_mutexattr_settype.c: Likewise.
4625 * pthread_mutex_init.c: Reject robust+pshared attribute for now.
4626 Initialize mutex kind according to robust flag.
4627 * pthread_mutex_lock.c: Implement local robust mutex.
4628 * pthread_mutex_timedlock.c: Likewise.
4629 * pthread_mutex_trylock.c: Likewise.
4630 * pthread_mutex_unlock.c: Likewise.
4631 * pthread_create.c (start_thread): Mark robust mutexes which remained
4632 locked as dead.
4633 * tst-robust1.c: New file.
4634 * tst-robust2.c: New file.
4635 * tst-robust3.c: New file.
4636 * tst-robust4.c: New file.
4637 * tst-robust5.c: New file.
4638 * tst-robust6.c: New file.
4639 * tst-robust7.c: New file.
4640 * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
4641 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
4642 (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
4643 tst-robust5, tst-robust6, and tst-robust7.
4644
4645 * tst-typesizes.c: New file.
4646 * Makefile (tests): Add tst-typesizes.
4647
4648 * tst-once3.c: More debug output.
4649
4650 2005-12-24 Ulrich Drepper <drepper@redhat.com>
4651
4652 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
4653 missing after last change.
4654
4655 * version.c: Update copyright year.
4656
4657 2005-12-23 Ulrich Drepper <drepper@redhat.com>
4658
4659 * pthread_mutex_destroy.c: Set mutex type to an invalid value.
4660 * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
4661 * pthread_mutex_trylock.c: Likewise.
4662 * pthread_mutex_timedlock.c: Likewise.
4663 * pthread_mutex_unlock.c: Likewise.
4664
4665 2005-12-22 Roland McGrath <roland@redhat.com>
4666
4667 * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
4668 so that #include_next's search location is not reset to the -I..
4669 directory where <nptl/...> can be found.
4670
4671 2005-12-22 Ulrich Drepper <drepper@redhat.com>
4672
4673 [BZ #1913]
4674 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
4675 Fix unwind info. Remove useless branch prediction prefix.
4676 * tst-cancel24.cc: New file.
4677 * Makefile: Add rules to build and run tst-cancel24.
4678
4679 2005-12-21 Roland McGrath <roland@redhat.com>
4680
4681 * libc-cancellation.c: Use <> rather than "" #includes.
4682 * pt-cleanup.c: Likewise.
4683 * pthread_create.c: Likewise.
4684 * pthread_join.c: Likewise.
4685 * pthread_timedjoin.c: Likewise.
4686 * pthread_tryjoin.c: Likewise.
4687 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
4688 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
4689 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
4690 * unwind.c: Likewise.
4691
4692 2005-12-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4693
4694 * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
4695 * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
4696 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
4697 THREAD_COPY_POINTER_GUARD): Define.
4698
4699 2005-12-19 Jakub Jelinek <jakub@redhat.com>
4700
4701 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
4702 rather than one.
4703 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
4704 THREAD_COPY_POINTER_GUARD): Define.
4705 * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
4706 * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
4707 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
4708 THREAD_COPY_POINTER_GUARD): Define.
4709 * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
4710 * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
4711 THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
4712 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
4713 Use PTR_DEMANGLE for B0 if defined.
4714
4715 2005-12-17 Ulrich Drepper <drepper@redhat.com>
4716
4717 * pthread_create.c (__pthread_create_2_1): Use
4718 THREAD_COPY_POINTER_GUARD if available.
4719 * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
4720 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
4721 * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
4722 Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
4723 * sysdeps/x86_64/tls.h: Likewise.
4724
4725 2005-12-15 Roland McGrath <roland@redhat.com>
4726
4727 * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
4728
4729 2005-12-13 Ulrich Drepper <drepper@redhat.com>
4730
4731 * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
4732 sysdeps/generic.
4733 * errno-loc.c: New file.
4734
4735 2005-12-12 Roland McGrath <roland@redhat.com>
4736
4737 * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
4738 adjustments before choosing stack size. Update minimum stack size
4739 calculation to match allocate_stack change.
4740
4741 2005-12-12 Ulrich Drepper <drepper@redhat.com>
4742
4743 * allocatestack.c (allocate_stack): Don't demand that there is an
4744 additional full page available on the stack beside guard, TLS, the
4745 minimum stack.
4746
4747 2005-11-24 Ulrich Drepper <drepper@redhat.com>
4748
4749 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
4750 (__cleanup_fct_attribute): Use __regparm__ not regparm.
4751
4752 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
4753 compiling 32-bit code we must define __cleanup_fct_attribute.
4754
4755 005-11-24 Jakub Jelinek <jakub@redhat.com>
4756
4757 [BZ #1920]
4758 * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
4759 __attribute__ instead of __attribute.
4760 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
4761 (__cleanup_fct_attribute): Likewise.
4762
4763 2005-11-17 Jakub Jelinek <jakub@redhat.com>
4764
4765 * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
4766 a write barrier before writing libgcc_s_getcfa.
4767
4768 2005-11-06 Ulrich Drepper <drepper@redhat.com>
4769
4770 * sysdeps/unix/sysv/linux/configure: Removed.
4771
4772 2005-11-05 Ulrich Drepper <drepper@redhat.com>
4773
4774 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
4775 optional init_array/fini_array support.
4776
4777 2005-10-24 Roland McGrath <roland@redhat.com>
4778
4779 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
4780 versioned_symbol use.
4781
4782 2005-10-16 Roland McGrath <roland@redhat.com>
4783
4784 * init.c (__pthread_initialize_minimal_internal): Even when using a
4785 compile-time default stack size, apply the minimum that allocate_stack
4786 will require, and round up to page size.
4787
4788 2005-10-10 Daniel Jacobowitz <dan@codesourcery.com>
4789
4790 * Makefile ($(test-modules)): Remove static pattern rule.
4791
4792 2005-10-14 Jakub Jelinek <jakub@redhat.com>
4793 Ulrich Drepper <drepper@redhat.com>
4794
4795 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
4796 alignment in callback function.
4797 * Makefile: Add rules to build and run tst-align3.
4798 * tst-align3.c: New file.
4799
4800 2005-10-03 Jakub Jelinek <jakub@redhat.com>
4801
4802 * allocatestack.c (setxid_signal_thread): Add
4803 INTERNAL_SYSCALL_DECL (err).
4804
4805 2005-10-02 Jakub Jelinek <jakub@redhat.com>
4806
4807 * allocatestack.c (setxid_signal_thread): Need to use
4808 atomic_compare_and_exchange_bool_acq.
4809
4810 2005-10-01 Ulrich Drepper <drepper@redhat.com>
4811 Jakub Jelinek <jakub@redhat.com>
4812
4813 * descr.h: Define SETXID_BIT and SETXID_BITMASK. Adjust
4814 CANCEL_RESTMASK.
4815 (struct pthread): Move specific_used field to avoid padding.
4816 Add setxid_futex field.
4817 * init.c (sighandler_setxid): Reset setxid flag and release the
4818 setxid futex.
4819 * allocatestack.c (setxid_signal_thread): New function. Broken
4820 out of the bodies of the two loops in __nptl_setxid. For undetached
4821 threads check whether they are exiting and if yes, don't send a signal.
4822 (__nptl_setxid): Simplify loops by using setxid_signal_thread.
4823 * pthread_create.c (start_thread): For undetached threads, check
4824 whether setxid bit is set. If yes, wait until signal has been
4825 processed.
4826
4827 * allocatestack.c (STACK_VARIABLES): Initialize them.
4828 * pthread_create.c (__pthread_create_2_1): Initialize pd.
4829
4830 2004-09-02 Jakub Jelinek <jakub@redhat.com>
4831
4832 * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
4833 waiters, awake all waiters on the associated mutex.
4834
4835 2005-09-22 Roland McGrath <roland@redhat.com>
4836
4837 * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
4838 ../sysdeps/x86_64/hp-timing.h).
4839
4840 2005-08-29 Jakub Jelinek <jakub@redhat.com>
4841
4842 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
4843 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4844 (lll_futex_wake_unlock): Define.
4845 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
4846 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4847 (lll_futex_wake_unlock): Define.
4848 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
4849 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4850 (lll_futex_wake_unlock): Define.
4851 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
4852 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4853 (lll_futex_wake_unlock): Define.
4854 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
4855 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4856 (lll_futex_wake_unlock): Define.
4857 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
4858 lll_futex_wake_unlock.
4859 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
4860 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4861 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
4862 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
4863 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4864 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
4865
4866 2005-09-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4867
4868 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
4869 Fix typo in register name.
4870
4871 2005-08-23 Ulrich Drepper <drepper@redhat.com>
4872
4873 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
4874 Use __sigfillset. Document that sigfillset does the right thing wrt
4875 to SIGSETXID.
4876
4877 2005-07-11 Jakub Jelinek <jakub@redhat.com>
4878
4879 [BZ #1102]
4880 * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
4881 PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
4882 PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
4883 PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
4884 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
4885 PTHREAD_COND_INITIALIZER): Supply zeros for all fields
4886 in the structure.
4887 * Makefile (tests): Add tst-initializers1.
4888 (CFLAGS-tst-initializers1.c): Set.
4889 * tst-initializers1.c: New test.
4890
4891 2005-07-11 Jakub Jelinek <jakub@redhat.com>
4892
4893 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
4894 Make sure __flags are located at offset 48 from the start of the
4895 structure.
4896
4897 2005-07-02 Roland McGrath <roland@redhat.com>
4898
4899 * Makeconfig: Comment fix.
4900
4901 2005-07-05 Jakub Jelinek <jakub@redhat.com>
4902
4903 * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
4904 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
4905 is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
4906 (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
4907 TLS_PRE_TCB_SIZE is sizeof (struct pthread).
4908 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4909 * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
4910 Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
4911 * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
4912 assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
4913
4914 2005-06-25 Jakub Jelinek <jakub@redhat.com>
4915
4916 * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
4917 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4918 * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
4919 fields.
4920 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4921 * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
4922 field. Put in sysinfo field unconditionally.
4923 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4924 * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
4925 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4926 * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
4927 fields.
4928 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4929 * pthread_create.c (__pthread_create_2_1): Use
4930 THREAD_COPY_STACK_GUARD macro.
4931 * Makefile: Add rules to build and run tst-stackguard1{,-static}
4932 tests.
4933 * tst-stackguard1.c: New file.
4934 * tst-stackguard1-static.c: New file.
4935
4936 2005-06-14 Alan Modra <amodra@bigpond.net.au>
4937
4938 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
4939 Invoke CGOTSETUP and CGOTRESTORE.
4940 (CGOTSETUP, CGOTRESTORE): Define.
4941
4942 2005-05-29 Richard Henderson <rth@redhat.com>
4943
4944 * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
4945 (tf_write, tf_writev): Use it.
4946 (do_test): Use socketpair instead of pipe. Set SO_SNDBUF to
4947 the system minimum.
4948
4949 2005-05-23 Jakub Jelinek <jakub@redhat.com>
4950
4951 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
4952 [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
4953 __librt_*_asynccancel@local.
4954
4955 2005-05-17 Alan Modra <amodra@bigpond.net.au>
4956
4957 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
4958 all occurrences of JUMPTARGET. Instead append @local to labels.
4959
4960 2005-05-20 Jakub Jelinek <jakub@redhat.com>
4961
4962 * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
4963 size/alignment of struct pthread rather than tcbhead_t.
4964 * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
4965 Likewise.
4966 * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
4967 Likewise.
4968 * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
4969 Likewise.
4970
4971 2005-05-19 Richard Henderson <rth@redhat.com>
4972
4973 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
4974 __sync_val_compare_and_swap, not explicit _si variant.
4975 * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
4976
4977 2005-05-03 Ulrich Drepper <drepper@redhat.com>
4978
4979 [BZ #915]
4980 * sysdeps/pthread/pthread.h: Avoid empty initializers.
4981
4982 2005-05-03 Jakub Jelinek <jakub@redhat.com>
4983
4984 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
4985 .eh_frame section, use cfi_* directives.
4986
4987 2005-04-27 Jakub Jelinek <jakub@redhat.com>
4988
4989 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
4990 of "" includes.
4991
4992 2005-04-27 Ulrich Drepper <drepper@redhat.com>
4993
4994 [BZ #1075]
4995 * tst-cancel17.c (do_test): Add arbitrary factor to make sure
4996 aio_write blocks.
4997
4998 2005-04-27 Roland McGrath <roland@redhat.com>
4999
5000 * Makefile (tests): Remove tst-clock2.
5001
5002 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
5003 CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
5004 translating to the kernel clockid_t for our own process/thread clock.
5005
5006 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
5007
5008 2005-04-15 Jakub Jelinek <jakub@redhat.com>
5009
5010 * old_pthread_cond_init.c: Include <errno.h>.
5011 (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
5012 process shared or uses clock other than CLOCK_REALTIME.
5013 * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
5014
5015 2005-04-13 David S. Miller <davem@davemloft.net>
5016
5017 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
5018 * sysdeps/sparc/sparc64/clone.S: New file.
5019
5020 2005-04-05 Jakub Jelinek <jakub@redhat.com>
5021
5022 [BZ #1102]
5023 * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
5024 __inline instead of inline.
5025 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
5026
5027 2005-03-31 Jakub Jelinek <jakub@redhat.com>
5028
5029 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
5030 functionally equivalent, but shorter instructions.
5031 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
5032 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
5033 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
5034 Likewise.
5035 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
5036 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
5037 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
5038 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
5039 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5040 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
5041 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
5042 Likewise.
5043 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
5044 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
5045 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5046 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
5047 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
5048
5049 2005-03-28 Daniel Jacobowitz <dan@codesourcery.com>
5050
5051 * sysdeps/mips/Makefile: New file.
5052 * sysdeps/mips/nptl-sysdep.S: New file.
5053 * sysdeps/mips/tcb-offsets.sym: New file.
5054 * sysdeps/mips/pthread_spin_lock.S: New file.
5055 * sysdeps/mips/pthread_spin_trylock.S: New file.
5056 * sysdeps/mips/pthreaddef.h: New file.
5057 * sysdeps/mips/tls.h: New file.
5058 * sysdeps/mips/jmpbuf-unwind.h: New file.
5059 * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
5060 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
5061 * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
5062 * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
5063 * sysdeps/unix/sysv/linux/mips/fork.c: New file.
5064 * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
5065 * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
5066 * sysdeps/unix/sysv/linux/mips/clone.S: New file.
5067 * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
5068 * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
5069
5070 2005-03-23 Ulrich Drepper <drepper@redhat.com>
5071
5072 [BZ #1112]
5073 * pthread_create.c (__pthread_create_2_1): Rename syscall error
5074 variable to scerr.
5075
5076 2005-03-10 Jakub Jelinek <jakub@redhat.com>
5077
5078 * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
5079
5080 2005-02-25 Roland McGrath <roland@redhat.com>
5081
5082 * alloca_cutoff.c: Correct license text.
5083 * tst-unload.c: Likewise.
5084 * sysdeps/pthread/allocalim.h: Likewise.
5085 * sysdeps/pthread/pt-initfini.c: Likewise.
5086 * sysdeps/pthread/bits/libc-lock.h: Likewise.
5087 * sysdeps/pthread/bits/sigthread.h: Likewise.
5088 * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
5089 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
5090
5091 2005-02-16 Roland McGrath <roland@redhat.com>
5092
5093 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
5094 Use unsigned int * for ptr_nthreads.
5095
5096 2005-02-14 Alan Modra <amodra@bigpond.net.au>
5097
5098 [BZ #721]
5099 * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
5100 gcc4.
5101
5102 2005-02-07 Richard Henderson <rth@redhat.com>
5103
5104 [BZ #787]
5105 * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
5106 argument.
5107
5108 2004-11-03 Marcus Brinkmann <marcus@gnu.org>
5109
5110 * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
5111 order of arguments in invocation of atomic_add_zero.
5112
5113 2005-01-26 Jakub Jelinek <jakub@redhat.com>
5114
5115 [BZ #737]
5116 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
5117 Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
5118 at least gotntpoff relocation and addition.
5119 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
5120 Likewise.
5121 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
5122 Likewise.
5123 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
5124 Likewise.
5125
5126 2005-01-06 Ulrich Drepper <drepper@redhat.com>
5127
5128 * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
5129 entry for static tls deallocation fix.
5130 * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
5131 also contains information whether the memory pointed to is static
5132 TLS or not.
5133 * sysdeps/i386/tls.h: Likewise.
5134 * sysdeps/ia64/tls.h: Likewise.
5135 * sysdeps/powerpc/tls.h: Likewise.
5136 * sysdeps/s390/tls.h: Likewise.
5137 * sysdeps/sh/tls.h: Likewise.
5138 * sysdeps/sparc/tls.h: Likewise.
5139 * sysdeps/x86_64/tls.h: Likewise.
5140
5141 2004-12-27 Ulrich Drepper <drepper@redhat.com>
5142
5143 * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
5144
5145 2004-12-21 Jakub Jelinek <jakub@redhat.com>
5146
5147 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
5148 %esp.
5149 * Makefile (tests): Add tst-align2.
5150 * tst-align2.c: New test.
5151 * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
5152 -mpreferred-stack-boundary=4.
5153
5154 2004-12-18 Roland McGrath <roland@redhat.com>
5155
5156 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
5157 New file removed withdrawn for the moment.
5158
5159 2004-12-17 Richard Henderson <rth@redhat.com>
5160
5161 * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
5162 * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
5163
5164 2004-12-16 Ulrich Drepper <drepper@redhat.com>
5165
5166 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
5167 Increased PTHREAD_STACK_MIN.
5168
5169 * tst-context1.c (stacks): Use bigger stack size.
5170
5171 2004-12-16 Jakub Jelinek <jakub@redhat.com>
5172
5173 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
5174 * sysdeps/sparc/tcb-offsets.sym: Add TID.
5175
5176 2004-12-15 Jakub Jelinek <jakub@redhat.com>
5177
5178 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
5179 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
5180 * sysdeps/s390/tcb-offsets.sym (TID): Add.
5181
5182 2004-12-15 Ulrich Drepper <drepper@redhat.com>
5183
5184 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
5185
5186 2004-12-14 Ulrich Drepper <drepper@redhat.com>
5187
5188 * sysdeps/powerpc/tcb-offsets.sym: Add TID.
5189 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
5190
5191 * tst-getpid1.c: If child crashes, report this first. Print which
5192 signal.
5193
5194 2004-12-09 Ulrich Drepper <drepper@redhat.com>
5195
5196 * init.c (__pthread_initialize_minimal_internal): Also unblock
5197 SIGSETXID.
5198
5199 2004-12-01 Jakub Jelinek <jakub@redhat.com>
5200
5201 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
5202 _POSIX_THREAD_CPUTIME): Define to 0.
5203 * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
5204 handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
5205 * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
5206 __timer_signal_thread_tclk): Remove.
5207 (init_module): Remove their initialization.
5208 (thread_cleanup): Remove their cleanup assertions.
5209 * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
5210 __timer_signal_thread_tclk): Remove.
5211 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
5212 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
5213 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
5214
5215 2004-12-07 Jakub Jelinek <jakub@redhat.com>
5216
5217 * sysdeps/ia64/tcb-offsets.sym (TID): Add.
5218 * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
5219
5220 * Makefile (tests): Add tst-getpid2.
5221 * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
5222 (do_test): Use it. Use __clone2 instead of clone on ia64.
5223 * tst-getpid2.c: New test.
5224
5225 2004-12-07 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5226
5227 * sysdeps/unix/sysv/linux/sh/clone.S: New file.
5228
5229 2004-12-04 Ulrich Drepper <drepper@redhat.com>
5230
5231 * Makefile (tests): Add tst-getpid1.
5232 * tst-getpid1.c: New file.
5233 * sysdeps/unix/sysv/linux/i386/clone.S: New file.
5234 * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
5235
5236 2004-12-02 Roland McGrath <roland@redhat.com>
5237
5238 * Makefile (libpthread-nonshared): Variable removed.
5239 ($(objpfx)libpthread_nonshared.a): Target removed.
5240 ($(inst_libdir)/libpthread_nonshared.a): Likewise.
5241 These are now handled by generic magic from
5242 libpthread-static-only-routines being set.
5243
5244 2004-11-27 Ulrich Drepper <drepper@redhat.com>
5245
5246 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
5247 _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
5248 _POSIX_THREAD_PRIO_PROTECT): Define.
5249 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5250 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
5251 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
5252
5253 2004-11-26 Jakub Jelinek <jakub@redhat.com>
5254
5255 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
5256 _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
5257 _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
5258 _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
5259 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5260 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
5261 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
5262
5263 2004-11-24 Ulrich Drepper <drepper@redhat.com>
5264
5265 * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
5266
5267 * Makefile (libpthread-routines): Add pthread_setschedprio.
5268 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
5269 * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
5270 * pthread_setschedprio.c: New file.
5271
5272 2004-11-20 Jakub Jelinek <jakub@redhat.com>
5273
5274 * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
5275 * pthread_cancel.c (pthread_create): Likewise.
5276
5277 * Makefile (libpthread-routines): Add vars.
5278 * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
5279 * init.c (__default_stacksize, __is_smp): Remove.
5280 * vars.c: New file.
5281 * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
5282 and define a wrapper macro.
5283 (PTHREAD_STATIC_FN_REQUIRE): Define.
5284 * allocatestack.c (__find_thread_by_id): Undefine.
5285 * pthread_create (__pthread_keys): Remove.
5286 (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
5287 pthread_key_create, pthread_setspecific, pthread_getspecific): Add
5288 PTHREAD_STATIC_FN_REQUIRE.
5289
5290 2004-11-18 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5291
5292 * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
5293 parameter to REGISTER macro.
5294
5295 2004-11-17 Roland McGrath <roland@redhat.com>
5296
5297 * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
5298 Make sure SIGCANCEL is blocked as well.
5299
5300 2004-11-10 Jakub Jelinek <jakub@redhat.com>
5301
5302 * sysdeps/pthread/setxid.h: New file.
5303 * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
5304 (struct xid_command): Add forward decl.
5305 (struct pthread_functions): Change return type of __nptl_setxid hook
5306 to int.
5307 * pthreadP.h (__nptl_setxid): Change return type to int.
5308 * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
5309 calling thread, return its return value and set errno on failure.
5310 * descr.h (struct xid_command): Change id type to long array.
5311
5312 * Makefile: Add rules to build and test tst-setuid1 and
5313 tst-setuid1-static.
5314 * tst-setuid1.c: New test.
5315 * tst-setuid1-static.c: New test.
5316
5317 2004-11-10 Jakub Jelinek <jakub@redhat.com>
5318
5319 * Makefile (tests): Add tst-exit3.
5320 * tst-exit3.c: New test.
5321
5322 2004-11-09 Ulrich Drepper <drepper@redhat.com>
5323
5324 * Makefile (tests): Add tst-exit2.
5325 * tst-exit2.c: New file.
5326
5327 2004-11-09 Roland McGrath <roland@redhat.com>
5328
5329 [BZ #530]
5330 * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
5331 here, before calling clone.
5332 * pthread_create.c (start_thread): Don't do it here.
5333
5334 2004-11-02 Jakub Jelinek <jakub@redhat.com>
5335
5336 * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
5337
5338 2004-10-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5339
5340 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
5341 Set ETIMEDOUT to errno when time is up. Tweak to avoid
5342 assembler warning.
5343
5344 2004-10-28 Jakub Jelinek <jakub@redhat.com>
5345
5346 * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
5347 if sched_priority is not between minprio and maxprio.
5348
5349 2004-10-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5350
5351 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
5352 (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
5353
5354 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
5355 (__lll_mutex_timedlock_wait): Fix a bad branch condition.
5356
5357 2004-10-24 Ulrich Drepper <drepper@redhat.com>
5358
5359 * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
5360 not-cancelable I/O functions.
5361
5362 2004-10-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5363
5364 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
5365 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
5366 make sure 2 is stored in the futex and we looked at the old value.
5367 Fix a few other problems to return the correct value.
5368
5369 2004-10-14 Richard Henderson <rth@redhat.com>
5370
5371 * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
5372 make gcc4 happy.
5373
5374 2004-10-06 Jakub Jelinek <jakub@redhat.com>
5375
5376 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
5377 of pthread-functions.h and pthreaddef.h.
5378 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
5379
5380 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
5381 Change __data.__nwaiters from int to unsigned int.
5382
5383 * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
5384 sysconf (_SC_THREAD_CPUTIME) returns negative value.
5385
5386 * allocatestack.c (__find_thread_by_id): Move attribute_hidden
5387 before return type.
5388
5389 * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
5390 (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
5391
5392 2004-10-06 Ulrich Drepper <drepper@redhat.com>
5393
5394 * tst-cancel4.c (tf_msgrcv): Check for failure in msgget. If the
5395 test fails, remove message queue.
5396 (tf_msgsnd): Likewise.
5397
5398 2004-10-05 Jakub Jelinek <jakub@redhat.com>
5399
5400 * tst-clock1.c: Change #ifdef to #if defined.
5401 * tst-clock2.c: Likewise.
5402 * tst-cond11.c: Likewise.
5403
5404 * sysdeps/pthread/timer_create.c (timer_create): Use
5405 defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
5406 defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
5407 THREAD_CPUTIME.
5408
5409 2004-10-05 Jakub Jelinek <jakub@redhat.com>
5410
5411 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
5412 _POSIX_THREAD_CPUTIME): Define to 0.
5413
5414 2004-10-04 Ulrich Drepper <drepper@redhat.com>
5415
5416 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
5417 and _POSIX_THREAD_CPUTIME to zero.
5418 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
5419 * tst-barrier2.c: Fix testing for POSIX feature.
5420 * tst-clock1.c: Likewise.
5421 * tst-clock2.c: Likewise.
5422 * tst-cond11.c: Likewise.
5423 * tst-cond4.c: Likewise.
5424 * tst-cond6.c: Likewise.
5425 * tst-flock2.c: Likewise.
5426 * tst-mutex4.c: Likewise.
5427 * tst-mutex9.c: Likewise.
5428 * tst-rwlock12.c: Likewise.
5429 * tst-rwlock4.c: Likewise.
5430 * tst-signal1.c: Likewise.
5431 * tst-spin2.c: Likewise.
5432 * sysdeps/pthread/posix-timer.h: Likewise.
5433 * sysdeps/pthread/timer_create.c: Likewise.
5434 * sysdeps/pthread/timer_routines.c: Likewise.
5435
5436 2004-10-01 Ulrich Drepper <drepper@redhat.com>
5437
5438 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5439 (__lll_mutex_timedlock_wait): Address futex correctly.
5440
5441 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5442 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
5443 make sure 2 is stored in the futex and we looked at the old value.
5444 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5445 (__lll_mutex_timedlock_wait): Likewise. Fix a few other problems
5446 which might very well made the code not working at all before.
5447 [BZ #417]
5448
5449 2004-09-28 Ulrich Drepper <drepper@redhat.com>
5450
5451 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
5452 allow SIGSETXID to be sent.
5453 * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
5454 for SIGSETXID to be defined.
5455 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
5456 SIGSETXID cannot be blocked.
5457
5458 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
5459 Add __extension__ to long long types.
5460 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5461 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5462 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5463 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5464 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
5465 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5466 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5467
5468 2004-09-25 Ulrich Drepper <drepper@redhat.com>
5469
5470 * descr.h (struct pthread): Add stopped_start field.
5471 * sysdeps/pthread/createthread.c (create_thread): Set
5472 start_stopped flag in descriptor for new thread appropriately.
5473 * pthread_create.c (start_thread): Only take lock to be stopped on
5474 startup if stopped_start flag says so.
5475
5476 2004-09-24 Ulrich Drepper <drepper@redhat.com>
5477
5478 * pthread_create.c (__pthread_create_2_1): Remember whether thread
5479 is created detached and if yes, do not try to free the stack in case
5480 the thread creation failed.
5481 * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
5482 call fails. Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
5483 case there has been no error. [BZ #405]
5484
5485 * pthread_create.c (start_thread): Don't wait for scheduler data
5486 etc to be set at the beginning of the function. The cancellation
5487 infrastructure must have been set up. And enable async
5488 cancellation before potentially going to sleep. [BZ #401]
5489
5490 2004-09-20 Ulrich Drepper <drepper@redhat.com>
5491
5492 * Versions: Remove exports for pthread_set*id_np functions.
5493 * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
5494 for now.
5495 * Makefile: Don't build pthread_set*id code for now.
5496
5497 2004-09-19 Ulrich Drepper <drepper@redhat.com>
5498
5499 * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
5500 internal use.
5501 * allocatestack.c (__nptl_setxid): New function.
5502 * descr.h (struct xid_command): Define type.
5503 * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
5504 (sighandler_setxid): New function.
5505 (__pthread_initialize_minimal): Register sighandler_setxid for
5506 SIGCANCEL.
5507 * pt-allocrtsig.c: Update comment.
5508 * pthreadP.h: Define SIGSETXID. Declare __xidcmd variable.
5509 Declare __nptl_setxid.
5510 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
5511 * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
5512 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
5513 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
5514 and pthread_setresuid_np.
5515 * pthread_setgid_np.c: New file.
5516 * pthread_setuid_np.c: New file.
5517 * pthread_setegid_np.c: New file.
5518 * pthread_seteuid_np.c: New file.
5519 * pthread_setregid_np.c: New file.
5520 * pthread_setreuid_np.c: New file.
5521 * pthread_setresgid_np.c: New file.
5522 * pthread_setresuid_np.c: New file.
5523 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
5524 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
5525 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
5526 and pthread_setresuid_np.
5527 * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
5528 pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
5529 pthread_setregid, and pthread_setresgid.
5530
5531 2004-09-18 Ulrich Drepper <drepper@redhat.com>
5532
5533 * allocatestack.c (allocate_stack): Return EAGAIN instead of
5534 ENOMEM when out of memory.
5535
5536 2004-09-10 Roland McGrath <roland@redhat.com>
5537
5538 [BZ #379]
5539 * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
5540 code, since we don't try to use the broken CLONE_STOPPED any more.
5541 * pthread_create.c (start_thread): Likewise.
5542
5543 2004-09-15 Richard Henderson <rth@redhat.com>
5544
5545 * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
5546
5547 2004-09-01 David Mosberger <davidm@hpl.hp.com>
5548
5549 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
5550 (__libc_unwind_longjmp): Delete macro and declare as function.
5551 * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
5552 __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
5553 nptl directory.
5554 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
5555 * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
5556 * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
5557
5558 2004-09-12 Ulrich Drepper <drepper@redhat.com>
5559
5560 * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
5561 for __USE_XOPEN2K.
5562 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
5563 types also for __USE_XOPEN2K.
5564 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5565 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5566 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5567 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5568 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5569 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5570 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5571 [BZ #320]
5572
5573 2004-09-08 Ulrich Drepper <drepper@redhat.com>
5574
5575 * sysdeps/pthread/pthread.h
5576 (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
5577 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
5578 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
5579 (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
5580 [BZ #375]
5581
5582 2004-09-07 Ulrich Drepper <drepper@redhat.com>
5583
5584 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
5585 PSEUDO to be used with . prefix.
5586
5587 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
5588 Use atomic_increment instead of atomic_exchange_and_add.
5589 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
5590 Likewise.
5591 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
5592 Likewise.
5593 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
5594 Likewise.
5595
5596 * allocatestack.c (allocate_stack): Use atomic_increment_val
5597 instead of atomic_exchange_and_add.
5598 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
5599 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
5600 Likewise.
5601 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5602 Likewise.
5603
5604 * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
5605 the initialization function might throw.
5606
5607 2005-09-05 Richard Henderson <rth@redhat.com>
5608
5609 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
5610 Move definition inside libpthread, libc, librt check. Provide
5611 definition for rtld.
5612
5613 2004-09-02 Ulrich Drepper <drepper@redhat.com>
5614
5615 * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
5616 * sysdeps/i386/jmpbuf-unwind.h: Likewise
5617 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
5618 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
5619 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
5620 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
5621 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
5622 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
5623 * unwind.c: Use it.
5624
5625 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
5626 Rename __data.__clock to __data.__nwaiters, make it unsigned int.
5627 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
5628 Likewise.
5629 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
5630 Decrement __nwaiters. If pthread_cond_destroy has been called and
5631 this is the last waiter, signal pthread_cond_destroy caller and
5632 avoid using the pthread_cond_t structure after unlock.
5633 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5634 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5635 Read clock type from the least significant bits of __nwaiters instead
5636 of __clock.
5637 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5638 * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
5639
5640 2004-08-31 Jakub Jelinek <jakub@redhat.com>
5641
5642 [BZ #342]
5643 * Makefile (tests): Add tst-cond20 and tst-cond21.
5644 * tst-cond20.c: New test.
5645 * tst-cond21.c: New test.
5646 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
5647 (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
5648 it unsigned int.
5649 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
5650 Likewise.
5651 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
5652 (pthread_cond_t): Likewise.
5653 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
5654 Likewise.
5655 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
5656 Likewise.
5657 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
5658 Likewise.
5659 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
5660 (cond_nwaiters): New.
5661 (clock_bits): New.
5662 * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
5663 if there are waiters not signalled yet.
5664 Wait until all already signalled waiters wake up.
5665 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
5666 __nwaiters. If pthread_cond_destroy has been called and this is the
5667 last waiter, signal pthread_cond_destroy caller and avoid using
5668 the pthread_cond_t structure after unlock.
5669 (__pthread_cond_wait): Increment __nwaiters in the beginning,
5670 decrement it when leaving. If pthread_cond_destroy has been called
5671 and this is the last waiter, signal pthread_cond_destroy caller.
5672 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5673 Likewise. Read clock type from the least significant bits of
5674 __nwaiters instead of __clock.
5675 * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
5676 whether clock ID can be encoded in COND_CLOCK_BITS bits.
5677 * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
5678 clock type just from the last COND_CLOCK_BITS bits of value.
5679 * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
5680 instead of __clock, just from second bit of condattr's value.
5681
5682 2004-08-30 Jakub Jelinek <jakub@redhat.com>
5683
5684 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
5685 bits/wordsize.h. Make the header match i386 header when __WORDSIZE
5686 != 64.
5687 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
5688
5689 2004-08-15 Roland McGrath <roland@frob.com>
5690
5691 * pthread_atfork.c: Update copyright terms including special exception
5692 for these trivial files, which are statically linked into executables
5693 that use dynamic linking for the significant library code.
5694
5695 2004-08-09 Jakub Jelinek <jakub@redhat.com>
5696
5697 * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
5698 pthread_rwlock_rdlock.
5699 * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
5700 Decrease __nr_readers_queued after reacquiring lock.
5701 * sysdeps/pthread/pthread_rwlock_timedrdlock
5702 (pthread_rwlock_timedrdlock): Likewise.
5703 Reported by Bob Cook <bobcook47@hotmail.com>.
5704
5705 2004-08-11 Jakub Jelinek <jakub@redhat.com>
5706
5707 * tst-rwlock14.c (tf): Read main thread handle from *ARG
5708 before pthread_barrier_wait.
5709
5710 2004-08-07 Ulrich Drepper <drepper@redhat.com>
5711
5712 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
5713 Remove unnecessary exception handling data.
5714
5715 2004-07-23 Jakub Jelinek <jakub@redhat.com>
5716
5717 [BZ #284]
5718 * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
5719 instead of clockid_t.
5720
5721 2004-07-21 Roland McGrath <roland@redhat.com>
5722
5723 * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
5724
5725 2004-07-19 Roland McGrath <roland@redhat.com>
5726
5727 * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
5728
5729 2004-07-02 Roland McGrath <roland@redhat.com>
5730
5731 * configure: Don't exit.
5732
5733 2004-07-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5734
5735 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
5736 (__pthread_cond_timedwait): Check for invalid nanosecond in
5737 timeout value.
5738
5739 2004-07-07 Ulrich Drepper <drepper@redhat.com>
5740
5741 * Makefile: Add rules to build and run tst-fini1.
5742 * tst-fini1.c: New file.
5743 * tst-fini1mod.c: New file.
5744
5745 2004-07-05 Ulrich Drepper <drepper@redhat.com>
5746
5747 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
5748 if no cancellation support is needed.
5749 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
5750 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
5751 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
5752 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
5753 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
5754 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
5755 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
5756 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
5757 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
5758
5759 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
5760 only if not already defined.
5761
5762 2004-07-05 Jakub Jelinek <jakub@redhat.com>
5763
5764 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
5765 constraint "m" instead of "0" for futex.
5766
5767 * shlib-versions: Add powerpc64-.*-linux.*.
5768
5769 2004-07-04 Jakub Jelinek <jakub@redhat.com>
5770
5771 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
5772 (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
5773 for valid tv_nsec.
5774 * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
5775 1 billion and 64-bit tv_nsec which is valid when truncated to 32
5776 bits.
5777
5778 2004-06-29 Roland McGrath <roland@redhat.com>
5779
5780 * Banner: NPTL no longer has its own version number.
5781 * Makefile (nptl-version): Variable removed.
5782 * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
5783 using $(version), the glibc version number.
5784
5785 2004-06-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5786
5787 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
5788 Fix branch offset for a PLT entry.
5789 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
5790 Likewise.
5791 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
5792 Likewise.
5793 * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
5794 Likewise.
5795 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
5796 Likewise.
5797
5798 2004-06-28 Jakub Jelinek <jakub@redhat.com>
5799
5800 * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
5801 unconditionally.
5802
5803 2004-06-28 Jakub Jelinek <jakub@redhat.com>
5804
5805 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
5806 (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
5807 instead of tv_sec.
5808 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
5809 (pthread_rwlock_timedrdlock): Likewise.
5810
5811 2004-06-22 Jakub Jelinek <jakub@redhat.com>
5812
5813 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
5814 Set __r7 to val, not mutex.
5815
5816 2004-06-27 Ulrich Drepper <drepper@redhat.com>
5817
5818 * Makefile: Add rules to build tst-rwlock14.
5819 * tst-rwlock14.c: New file.
5820
5821 2004-06-24 Boris Hu <boris.hu@intel.com>
5822
5823 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
5824 check.
5825 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
5826
5827 2004-06-19 Andreas Jaeger <aj@suse.de>
5828
5829 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
5830 assembler in last patch.
5831
5832 2004-06-17 Ulrich Drepper <drepper@redhat.com>
5833
5834 * sysdeps/pthread/pthread_cond_timedwait.c
5835 (__pthread_cond_timedwait): Also check for negativ nanoseconds.
5836 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5837 (__pthread_cond_timedwait): Check for invalid nanosecond in
5838 timeout value.
5839 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5840 * tst-cond19.c: New file.
5841 * Makefile: Add rules to build and run tst-cond19.
5842
5843 2004-06-15 Steven Munroe <sjmunroe@us.ibm.com>
5844
5845 * tst-context1.c (GUARD_PATTERN): Defined.
5846 (tst_context_t): Define struct containing ucontext_t & guard words.
5847 (ctx): Declare as an array of tst_context_t.
5848 (fct): Verify uc_link & guard words are still valid.
5849 (tf): Initialize guard words in ctx. Adjust ctx refs for new struct.
5850
5851 2004-06-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5852
5853 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
5854 Add __data.__futex field, reshuffle __data.__clock.
5855 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
5856 (__pthread_cond_signal): Increment __futex at the same time as
5857 __wakeup_seq or __total_seq. Pass address of __futex instead of
5858 address of low 32-bits of __wakeup_seq to futex syscall.
5859 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
5860 (__pthread_cond_wait): Likewise. Pass __futex value from before
5861 releasing internal lock to FUTEX_WAIT.
5862 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
5863 (__pthread_cond_timedwait): Likewise.
5864 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
5865 (FUTEX_CMP_REQUEUE): Define.
5866 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
5867 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
5868 Pass __futex value from before the unlock and __futex address instead
5869 of address of low 32-bits of __wakeup_seq to futex syscall.
5870 Fallback to FUTEX_WAKE all on any errors.
5871
5872 2004-06-08 Jakub Jelinek <jakub@redhat.com>
5873
5874 * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
5875 comment typo.
5876 * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
5877 * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
5878 * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
5879 * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
5880 Likewise. Reported by Bob Cook <bobcook47@hotmail.com>.
5881
5882 2004-06-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
5883
5884 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
5885 Add memory clobber to inline assembly.
5886 (__lll_mutex_trylock): Likewise.
5887 (__lll_mutex_cond_trylock): Likewise.
5888
5889 2004-06-07 Martin Schwidefsky <schwidefsky@de.ibm.com>
5890
5891 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
5892 Pass val argument as 6th system call argument in %r7.
5893
5894 2004-05-21 Jakub Jelinek <jakub@redhat.com>
5895
5896 * Makefile (tests): Add tst-cond16.
5897 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
5898 * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
5899 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
5900 Add __data.__futex field, reshuffle __data.__clock.
5901 * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
5902 (__pthread_cond_signal): Increment __futex at the same time as
5903 __wakeup_seq or __total_seq. Pass address of __futex instead of
5904 address of low 32-bits of __wakeup_seq to futex syscall.
5905 * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
5906 (__pthread_cond_wait): Likewise. Pass __futex value from before
5907 releasing internal lock to FUTEX_WAIT.
5908 * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
5909 (__pthread_cond_timedwait): Likewise.
5910 * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
5911 (FUTEX_CMP_REQUEUE): Define.
5912 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
5913 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
5914 Pass __futex value from before the unlock and __futex address instead
5915 of address of low 32-bits of __wakeup_seq to futex syscall.
5916 Fallback to FUTEX_WAKE all on any errors.
5917 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
5918 Define.
5919 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
5920 internally. Return non-zero if error, zero if success.
5921 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
5922 Add __data.__futex field, reshuffle __data.__clock.
5923 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
5924 Define.
5925 (lll_futex_requeue): Add val argument, return 1 unconditionally
5926 for the time being.
5927 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
5928 Add __data.__futex field, reshuffle __data.__clock.
5929 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
5930 Define.
5931 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
5932 internally. Return non-zero if error, zero if success.
5933 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
5934 (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
5935 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
5936 Define.
5937 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
5938 internally. Return non-zero if error, zero if success.
5939 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
5940 Add __data.__futex field, reshuffle __data.__clock.
5941 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
5942 Define.
5943 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
5944 internally. Return non-zero if error, zero if success.
5945 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
5946 Add __data.__futex field, reshuffle __data.__clock.
5947 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
5948 Add __data.__futex field, reshuffle __data.__clock.
5949 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
5950 Increment __futex at the same time as __wakeup_seq or __total_seq.
5951 Pass address of __futex instead of address of low 32-bits of
5952 __wakeup_seq to futex syscall.
5953 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
5954 Pass __futex value from before releasing internal lock
5955 to FUTEX_WAIT.
5956 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5957 Likewise. Avoid unnecessary shadowing of variables.
5958 * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
5959 Set __futex to 2 * __total_seq. Pass __futex value from before the
5960 unlock and __futex address instead of address of low 32-bits of
5961 __wakeup_seq to futex_requeue macro, adjust for new return value
5962 meaning.
5963 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
5964 (__pthread_cond_signal): Increment __futex at the same time as
5965 __wakeup_seq or __total_seq. Pass address of __futex instead of
5966 address of low 32-bits of __wakeup_seq to futex syscall.
5967 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
5968 (__pthread_cond_wait): Likewise. Pass __futex value from before
5969 releasing internal lock to FUTEX_WAIT.
5970 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5971 (__pthread_cond_timedwait): Likewise.
5972 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
5973 (FUTEX_CMP_REQUEUE): Define.
5974 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
5975 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
5976 Pass __futex value from before the unlock and __futex address instead
5977 of address of low 32-bits of __wakeup_seq to futex syscall.
5978 Fallback to FUTEX_WAKE all on any errors.
5979
5980 2004-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5981
5982 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
5983 Add nop to align the end of critical section.
5984 (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
5985
5986 2004-06-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5987
5988 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
5989 Add __broadcast_seq field.
5990 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
5991 all waiters as woken with woken_seq and bump broadcast counter.
5992 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
5993 __broadcast_seq. Increment __woken_seq correctly when cleanuped.
5994 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5995 Comment typo fixes. Avoid returning -ETIMEDOUT.
5996
5997 2004-06-01 Ulrich Drepper <drepper@redhat.com>
5998
5999 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6000 (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
6001 Reported by Kaz Kojima.
6002
6003 2004-05-25 Jakub Jelinek <jakub@redhat.com>
6004
6005 * sysdeps/unix/sysv/linux/aio_misc.h: New file.
6006
6007 2004-05-21 Jakub Jelinek <jakub@redhat.com>
6008
6009 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
6010 __broadcast_seq with bc_seq after acquiring internal lock instead of
6011 before it.
6012
6013 2004-05-18 Jakub Jelinek <jakub@redhat.com>
6014
6015 * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
6016 compilation.
6017 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6018 (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
6019 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
6020 (pthread_cond_t): Add __data.__broadcast_seq field.
6021 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6022 (FRAME_SIZE): Define.
6023 (__pthread_cond_timedwait): Use it. Store/check broadcast_seq.
6024 Comment typo fixes.
6025 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
6026 Define.
6027 (__pthread_cond_wait): Use it. Store/check broadcast_seq. Comment
6028 typo fixes.
6029 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
6030 (__pthread_cond_broadcast): Increment broadcast_seq. Comment typo
6031 fixes.
6032
6033 2004-05-18 Ulrich Drepper <drepper@redhat.com>
6034
6035 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
6036 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
6037 Add __broadcast_seq field.
6038 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6039 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6040 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6041 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6042 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6043 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
6044 all waiters as woken with woken_seq and bump broadcast counter.
6045 * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
6046 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
6047 __broadcast_seq field.
6048 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6049 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6050 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
6051 * pthread_cond_init.c: Initialize __broadcast_seq field.
6052 * Makefile (tests): Add tst-cond17 and tst-cond18.
6053 Add .NOTPARALLEL goal.
6054 * tst-cond16.c: New file. From Jakub.
6055 * tst-cond17.c: New file. From Jakub.
6056 * tst-cond18.c: New file. From Jakub.
6057
6058 2004-05-16 Ulrich Drepper <drepper@redhat.com>
6059
6060 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
6061 unwind info.
6062
6063 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
6064 Parametrize frame size. Correct some unwind info.
6065 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6066
6067 2004-05-04 Jakub Jelinek <jakub@redhat.com>
6068
6069 * tst-stack3.c: Note testing functionality beyond POSIX.
6070
6071 2004-05-04 Jakub Jelinek <jakub@redhat.com>
6072
6073 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
6074 Change conditional from ifdef to if.
6075
6076 2004-04-23 Jakub Jelinek <jakub@redhat.com>
6077
6078 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
6079 SYSDEP_CANCEL_ERROR): Define.
6080 (PSEUDO): Use it.
6081
6082 2004-05-01 Jakub Jelinek <jakub@redhat.com>
6083
6084 * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
6085
6086 2004-04-20 Jakub Jelinek <jakub@redhat.com>
6087
6088 * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
6089
6090 2004-04-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6091
6092 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
6093 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6094 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
6095 info. Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6096
6097 2004-04-19 Ulrich Drepper <drepper@redhat.com>
6098
6099 * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
6100 thread has all signals blocked.
6101
6102 2004-04-18 Andreas Jaeger <aj@suse.de>
6103
6104 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
6105 (SEM_VALUE_MAX): Add missing brace.
6106
6107 2004-04-17 Jakub Jelinek <jakub@redhat.com>
6108
6109 * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
6110 in rt subdir.
6111 (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
6112 * sysdeps/pthread/tst-mqueue8x.c: New test.
6113 * tst-cancel4.c: Update comment about message queues.
6114
6115 * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
6116 return it_value { 0, 0 }.
6117 * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
6118 like SIGEV_SIGNAL.
6119 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
6120 assertion for SIGEV_NONE.
6121 (thread_attr_compare): Compare all attributes, not just a partial
6122 subset.
6123
6124 2004-04-17 Jakub Jelinek <jakub@redhat.com>
6125
6126 * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
6127
6128 2004-04-17 Ulrich Drepper <drepper@redhat.com>
6129
6130 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
6131 Just use a plain number.
6132 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
6133 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
6134 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
6135 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
6136 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
6137 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
6138 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
6139
6140 2004-04-16 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6141
6142 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
6143 frame info.
6144 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6145
6146 2004-04-15 Jakub Jelinek <jakub@redhat.com>
6147
6148 * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
6149 (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
6150 of calling sigwaitinfo.
6151
6152 2004-04-16 Ulrich Drepper <drepper@redhat.com>
6153
6154 * allocatestack.c (allocate_stack): Set reported_guardsize
6155 unconditionally.
6156 * pthread_getattr_np.c (pthread_getattr_np): Use
6157 reported_guardsize instead of guardsize.
6158 * descr.h (struct pthread): Add reported_guardsize field.
6159
6160 2004-04-13 Jakub Jelinek <jakub@redhat.com>
6161
6162 * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
6163
6164 2004-04-12 Ulrich Drepper <drepper@redhat.com>
6165
6166 * sysdeps/unix/sysv/linux/mq-notify.c: New file.
6167
6168 2004-04-08 Jakub Jelinek <jakub@redhat.com>
6169
6170 * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
6171 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
6172 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
6173 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
6174 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
6175 Define.
6176 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
6177 (_POSIX_MESSAGE_PASSING): Define.
6178 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
6179 (_POSIX_MESSAGE_PASSING): Define.
6180 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
6181 (_POSIX_MESSAGE_PASSING): Define.
6182
6183 2004-04-04 Ulrich Drepper <drepper@redhat.com>
6184
6185 * tst-context1.c (fct): Check whether correct stack is used.
6186
6187 2004-04-03 Ulrich Drepper <drepper@redhat.com>
6188
6189 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
6190 matching constraints for asm mem parameters.
6191
6192 * tst-clock2.c (tf): Don't define unless needed.
6193
6194 2004-03-30 H.J. Lu <hongjiu.lu@intel.com>
6195
6196 * Makefile (link-libc-static): Use $(static-gnulib) instead of
6197 $(gnulib).
6198
6199 2004-03-30 Ulrich Drepper <drepper@redhat.com>
6200
6201 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
6202 * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
6203 * pthreadP.h: Declare __nptl_deallocate_tsd.
6204 * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
6205 Adjust caller.
6206
6207 * Makefile (tests): Add tst-tsd5.
6208 * tst-tsd5.c: New file.
6209
6210 2004-03-29 Ulrich Drepper <drepper@redhat.com>
6211
6212 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
6213 (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
6214 is SHLIB_COMPAT check.
6215 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
6216 (__pthread_attr_getaffinity_old): Likewise.
6217 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6218 (__pthread_getaffinity_old): Likewise.
6219 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
6220 (__pthread_setaffinity_old): Likewise.
6221
6222 2004-03-26 Ulrich Drepper <drepper@redhat.com>
6223
6224 * allocatestack.c (_make_stacks_executable): Call
6225 _dl_make_stack_executable first.
6226
6227 2004-03-24 Roland McGrath <roland@redhat.com>
6228
6229 * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
6230 constraint instead of "0".
6231
6232 2004-03-24 Ulrich Drepper <drepper@redhat.com>
6233
6234 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6235 (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
6236
6237 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
6238 code to avoid warning.
6239
6240 2004-03-24 Andreas Jaeger <aj@suse.de>
6241
6242 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
6243 (__pthread_attr_setaffinity_old): Remove const.
6244
6245 2004-03-23 Ulrich Drepper <drepper@redhat.com>
6246
6247 * sysdeps/unix/sysv/linux/smp.h: New file.
6248 * sysdeps/unix/sysv/linux/sh/smp.h: New file.
6249 * init.c: Define __is_smp.
6250 (__pthread_initialize_minimal_internal): Call is_smp_system to
6251 initialize __is_smp.
6252 * pthreadP.h: Declare __is_smp.
6253 Define MAX_ADAPTIVE_COUNT is necessary.
6254 * pthread_mutex_init.c: Add comment regarding __spins field.
6255 * pthread_mutex_lock.c: Implement adaptive mutex type.
6256 * pthread_mutex_timedlock.c: Likewise.
6257 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
6258 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
6259 Add __spins field.
6260 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6261 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6262 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6263 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6264 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6265 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6266 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6267 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
6268 lll_mutex_cond_trylock.
6269 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6270 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6271 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6272 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6273 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6274 Define BUSY_WAIT_NOP.
6275 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6276 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6277
6278 * tst-mutex5.c: Add support for testing adaptive mutexes.
6279 * tst-mutex7.c: Likewise.
6280 * tst-mutex5a.c: New file.
6281 * tst-mutex7a.c: New file.
6282 * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
6283
6284 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6285 (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
6286 vgettimeofday call might destroy the content.
6287
6288 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
6289 @pause in the loop.
6290
6291 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
6292 No need to restrict type of ret. Make it int. Add comment.
6293
6294 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
6295 Remove unnecessary setne instruction.
6296
6297 2004-03-22 Jakub Jelinek <jakub@redhat.com>
6298
6299 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6300 (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
6301 * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
6302 If realloc fails, break out of the loop.
6303
6304 2004-03-20 Andreas Jaeger <aj@suse.de>
6305
6306 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
6307 (__pthread_setaffinity_old): Fix interface.
6308 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6309 (__pthread_getaffinity_old): Likewise.
6310
6311 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
6312 (__pthread_setaffinity_new): Remove duplicate declaration.
6313
6314 2004-03-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6315
6316 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
6317 the return value to a safe register.
6318 (CDISABLE): Set the function argument correctly.
6319
6320 2004-03-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6321
6322 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
6323 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
6324 Rewrite so that only one locked memory operation per round is needed.
6325 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
6326 (pthread_barrier_wait): After wakeup, release lock only when the
6327 last thread stopped using the barrier object.
6328 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
6329 (__pthread_cond_wait): Don't store mutex address if the current
6330 value is ~0l. Add correct cleanup support and unwind info.
6331 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6332 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
6333 (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
6334 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
6335 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
6336 Add correct cleanup support and unwind info.
6337 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
6338 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
6339 information for syscall wrappers.
6340
6341 2004-03-18 Ulrich Drepper <drepper@redhat.com>
6342
6343 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
6344 cpusetsize field, remove next.
6345 * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
6346 parameter for size of the CPU set.
6347 (pthread_setaffinity_np): Likewise.
6348 (pthread_attr_getaffinity_np): Likewise.
6349 (pthread_attr_setaffinity_np): Likewise.
6350 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
6351 interface change, keep compatibility code.
6352 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
6353 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
6354 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
6355 * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np. Declare
6356 __pthread_getaffinity_np.
6357 * Versions: Add version for changed interfaces.
6358 * tst-attr3.c: Adjust test for interface change.
6359 * pthread_getattr_np.c: Query the kernel about the affinity mask with
6360 increasing buffer sizes.
6361 * pthread_attr_destroy.c: Remove unused list handling.
6362 * pthread_attr_init.c: Likewise.
6363
6364 2004-03-17 Roland McGrath <roland@redhat.com>
6365
6366 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
6367 first argument to clock_getres so we ever enable kernel timers.
6368
6369 2004-03-15 Ulrich Weigand <uweigand@de.ibm.com>
6370
6371 * init.c (nptl_version): Add __attribute_used__ to nptl_version.
6372
6373 2004-03-12 Richard Henderson <rth@redhat.com>
6374
6375 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
6376 oldvalue from CENABLE to CDISABLE.
6377
6378 2004-03-12 Ulrich Drepper <drepper@redhat.com>
6379
6380 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
6381 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
6382 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
6383 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
6384
6385 2004-03-11 Richard Henderson <rth@redhat.com>
6386
6387 * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
6388 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
6389 * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
6390
6391 2004-03-11 Jakub Jelinek <jakub@redhat.com>
6392
6393 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
6394 instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
6395 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
6396
6397 2004-03-11 Jakub Jelinek <jakub@redhat.com>
6398
6399 * forward.c (__pthread_cond_broadcast_2_0,
6400 __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
6401 __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
6402 __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
6403
6404 2004-03-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6405
6406 * sysdeps/sh/tcb-offsets.sym: Add PID.
6407 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
6408 * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
6409
6410 2004-03-10 Ulrich Drepper <drepper@redhat.com>
6411
6412 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
6413 include <sysdep-cancel.h>, vfork is no cancellation point.
6414 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
6415 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
6416 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
6417
6418 2004-03-10 Jakub Jelinek <jakub@redhat.com>
6419
6420 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
6421 libc_hidden_def.
6422 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
6423 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
6424 Likewise.
6425 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
6426 Likewise.
6427 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
6428 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
6429 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
6430 * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
6431 of DO_CALL_VIA_BREAK. Work around a gas problem.
6432
6433 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
6434 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
6435 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
6436 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
6437 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
6438 * sysdeps/powerpc/tcb-offsets.sym: Add PID.
6439
6440 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
6441 a local register for saving old PID. Negate PID in parent upon exit.
6442
6443 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
6444 tcb-offsets.h.
6445 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
6446 before syscall, set to the old value in the parent afterwards.
6447 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
6448 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
6449 tcb-offsets.h.
6450 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
6451 before syscall, set to the old value in the parent afterwards.
6452 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
6453 * sysdeps/s390/tcb-offsets.sym: Add PID.
6454
6455 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
6456 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
6457 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
6458 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
6459 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
6460 * sysdeps/sparc/tcb-offsets.sym: Add PID.
6461
6462 2004-03-10 Andreas Schwab <schwab@suse.de>
6463
6464 * sysdeps/ia64/tcb-offsets.sym: Add PID.
6465 * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
6466 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
6467
6468 2004-03-09 Jakub Jelinek <jakub@redhat.com>
6469
6470 * tst-cancel20.c (do_one_test): Clear in_sh_body first.
6471 * tst-cancel21.c (do_one_test): Likewise.
6472 Reported by Gordon Jin <gordon.jin@intel.com>.
6473
6474 2004-02-09 Jakub Jelinek <jakub@redhat.com>
6475
6476 * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
6477 if non-zero and set to INT_MIN if zero.
6478 * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
6479 * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
6480 (SAVE_PID, RESTORE_PID): Define.
6481 (__vfork): Use it.
6482 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
6483 Use relative path to avoid including NPTL i386/vfork.S.
6484 (SAVE_PID, RESTORE_PID): Define.
6485 * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
6486 (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
6487 * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
6488 tst-vfork2x.
6489 (tests-reverse): Add tst-vfork1x and tst-vfork2x.
6490 * tst-vfork1.c: New test.
6491 * tst-vfork2.c: New test.
6492 * tst-vfork1x.c: New test.
6493 * tst-vfork2x.c: New test.
6494
6495 2004-03-08 Ulrich Drepper <drepper@redhat.com>
6496
6497 * sysdeps/i386/tcb-offsets.sym: Add PID.
6498 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6499 * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
6500 * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
6501
6502 2004-03-08 Steven Munroe <sjmunroe@us.ibm.com>
6503
6504 * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
6505
6506 2004-03-08 H.J. Lu <hongjiu.lu@intel.com>
6507
6508 * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
6509 _rtld_global_ro.
6510
6511 2004-03-07 Ulrich Drepper <drepper@redhat.com>
6512
6513 * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
6514 _rtld_global_ro.
6515
6516 * tst-once4.c: Remove unnecessary macro definition.
6517
6518 * tst-mutex7.c (do_test): Limit thread stack size.
6519 * tst-once2.c (do_test): Likewise.
6520 * tst-tls3.c (do_test): Likewise.
6521 * tst-tls1.c (do_test): Likewise.
6522 * tst-signal3.c (do_test): Likewise.
6523 * tst-kill6.c (do_test): Likewise.
6524 * tst-key4.c (do_test): Likewise.
6525 * tst-join4.c (do_test): Likewise.
6526 * tst-fork1.c (do_test): Likewise.
6527 * tst-context1.c (do_test): Likewise.
6528 * tst-cond2.c (do_test): Likewise.
6529 * tst-cond10.c (do_test): Likewise.
6530 * tst-clock2.c (do_test): Likewise.
6531 * tst-cancel10.c (do_test): Likewise.
6532 * tst-basic2.c (do_test): Likewise.
6533 * tst-barrier4.c (do_test): Likewise.
6534
6535 2004-03-05 Ulrich Drepper <drepper@redhat.com>
6536
6537 * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
6538
6539 2004-03-01 Ulrich Drepper <drepper@redhat.com>
6540
6541 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6542 (__pthread_cond_timedwait): Optimize wakeup test.
6543 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
6544 (__pthread_cond_wait): Likewise.
6545 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
6546 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6547 Likewise.
6548
6549 2004-02-29 Ulrich Drepper <drepper@redhat.com>
6550
6551 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6552 (__lll_mutex_lock_wait): Optimize a bit more. Just one copy of
6553 the atomic instruction needed.
6554 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6555 (__lll_mutex_lock_wait): Likewise.
6556
6557 2004-02-28 Ulrich Drepper <drepper@redhat.com>
6558
6559 * Makefile (tests): Add tst-cond14 and tst-cond15.
6560 * tst-cond14.c: New file.
6561 * tst-cond15.c: New file.
6562
6563 2004-02-27 Ulrich Drepper <drepper@redhat.com>
6564
6565 * sysdeps/pthread/createthread.c (create_thread): Remove use of
6566 CLONE_STOPPED. We cannot use SIGCONT which means CLONE_STOPPED
6567 needs to be implemented differently to be useful.
6568
6569 2004-02-26 Ulrich Drepper <drepper@redhat.com>
6570
6571 * pthread_attr_setschedparam.c: Don't test priority against limits
6572 here. Set ATTR_FLAG_SCHED_SET flag.
6573 * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
6574 * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
6575 from parent thread to child. If attribute is used and scheduling
6576 parameters are not inherited, copy parameters from attribute or
6577 compute them. Check priority value.
6578 * pthread_getschedparam.c: If the parameters aren't known yet get
6579 them from the kernel.
6580 * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
6581 ATTR_FLAG_POLICY_SET flag for thread.
6582 * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
6583 and ATTR_FLAG_POLICY_SET.
6584
6585 * sysdeps/pthread/createthread.c: Use tgkill if possible.
6586
6587 * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
6588 fail if stack address hasn't been set. Just return 0.
6589
6590 2004-02-25 Ulrich Drepper <drepper@redhat.com>
6591
6592 * Makefile (tests-nolibpthread): Add tst-unload. Don't link with
6593 libpthread for the files in this list.
6594 (CFLAGS-tst-unload): Removed.
6595 * tst-unload.c (do_test): Don't use complete path for
6596 LIBPHREAD_SO.
6597
6598 * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
6599 tst-_res1mod2.
6600
6601 2004-02-22 Ulrich Drepper <drepper@redhat.com>
6602
6603 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6604 (__lll_mutex_lock_wait): Rewrite so that only one locked memory
6605 operation per round is needed.
6606 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6607 (__lll_mutex_lock_wait): Likewise.
6608
6609 2004-02-20 Ulrich Drepper <drepper@redhat.com>
6610
6611 * tst-cancel9.c (cleanup): Don't print to stderr.
6612
6613 2004-02-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6614
6615 * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
6616
6617 2004-02-20 Jakub Jelinek <jakub@redhat.com>
6618
6619 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
6620 (__syscall_error_handler2): Call CDISABLE.
6621 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
6622 (__syscall_error_handler2): Call CDISABLE.
6623
6624 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
6625 Release lock before the loop, don't reacquire it.
6626
6627 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
6628
6629 2004-02-19 Andreas Schwab <schwab@suse.de>
6630
6631 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
6632 Fix last change.
6633
6634 2004-02-18 Ulrich Drepper <drepper@redhat.com>
6635
6636 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
6637 (pthread_barrier_wait): After wakeup, release lock only when the
6638 last thread stopped using the barrier object.
6639 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
6640 (pthread_barrier_wait): Likewise.
6641 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
6642 Likewise.
6643 * Makefile (tests): Add tst-barrier4.
6644 * tst-barrier4.c: New file.
6645
6646 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6647 (__pthread_cond_timedwait): Perform timeout test while holding
6648 internal lock to prevent wakeup race.
6649 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
6650 * sysdeps/pthread/pthread_cond_timedwait.c
6651 (__pthread_cond_timedwait): Likewise.
6652 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6653 (__pthread_cond_timedwait): Likewise.
6654
6655 2004-02-18 Jakub Jelinek <jakub@redhat.com>
6656
6657 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
6658 (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
6659 * Makefile (tests): Add tst-rwlock13.
6660 * tst-rwlock13.c: New test.
6661
6662 2004-02-16 Ulrich Drepper <drepper@redhat.com>
6663
6664 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6665 (__condvar_tw_cleanup): Little optimization.
6666 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
6667
6668 2004-02-16 Steven Munroe <sjmunroe@us.ibm.com>
6669
6670 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
6671 libpthread as "lib" parameter to SHLIB_COMPAT.
6672 (__novmx_siglongjmp): Fix typo in function name.
6673 (__novmx_longjmp): Fix typo in function name.
6674
6675 2004-02-13 Ulrich Drepper <drepper@redhat.com>
6676
6677 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
6678 __builtin_expect.
6679
6680 * sysdeps/generic/pt-longjmp.c: Moved to...
6681 * sysdeps/pthread/pt-longjmp.c: ...here. New file.
6682
6683 2004-01-29 Steven Munroe <sjmunroe@us.ibm.com>
6684
6685 * Makefile (libpthread-routines): Add pt-cleanup.
6686 * pt-longjmp.c: Removed.
6687 * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
6688 * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
6689 * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
6690 Version longjmp, siglongjmp for GLIBC_2.3.4.
6691 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
6692
6693 2004-02-13 Ulrich Drepper <drepper@redhat.com>
6694
6695 * sysdeps/pthread/pthread_cond_timedwait.c
6696 (__pthread_cond_timedwait): Optimize. Drop internal lock earlier.
6697 Reuse code. Add __builtin_expects.
6698
6699 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6700 (__pthread_cond_timedwait): Get internal lock in case timeout has
6701 passed before the futex syscall.
6702 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6703
6704 2004-01-20 Ulrich Drepper <drepper@redhat.com>
6705
6706 * allocatestack.c: Pretty printing.
6707
6708 * sysdeps/pthread/createthread.c (create_thread): Don't add
6709 CLONE_DETACHED bit if it is not necessary.
6710
6711 2004-01-16 Ulrich Drepper <drepper@redhat.com>
6712
6713 * pthread_getattr_np.c: Include ldsodefs.h.
6714
6715 2004-01-16 Richard Henderson <rth@redhat.com>
6716
6717 * allocatestack.c: Don't declare __libc_stack_end.
6718 * init.c (__pthread_initialize_minimal_internal): Likewise.
6719 * pthread_getattr_np.c (pthread_getattr_np): Likewise.
6720
6721 2004-01-15 Richard Henderson <rth@redhat.com>
6722
6723 * sysdeps/alpha/tls.h (tcbhead_t): Add private.
6724 (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
6725 TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
6726 GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
6727 (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
6728 (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
6729 (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
6730 * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
6731
6732 2004-01-14 Ulrich Drepper <drepper@redhat.com>
6733
6734 * init.c (pthread_functions): Make array const.
6735
6736 2004-01-13 Ulrich Drepper <drepper@redhat.com>
6737
6738 * allocatestack.c (__make_stacks_executable): Change interface.
6739 Check parameters. Pass parameter on to libc counterpart.
6740 * pthreadP.h: Change declaration.
6741
6742 2004-01-13 Richard Henderson <rth@redhat.com>
6743
6744 * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
6745 prototype form.
6746 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
6747 Likewise.
6748
6749 * sysdeps/alpha/Makefile: New file.
6750 * sysdeps/alpha/tcb-offsets.sym: New file.
6751 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
6752 Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
6753
6754 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
6755 on powerpc version.
6756
6757 2004-01-08 Jakub Jelinek <jakub@redhat.com>
6758
6759 * Makefile (tests): Add tst-backtrace1.
6760 * tst-backtrace1.c: New test.
6761
6762 2003-12-11 Ulrich Weigand <uweigand@de.ibm.com>
6763
6764 * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
6765 register as second parameter to the REGISTER macro.
6766 * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
6767 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
6768 * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
6769 * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
6770 * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
6771 of thread register as second parameter to REGISTER macro in 64 case.
6772
6773 2004-01-03 Ulrich Drepper <drepper@redhat.com>
6774
6775 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
6776 (CFLAGS-getpid.o): Defined.
6777 (CFLAGS-getpid.os): Defined.
6778
6779 2003-12-31 Ulrich Drepper <drepper@redhat.com>
6780
6781 * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
6782 returned for main thread does not overlap with any other VMA.
6783 Patch by Jakub Jelinek.
6784
6785 2003-12-29 Jakub Jelinek <jakub@redhat.com>
6786
6787 * tst-raise1.c: Include stdio.h.
6788
6789 2003-12-23 Jakub Jelinek <jakub@redhat.com>
6790
6791 * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
6792 setting with __ASSUME_TGKILL || defined __NR_tgkill.
6793 If pid is 0, set it to selftid.
6794 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
6795 Don't set self->pid but self->tid. If self->pid == 0 and self->tid
6796 != 0, return self->tid without doing a syscall.
6797 * descr.h (struct pthread): Move pid field after tid.
6798
6799 * Makefile (tests): Add tst-raise1.
6800 * tst-raise1.c: New file.
6801
6802 2003-12-23 Roland McGrath <roland@redhat.com>
6803
6804 * tst-oddstacklimit.c: New file.
6805 * Makefile (tests): Add it.
6806 (tst-oddstacklimit-ENV): New variable.
6807
6808 * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
6809 value up to page size for __default_stacksize.
6810
6811 2003-12-21 Ulrich Drepper <drepper@redhat.com>
6812
6813 * Makefile (tests): Add tst-eintr5.
6814 * tst-eintr5.c: New file.
6815
6816 * eintr.c (eintr_source): Prevent sending signal to self.
6817
6818 * tst-eintr2.c (tf1): Improve error message.
6819
6820 2003-12-20 Ulrich Drepper <drepper@redhat.com>
6821
6822 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
6823 * sysdeps/unix/sysv/linux/getpid.c: New file.
6824 * pthread_cancel.c: Add comment explaining use of PID field.
6825 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
6826 * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
6827 * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
6828 temporarily to signal the field must not be relied on and updated
6829 by getpid().
6830 * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
6831 temporarily negative.
6832 * sysdeps/unix/sysv/linux/raise.c: Likewise.
6833
6834 2003-12-19 Ulrich Drepper <drepper@redhat.com>
6835
6836 * eintr.c (setup_eintr): Add new parameter. Pass to thread function.
6837 (eintr_source): If ARG != NULL, use pthread_kill.
6838 * tst-eintr1.c: Adjust for this change.
6839 * tst-eintr2.c: Likewise.
6840 * Makefile (tests): Add tst-eintr3 and tst-eintr4.
6841 * tst-eintr3.c: New file.
6842 * tst-eintr4.c: New file.
6843
6844 2003-12-19 Jakub Jelinek <jakub@redhat.com>
6845
6846 * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
6847 if CANCELSTATE_BITMASK is set.
6848 * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
6849 Likewise.
6850
6851 * Makefile (tests): Add tst-cancel22 and tst-cancel23.
6852 (tests-reverse): Add tst-cancel23.
6853 * tst-cancel22.c: New test.
6854 * tst-cancel23.c: New test.
6855
6856 2003-12-18 Ulrich Drepper <drepper@redhat.com>
6857
6858 * tst-eintr1.c: Better error messages.
6859
6860 * Makefile (tests): Add tst-eintr2.
6861 * tst-eintr2.c: New file.
6862
6863 2003-12-18 Jakub Jelinek <jakub@redhat.com>
6864
6865 * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
6866 (CFLAGS-tst-cancelx21.c): Set.
6867 * tst-cancel21.c: New test.
6868 * tst-cancelx21.c: New test.
6869
6870 * unwind.c (FRAME_LEFT): Add adj argument. Subtract it from each
6871 comparison operand.
6872 (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
6873 _JMPBUF_CFA_UNWINDS. Adjust FRAME_LEFT invocations.
6874 * pt-longjmp.c: Include jmpbuf-unwind.h.
6875 (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
6876 _JMPBUF_UNWINDS. Adjust compared pointers.
6877 * init.c (__pthread_initialize_minimal_internal): Initialize
6878 pd->stackblock_size.
6879 * sysdeps/pthread/jmpbuf-unwind.h: Removed.
6880 * sysdeps/alpha/jmpbuf-unwind.h: New file.
6881 * sysdeps/i386/jmpbuf-unwind.h: New file.
6882 * sysdeps/powerpc/jmpbuf-unwind.h: New file.
6883 * sysdeps/s390/jmpbuf-unwind.h: New file.
6884 * sysdeps/sh/jmpbuf-unwind.h: New file.
6885 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
6886 * sysdeps/x86_64/jmpbuf-unwind.h: New file.
6887 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
6888 (_JMPBUF_CFA_UNWINDS): Remove.
6889 (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
6890
6891 2003-12-12 Jakub Jelinek <jakub@redhat.com>
6892
6893 * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
6894 (CFLAGS-tst-cancelx20.c): Set.
6895 * tst-cancel20.c: New test.
6896 * tst-cancelx20.c: New test.
6897
6898 2003-12-17 Ulrich Drepper <drepper@redhat.com>
6899
6900 * init.c (__pthread_initialize_minimal_internal): Don't treat
6901 architectures with separate register stack special here when
6902 computing default stack size.
6903
6904 2003-12-17 Roland McGrath <roland@redhat.com>
6905
6906 * Makefile (tst-cancelx7-ARGS): New variable.
6907 Reportd by Greg Schafer <gschafer@zip.com.au>.
6908
6909 2003-12-17 Jakub Jelinek <jakub@redhat.com>
6910
6911 * Makefile (tests): Add tst-stack3. Depend on $(objpfx)tst-stack3-mem.
6912 (generated): Add tst-stack3.mtrace and tst-stack3-mem.
6913 (tst-stack3-ENV): Set.
6914 ($(objpfx)tst-stack3-mem): New.
6915 * tst-stack3.c: New test.
6916
6917 2003-12-10 David Mosberger <davidm@hpl.hp.com>
6918
6919 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
6920 Add unwind directives. Drop unused .regstk directive.
6921 (_fini_EPILOG_BEGINS): Add unwind directives.
6922
6923 2003-12-11 Ulrich Drepper <drepper@redhat.com>
6924
6925 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
6926 Assume parameter is a pointer.
6927 (lll_futex_wake): Likewise.
6928 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
6929 Likewise.
6930 (lll_futex_wake): Likewise.
6931 Reported by Boris Hu.
6932 * sysdeps/unix/sysv/linux/unregister-atfork.c
6933 (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
6934
6935 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
6936
6937 2003-12-10 Ulrich Drepper <drepper@redhat.com>
6938
6939 * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
6940 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
6941 __rtld_lock_initialize for ld.so lock.
6942 Patch in part by Adam Li <adam.li@intel.com>.
6943
6944 2003-12-02 David Mosberger <davidm@hpl.hp.com>
6945
6946 * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
6947 in $(gnulib). Also, remove stale comment.
6948
6949 2003-11-12 David Mosberger <davidm@hpl.hp.com>
6950
6951 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
6952 advantage of new syscall stub and optimize accordingly.
6953
6954 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
6955 from SYS_futex, to match expectations of
6956 sysdep.h:DO_INLINE_SYSCALL.
6957 (lll_futex_clobbers): Remove.
6958 (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
6959 (lll_futex_wake): Likewise.
6960 (lll_futex_requeue): Likewise.
6961 (__lll_mutex_trylock): Rewrite to a macro, so we can include this
6962 file before DO_INLINE_SYSCALL is defined (proposed by Jakub
6963 Jelinek).
6964 (__lll_mutex_lock): Likewise.
6965 (__lll_mutex_cond_lock): Likewise.
6966 (__lll_mutex_timed_lock): Likewise.
6967 (__lll_mutex_unlock): Likewise.
6968 (__lll_mutex_unlock_force): Likewise.
6969
6970 * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
6971 comes before the include of <sysdep.h>.
6972 (THREAD_SELF_SYSINFO): New macro.
6973 (THREAD_SYSINFO): Likewise.
6974 (INIT_SYSINFO): New macro.
6975 (TLS_INIT_TP): Call INIT_SYSINFO.
6976
6977 * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
6978
6979 * sysdeps/pthread/createthread.c (create_thread): Use
6980 THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
6981 * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
6982 THREAD_SELF_SYSINFO instead of open code.
6983 * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
6984 (THREAD_SYSINFO): Likewise.
6985
6986 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
6987
6988 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
6989
6990 2003-12-06 Ulrich Drepper <drepper@redhat.com>
6991
6992 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
6993 instead of .init. Patch by David Mosberger.
6994
6995 2003-11-30 Thorsten Kukuk <kukuk@suse.de>
6996
6997 * sysdeps/pthread/configure.in: Remove broken declaration in C
6998 cleanup handling check.
6999
7000 2003-11-30 Andreas Jaeger <aj@suse.de>
7001
7002 * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
7003 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
7004 Likewise.
7005
7006 2003-11-27 Jakub Jelinek <jakub@redhat.com>
7007
7008 * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
7009 * pthread_attr_destroy.c: Include shlib-compat.h.
7010 (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
7011 is set in iattr->flags.
7012 * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
7013
7014 2003-11-21 Jakub Jelinek <jakub@redhat.com>
7015
7016 * Makefile (distribute): Add tst-cleanup4aux.c.
7017
7018 * tst-cond12.c (prepare): Add prototype. Move after test-skeleton.c
7019 include.
7020
7021 2003-11-21 Ulrich Drepper <drepper@redhat.com>
7022
7023 * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
7024 pthread_cond_signal.
7025
7026 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
7027 store mutex address if the current value is ~0l.
7028 * sysdeps/pthread/pthread_cond_timedwait.c
7029 (__pthread_cond_timedwait): Likewise.
7030 * sysdeps/pthread/pthread_cond_broadcast.c
7031 (__pthread_cond_broadcast): Don't use requeue for pshared
7032 condvars.
7033
7034 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
7035 (__pthread_cond_wait): Don't store mutex address if the current
7036 value is ~0l.
7037 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
7038 (__pthread_cond_timedwait): Likewise.
7039 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
7040 (__pthread_cond_broadcast): Don't use requeue for pshared
7041 condvars.
7042
7043 * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
7044 element with ~0l for pshared condvars, with NULL otherwise.
7045
7046 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
7047 (__pthread_cond_wait): Don't store mutex address if the current
7048 value is ~0l.
7049 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7050 (__pthread_cond_timedwait): Likewise.
7051 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
7052 (__pthread_cond_broadcast): Don't use requeue for pshared
7053 condvars.
7054
7055 * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
7056 * tst-cond12.c: New file.
7057 * tst-cond13.c: New file.
7058
7059 2003-11-17 Ulrich Drepper <drepper@redhat.com>
7060
7061 * sysdeps/pthread/configure.in: Make missing forced unwind support
7062 fatal.
7063
7064 2003-11-11 Ulrich Drepper <drepper@redhat.com>
7065
7066 * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
7067
7068 2003-11-06 Ulrich Drepper <drepper@redhat.com>
7069
7070 * Makefile: Add magic to clean up correctly.
7071
7072 2003-11-05 Jakub Jelinek <jakub@redhat.com>
7073
7074 * unwind.c (FRAME_LEFT): Define.
7075 (unwind_stop): Handle old style cleanups here.
7076 (__pthread_unwind): Handle old style cleanups only if
7077 !HAVE_FORCED_UNWIND.
7078 * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
7079 (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
7080 ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
7081 ($(objpfx)tst-cleanupx4): Likewise.
7082 * tst-cleanup4.c: New test.
7083 * tst-cleanup4aux.c: New.
7084 * tst-cleanupx4.c: New test.
7085
7086 2003-11-04 Ulrich Drepper <drepper@redhat.com>
7087
7088 * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
7089 lll_mutex_*lock macros to skip atomic operations on some archs.
7090
7091 2003-11-03 Ulrich Drepper <drepper@redhat.com>
7092
7093 * sysdeps/pthread/tst-timer.c (main): Initialize
7094 sigev2.sigev_value as well.
7095
7096 2003-10-15 Roland McGrath <roland@redhat.com>
7097
7098 * sysdeps/pthread/configure.in: Barf if visibility attribute support
7099 is missing.
7100 * sysdeps/pthread/configure: Regenerated.
7101
7102 2003-10-09 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7103
7104 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
7105 locking macros. No distinction between normal and mutex locking
7106 anymore.
7107 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
7108 Merge bits from lowlevelmutex.S we still need.
7109 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
7110 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
7111 * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
7112 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
7113 new mutex implementation.
7114 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
7115 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
7116 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7117 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
7118 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
7119 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7120 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7121 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
7122 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7123 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
7124 symbol for entry point to avoid cancellation.
7125
7126 2003-10-07 Jakub Jelinek <jakub@redhat.com>
7127
7128 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
7129 changes.
7130 (SAVE_OLDTYPE_0): Fix a typo.
7131
7132 2003-10-03 Ulrich Drepper <drepper@redhat.com>
7133
7134 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
7135 Check __sigsetjmp return value. Reported by Daniel Jacobowitz.
7136
7137 2003-10-02 Ulrich Drepper <drepper@redhat.com>
7138
7139 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
7140 correct offset.
7141
7142 2003-10-02 Jakub Jelinek <jakub@redhat.com>
7143
7144 * Makefile (tests): Add tst-cancel19.
7145 * tst-cancel19.c: New test.
7146
7147 2003-10-02 Ulrich Drepper <drepper@redhat.com>
7148
7149 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
7150 restoring of the old cancellation type.
7151
7152 2003-09-30 Jakub Jelinek <jakub@redhat.com>
7153
7154 * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
7155
7156 2003-09-27 Wolfram Gloger <wg@malloc.de>
7157
7158 * sysdeps/pthread/malloc-machine.h: New file
7159
7160 2003-09-24 Roland McGrath <roland@redhat.com>
7161
7162 * allocatestack.c (__make_stacks_executable): Don't ignore return
7163 value from _dl_make_stack_executable.
7164
7165 2003-09-24 Ulrich Drepper <drepper@redhat.com>
7166
7167 * allocatestack.c (__make_stacks_executable): Also change
7168 permission of the currently unused stacks.
7169
7170 * allocatestack.c (change_stack_perm): Split out from
7171 __make_stacks_executable.
7172 (allocate_stack): If the required permission changed between the time
7173 we started preparing the stack and queueing it, change the permission.
7174 (__make_stacks_executable): Call change_stack_perm.
7175
7176 * Makefile: Build tst-execstack-mod locally.
7177 * tst-execstack-mod.c: New file.
7178
7179 2003-09-23 Jakub Jelinek <jakub@redhat.com>
7180
7181 * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
7182
7183 2003-09-23 Roland McGrath <roland@redhat.com>
7184
7185 * tst-execstack.c: New file.
7186 * Makefile (tests): Add it.
7187 ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
7188 (LDFLAGS-tst-execstack): New variable.
7189
7190 * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
7191 whether to use PROT_EXEC for stack mmap.
7192 (__make_stacks_executable): New function.
7193 * pthreadP.h: Declare it.
7194 * init.c (__pthread_initialize_minimal_internal): Set
7195 GL(dl_make_stack_executable_hook) to that.
7196
7197 2003-09-22 Ulrich Drepper <drepper@redhat.com>
7198
7199 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
7200 recommendation from AMD re avoidance of lock prefix.
7201
7202 2003-09-22 Jakub Jelinek <jakub@redhat.com>
7203
7204 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
7205 lll_futex_timed_wait instead of lll_futex_wait.
7206 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
7207 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
7208 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
7209 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
7210 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
7211 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
7212 * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
7213 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
7214 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
7215 Completely revamp the locking macros. No distinction between
7216 normal and mutex locking anymore.
7217 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
7218 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
7219 __lll_lock_timedwait): Fix prototypes.
7220 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
7221 __lll_lock_timedwait): Likewise.
7222 (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
7223 macros, add __builtin_expect.
7224 (lll_mutex_timedlock): Likewise. Fix return value.
7225 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
7226 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
7227 * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
7228 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
7229 * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
7230 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
7231 * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
7232 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
7233
7234 2003-09-22 Ulrich Drepper <drepper@redhat.com>
7235
7236 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
7237 (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
7238 operation if possible.
7239
7240 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
7241 like jumping over the lock prefix.
7242
7243 2003-09-21 Ulrich Drepper <drepper@redhat.com>
7244
7245 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
7246 locking macros. No distinction between normal and mutex locking
7247 anymore.
7248 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7249 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
7250 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
7251 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
7252 locking. Merge bits from lowlevelmutex.S we still need.
7253 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
7254 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
7255 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
7256 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
7257 * Makefile (routines): Remove libc-lowlevelmutex.
7258 (libpthread-rountines): Remove lowlevelmutex.
7259 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
7260 for new mutex implementation.
7261 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
7262 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7263 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7264 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
7265 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7266 Likewise.
7267 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7268 Likewise.
7269 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
7270 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7271 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
7272 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
7273 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7274 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7275 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
7276 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
7277 Likewise.
7278 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
7279 Likewise.
7280 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
7281 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
7282 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
7283 Don't use requeue.
7284 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
7285 * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
7286
7287 2003-09-20 Ulrich Drepper <drepper@redhat.com>
7288
7289 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
7290 in parameters of asm with output parameters.
7291
7292 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
7293 type of DECR parameter to int.
7294 * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
7295
7296 2003-09-18 Jakub Jelinek <jakub@redhat.com>
7297
7298 * tst-attr3.c (tf, do_test): Print stack start/end/size and
7299 guardsize for each thread.
7300
7301 2003-09-17 Jakub Jelinek <jakub@redhat.com>
7302
7303 * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
7304 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
7305 (pthread_attr_setaffinity_np): Handle cpuset == NULL.
7306
7307 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
7308 (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
7309 NULL.
7310 * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
7311 * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
7312 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
7313 (pthread_getaffinity_np): Add hidden_def.
7314
7315 * Makefile (tests): Add tst-attr3.
7316 * tst-attr3.c: New test.
7317
7318 * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
7319
7320 2003-09-15 Jakub Jelinek <jakub@redhat.com>
7321
7322 * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
7323 CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
7324
7325 2003-09-17 Jakub Jelinek <jakub@redhat.com>
7326
7327 * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
7328 * tst-align.c: Include tst-stack-align.h.
7329 (tf, do_test): Use TEST_STACK_ALIGN macro.
7330
7331 2003-09-17 Ulrich Drepper <drepper@redhat.com>
7332
7333 * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
7334 variable.
7335
7336 2003-09-16 Ulrich Drepper <drepper@redhat.com>
7337
7338 * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
7339 stack-related values for the initial thread.
7340
7341 2003-09-15 Jakub Jelinek <jakub@redhat.com>
7342
7343 * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
7344
7345 2003-09-11 Ulrich Drepper <drepper@redhat.com>
7346
7347 * pthread_mutex_lock.c: Minor code rearrangements.
7348
7349 2003-09-05 Roland McGrath <roland@redhat.com>
7350
7351 * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
7352 Instead, include ../nptl_db/db_info.c to do its magic.
7353 * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
7354 (__pthread_pthread_key_2ndlevel_size): Likewise.
7355 * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
7356 * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
7357 * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
7358 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
7359 * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
7360 * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
7361 * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
7362 * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
7363 * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
7364 * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
7365 * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
7366 * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
7367 * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
7368 * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
7369 * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
7370 * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
7371 * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
7372
7373 2003-09-08 Ulrich Drepper <drepper@redhat.com>
7374
7375 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
7376 of pthread_t to be compatible with LT.
7377 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
7378 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7379 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7380 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7381 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
7382 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7383 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
7384
7385 2003-09-04 Ulrich Drepper <drepper@redhat.com>
7386
7387 * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
7388
7389 2003-09-04 Jakub Jelinek <jakub@redhat.com>
7390
7391 * unwind-forcedunwind.c: Move to...
7392 * sysdeps/pthread/unwind-forcedunwind.c: ...here.
7393 (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
7394 * sysdeps/pthread/jmpbuf-unwind.h: New file.
7395 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
7396 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
7397 * unwind.c: Include jmpbuf-unwind.h.
7398 (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
7399
7400 2003-09-02 Jakub Jelinek <jakub@redhat.com>
7401
7402 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
7403 * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
7404 pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
7405 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
7406 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
7407 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
7408 * sysdeps/unix/sysv/linux/sparc/Versions: New file.
7409 * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
7410 (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
7411 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
7412 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
7413 function.
7414 (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
7415 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
7416 * Makefile (tests): Add tst-stack2.
7417 * tst-stack2.c: New test.
7418 * tst-stack1.c: Include limits.h and sys/param.h.
7419 (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
7420
7421 * pthread_condattr_setpshared.c: Include errno.h.
7422 (pthread_condattr_setpshared): Return EINVAL if pshared
7423 is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
7424
7425 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
7426 defined symbol for entry point to avoid cancellation.
7427 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
7428 Likewise.
7429 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
7430 Likewise.
7431 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
7432 Likewise.
7433 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
7434 Likewise.
7435 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
7436 Likewise.
7437 * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
7438 __close_nocancel, __read_nocancel, __write_nocancel,
7439 __waitpid_nocancel): Add attribute_hidden. If not in libc.so,
7440 libpthread.so or librt.so, define to corresponding function
7441 without _nocancel suffix.
7442 * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
7443 * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
7444 * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
7445
7446 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
7447
7448 2003-09-02 Ulrich Drepper <drepper@redhat.com>
7449
7450 * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
7451 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
7452
7453 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
7454 in subsections has a symbol associated with it.
7455
7456 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
7457 defined symbol for entry point to avoid cancellation.
7458 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
7459
7460 2003-09-01 Jakub Jelinek <jakub@redhat.com>
7461
7462 * Makefile (tests): Add tst-tls5.
7463 (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
7464 ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
7465 ($(objpfx)tst-tls5): New.
7466 ($(objpfx)tst-tls6.out): Likewise.
7467 (tests): Depend on $(objpfx)tst-tls6.out.
7468 * tst-tls3.c: Include stdint.h and pthreaddef.h.
7469 (do_test): Check pthread_self () return value alignment.
7470 * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
7471 (tf): Check pthread_self () return value alignment.
7472 * tst-tls5.c: New test.
7473 * tst-tls5.h: New.
7474 * tst-tls5mod.c: New.
7475 * tst-tls5moda.c: New.
7476 * tst-tls5modb.c: New.
7477 * tst-tls5modc.c: New.
7478 * tst-tls5modd.c: New.
7479 * tst-tls5mode.c: New.
7480 * tst-tls5modf.c: New.
7481 * tst-tls6.sh: New test.
7482
7483 * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
7484 ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
7485 * init.c (pthread_functions): Initialize them.
7486 * forward.c (pthread_cond_timedwait@GLIBC_2.0,
7487 pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
7488 * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
7489 pthread_cond_timedwait@@GLIBC_2.3.2.
7490
7491 2003-09-01 Jakub Jelinek <jakub@redhat.com>
7492
7493 * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
7494 * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
7495 * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
7496 * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
7497 * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
7498 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
7499
7500 * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
7501
7502 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
7503 _POSIX_THREAD_PRIORITY_SCHEDULING.
7504 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
7505
7506 2003-08-31 Ulrich Drepper <drepper@redhat.com>
7507
7508 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
7509 nested function, use static inline function from libio.h.
7510 Code by Richard Henderson.
7511
7512 * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
7513 weak.
7514
7515 2003-08-30 Jakub Jelinek <jakub@redhat.com>
7516
7517 * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
7518 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
7519 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
7520 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
7521 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
7522 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
7523 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
7524 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
7525 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
7526 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
7527 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
7528 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
7529 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
7530 * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
7531 * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
7532 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
7533 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
7534 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
7535 * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
7536 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
7537 * sysdeps/sparc/sparc32/pthreaddef.h: New file.
7538 * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
7539 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
7540 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
7541 * sysdeps/sparc/sparc64/pthreaddef.h: New file.
7542 * sysdeps/sparc/tls.h: New file.
7543 * sysdeps/sparc/tcb-offsets.sym: New file.
7544 * sysdeps/sparc/Makefile: New file.
7545 * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
7546 * init.c [__sparc__] (__NR_set_tid_address): Define.
7547
7548 2003-08-29 Jakub Jelinek <jakub@redhat.com>
7549
7550 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
7551 _IO_release_lock): Define.
7552
7553 2003-08-29 Jakub Jelinek <jakuB@redhat.com>
7554
7555 * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
7556 sigemptyset before sigaddset. Reported by jreiser@BitWagon.com.
7557
7558 2003-08-27 Ulrich Drepper <drepper@redhat.com>
7559
7560 * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
7561 (__pthread_cleanup_class): Add missing return types of member
7562 functions.
7563
7564 2003-08-26 Steven Munroe <sjmunroe@us.ibm.com>
7565
7566 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
7567 (lll_mutex_unlock_force): Add memory barrier between store and futex
7568 syscall.
7569
7570 2003-08-25 Ulrich Drepper <drepper@redhat.com>
7571
7572 * tst-cancel4.c (do_test): Also unlink tempfname and remove
7573 tempmsg in first loop.
7574
7575 2003-08-18 Ulrich Drepper <drepper@redhat.com>
7576
7577 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
7578 _POSIX_THREAD_PRIORITY_SCHEDULING.
7579 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
7580
7581 2003-08-07 Jakub Jelinek <jakub@redhat.com>
7582
7583 * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
7584 (__rtld_lock_default_lock_recursive,
7585 __rtld_lock_default_unlock_recursive): Define.
7586 [_LIBC && SHARED] (__rtld_lock_lock_recursive,
7587 __rtld_lock_unlock_recursive): Define using
7588 GL(_dl_rtld_*lock_recursive).
7589 * init.c (__pthread_initialize_minimal_internal): Initialize
7590 _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
7591 Lock GL(_dl_load_lock) the same number of times as
7592 GL(_dl_load_lock) using non-mt implementation was nested.
7593
7594 * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
7595 * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
7596
7597 2003-08-06 Jakub Jelinek <jakub@redhat.com>
7598
7599 * tst-cancel17.c (do_test): Make len2 maximum of page size and
7600 PIPE_BUF.
7601
7602 2003-08-07 Jakub Jelinek <jakub@redhat.com>
7603
7604 * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
7605
7606 2003-08-03 Jakub Jelinek <jakub@redhat.com>
7607
7608 * sysdeps/pthread/createthread.c (do_clone): Move error handling
7609 to first syscall error check. Move syscall error check for tkill
7610 into __ASSUME_CLONE_STOPPED #ifdef.
7611
7612 2003-08-02 Ulrich Drepper <drepper@redhat.com>
7613
7614 * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
7615 is not defined, do explicit synchronization.
7616 (create_thread): Do not lock pd->lock here. If __ASSUME_CLONE_STOPPED
7617 is not defined also unlock pd->lock for non-debugging case in case
7618 it is necessary.
7619 * pthread_create.c (start_thread): Always get and release pd->lock
7620 if __ASSUME_CLONE_STOPPED is not defined.
7621 (start_thread_debug): Removed. Adjust users.
7622 * allocatestack.c (allocate_stack): Always initialize lock if
7623 __ASSUME_CLONE_STOPPED is not defined.
7624 * Makefile (tests): Add tst-sched1.
7625 * tst-sched1.c: New file.
7626
7627 * sysdeps/pthread/createthread.c (do_clone): Only use
7628 sched_setschduler and pass correct parameters.
7629
7630 2003-07-31 Jakub Jelinek <jakub@redhat.com>
7631
7632 * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
7633 pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
7634 PTHREAD_STACK_MIN in comments.
7635
7636 2003-07-31 Jakub Jelinek <jakub@redhat.com>
7637
7638 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
7639 Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
7640 argument.
7641 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
7642 * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
7643 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
7644 (__pthread_cleanup_upto): Fix prototype.
7645 (_longjmp_unwind): Adjust caller.
7646 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
7647 Change second argument to const struct pointer.
7648 * tst-sem8.c (main): Remove unused s2 and s3 variables.
7649 * tst-sem9.c (main): Likewise.
7650 * unwind.c: Include string.h for strlen prototype.
7651
7652 2003-07-31 Ulrich Drepper <drepper@redhat.com>
7653
7654 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7655 (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
7656 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
7657 Define HAVE_CMOV.
7658 Patch by Nicholas Miell <nmiell@attbi.com>.
7659
7660 2003-07-30 Jakub Jelinek <jakub@redhat.com>
7661
7662 * init.c (__pthread_initialize_minimal_internal): Initialize
7663 GL(dl_init_static_tls).
7664 * pthreadP.h (__pthread_init_static_tls): New prototype.
7665 * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
7666 New functions.
7667 * Makefile (tests): Add tst-tls4.
7668 (modules-names): Add tst-tls4moda and tst-tls4modb.
7669 ($(objpfx)tst-tls4): Link against libdl and libpthread.
7670 ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
7671 tst-tls4modb.so.
7672 * tst-tls4.c: New file.
7673 * tst-tls4moda.c: New file.
7674 * tst-tls4modb.c: New file.
7675
7676 2003-06-19 Daniel Jacobowitz <drow@mvista.com>
7677
7678 * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
7679 before __timer_dealloc.
7680 * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
7681 Don't call list_unlink.
7682
7683 2003-07-29 Roland McGrath <roland@redhat.com>
7684
7685 * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
7686
7687 2003-07-25 Jakub Jelinek <jakub@redhat.com>
7688
7689 * tst-cancel17.c (do_test): Check if aio_cancel failed.
7690 Don't reuse struct aiocb A if it failed.
7691 Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
7692 not just one byte, as that does not block.
7693
7694 2003-07-22 Jakub Jelinek <jakub@redhat.com>
7695
7696 * sysdeps/pthread/unwind-resume.c: New file.
7697 * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
7698 unwind-resume in csu subdir.
7699 (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
7700 exceptions.
7701 (librt-sysdep_routines, librt-shared-only-routines): Add
7702 rt-unwind-resume.
7703 * sysdeps/pthread/rt-unwind-resume.c: New file.
7704 * unwind-forcedunwind.c: New file.
7705 * Makefile (libpthread-routines): Add unwind-forcedunwind.
7706 (libpthread-shared-only-routines): Likewise.
7707 (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
7708 * pthreadP.h (pthread_cancel_init): New prototype.
7709 * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
7710
7711 * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
7712 attr argument const struct pthread_attr *.
7713
7714 * res.c (__res_state): Return __resp.
7715 * descr.h: Include resolv.h.
7716 (struct pthread): Add res field.
7717 * pthread_create.c: Include resolv.h.
7718 (start_thread): Initialize __resp.
7719 * Makefile (tests): Add tst-_res1.
7720 (module-names): Add tst-_res1mod1, tst-_res1mod2.
7721 ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
7722 ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
7723 libpthread.
7724 * tst-_res1.c: New file.
7725 * tst-_res1mod1.c: New file.
7726 * tst-_res1mod2.c: New file.
7727
7728 2003-07-21 Ulrich Drepper <drepper@redhat.com>
7729
7730 * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
7731
7732 * Makefile: Define various *-no-z-defs variables for test DSOs
7733 which has undefined symbols.
7734
7735 2003-07-21 Steven Munroe <sjmunroe@us.ibm.com>
7736
7737 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
7738 Retry if the stwcx fails to store once_control.
7739
7740 2003-07-20 Ulrich Drepper <drepper@redhat.com>
7741
7742 * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
7743 pthread_attr_setaffinity.
7744 * Versions [libpthread] (GLIBC_2.3.3): Likewise.
7745 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
7746 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
7747 * pthread_attr_destroy.c: Free cpuset element if allocated.
7748 * pthread_create.c: Pass iattr as additional parameter to
7749 create_thread.
7750 * sysdeps/pthread/createthread.c: If attribute is provided and
7751 a new thread is created with affinity set or scheduling parameters,
7752 start thread with CLONE_STOPPED.
7753 * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
7754 pthread_attr_setaffinity.
7755 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
7756 cpuset element.
7757
7758 2003-07-15 Ulrich Drepper <drepper@redhat.com>
7759
7760 * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
7761
7762 2003-07-14 Ulrich Drepper <drepper@redhat.com>
7763
7764 * sysdeps/pthread/configure.in: Require CFI directives also for
7765 ppc and s390.
7766
7767 2003-07-15 Jakub Jelinek <jakub@redhat.com>
7768
7769 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
7770 Add cfi directives.
7771
7772 2003-07-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7773
7774 * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
7775 CLEANUP_JMP_BUF.
7776 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
7777 registers as variables. Call __pthread_mutex_unlock_usercnt.
7778 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7779 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
7780 not self pointer in __writer. Compare with TID to determine
7781 deadlocks.
7782 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7783 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
7784 Likewise.
7785 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
7786 Likewise.
7787 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
7788 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
7789 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
7790 macros also when compiling librt.
7791
7792 2003-07-11 Jakub Jelinek <jakub@redhat.com>
7793
7794 * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
7795 -fasynchronous-unwind-tables.
7796 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
7797 (PSEUDO): Add cfi directives.
7798 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
7799 Likewise.
7800 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
7801 Likewise.
7802
7803 2003-07-08 Jakub Jelinek <jakub@redhat.com>
7804
7805 * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
7806 __pthread_unregister_cancel): Add prototypes and hidden_proto.
7807 * unwind.c (__pthread_unwind_next): Add hidden_def.
7808 * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
7809 Likewise.
7810 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
7811 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
7812 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
7813 Likewise.
7814 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
7815 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
7816 Likewise.
7817 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
7818 HIDDEN_JUMPTARGET to call __pthread_register_cancel,
7819 __pthread_unregister_cancel and __pthread_unwind_next.
7820
7821 2003-07-04 Jakub Jelinek <jakub@redhat.com>
7822
7823 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
7824 different symbol for the cancellation syscall wrapper and
7825 non-cancellation syscall wrapper.
7826 (PSEUDO_END): Define.
7827
7828 2003-07-05 Richard Henderson <rth@redhat.com>
7829
7830 * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
7831 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
7832 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
7833 return actual return value from the syscall, not 0.
7834
7835 2003-07-07 Ulrich Drepper <drepper@redhat.com>
7836
7837 * descr.h (struct pthread): Add pid field.
7838 * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
7839 (__reclaim_stacks): Likewise.
7840 * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
7841 also check for PID of the signal source.
7842 (__pthread_initialize_minimal_internal): Also initialize pid field
7843 of initial thread's descriptor.
7844 * pthread_cancel.c: Use tgkill instead of tkill if possible.
7845 * sysdeps/unix/sysv/linux/fork.c: Likewise.
7846 * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
7847 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
7848 * sysdeps/unix/sysv/linux/raise.c: Likewise.
7849
7850 2003-07-05 Ulrich Drepper <drepper@redhat.com>
7851
7852 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
7853 Fix use of parameter.
7854 (__libc_cleanup_pop): Likewise.
7855
7856 2003-07-04 Ulrich Drepper <drepper@redhat.com>
7857
7858 * init.c (sigcancel_handler): Change parameters to match handler
7859 for SA_SIGACTION. Check signal number and code to recognize
7860 invalid invocations.
7861
7862 2003-07-03 Roland McGrath <roland@redhat.com>
7863
7864 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
7865 Apply sizeof (struct pthread) bias to r13 value.
7866
7867 2003-07-03 Ulrich Drepper <drepper@redhat.com>
7868
7869 * sysdeps/pthread/configure.in: Require CFI directives.
7870
7871 * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
7872 definition.
7873 * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
7874 libpthread compilation.
7875 * unwind.c (__pthread_unwind): Add hidden_def.
7876 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
7877
7878 2003-07-01 Ulrich Drepper <drepper@redhat.com>
7879
7880 * libc-cancellation.c (__libc_cleanup_routine): Define.
7881 * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
7882 (__pthread_cleanup_pop): Define.
7883
7884 2003-07-01 Richard Henderson <rth@redhat.com>
7885
7886 * sysdeps/alpha/elf/pt-initfini.c: New file.
7887 * sysdeps/alpha/pthread_spin_lock.S: New file.
7888 * sysdeps/alpha/pthread_spin_trylock.S: New file.
7889 * sysdeps/alpha/pthreaddef.h: New file.
7890 * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
7891 * sysdeps/alpha/tls.h: New file.
7892 * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
7893 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
7894 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
7895 * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
7896 * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
7897 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
7898 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
7899 * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
7900 * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
7901 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
7902
7903 2003-07-01 Ulrich Drepper <drepper@redhat.com>
7904
7905 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
7906 cleanup support and unwind info.
7907
7908 2003-06-30 Ulrich Drepper <drepper@redhat.com>
7909
7910 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
7911 Use correct cleanup handler registration. Add unwind info.
7912 * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
7913 * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
7914 * tst-once3.c: Add cleanup handler and check it is called.
7915 * tst-once4.c: Likewise.
7916 * tst-oncex3.c: New file.
7917 * tst-oncex4.c: New file.
7918 * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
7919
7920 2003-06-29 Ulrich Drepper <drepper@redhat.com>
7921
7922 * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
7923
7924 2003-06-27 Ulrich Drepper <drepper@redhat.com>
7925
7926 * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
7927 (tf_msgsnd): Likewise.
7928
7929 * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
7930 premature returns a bit more.
7931
7932 2003-06-26 Ulrich Drepper <drepper@redhat.com>
7933
7934 * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
7935 definition to the front.
7936
7937 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
7938 the cleanup functions to make the names unique. Fix dwarf opcode
7939 un unwind table.
7940 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
7941 functions to make the names unique. Fix CFA offset for two blocks.
7942
7943 2003-06-25 Ulrich Drepper <drepper@redhat.com>
7944
7945 * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
7946 missing closing braces.
7947 Patch by Christophe Saout <christophe@saout.de>.
7948
7949 2003-06-24 Roland McGrath <roland@redhat.com>
7950
7951 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
7952
7953 2003-06-24 Ulrich Drepper <drepper@redhat.com>
7954
7955 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
7956 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
7957
7958 * pthreadP.h: Declare __find_thread_by_id.
7959 * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
7960 * pthread_clock_gettime.c: Allow using other thread's clock.
7961 * pthread_clock_settime.c: Likewise.
7962 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
7963 * Makefile: Add rules to build and run tst-clock2.
7964 * tst-clock2.c: New file.
7965
7966 2003-06-23 Ulrich Drepper <drepper@redhat.com>
7967
7968 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
7969 to use exception-based cleanup handler.
7970 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7971
7972 * tst-cond8.c (ch): Announce that we are done.
7973
7974 * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
7975
7976 * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
7977 Also test aio_suspend with timeout value.
7978
7979 2003-06-22 Ulrich Drepper <drepper@redhat.com>
7980
7981 * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
7982 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
7983 attribute_hidden.
7984
7985 * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
7986 (__pthread_mutex_lock_internal): Likewise.
7987 (__pthread_mutex_unlock_internal): Likewise.
7988 (__pthread_mutex_unlock_usercnt): Declare.
7989 * pthread_mutex_destroy.c: Always fail if used in any way.
7990 * pthread_mutex_init.c: Update comment.
7991 * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
7992 * pthread_mutex_timedlock.c: Adjust __nusers.
7993 * pthread_mutex_trylock.c: Adjust __nusers.
7994 * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
7995 and public interfaces are wrapper with pass additional parameter.
7996 __pthread_mutex_unlock_usercnt does not adjust __nusers if second
7997 parameter zero.
7998 * tst-mutex8.c: New file.
7999 * Makefile (tests): Add tst-mutex8.
8000 * sysdeps/pthread/pthread_cond_timedwait.c: Call
8001 __pthread_mutex_unlock_usercnt.
8002 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
8003 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8004 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8005 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8006 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8007 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
8008 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
8009 Add __nusers.
8010 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8011 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8012 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8013 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8014 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8015
8016 * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
8017 * pthread_mutex_timedlock.c: Likewise.
8018 * pthread_mutex_trylock.c: Adjust __nusers.
8019 * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
8020 * tst-mutex9.c: New file.
8021 * Makefile (tests): Add tst-mutex9.
8022 * sysdeps/i386/tls.h: Remove THREAD_ID definition.
8023 * sysdeps/ia64/tls.h: Likewise.
8024 * sysdeps/powerpc/tls.h: Likewise.
8025 * sysdeps/s390/tls.h: Likewise.
8026 * sysdeps/sh/tls.h: Likewise.
8027 * sysdeps/x86_64/tls.h: Likewise.
8028 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
8029 Change type of __owner.
8030 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8031 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8032 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8033 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8034 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8035
8036 2003-06-19 Jakub Jelinek <jakub@redhat.com>
8037
8038 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
8039 * sysdeps/unix/sysv/linux/sem_post.c: ...here.
8040
8041 * sysdeps/unix/sysv/linux/sem_post.c: Move to...
8042 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here. Pass nr + 1
8043 instead of nr to lll_futex_wake. Only set errno and return -1
8044 if err < 0.
8045
8046 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
8047 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
8048 return actual return value from the syscall, not 0.
8049
8050 2003-06-18 Ulrich Drepper <drepper@redhat.com>
8051
8052 * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
8053 find a random value.
8054 (tf_msgrcv): Likewise. Also don't report msgrcv returns if
8055 errno==EIDRM.
8056
8057 * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
8058 compat_timer_settime.
8059 * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
8060 compat_timer_gettime.
8061 * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
8062 compat_timer_getoverrun.
8063 * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
8064 compat_timer_delete.
8065
8066 * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
8067 error-checking mutex detect busy mutexes.
8068
8069 2003-06-17 Ulrich Drepper <drepper@redhat.com>
8070
8071 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
8072 Add ax to clobber list.
8073 (lll_mutex_cond_lock): Likewise.
8074 (lll_mutex_unlock): Likewise.
8075 (lll_lock): Likewise.
8076 (lll_unlock): Likewise.
8077
8078 * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
8079 * tst-cancel18.c: New file.
8080 * tst-cancelx18.c: New file.
8081
8082 * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
8083 and tcdrain.
8084
8085 * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
8086 * tst-cancel17.c: New file.
8087 * tst-cancelx17.c: New file.
8088
8089 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
8090 * sysdeps/unix/sysv/linux/sigwait.c: New file.
8091 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
8092
8093 * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
8094
8095 2003-06-16 Jakub Jelinek <jakub@redhat.com>
8096
8097 * sysdeps/pthread/createthread.c (create_thread): Set
8098 header.multiple_threads unconditionally.
8099 * allocatestack.c (allocate_stack): Likewise.
8100 * descr.h (struct pthread): Add header.multiple_threads
8101 unconditionally.
8102 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
8103 Define for librt. #error if neither libpthread, libc nor librt.
8104 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
8105 Likewise.
8106 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
8107 CDISABLE): Likewise.
8108 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
8109 CDISABLE): Likewise.
8110 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
8111 CDISABLE): Likewise.
8112 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
8113 CDISABLE): Likewise. Access header.multiple_threads outside of
8114 libc and libpthread.
8115 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
8116 Likewise.
8117 * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
8118 * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
8119
8120 2003-06-17 Ulrich Drepper <drepper@redhat.com>
8121
8122 * tst-cancel4.c: Add tests for the socket and signal functions, pause.
8123 Also test early cancellation before the thread reaches the cancellation
8124 point.
8125
8126 * Makefile: Compile forward.c with exceptions.
8127
8128 * sysdeps/unix/sysv/linux/sleep.c: New file.
8129
8130 2003-06-16 Ulrich Drepper <drepper@redhat.com>
8131
8132 * Makefile: Add CFLAGS definition to compile function wrappers
8133 duplicated from libc with exceptions.
8134 * tst-cancel4.c: Also check cancellation handlers.
8135
8136 * Makefile: Add rules to build and run tst-cancel16 and
8137 tst-cancelx16. Add missing CFLAGS definitions.
8138 * tst-cancel16.c: New file.
8139 * tst-cancelx16.c: New file.
8140
8141 2003-06-15 Ulrich Drepper <drepper@redhat.com>
8142
8143 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
8144 (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
8145 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
8146 (DL_SYSINFO_IMPLEMENTATION): Likewise.
8147
8148 * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
8149 (LIBC_CANCEL_RESET): Likewise.
8150 Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
8151 * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
8152 librt-cancellation.
8153 (CFLAGS-libcrt-cancellation.c): Define.
8154 * sysdeps/pthread/librt-cancellation.c: New file.
8155 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
8156 macros also when compiling librt.
8157 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
8158 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
8159 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
8160 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
8161 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
8162 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
8163 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
8164
8165 * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
8166 compat_timer_create.
8167
8168 2003-06-14 Ulrich Drepper <drepper@redhat.com>
8169
8170 * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
8171
8172 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
8173 __register_atfork.
8174 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
8175 Add libc_hidden_def.
8176
8177 2003-06-13 Roland McGrath <roland@redhat.com>
8178
8179 * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
8180 constant from <sys/reg.h> to ps_get_thread_area, not register contents.
8181
8182 2003-06-11 Ulrich Drepper <drepper@redhat.com>
8183
8184 * allocatestack.c (queue_stack): Always inline.
8185 * ptreadhP.h (__do_cancel): Likewise.
8186
8187 2003-06-10 Jakub Jelinek <jakub@redhat.com>
8188
8189 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
8190 a typo.
8191
8192 2003-06-10 Ulrich Drepper <drepper@redhat.com>
8193
8194 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8195 (__pthread_cond_signal): Remove incorrect second addition for
8196 cond_lock!=0.
8197
8198 2003-06-09 Ulrich Drepper <drepper@redhat.com>
8199
8200 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8201 (__pthread_cond_signal): Use correct futex pointer in
8202 __lll_mutex_lock_wait call.
8203
8204 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8205 (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
8206
8207 2003-06-08 Ulrich Drepper <drepper@redhat.com>
8208
8209 * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
8210 cancelable.
8211 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
8212 Likewise.
8213
8214 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
8215 hand-written CFI generation code. Since ENTRY/END also initiated
8216 CFI frames this caused two CFI sets to be generated.
8217
8218 2003-06-07 Ulrich Drepper <drepper@redhat.com>
8219
8220 * cleanup_routine.c: New file.
8221 * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
8222 * sysdeps/pthread/pthread.h: Add support for fully exception-based
8223 cleanup handling.
8224 * Makefile (libpthread-routines): Add cleanup_routine.
8225 Add more CFLAGS variables to compile with exceptions. Add comments
8226 why which file needs unwind tables.
8227 (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
8228 tests.
8229 * tst-cancelx1.c: New file.
8230 * tst-cancelx2.c: New file.
8231 * tst-cancelx3.c: New file.
8232 * tst-cancelx4.c: New file.
8233 * tst-cancelx5.c: New file.
8234 * tst-cancelx6.c: New file.
8235 * tst-cancelx7.c: New file.
8236 * tst-cancelx8.c: New file.
8237 * tst-cancelx9.c: New file.
8238 * tst-cancelx10.c: New file.
8239 * tst-cancelx11.c: New file.
8240 * tst-cancelx12.c: New file.
8241 * tst-cancelx13.c: New file.
8242 * tst-cancelx14.c: New file.
8243 * tst-cancelx15.c: New file.
8244 * tst-cleanupx0.c: New file.
8245 * tst-cleanupx0.expect: New file.
8246 * tst-cleanupx1.c: New file.
8247 * tst-cleanupx2.c: New file.
8248 * tst-cleanupx3.c: New file.
8249
8250 * tst-cleanup0.c: Make standard compliant.
8251 * tst-cleanup1.c: Likewise.
8252
8253 * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
8254 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
8255 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8256 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
8257 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8258 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8259 * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
8260 CLEANUP_JMP_BUF.
8261 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
8262 * tst-cancel12.c: New file.
8263 * tst-cancel13.c: New file.
8264 * tst-cancel14.c: New file.
8265 * tst-cancel15.c: New file.
8266 * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
8267 and tst-cancel15.
8268
8269 * tst-cancel1.c: Add some comments.
8270
8271 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
8272 timeout correctly.
8273
8274 2003-06-06 Ulrich Drepper <drepper@redhat.com>
8275
8276 * Makefile (CFLAGS-pthread_cancel.c): Define.
8277
8278 2003-06-05 Ulrich Drepper <drepper@redhat.com>
8279
8280 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
8281 Change type of __writer element to int.
8282 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8283 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8284 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8285 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8286 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8287 * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
8288 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
8289 * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
8290 Compare with TID to determine deadlocks.
8291 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
8292 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
8293 * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
8294 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
8295 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8296 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8297 Likewise.
8298 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8299 Likewise.
8300 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8301 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
8302 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
8303 Likewise.
8304 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
8305 Likewise.
8306 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
8307 * Makefile (tests): Add tst-rwlock12.
8308 * tst-rwlock12.c: New file.
8309
8310 2003-06-05 Jakub Jelinek <jakub@redhat.com>
8311
8312 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
8313 __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
8314 Remove bogus hidden_proto.
8315 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
8316 Likewise.
8317 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
8318 lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
8319 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
8320 ___lll_mutex_timedlock): Likewise.
8321
8322 2003-06-04 Ulrich Drepper <drepper@redhat.com>
8323
8324 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8325 (__pthread_cond_signal): Add some code to eventually handle
8326 cond_lock!=0.
8327
8328 2003-06-01 Ulrich Drepper <drepper@redhat.com>
8329
8330 * Makefile (tests): Add tst-exec4.
8331 (tst-exec4-ARGS): Define.
8332 * tst-exec4.c: New file.
8333
8334 2003-05-31 Ulrich Drepper <drepper@redhat.com>
8335
8336 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
8337 Also fail if tv_nsec < 0.
8338 (__lll_timedwait_tid): Likewise.
8339 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
8340 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
8341 Likewise.
8342 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
8343 Likewise.
8344 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
8345 Likewise.
8346 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
8347 Likewise.
8348 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
8349 Likewise.
8350 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
8351 Likewise.
8352
8353 * Makefile (tests): Add tst-sem8 and tst-sem9.
8354 * tst-sem8.c: New file.
8355 * tst-sem9.c: New file.
8356 * sem_open.c: Fix creation of in_use record if the file exists but
8357 no internal record.
8358
8359 * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
8360 definitions.
8361
8362 * sysdeps/pthread/timer_create.c (timer_create): In case
8363 evp==NULL, assign timer ID to sival_ptr.
8364
8365 * descr.h (struct pthread_unwind_buf): Change type of prev element to
8366 struct pthread_unwind_buf *.
8367 (struct pthread): Likewise for cleanup_jmp_buf element.
8368
8369 * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
8370 * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
8371 * unwind.c (__pthread_unwind_next): Likewise.
8372
8373 2003-05-30 Ulrich Drepper <drepper@redhat.com>
8374
8375 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8376 (lll_futex_timed_wait): Use int for futex value parameter.
8377 (lll_futex_wake): Likewise.
8378 (lll_futex_requeue): Likewise.
8379
8380 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
8381 Replace one memory operation with one register operation.
8382
8383 * tst-join4.c (do_test): Fix error message.
8384
8385 * tst-rwlock6.c (do_test): Use correct format specifier.
8386
8387 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8388 (__lll_mutex_lock_wait): Replace one memory operation with one
8389 register operation.
8390 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
8391 (__lll_mutex_lock_wait): Likewise.
8392
8393 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8394 (__lll_mutex_cond_lock): Add one to value parameter of
8395 __lll_lock_wait to reflect reality in the futex syscall.
8396 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
8397 (lll_mutex_cond_lock): Likewise.
8398
8399 2003-05-30 Jakub Jelinek <jakub@redhat.com>
8400
8401 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
8402 New function.
8403 (lll_mutex_cond_lock): Define.
8404
8405 2003-05-29 Ulrich Drepper <drepper@redhat.com>
8406
8407 * Makefile (tests): Add tst-signal6.
8408 * tst-signal6.c: New file.
8409
8410 * sysdeps/unix/sysv/linux/s390/lowlevellock.h
8411 (__lll_mutex_unlock_force): New function
8412 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
8413
8414 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8415 (__lll_mutex_unlock_force): New function.
8416 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
8417
8418 * tst-rwlock7.c (do_test): Use correct format specifier.
8419
8420 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
8421 Find break parameter in correct asm argument.
8422
8423 2003-05-27 Jakub Jelinek <jakub@redhat.com>
8424
8425 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
8426 Remove out4.
8427 (lll_futex_requeue): Fix __o3 constraint, return negative errno if
8428 error occured.
8429 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
8430 Add __mutex.
8431 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
8432 lll_futex_requeue, lll_mutex_unlock_force): Define.
8433
8434 2003-05-30 Jakub Jelinek <jakub@redhat.com>
8435
8436 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
8437 (pthread_cond_t): Add __mutex.
8438 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
8439 lll_futex_requeue, lll_mutex_unlock_force): Define.
8440
8441 2003-05-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
8442
8443 * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
8444 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
8445 Add __mutex field.
8446 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
8447 Define.
8448 (lll_futex_wait, lll_futex_wake): Define.
8449 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
8450 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
8451 FUTEX_REQUEUE instead of FUTEX_WAIT.
8452 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
8453 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
8454 mutex which was used in condvar structure. Call
8455 __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
8456 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
8457
8458 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
8459 include tcb-offsets.h. Read wakeup value in locked region.
8460 Use the value of gbr register as THREAD_ID.
8461 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8462 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
8463 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
8464
8465 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
8466 macros.
8467
8468 2003-05-28 Ulrich Drepper <drepper@redhat.com>
8469
8470 * sysdeps/pthread/pthread_cond_broadcast.c
8471 (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
8472
8473 2003-05-26 Ulrich Drepper <drepper@redhat.com>
8474
8475 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
8476 typo in register name.
8477 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
8478 correctly. Actually use requeue. Little optimization.
8479 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
8480 mutex address early. Handle cancellation state as 32-bit value.
8481 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8482 Remove unnecessary label.
8483
8484 2003-05-25 Ulrich Drepper <drepper@redhat.com>
8485
8486 * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
8487 instead of FUTEX_WAIT.
8488 * sysdeps/pthread/pthread_cond_signal.c: Likewise.
8489 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8490 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8491 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
8492 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
8493 * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
8494 used in condvar structure. Call __pthread_mutex_cond_lock instead
8495 of __pthread_mutex_lock_internal.
8496 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8497 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8498 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
8499 (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
8500 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8501 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8502 * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
8503 Add pthread_mutex_cond_lock.
8504 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
8505 * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
8506 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
8507 lll_mutex_cond_lock.
8508 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
8509 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
8510 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
8511 Add __mutex field.
8512 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8513 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8514
8515 * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
8516 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
8517
8518 * pthreadP.h: Declare __pthread_mutex_cond_lock.
8519 * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
8520 Use it instead of lll_mutex_lock. If __pthread_mutex_lock is a
8521 macro don't define aliases.
8522
8523 * cancellation.c: Remove __pthread_enable_asynccancel_2.
8524 * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
8525 * sysdeps/pthread/pthread_cond_timedwait.c: Use
8526 __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
8527 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8528 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8529 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
8530 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8531 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8532
8533 2003-05-17 Ulrich Drepper <drepper@redhat.com>
8534
8535 * sem_open.c: Fix one endless loop. Implement correct semantics
8536 wrt opening the same semaphore more then once.
8537 * sem_close.c: Adjust for sem_open change.
8538 * semaphoreP.h: Include <semaphore.h>. Define struct inuse_sem.
8539 Declare __sem_mappings, __sem_mappings_lock, __sem_search.
8540 * Makefile (tests): Add tst-sem7.
8541 * tst-sem7.c: New file.
8542
8543 2003-05-16 Roland McGrath <roland@redhat.com>
8544
8545 * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
8546 uninitialized variable braino.
8547
8548 2003-05-16 Ulrich Drepper <drepper@redhat.com>
8549
8550 * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
8551 test for syscall availability.
8552
8553 * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
8554 __no_posix_timers to -1 if the syscalls don't exist.
8555
8556 * pthread_join.c (pthread_join): Set tid field of the joined
8557 thread to -1. This isn't necessary but helps to recognize some
8558 error conditions with almost no cost.
8559
8560 * allocatestack.c (FREE_P): Also negative values indicate an
8561 unused stack.
8562
8563 * unwind.c: Include <unistd.h>.
8564
8565 2003-05-14 Ulrich Drepper <drepper@redhat.com>
8566
8567 * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
8568
8569 2003-05-14 Jakub Jelinek <jakub@redhat.com>
8570
8571 * Makefile (crti-objs, crtn-objs): New variables.
8572 (omit-deps, extra-objs): Add crtn.
8573 ($(objpfx)libpthread.so): Depend on both crti and crtn
8574 and links to them in multidir.
8575 ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
8576
8577 2003-05-12 Steven Munroe <sjmunroe@us.ibm.com>
8578
8579 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
8580 (lll_mutex_unlock): Use atomic_exchange_rel.
8581
8582 2003-05-11 Ulrich Drepper <drepper@redhat.com>
8583
8584 * cond-perf.c (cons): Add missing locking around setting of alldone.
8585
8586 2003-05-10 Ulrich Drepper <drepper@redhat.com>
8587
8588 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
8589 related macros.
8590 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8591
8592 2003-05-09 Ulrich Drepper <drepper@redhat.com>
8593
8594 * tst-sem6.c: New file.
8595 * Makefile (tests): Add tst-sem6.
8596
8597 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
8598 Use atomic_exchange_rel instead of atomic_exchange.
8599 * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
8600 Likewise.
8601
8602 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
8603 code for lll_futex_wait and lll_futex_wake in static apps. Use
8604 vsyscall is possible.
8605
8606 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
8607 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
8608 * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
8609 pthread_setaffinity_np.
8610 * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
8611 and pthread_setaffinity_np.
8612 * Makefile (libpthread-routines): Add pthread_getaffinity and
8613 pthread_setaffinity.
8614
8615 * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
8616 use it in case mmap to allocate the stack fails.
8617 * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
8618 ARCH_MAP_FLAGS here.
8619 * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
8620 ARCH_RETRY_MMAP.
8621
8622 2003-05-08 Ulrich Drepper <drepper@redhat.com>
8623
8624 * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
8625 handler implementation. It is now lockless in fork().
8626 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
8627 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
8628 * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>. Don't
8629 declare the __fork_*_lists.
8630 (struct fork_handler): Include pointers to all three functions.
8631 Add next, refcntr and need_signal elements.
8632 (__fork_handlers): New declaration.
8633 (__register_atfork_malloc): Remove declaration.
8634 (HAVE_register_atfork_malloc): Remove definition.
8635 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
8636 __pthread_child_handler variable.
8637 (__libc_pthread_init): Use __register_atfork instead of explicitly
8638 adding to the list.
8639 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
8640 and lll_futex_wake.
8641 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
8642
8643 * unwind.c (unwind_cleanup): Print error message and then abort. This
8644 function must never be reached.
8645
8646 * cond-perf.c: New file.
8647
8648 2003-05-05 Ulrich Drepper <drepper@redhat.com>
8649
8650 * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
8651
8652 2003-05-04 Roland McGrath <roland@redhat.com>
8653
8654 * Makefile ($(objpfx)../libc.so): New target.
8655
8656 2003-05-02 Ulrich Drepper <drepper@redhat.com>
8657
8658 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
8659 (pthread_condattr_t): Size is only an int, don't use long for
8660 alignment.
8661 (pthread_mutexattr_t): Likewise.
8662 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8663 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8664 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8665
8666 2003-05-01 Ulrich Drepper <drepper@redhat.com>
8667
8668 * sysdeps/i386/tls.h: Define THREAD_ID.
8669 * sysdeps/ia64/tls.h: Likewise.
8670 * sysdeps/powerpc/tls.h: Likewise.
8671 * sysdeps/s390/tls.h: Likewise.
8672 * sysdeps/sh/tls.h: Likewise.
8673 * sysdeps/x86_64/tls.h: Likewise.
8674 * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
8675 record ownership.
8676 * pthread_mutex_timedlock.c: Likewise.
8677 * pthread_mutex_trylock.c: Likewise.
8678 * pthread_mutex_unlock.c: Likewise.
8679 * pthread_rwlock_trywrlock.c: Likewise.
8680 * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
8681 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
8682 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
8683 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
8684
8685 * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
8686 flag.
8687
8688 2003-04-29 Jakub Jelinek <jakub@redhat.com>
8689
8690 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
8691 (__SIZEOF_PTHREAD_COND_T): Define to 48.
8692 (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
8693 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
8694 Make __align long long instead of long.
8695 (pthread_rwlock_t): Formatting.
8696 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
8697 (pthread_rwlock_t): Formatting.
8698 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
8699 (pthread_cond_t): Make __align long long instead of long.
8700 (pthread_rwlock_t): Move __flags field to the same position as in
8701 linuxthreads.
8702
8703 2003-04-30 Ulrich Drepper <drepper@redhat.com>
8704
8705 * tst-rwlock6.c (do_test): Use correct printf format specifiers.
8706 * tst-rwlock7.c (do_test): Likewise.
8707
8708 2003-04-26 Roland McGrath <roland@redhat.com>
8709
8710 * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
8711
8712 2003-04-22 Jakub Jelinek <jakub@redhat.com>
8713
8714 * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
8715 sizeof (struct pthread).
8716 (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
8717 1 struct pthread.
8718 * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
8719 to 0.
8720 (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
8721 struct pthread.
8722 (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
8723 to 32-bit bytes.
8724 (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
8725 tcbp.
8726 (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
8727 unneccessarily.
8728 (NO_TLS_OFFSET): Define.
8729 * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
8730 add TLS_TCB_SIZE unnecessarily.
8731
8732 2003-04-22 Roland McGrath <roland@redhat.com>
8733
8734 * Makeconfig (shared-thread-library): Reverse link order to work
8735 around linker bug.
8736
8737 2003-04-22 Ulrich Drepper <drepper@redhat.com>
8738
8739 * semaphore.h: Fix typo in comment.
8740
8741 2003-04-21 Ulrich Drepper <drepper@redhat.com>
8742
8743 * sysdeps/pthread/sigfillset.c: New file.
8744
8745 * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
8746 * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
8747 * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
8748 * sysdeps/pthread/sigaction.c: Likewise.
8749 * sysdeps/pthread/sigprocmask.c: New file.
8750 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
8751 __SIGRTMIN+1.
8752 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
8753 Block SIGTIMER. Also handle SI_TKILL events and terminate thread
8754 in this case.
8755
8756 2003-04-19 Ulrich Drepper <drepper@redhat.com>
8757
8758 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
8759 (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
8760
8761 * sysdeps/unix/sysv/linux/unregister-atfork.c
8762 (__unregister_atfork): Don't free memory not allocated dynamically.
8763
8764 * semaphore.h: Remove __THROW marker from cancellation points.
8765 * nptl/sysdeps/pthread/pthread.h: Likewise.
8766
8767 2003-04-18 Ulrich Drepper <drepper@redhat.com>
8768
8769 * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
8770 pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
8771 __THROW.
8772
8773 2003-04-16 Jakub Jelinek <jakub@redhat.com>
8774
8775 * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
8776
8777 2003-04-15 Roland McGrath <roland@redhat.com>
8778
8779 * forward.c (__pthread_unwind): Tweak to avoid warning.
8780
8781 2003-04-15 Ulrich Drepper <drepper@redhat.com>
8782
8783 * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
8784
8785 2003-04-14 Ulrich Drepper <drepper@redhat.com>
8786
8787 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
8788 overflow CFA advance instructions.
8789 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8790
8791 2003-04-14 Jakub Jelinek <jakub@redhat.com>
8792
8793 * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
8794 * sysdeps/i386/pthread_spin_lock.c: Likewise.
8795 * sysdeps/x86_64/tls.h: Likewise. Define LOCK_PREFIX if not already
8796 defined.
8797
8798 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
8799 DW_CFA_advance_loc2 for .Laddl-.Lsubl.
8800 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
8801 DW_CFA_advance_loc for .Laddl-.Lsubl.
8802
8803 2003-04-13 Ulrich Drepper <drepper@redhat.com>
8804
8805 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
8806 position-independent unwind data for static libraries.
8807 Add missing unwind info. Add comments.
8808
8809 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
8810 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8811 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8812 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8813
8814 2003-04-12 Ulrich Drepper <drepper@redhat.com>
8815
8816 * Makefile: Make sure all cancellation points are compiled with
8817 exception and asynchronous unwind tables.
8818
8819 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
8820 which mishandles loading of global object addresses in PIC.
8821 (THREAD_SETMEM_NC): Likewise.
8822
8823 2003-04-11 Ulrich Drepper <drepper@redhat.com>
8824
8825 * pthread.h: Define new data structure for cleanup buffer. Declare
8826 new cleanup handler interfaces.
8827 * descr.h: Include <unwind.h> if necessary. Define pthread_unwind_buf.
8828 (struct pthread): Add cleanup_jmp_buf pointer. Define
8829 HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
8830 * pthreadP.h: Declare __pthread_unwind. Define __do_cancel to use
8831 it. Declare old cleanup handler installation functions.
8832 * cleanup.c: Rewrite. Install handler for unwind-based cleanup
8833 handling.
8834 * cleanup_defer.c: Likewise.
8835 * cleanup_compat.c: New file. Old cleanup code.
8836 * cleanup_def_compat.c: New file. Old cleanup code.
8837 * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
8838 if own thread descriptor.
8839 * unwind.c: New file.
8840 * forward.c: Add __pthread_unwind.
8841 * init.c (pthread_functions): Add __pthread_unwind.
8842 * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
8843 Add ptr___pthread_unwind.
8844 * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
8845 and unwind function.
8846 * Makefile (libpthread-routines): Add cleanup_compat,
8847 cleanup_def_compat, and unwind. Define CFLAGS to enable unwind
8848 table generation if necessary.
8849 * version.c: Record whether unwind support is compiled in.
8850 * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
8851 * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
8852 handler interfaces.
8853 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
8854 complication to generate unwind information for syscall wrappers.
8855 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
8856 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
8857 __cleanup_fct_attribute.
8858
8859 * Makefile: Add rules to build and run tst-cleanup0.
8860 * tst-cleanup0.c: New file.
8861 * tst-cleanup0.expect: New file.
8862
8863 * pthread_create.c (deallocate_tsd): Don't take parameter. Adjust
8864 caller. Optimize to avoid often unecessary local variable.
8865
8866 2003-04-11 Roland McGrath <roland@redhat.com>
8867
8868 * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
8869 sets variable `multidir'; include that.
8870 (generated): Add it.
8871 ($(objpfx)$(multidir)/crti.o): New target.
8872 [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
8873
8874 2003-04-11 Ulrich Drepper <drepper@redhat.com>
8875
8876 * tst-attr2.c (do_test): Add cast to avoid warning.
8877 * tst-mutex4.c (do_test): Likewise.
8878
8879 2003-04-10 Ulrich Drepper <drepper@redhat.com>
8880
8881 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
8882 in child.
8883
8884 2003-04-09 Ulrich Drepper <drepper@redhat.com>
8885
8886 * Makefile (tests): Add tst-detach1.
8887 * tst-detach1.c: New file.
8888
8889 2003-04-08 Ulrich Drepper <drepper@redhat.com>
8890
8891 * sysdeps/pthread/pthread.h: Remove duplicate
8892 pthread_cleanup_{push,pop} definitions.
8893
8894 * tst-barrier2.c: Eliminate warnings.
8895 * tst-cancel4.c: Likewise.
8896 * tst-cond4.c: Likewise.
8897 * tst-cond6.c: Likewise.
8898 * tst-detach1.c: Likewise.
8899 * tst-rwlock4.c: Likewise.
8900 * tst-rwlock6.c: Likewise.
8901 * tst-rwlock7.c: Likewise.
8902 * tst-sem3.c: Likewise.
8903 * tst-spin2.c: Likewise.
8904 * tst-umask1.c: Likewise.
8905
8906 2003-04-07 Ulrich Drepper <drepper@redhat.com>
8907
8908 * pthread_detach.c (pthread_detach): Fix test for invalid TID.
8909
8910 2003-04-06 Ulrich Drepper <drepper@redhat.com>
8911
8912 * descr.h (struct pthread): Move cancelhandling member to the front.
8913
8914 2003-04-05 Ulrich Drepper <drepper@redhat.com>
8915
8916 * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
8917 malloc_parent, and malloc_child statically.
8918 (__register_atfork_malloc): New function.
8919 (free_mem): Don't free any of the malloc_* variables on the list.
8920 * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
8921 Define HAVE_register_atfork_malloc.
8922
8923 2003-04-04 Ulrich Drepper <drepper@redhat.com>
8924
8925 * sysdeps/pthread/createthread.c (create_thread): Add some more
8926 comments explaining when to set multiple_threads and when not.
8927
8928 * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
8929 THREAD_ATOMIC_BIT_SET if not already defined.
8930 * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
8931 THREAD_ATOMIC_BIT_SET:
8932 * sysdeps/x86_64/tls.h: Likewise.
8933 * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
8934 THREAD_ATOMIC_CMPXCHG_VAL.
8935 (_pthread_cleanup_pop_restore): Likewise.
8936 * cancellation.c (__pthread_enable_asynccancel): Likewise.
8937 (__pthread_enable_asynccancel_2): Likewise.
8938 (__pthread_disable_asynccancel): Likewise.
8939 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
8940 (__libc_disable_asynccancel): Likewise.
8941 * init.c (sigcancel_handler): Likewise.
8942 * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
8943 * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
8944
8945 2003-04-03 Ulrich Drepper <drepper@redhat.com>
8946
8947 * init.c (sigcancel_handler): Don't set EXITING_BIT here.
8948 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
8949 * pthreadP.h (__do_cancel): Set EXITING_BIT here.
8950 * Makefile (tests): Add tst-cancel11.
8951 * tst-cancel11.c: New file.
8952
8953 2003-04-01 Ulrich Drepper <drepper@redhat.com>
8954
8955 * pthread_create.c (deallocate_tsd): Clear/free memory after the last
8956 round, not the first. Use specific_used flag instead of local
8957 found_nonzero variable. Use THREAD_[SG]ETMEM where possible.
8958 (__free_tcb): Don't call deallocate_tsd here.
8959 (start_thread): Call deallocate_tsd here.
8960 * pthread_setspecific.c: Set specific_used flag really only when
8961 needed.
8962 * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
8963 * tst-tsd3.c: New file.
8964 * tst-tsd4.c: New file.
8965
8966 2003-03-31 Ulrich Drepper <drepper@redhat.com>
8967
8968 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
8969 Use atomic_exchange_and_add instead of __lll_add.
8970 (__lll_mutex_timedlock): Likewise.
8971 Patch by Ian Wienand.
8972
8973 2003-03-24 Steven Munroe <sjmunroe@us.ibm.com>
8974
8975 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
8976 (SINGLE_THREAD_P): Fix typo.
8977 * tst-cancel-wrappers.sh: Handle '.'ed symbols.
8978
8979 2003-03-31 Ulrich Drepper <drepper@redhat.com>
8980
8981 * Makefile (tests): Add tst-align.
8982 * tst-align.c: New file.
8983 * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
8984
8985 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
8986 function correctly.
8987
8988 * tst-tsd2.c: Add casts to avoid warnings.
8989
8990 2003-03-30 Ulrich Drepper <drepper@redhat.com>
8991
8992 * descr.h (struct pthread): Move most often used elements to the front.
8993
8994 2003-03-29 Ulrich Drepper <drepper@redhat.com>
8995
8996 * Makefile (libpthread-routines): Add pthread_atfork.
8997 (libpthread-static-only-routines): Add pthread_atfork.
8998
8999 2003-03-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
9000
9001 * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
9002 of TLS_DTV_AT_TP.
9003 (INSTALL_DTV): Add parens.
9004 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
9005 Use passed descr instead of THREAD_SELF.
9006 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
9007 (__lll_mutex_timedlock_wait): Correct expected value after
9008 spurious wakeup.
9009 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
9010 Release lock before waking up the waiters.
9011 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
9012 criteria. Reorderstruct passed to cleanup handler. Fix
9013 handling of cancellation and failung pthread_mutex_unlock call.
9014 Use __pthread_enable_asynccancel_2 instead of
9015 __pthread_enable_asynccancel.
9016 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
9017 Return result of lock re-get if it fails.
9018 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
9019 for __pthread_cleanup_push.
9020 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
9021 completely broken rwlock implementation.
9022 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9023 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
9024 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
9025 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
9026 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9027 * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value. Use
9028 versioned_symbol macro.
9029 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
9030 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
9031
9032 2003-03-27 Ulrich Drepper <drepper@redhat.com>
9033
9034 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
9035 __timer_helper_thread. Declare __start_helper_thread, __helper_once,
9036 and __helper_tid.
9037 (struct timer): Remove th and bar field.
9038 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
9039 debugging code. Create only one helper thread.
9040 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
9041 helper thread.
9042 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
9043 Renamed. Define statically. Use thread info from siginfo.
9044 (__helper_once): New variable.
9045 (__helper_tid): New variable.
9046 (__reset_helper_control): New function.
9047 (__start_helper_thread): New function.
9048
9049 * pthread_create.c (start_thread): Don't use setjmp inside
9050 __builtin_expect to work around gcc bug.
9051
9052 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
9053 timer_delete syscall fails, but not with ENOSYS, set
9054 __no_posix_timers.
9055
9056 * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
9057 (timer_settime): Fix typo.
9058 * sysdeps/unix/sysv/linux/timer_getoverr.c
9059 [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
9060
9061 2003-03-27 Jakub Jelinek <jakub@redhat.com>
9062
9063 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
9064 offset of cleanupbuf.__prev.
9065
9066 2003-03-26 Jakub Jelinek <jakub@redhat.com>
9067
9068 * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
9069 of included file.
9070
9071 2003-03-26 Ulrich Drepper <drepper@redhat.com>
9072
9073 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
9074 NULL provide default definition to syscall.
9075
9076 2003-03-25 Roland McGrath <roland@redhat.com>
9077
9078 * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
9079 (timer_id2ptr): Fix typo.
9080
9081 2003-03-25 Ulrich Drepper <drepper@redhat.com>
9082
9083 * pthreadP.h: Define SIGCANCEL and SIGTIMER.
9084 * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
9085 * sysdeps/ia64/pthreaddef.h: Likewise.
9086 * sysdeps/powerpc/pthreaddef.h: Likewise.
9087 * sysdeps/s390/pthreaddef.h: Likewise.
9088 * sysdeps/sh/pthreaddef.h: Likewise.
9089 * sysdeps/x86_64/pthreaddef.h: Likewise.
9090 * init.c (__pthread_initialize_minimal): Block SIGTIMER.
9091 * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
9092 being changed.
9093 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
9094 SIGTIMER is not unblocked.
9095 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
9096 RT signal taken.
9097 * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
9098 be send.
9099 * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
9100 pass pointer through as ID.
9101 * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
9102 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
9103 * sysdeps/unix/sysv/linux/timer_create.c: New file.
9104 * sysdeps/unix/sysv/linux/timer_delete.c: New file.
9105 * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
9106 * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
9107 * sysdeps/unix/sysv/linux/timer_routines.c: New file.
9108 * sysdeps/unix/sysv/linux/timer_settime.c: New file.
9109 * sysdeps/unix/sysv/linux/ia64/Versions: New file.
9110 * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
9111 * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
9112 * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
9113 * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
9114 * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
9115 * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
9116 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
9117 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
9118 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
9119 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
9120 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
9121 * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
9122 * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
9123 * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
9124 * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
9125 * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
9126 * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
9127 * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
9128 * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
9129 * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
9130 * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
9131 * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
9132 * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
9133 * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
9134
9135 * pthreadP.h: Remove FRAME_LEFT definition.
9136 * cleanup.c (_pthread_cleanup_push): Don't check for reference to
9137 already left frame. Programs which have this problem are not POSIX
9138 compliant.
9139 * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
9140
9141 2003-03-24 Ulrich Drepper <drepper@redhat.com>
9142
9143 * sysdeps/pthread/tst-timer.c: Check return values of the
9144 functions we test.
9145
9146 2003-03-23 Roland McGrath <roland@redhat.com>
9147
9148 * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
9149 * tst-tls3mod.c: Likewise.
9150 * tst-tls1.c: Likewise.
9151 * tst-tls2.c: Likewise.
9152
9153 * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
9154 undefined behavior.
9155
9156 * tst-join5.c (tf1, tf2): Add a cast.
9157
9158 * Makeconfig (includes): Append -I$(..)nptl to this variable.
9159
9160 * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
9161 Don't test anything.
9162 * tst-cond4.c: Likewise.
9163 * tst-cond6.c: Likewise.
9164 * tst-flock2.c: Likewise.
9165 * tst-mutex4.c: Likewise.
9166 * tst-rwlock4.c: Likewise.
9167 * tst-signal1.c: Likewise.
9168 * tst-spin2.c: Likewise.
9169 * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
9170
9171 * tst-mutex4.c: Use test-skeleton.c.
9172 * tst-spin2.c: Likewise.
9173 * tst-sysconf.c: Likewise.
9174 * tst-barrier2.c: Likewise.
9175 * tst-cond4.c: Likewise.
9176 * tst-cond6.c: Likewise.
9177 * tst-rwlock4.c: Likewise.
9178 * tst-unload.c: Likewise.
9179 * tst-flock2.c (do_test): Use return instead of exit.
9180
9181 2003-03-22 Jakub Jelinek <jakub@redhat.com>
9182
9183 * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
9184
9185 2003-03-21 Ulrich Drepper <drepper@redhat.com>
9186
9187 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
9188 (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
9189 instead of __lll_compare_and_swap.
9190 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
9191 Likewise.
9192 Removed definition if __lll_compare_and_swap.
9193
9194 * cancellation.c: Adjust for new form of compare&exchange macros.
9195 * cleanup_defer.c: Likewise.
9196 * init.c: Likewise.
9197 * libc-cancellation.c: Likewise.
9198 * old_pthread_cond_broadcast.c: Likewise.
9199 * old_pthread_cond_signal.c: Likewise.
9200 * old_pthread_cond_timedwait.c: Likewise.
9201 * old_pthread_cond_wait.c: Likewise.
9202 * pthread_cancel.c: Likewise.
9203 * pthread_create.c: Likewise.
9204 * pthread_detach.c: Likewise.
9205 * pthread_join.c: Likewise.
9206 * pthread_key_delete.c: Likewise.
9207 * pthread_setcancelstate.c: Likewise.
9208 * pthread_setcanceltype.c: Likewise.
9209 * pthread_timedjoin.c: Likewise.
9210 * pthread_tryjoin.c: Likewise.
9211 * sysdeps/pthread/createthread.c: Likewise.
9212
9213 2003-03-20 Ulrich Drepper <drepper@redhat.com>
9214
9215 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
9216 Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
9217 definitions. Replace uses with calls to atomic_* functions.
9218 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
9219 * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
9220 __lll_test_and_set calls with atomic_exchange_and_add and
9221 atomic_exchange calls respectively.
9222 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
9223 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
9224 * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
9225 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
9226 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
9227 * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
9228 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
9229
9230 * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
9231 returns the old value.
9232
9233 2003-03-20 Martin Schwidefsky <sky@mschwid3.boeblingen.de.ibm.com>
9234
9235 * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
9236 int for variable OLDVAL and correct inline assembler contraint.
9237 * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
9238 type int for variable OLD.
9239
9240 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
9241 only for s390-32.
9242 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
9243 (SINGLE_THREAD_P): Use global variable __local_multiple_threads
9244 instead of multiple_threads field in the TCB.
9245
9246 2003-03-19 Ulrich Drepper <drepper@redhat.com>
9247
9248 * sysdeps/i386/i686/bits/atomic.h: Removed.
9249 * sysdeps/i386/i586/bits/atomic.h: Removed.
9250 * sysdeps/i386/i486/bits/atomic.h: Removed. Moved to glibc.
9251 * sysdeps/x86_64/bits/atomic.h: Removed. Moved to glibc.
9252 * sysdeps/s390/bits/atomic.h: Removed. Moved to glibc.
9253 * sysdeps/sh/bits/atomic.h: Removed. Moved to glibc.
9254 * sysdeps/ia64/bits/atomic.h: Removed. Moved to glibc.
9255 * sysdeps/powerpc/bits/atomic.h: Removed. Moved to glibc.
9256 * atomic.h: Removed. Moved to glibc.
9257
9258 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
9259 support for clock selection.
9260
9261 * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
9262 signalling waiters.
9263
9264 2003-03-18 Roland McGrath <roland@redhat.com>
9265
9266 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
9267 Add __lll_rel_instr first. Add memory clobber.
9268 (lll_mutex_unlock): Use __lll_test_and_set.
9269 From Paul Mackerras <paulus@samba.org>.
9270
9271 * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
9272 unconditionally.
9273 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
9274 (SINGLE_THREAD_P): Add `header.' prefix.
9275 From Paul Mackerras <paulus@samba.org>.
9276
9277 * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
9278 pthread_timedjoin_np to ...
9279 (libpthread: GLIBC_2.3.3): ... here.
9280 (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
9281
9282 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
9283 Avoid shadowing VAL variable.
9284
9285 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
9286 New macro.
9287
9288 2003-03-18 Ulrich Drepper <drepper@redhat.com>
9289
9290 * Makefile (tests): Add tst-cond11.
9291 * tst-cond11.c: New file.
9292
9293 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
9294 struct passed to cleanup handler to eliminate one more
9295 instruction.
9296 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9297
9298 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
9299 (pthrad_cond_t): Replace __unused field with __clock.
9300
9301 * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
9302 waken all waiters in cleanup handler.
9303 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9304 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9305
9306 * pthread_condattr_getclock.c: New file.
9307 * pthread_condattr_setclock.c: New file.
9308 * sysdeps/pthread/pthread.h: Declare these new functions.
9309 * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
9310 * Makefile (libpthread-routines): Add the new functions.
9311 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
9312 Renamed field to value. Document use of the bits.
9313 * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
9314 change.
9315 * pthread_condattr_setpshared.c: Likewise.
9316 * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
9317 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
9318 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
9319 Add __clock field.
9320 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9321 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
9322 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
9323 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
9324 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
9325 Implement clock selection.
9326 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
9327 * pthread-errnos.sym: Add ENOSYS.
9328 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
9329 _POSIX_CLOCK_SELECTION.
9330 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
9331
9332 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
9333 invalid .size directive.
9334
9335 2003-03-17 Roland McGrath <roland@redhat.com>
9336
9337 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
9338 Formatting tweaks.
9339
9340 2003-03-17 Ulrich Drepper <drepper@redhat.com>
9341
9342 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
9343 Use __lll_add instead of spelling it out. Use protected symbol names.
9344 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
9345 Use __lll_add.
9346 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
9347 Renamed from lll_compare_and_swap. Use new name where necessary.
9348 (__lll_add): Defined.
9349 (__lll_dec_if_positive): Defined.
9350 (__lll_test_and_set): Defined.
9351 * sysdeps/ia64/pthread_spin_init.c: Removed.
9352 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
9353 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
9354 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
9355 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
9356 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
9357 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
9358 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
9359 * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
9360 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
9361 __sync_lock_release_si.
9362 Patch by Jakub Jelinek.
9363
9364 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
9365 Fix timeout handling.
9366 (__lll_timedwait_tid): Likewise.
9367 (lll_unlock_wake_cb): Wake up other waiters if necessary.
9368 Patch by Jakub Jelinek.
9369
9370 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
9371
9372 2003-03-17 Roland McGrath <roland@redhat.com>
9373
9374 PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
9375 * sysdeps/pthread/pthread_spin_init.c: New file.
9376 * sysdeps/pthread/pthread_spin_unlock.c: New file.
9377 * sysdeps/powerpc/Makefile: New file.
9378 * sysdeps/powerpc/pthread_spin_lock.c: New file.
9379 * sysdeps/powerpc/pthread_spin_trylock.c: New file.
9380 * sysdeps/powerpc/pthreaddef.h: New file.
9381 * sysdeps/powerpc/tcb-offsets.sym: New file.
9382 * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
9383 * sysdeps/powerpc/tls.h: New file.
9384 * sysdeps/powerpc/bits/atomic.h: New file.
9385 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
9386 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
9387 * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
9388
9389 * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
9390 * sysdeps/unix/sysv/linux/sem_post.c: New file.
9391 * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
9392 * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
9393 * sysdeps/unix/sysv/linux/sem_wait.c: New file.
9394 * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
9395 * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
9396 * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
9397 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
9398 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
9399 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
9400 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
9401 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
9402 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
9403 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
9404
9405 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
9406 not gettimeofday.
9407 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
9408 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
9409 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
9410 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
9411 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
9412
9413 2003-03-17 Ulrich Drepper <drepper@redhat.com>
9414
9415 * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
9416 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
9417 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9418 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9419 Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
9420
9421 2003-03-16 Roland McGrath <roland@redhat.com>
9422
9423 * tst-fork4.c: Include <string.h>.
9424 * tst-signal2.c: Likewise.
9425 * tst-mutex5.c (do_test): exit -> return.
9426 * tst-mutex2.c: Include <stdlib.h>.
9427
9428 2003-03-16 Ulrich Drepper <drepper@redhat.com>
9429
9430 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
9431 (__lll_mutex_timedlock_wait): Correct expected value after
9432 spurious wakeup. Otherwise we would never wait again.
9433
9434 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
9435 zone versus inline asm stupidity. Use correct instructions.
9436
9437 * tst-rwlock6.c: Add some more status output.
9438
9439 2003-03-15 Roland McGrath <roland@redhat.com>
9440
9441 * sysdeps/pthread/configure.in: New file.
9442 * sysdeps/pthread/configure: New file (generated).
9443
9444 2003-03-15 Ulrich Drepper <drepper@redhat.com>
9445
9446 * allocatestack.c (allocate_stack): Store the exact stack size of
9447 user allocated stacks.
9448
9449 2003-03-15 Jakub Jelinek <jakub@redhat.com>
9450
9451 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
9452 (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
9453 * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
9454 * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
9455 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
9456 Use `header.' prefix.
9457 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
9458
9459 2003-03-15 Ulrich Drepper <drepper@redhat.com>
9460
9461 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
9462 __builtin_frame_address, use stack pointer.
9463
9464 * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
9465 instead of __builtin_frame_pointer.
9466
9467 2003-03-14 Ulrich Drepper <drepper@redhat.com>
9468
9469 * tst-basic1.c (do_test): Add cast to avoid warning.
9470 * tst-basic2.c (do_test): Likewise.
9471
9472 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
9473 amount of stack correction.
9474
9475 * tst-fork4.c: Use test-skeleton.c.
9476
9477 2003-03-14 Roland McGrath <roland@redhat.com>
9478
9479 * init.c: Fix typo "#eli" for "#else".
9480
9481 2003-03-14 Steven Munroe <sjmunroe@us.ibm.com>
9482
9483 * allocatestack.c (__stack_user): Use hidden_data_def.
9484 * pthread_create.c (__pthread_keys): Likewise.
9485
9486 * init.c [__powerpc__] (__NR_set_tid_address): Define it.
9487
9488 2003-03-14 Roland McGrath <roland@redhat.com>
9489
9490 * tst-fork4.c: New file.
9491 * Makefile (tests): Add it.
9492
9493 * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
9494 we always define the padding space.
9495 [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
9496 stopped supporting its own extensions fully.
9497 [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
9498 struct also called `header', so `header.multiple_threads' is the field
9499 name to use on all machines.
9500 * allocatestack.c (allocate_stack): Use `header.' prefix.
9501 * sysdeps/pthread/createthread.c (create_thread): Likewise.
9502 * pthread_create.c (__pthread_create_2_1): Likewise.
9503 * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
9504 (THREAD_SELF): Likewise.
9505 * sysdeps/x86_64/tls.h: Likewise.
9506 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
9507 (SINGLE_THREAD_P): Likewise.
9508 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
9509 (SINGLE_THREAD_P): Likewise.
9510 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
9511 (SINGLE_THREAD_P): Likewise.
9512
9513 * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
9514 value directly.
9515
9516 2003-03-14 Ulrich Drepper <drepper@redhat.com>
9517
9518 * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
9519 * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
9520
9521 * pthread_create.c (start_thread): setjmp is expected to return 0.
9522
9523 * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
9524 (THREAD_GETMEM_NC): Likewise.
9525
9526 2003-03-13 Ulrich Drepper <drepper@redhat.com>
9527
9528 * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
9529 and the size of the stack which must be allocated is a multiple,
9530 allocate one more page.
9531 * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
9532 MULTI_PAGE_ALIASING.
9533
9534 2003-03-13 Roland McGrath <roland@redhat.com>
9535
9536 * pthread_create.c (start_thread): Set EXITING_BIT after the
9537 event-reporting (and destructors), not before.
9538
9539 2003-03-13 Jakub Jelinek <jakub@redhat.com>
9540
9541 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
9542 lll_futex_wake): Declare register variables as long int instead of
9543 unsigned long int. Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
9544 Make syscall arguments clobbered by the syscall.
9545 (lll_futex_wait): Define using lll_futex_timed_wait.
9546
9547 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
9548 to void *.
9549
9550 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
9551 PPID if [! NDEBUG].
9552
9553 * allocatestack.c (nptl_ncreated): Only declare if
9554 COLORING_INCREMENT != 0.
9555
9556 * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
9557 (__libc_enable_asynccancel_2): Remove prototype.
9558
9559 * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
9560 ctid to match kernel.
9561
9562 2003-03-12 Ulrich Drepper <drepper@redhat.com>
9563
9564 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
9565 libc_multiple_threads.
9566 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
9567 __libc_multiple_threads to...
9568 * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here. New file.
9569
9570 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
9571 versioning.
9572 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
9573 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
9574
9575 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
9576 (__pthread_once_internal): Define.
9577
9578 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
9579 macros instead of .symver directly.
9580 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
9581 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
9582
9583 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
9584 * sysdeps/x86_64/tcb-offsets.sym: New file.
9585 * sysdeps/x86_64/Makefile: New file.
9586
9587 * sysdeps/i386/tcb-offsets.sym: Add SELF.
9588 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
9589 to access own pthread_t in TCB.
9590 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9591 Likewise.
9592 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9593 Likewise.
9594 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
9595
9596 2003-03-12 Roland McGrath <roland@redhat.com>
9597
9598 * pthread-errnos.sym: New file.
9599 * Makefile (gen-as-const-headers): New variable, list that file.
9600 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
9601 header <pthread-errnos.h> instead of defining errno values here.
9602 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
9603 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
9604 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
9605 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
9606 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9607 Likewise.
9608 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9609 Likewise.
9610 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
9611 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9612 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
9613 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
9614 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
9615 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
9616 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
9617 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
9618 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9619 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
9620 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
9621 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
9622 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
9623 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
9624 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
9625 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9626 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
9627 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
9628 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
9629 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
9630 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
9631 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
9632 * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
9633 * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
9634 * sysdeps/sh/pthread_spin_trylock.S: Likewise.
9635 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
9636 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
9637
9638 * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
9639 CLONE_CHILD_SETTID worked.
9640
9641 2003-03-12 Ulrich Drepper <drepper@redhat.com>
9642
9643 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
9644 file.
9645 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
9646 file.
9647
9648 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
9649 (pthread_cond_t): Add padding.
9650
9651 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
9652 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
9653 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
9654
9655 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
9656 (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
9657 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
9658 (__pthread_rwlock_timedrdlock): Likewise.
9659 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
9660 (__pthread_rwlock_wrlock): Likewise.
9661 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
9662 (__pthread_rwlock_rdlock): Likewise.
9663
9664 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
9665
9666 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
9667 result of lock re-get if it fails.
9668
9669 2003-03-11 Ulrich Drepper <drepper@redhat.com>
9670
9671 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
9672 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
9673 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
9674 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
9675 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9676 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
9677 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
9678 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
9679 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
9680 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
9681
9682 * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
9683 THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
9684
9685 * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
9686 Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
9687 * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
9688 (create_thread): Likewise.
9689 Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
9690 * init.c (__pthread_initialize_minimal_internal): Initialize
9691 __libc_multiple_threads_ptr if necessary.
9692 * pthreadP.h: Adjust prototype for __libc_pthread_init. Declare
9693 __pthread_multiple_threads and __libc_multiple_threads_ptr.
9694 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
9695 __libc_multiple_threads.
9696 (__libc_pthread_init): Return pointer to __libc_pthread_init if
9697 necessary.
9698
9699 * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
9700 (THREAD_SETMEM_NC): Likewise.
9701
9702 * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
9703 * sysdeps/x86_64/pthread_spin_trylock.S: New file.
9704 * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
9705 * sysdeps/x86_64/pthread_spin_unlock.S: New file.
9706
9707 * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
9708 Eliminate one entire instruction.
9709
9710 * cancellation.c (__pthread_enable_asynccancel_2): New function.
9711 * pthreadP.h: Declare __pthread_enable_asynccancel_2.
9712 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
9713 (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
9714 instead of __pthread_enable_asynccancel.
9715 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
9716 (__pthread_cond_wait): Likewise.
9717 * sysdeps/pthread/pthread_cond_timedwait.c
9718 (__pthread_cond_timedwait): Likewise.
9719 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
9720
9721 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
9722 (__condvar_cleanup): Wake up all waiters in case we got signaled
9723 after being woken up but before disabling asynchronous
9724 cancellation.
9725 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
9726 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
9727 (__condvar_cleanup): Likewise.
9728
9729 * init.c (__NR_set_tid_address): If already defined, don't redefine.
9730 Make it an error if architecture has no #if case. Add x86-64.
9731
9732 * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
9733 pt-initfini.s generation.
9734
9735 * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
9736 (TLS_INIT_TP): Fix typo.
9737
9738 2003-03-11 Jakub Jelinek <jakub@redhat.com>
9739
9740 * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
9741 3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
9742
9743 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
9744 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
9745 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
9746 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
9747 * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
9748 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
9749 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
9750 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
9751
9752 2003-03-11 Ulrich Drepper <drepper@redhat.com>
9753
9754 * sysdeps/pthread/pthread_cond_timedwait.c
9755 (__pthread_cond_timedwait): Return the result of the final
9756 locking. If it succeeds, the regular function return value.
9757
9758 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
9759 Return result of the final locking.
9760 * version.c (__nptl_main): Work around problems with the strange
9761 INTERNAL_SYSCALL macro on ppc32.
9762 * init.c (__pthread_initialize_minimal_internal): Unblock
9763 SIGCANCEL in case the parent blocked it.
9764 Reported by Paul Mackerras <paulus@samba.org>.
9765
9766 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
9767 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
9768 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
9769
9770 2003-03-11 Jakub Jelinek <jakub@redhat.com>
9771
9772 * sysdeps/pthread/pthread_cond_timedwait.c
9773 (__pthread_cond_timedwait): Unlock and fail if
9774 __pthread_mutex_unlock_internal failed.
9775
9776 * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
9777 (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
9778 Use ARCH_CLONE.
9779 * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
9780 [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
9781 STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
9782 ALLOCATE_STACK): New macros.
9783 (TLS_TPADJ): New macro.
9784 (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
9785 (allocate_stack): Handle TLS_DTV_AT_TP and
9786 NEED_SEPARATE_REGISTER_STACK. Use TLS_TPADJ.
9787 * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
9788 Don't set PD->self.
9789 * init.c [__ia64__] (__NR_set_tid_address): Define.
9790
9791 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
9792 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
9793 * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
9794 * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
9795 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
9796 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
9797 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
9798 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
9799 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
9800 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
9801 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
9802 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
9803 * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
9804 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
9805 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
9806 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
9807 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
9808 * sysdeps/ia64/bits/atomic.h: New file.
9809 * sysdeps/ia64/Makefile: New file.
9810 * sysdeps/ia64/pthread_spin_init.c: New file.
9811 * sysdeps/ia64/pthread_spin_lock.c: New file.
9812 * sysdeps/ia64/pthread_spin_trylock.c: New file.
9813 * sysdeps/ia64/pthread_spin_unlock.c: New file.
9814 * sysdeps/ia64/pthreaddef.h: New file.
9815 * sysdeps/ia64/tcb-offsets.sym: New file.
9816 * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
9817 * sysdeps/ia64/tls.h: New file.
9818
9819 * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
9820 to syscall instead of no arguments.
9821
9822 2003-03-10 Ulrich Drepper <drepper@redhat.com>
9823
9824 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
9825 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
9826 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
9827 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
9828
9829 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
9830 unused code.
9831
9832 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
9833
9834 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
9835 lowlevelbarrier.sym.
9836 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
9837 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
9838 Include lowlevelbarrier.h and don't define offsets locally.
9839 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
9840
9841 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
9842 (__lll_mutex_lock_wait): Reverse order of first two parameters.
9843 (__lll_mutex_timedlock_wait): Likewise.
9844 (lll_mutex_lock): Adjust asm for that.
9845 (lll_mutex_timedlock): Likewise. Mark cx, cc, r10 as clobbered.
9846 (lll_lock): Adjust asm for operand order change.
9847 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
9848 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
9849
9850 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
9851 Reverse order of parameters.
9852 (__lll_timedwait_tid): Remove regparms attribute.
9853 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
9854 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
9855
9856 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
9857 (__lll_timedwait_tid): Remove one unnecessary instruction.
9858
9859 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
9860 __lll_mutex_timedlock_wait only for NOT_IN_libc.
9861 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
9862 lowlevelmutex.S.
9863
9864 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
9865 lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
9866 for NOT_IN_libc.
9867 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
9868 lowlevellock.S.
9869
9870 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
9871 LOCK is already defined. Don't define __lll_mutex_timedlock_wait
9872 for libc.so.
9873 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
9874 define LOCK here (if UP is not defined). The actual code is in
9875 lowlevelmutex.S.
9876
9877 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
9878 LOCK is already defined. Don't define lll_unlock_wake_cb and
9879 __lll_timedwait_tid for libc.so.
9880 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
9881 define LOCK here (if UP is not defined). The actual code is in
9882 lowlevellock.S.
9883
9884 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
9885 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
9886 * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
9887 instead of lowlevelsem.h.
9888 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
9889 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
9890 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
9891
9892 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
9893 lowlevelrwlock.sym.
9894 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
9895 * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
9896 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
9897
9898 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
9899 register loading.
9900 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
9901 last changed. D'oh.
9902
9903 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
9904
9905 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
9906 of __libc_locking_needed.
9907 (lll_trylock): Initialize %eax to zero.
9908
9909 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
9910 pthread_cond_t definition.
9911
9912 2003-03-10 Roland McGrath <roland@redhat.com>
9913
9914 * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
9915 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
9916 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
9917 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
9918 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
9919
9920 * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
9921 Instead of setting PD->multiple_threads, set globals
9922 __pthread_multiple_threads and __libc_multiple_threads.
9923 * sysdeps/pthread/createthread.c (create_thread): Likewise.
9924 * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
9925 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
9926
9927 * descr.h (struct pthread): Conditionalize first member on
9928 [!TLS_DTV_AT_TP]. Replace the `header' member with an anonymous union
9929 containing an anonymous tcbhead_t. Move `list' member out.
9930 [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
9931 * allocatestack.c: Remove use of `header.data.' prefix.
9932 * pthread_create.c: Likewise.
9933 * init.c (__pthread_initialize_minimal_internal): Likewise.
9934 * sysdeps/pthread/createthread.c (create_thread): Likewise.
9935 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
9936 (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
9937 * sysdeps/x86_64/tls.h: Likewise.
9938 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
9939 (SINGLE_THREAD_P): Likewise.
9940 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
9941 (SINGLE_THREAD_P): Likewise.
9942 * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
9943 * sysdeps/s390/tls.h (tcbhead_t): Likewise.
9944
9945 2003-03-09 Ulrich Drepper <drepper@redhat.com>
9946
9947 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
9948
9949 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
9950 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
9951
9952 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
9953 leftovers from the ia32 code.
9954
9955 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
9956 memory load.
9957 (clear_once_control): Don't load %esi.
9958
9959 * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
9960 handling.
9961
9962 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
9963
9964 * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
9965 * sysdeps/unix/sysv/linux/createthread.c: ...here.
9966
9967 * Makefile (tests): Add tst-cond10.
9968 * tst-cond10.c: New file.
9969
9970 2003-03-08 Ulrich Drepper <drepper@redhat.com>
9971
9972 * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
9973 * tst-signal3.c (do_test): Likewise.
9974 * tst-sem5.c (do_test): Likewise.
9975 * tst-kill6.c (do_test): Likewise.
9976 * tst-tls3.c (do_test): Likewise. Include <errno.h>.
9977
9978 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
9979 of inc/dec.
9980 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
9981 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
9982 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
9983 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
9984 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
9985 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
9986 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9987 Likewise.
9988 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9989 Likewise.
9990 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
9991 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9992 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9993 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
9994 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
9995 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
9996 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
9997 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
9998
9999 * allocatestack.c (allocate_stack): If mprotect() fails free the
10000 TLS memory.
10001
10002 2003-03-07 Ulrich Drepper <drepper@redhat.com>
10003
10004 * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
10005
10006 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
10007 lll_wake_tid. This was used only to work around kernel limits in
10008 the early days.
10009 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
10010 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
10011 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
10012 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
10013
10014 * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
10015 (__pthread_initialize_minimal_internal): Change initialization of
10016 __static_tls_align_m1 appropriately.
10017 * pthreadP.h (__static_tls_align_m1): Renamed from
10018 __static_tls_align.
10019 * allocatestack.c (allocate_stack): Use __static_tls_align_m1
10020 instead of __static_tls_align-1.
10021
10022 2003-03-04 Ulrich Drepper <drepper@redhat.com>
10023
10024 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
10025
10026 * pthread_create.c: Define __pthread_keys using nocommon
10027 attribute, not by placing it explicitly in bss.
10028 Remove DEFINE_DEALLOC definition. Not needed anymore.
10029
10030 * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
10031 Use it in mmap call to allocate stacks.
10032
10033 * sysdeps/pthread/createthread.c (create_thread): Fix comment.
10034
10035 * pthread_create.c (start_thread): Use THREAD_SETMEM to store
10036 result of the thread function.
10037
10038 2003-03-03 Ulrich Drepper <drepper@redhat.com>
10039
10040 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed. The generic
10041 version is just fine.
10042
10043 * sysdeps/unix/sysv/linux/libc_pthread_init.c
10044 (__pthread_child_handler): Renamed from pthread_child_handler,
10045 exported, and marked hidden. Change all users.
10046 * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
10047 free __pthread_child_handler from child list.
10048
10049 2003-03-03 Martin Schwidefsky <schwidefsky@de.ibm.com>
10050
10051 * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
10052
10053 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
10054 Fix handling of cancellation and failing pthread_mutex_unlock call.
10055 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
10056 (__pthread_cond_wait): Likewise.
10057
10058 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
10059 (pthread_rwlock_timedrdlock): Fix clobber of result variable by
10060 lll_futex_timed_wait call.
10061 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
10062 (pthread_rwlock_timedwrlock): Likewise.
10063
10064 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
10065 Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
10066 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
10067
10068 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
10069 check of lll_futex_wake return value.
10070
10071 2003-03-03 Roland McGrath <roland@redhat.com>
10072
10073 * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
10074
10075 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
10076 Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
10077 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
10078
10079 2003-03-02 Ulrich Drepper <drepper@redhat.com>
10080
10081 * sysdeps/pthread/timer_create.c (timer_create): Return correct
10082 error for CPU clocks.
10083
10084 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
10085 _POSIX_MONOTONIC_CLOCK.
10086 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
10087
10088 * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
10089 recent kernels.
10090
10091 2003-03-01 Ulrich Drepper <drepper@redhat.com>
10092
10093 * descr.h (struct pthread): Move cleanup field to the front.
10094
10095 2003-03-01 Roland McGrath <roland@redhat.com>
10096
10097 * sem_open.c (sem_open): Braino fix.
10098
10099 2003-03-01 Ulrich Drepper <drepper@redhat.com>
10100
10101 * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
10102 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
10103 __pthread_cleanup_pop functionality.
10104 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10105
10106 * descr.h (struct pthread): Move tid field to the front now that
10107 it is often used.
10108
10109 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
10110 (__lll_mutex_timedlock_wait): Remove.
10111 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
10112 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
10113 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
10114 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
10115 (lll_unlock_wake_cb): Don't save and restore %esi.
10116 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
10117 %esi.
10118 (__lll_timedwait_tid): Add alignment.
10119 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
10120 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
10121 %esi.
10122 (__lll_timedwait_tid): Removed.
10123 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
10124 (__pthread_cond_broadcast): Don't save, load, and restore %esi.
10125 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
10126 (pthread_barrier_wait): Don't save, load, and restore %esi for
10127 last thread.
10128 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
10129 (__pthread_cond_signal): Don't save, load, and restore %esi.
10130 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
10131 (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
10132 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
10133 Don't save, load, and restore %esi.
10134
10135 2003-02-27 Ulrich Drepper <drepper@redhat.com>
10136
10137 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
10138 Release lock before waking up the waiters.
10139
10140 * tst-exit1.c (do_test): Don't start more than one thread in parallel.
10141
10142 * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
10143 (reader_thread): Likewise.
10144
10145 * sysdeps/pthread/pthread_rwlock_unlock.c
10146 (__pthread_rwlock_unlock): Release internal lock early. Don't try
10147 to wake up readers if there are none.
10148
10149 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
10150 Release internal lock before wake threads.
10151
10152 2003-02-26 Ulrich Drepper <drepper@redhat.com>
10153
10154 * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
10155 * tst-rwlock8.c: Initialize lock with INIT. Allow INIT to be
10156 predefined.
10157 * tst-rwlock9.c: Likewise.
10158 * tst-rwlock10.c: New file.
10159 * tst-rwlock11.c: New file.
10160
10161 * Makefile (tests): Add tst-dlsym1.
10162 * tst-dlsym1.c: New file.
10163
10164 * init.c (__pthread_initialize_minimal_internal): Set
10165 GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
10166 * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
10167
10168 2003-02-24 Ulrich Drepper <drepper@redhat.com>
10169
10170 * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
10171
10172 * tst-cond2.c: Fix sychronization with child.
10173
10174 * tst-rwlock8.c (reader_thread): Remove unused variable.
10175
10176 * Makefile: Add rules to build and run tst-tls3.
10177 * tst-tls3.c: New file.
10178 * tst-tls3mod.c: New file.
10179
10180 * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
10181 * tst-rwlock8.c: New file.
10182 * tst-rwlock9.c: New file.
10183 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
10184 complete broken rwlock implementation.
10185 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10186 Likewise.
10187 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10188 Likewise.
10189 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
10190 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10191 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
10192 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
10193 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
10194 * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
10195 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
10196
10197 2003-02-23 Roland McGrath <roland@redhat.com>
10198
10199 * Makefile (nptl-version): Change regexp so case sensitivity is ok.
10200
10201 2003-02-23 Ulrich Drepper <drepper@redhat.com>
10202
10203 * Makefile (tests): Add tst-context1.
10204 * tst-context1.c: New file.
10205
10206 * Makefile (tests): Add tst-tls1 and tst-tls2.
10207 * tst-tls1.c: New file.
10208 * tst-tls2.c: New file.
10209
10210 * libc-cancellation.c (__libc_enable_asynccancel): Correct test
10211 for failed cmpxchg.
10212
10213 * pthread_create.c (start_thread): Set EXITING_BIT early.
10214
10215 * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
10216 (THREAD_GETMEM_NC): Likewise.
10217
10218 2003-02-22 Ulrich Drepper <drepper@redhat.com>
10219
10220 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
10221 off 3 more bytes by using offset-less instructions when possible.
10222
10223 * Makefile: Add dependency for $(objpfx)version.d.
10224
10225 * eintr.c (eintr_source): Add unnecessary return but the compiler
10226 insists.
10227
10228 * tst-kill3.c: Include <unistd.h>.
10229
10230 2003-02-21 Roland McGrath <roland@redhat.com>
10231
10232 * pthread_create.c (start_thread): Call __libc_thread_freeres.
10233
10234 2003-02-21 Ulrich Drepper <drepper@redhat.com>
10235
10236 * Makefile (tests): Add tst-eintr1.
10237 (distribute): Add eintr.c.
10238 * tst-eintr1.c: New file.
10239 * eintr.c: New file.
10240
10241 * pthread_cancel.c (pthread_cancel): Use tkill directly.
10242
10243 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
10244 Disallow sending SIGCANCEL.
10245
10246 * Makefile (tests): Remove tst-basic7. Add tst-kill1, tst-kill2,
10247 tst-kill3, tst-kill4, tst-kill5, tst-kill6.
10248 * tst-kill1.c: New file.
10249 * tst-kill2.c: New file.
10250 * tst-kill3.c: New file.
10251 * tst-kill5.c: New file.
10252 * tst-kill6.c: New file.
10253 * tst-basic7.c: Renamed to...
10254 * tst-kill4.c: ...this.
10255
10256 2003-02-21 Roland McGrath <roland@redhat.com>
10257
10258 * Makefile (install-lib-ldscripts): New variable.
10259
10260 2003-02-21 Ulrich Drepper <drepper@redhat.com>
10261
10262 * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
10263 * pthread_cancel.c: Use INVALID_TD_P.
10264 * pthread_detach.c: Likewise.
10265 * pthread_getschedparam.c: Likewise.
10266 * pthread_setschedparam.c: Likewise.
10267 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
10268 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
10269 * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
10270 * pthread_timedjoin.c: Likewise.
10271
10272 * tst-basic7.c: Include <signal.h>.
10273
10274 * pthread_join.c (pthread_join): Limited checking for invalid
10275 descriptors.
10276 * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
10277
10278 2003-02-20 Ulrich Drepper <drepper@redhat.com>
10279
10280 * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
10281 beginning of the loop. Clear the entire first block of TSD.
10282 * Makefile (tests): Add tst-key4.
10283 * tst-key4.c: New file.
10284
10285 2003-02-18 Ulrich Drepper <drepper@redhat.com>
10286
10287 * Makefile (tests): Add tst-basic7.
10288 * tst-basic7.c: New file.
10289
10290 * pthread_create.c (deallocate_tsd): Mark as internal_function.
10291 Add some more __builtin_expect.
10292
10293 * pthreadP.h: Define dummy version of DEBUGGING_P.
10294
10295 2003-02-17 Ulrich Drepper <drepper@redhat.com>
10296
10297 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
10298 _POSIX_THREAD_PRIORITY_SCHEDULING.
10299 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
10300 _XOPEN_REALTIME_THREADS.
10301 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
10302
10303 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
10304 kernel returns EINVAL for PID <= 0, work around it.
10305
10306 * Makefile (tests): Add tst-signal5.
10307 * tst-signal5.c: New file.
10308
10309 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
10310 and LOGIN_NAME_MAX.
10311
10312 * tst-cancel1.c (tf): Block all signals.
10313
10314 * Makefile (tests): Add tst-basic6.
10315 * tst-basic6.c: New file.
10316
10317 * tst-basic1.c: Add test for process ID.
10318
10319 * Makefile (tests): Add tst-cancel10.
10320 * tst-cancel10.c: New file.
10321
10322 * Makefile (tests): Add tst-signal4.
10323 * tst-signal4.c: New file.
10324
10325 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
10326 __sigismember instead of sigismember. Add __builtin_expect.
10327
10328 2003-02-16 Ulrich Drepper <drepper@redhat.com>
10329
10330 * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
10331 pthread_setcancelstate, and pthread_rwlock_setpshared.
10332
10333 * tst-cancel7.c (do_test): Make sure the pid file exists before
10334 canceling the thread.
10335
10336 * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
10337 pthread_rwlock_timedrdlock tests.
10338 * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
10339 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10340 Check for invalid tv_nsec field.
10341 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10342 Likewise.
10343
10344 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
10345 recursive mutex of overflow.
10346
10347 * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
10348
10349 * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
10350 going into an endless loop.
10351 * Makefile (tests): Add tst-cancel9.
10352 * tst-cancel9.c: New file.
10353
10354 * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
10355
10356 2003-02-15 Ulrich Drepper <drepper@redhat.com>
10357
10358 * tst-mutex5.c (do_test): Add more timedlock tests.
10359
10360 * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
10361 * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
10362
10363 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
10364 use INLINE_SYSCALL. Error number is returned, not -1.
10365
10366 * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
10367 and __deallocate_stack with internal_function.
10368 * pthread_create.c: Adjust definitions appropriately.
10369 * allocatestack.c: Likewise.
10370
10371 * pthread_join.c: Add one more __builtin_expect.
10372 * pthread_timedjoin.c: Likewise.
10373
10374 * pthread_getspecific.c (__pthread_getspecific): Clear data->data
10375 not data of sequence number does not match.
10376 Add one __builtin_expect.
10377
10378 * Makefile (tests): Add tst-clock1.
10379 * tst-clock1.c: New file.
10380
10381 * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
10382 negative arguments.
10383 * Makefile (tests): Add tst-basic5.
10384 * tst-basic5.c: New file.
10385
10386 2003-02-14 Ulrich Drepper <drepper@redhat.com>
10387
10388 * Makefile (tests): Add tst-basic4.
10389 * tst-basic4.c: New file.
10390
10391 * pthreadP.h: Add declaraction for __nptl_nthreads.
10392 * pthread_create.c: Define __nptl_nthreads
10393 (start_thread): Increment __nptl_nthreads at beginning. Decrement
10394 after thread is done. If then zero, call exit(0).
10395 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
10396 Add ptr_nthreads. Define HAVE_PTR_NTHREADS.
10397 * init.c (pthread_functions): Initialize ptr_nthreads.
10398 * allocatestack.c (nptl_nthreads): Remove definition and all uses.
10399 (__reclaim_stacks): Decrement __nptl_nthreads.
10400 * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
10401 Define.
10402 * Makefile (tests): Add tst-basic3.
10403 * tst-basic3.c: New file.
10404
10405 * descr.h: Define CANCELING_BIT and CANCELING_BITMASK. Introduce
10406 after CANCELTYPE_BIT, move the other bits up. Update CANCEL_RESTMASK.
10407 * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
10408 * pthread_cancel.c (pthread_cancel): Likewise. Also set CANCELING_BIT
10409 if asynchronous canceling is enabled.
10410 * pthread_join.c (pthread_join): When recognizing circular joins,
10411 take into account the other thread might be already canceled.
10412 * Makefile (tests): Add tst-join5.
10413 * tst-join5.c: New file.
10414
10415 * Makefile (tests): Add tst-join4.
10416 * tst-join4.c: New file.
10417
10418 2003-02-13 Ulrich Drepper <drepper@redhat.com>
10419
10420 * tst-cond4.c (main): Add test of pthread_attr_getpshared.
10421
10422 2003-02-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
10423
10424 * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
10425 THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
10426 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
10427 warning.
10428 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
10429 to avoid warning.
10430 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
10431 error if lll_futex_wake failed.
10432
10433 2003-02-13 Ulrich Drepper <drepper@redhat.com>
10434
10435 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
10436 handling of cancellation and failung pthread_mutex_unlock call.
10437 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10438 * Makefile (tests): Add tst-cond8 and tst-cond9.
10439 * tst-cond8.c: New file.
10440 * tst-cond9.c: New file.
10441
10442 * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
10443
10444 * sysdeps/pthread/pthread.h: Add missing initializers. Protect
10445 non-standard initializers with __USE_GNU.
10446
10447 * Makefile (tests): Add tst-cleanup3.
10448 * tst-cleanup3.c: New file.
10449
10450 2003-02-12 Ulrich Drepper <drepper@redhat.com>
10451
10452 * Makefile (tests): Add tst-attr1 and tst-attr2.
10453 * tst-attr1.c: New file.
10454 * tst-attr2.c: New file.
10455
10456 * Makefile: Add rules to build and run tst-atfork2 test.
10457 * tst-atfork2.c: New file.
10458 * tst-atfork2mod.c: New file.
10459
10460 * sysdeps/unix/sysv/linux/unregister-atfork.c
10461 (__unregister_atfork): Free the memory allocated for the handlers
10462 after removing them from the lists.
10463
10464 * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
10465 cleanup function.
10466
10467 * tst-atfork1.c (do_test): Wait for the child we forked.
10468 Report error in child.
10469
10470 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
10471
10472 * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
10473
10474 2003-02-10 Ulrich Drepper <drepper@redhat.com>
10475
10476 * Makefile (tests): Add tst-cancel8.
10477 * tst-cancel8.c: New file.
10478
10479 * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
10480 clearing of control variable.
10481 * Makefile (tests): Add tst-once3 and tst-once4.
10482 * tst-once3.c: New file.
10483 * tst-once4.c: New file.
10484
10485 2003-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
10486
10487 * sysdeps/sh/Makefile: New file.
10488 * sysdeps/sh/bits/atomic.h: New file.
10489 * sysdeps/sh/pthread_spin_init.c: New file.
10490 * sysdeps/sh/pthread_spin_lock.c: New file.
10491 * sysdeps/sh/pthread_spin_trylock.S: New file.
10492 * sysdeps/sh/pthread_spin_unlock.S: New file.
10493 * sysdeps/sh/pthreaddef.h: New file.
10494 * sysdeps/sh/tcb-offsets.sym: New file.
10495 * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
10496 * sysdeps/sh/tls.h: New file.
10497 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
10498 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
10499 * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
10500 * sysdeps/unix/sysv/linux/sh/fork.c: New file.
10501 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
10502 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
10503 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
10504 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
10505 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
10506 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
10507 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
10508 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
10509 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
10510 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
10511 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
10512 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
10513 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
10514 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
10515 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
10516 * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
10517 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
10518 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
10519 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
10520 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
10521 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
10522 * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
10523 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
10524 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
10525 * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
10526 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
10527
10528 2003-02-08 Ulrich Drepper <drepper@redhat.com>
10529
10530 * tst-cond2.c: Rearrange code to not rely on behavior undefined
10531 according to POSIX.
10532
10533 * tst-basic2.c (do_test): Lock mutex before creating the thread.
10534
10535 2003-02-07 Ulrich Drepper <drepper@redhat.com>
10536
10537 * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
10538 (TLS_GET_FS): New #define.
10539 (TLS_SET_FS): New #define.
10540 Correct value of __NR_set_thread_area.
10541
10542 * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
10543
10544 2003-02-06 Ulrich Drepper <drepper@redhat.com>
10545
10546 * Makefile (tests): Add tst-popen1.
10547 * tst-popen1.c: New file.
10548
10549 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
10550 but inactive generalization.
10551 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10552 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
10553 Minor optimization, remove one instruction.
10554 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
10555
10556 2003-02-04 Martin Schwidefsky <schwidefsky@de.ibm.com>
10557
10558 * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
10559
10560 2003-01-31 Martin Schwidefsky <schwidefsky@de.ibm.com>
10561
10562 * init.c (__NR_set_tid_address): Add #ifdef for s390.
10563 * sysdeps/pthread/pthread_barrier_wait.c: New file.
10564 * sysdeps/pthread/pthread_cond_broadcast.c: New file.
10565 * sysdeps/pthread/pthread_cond_signal.c: New file.
10566 * sysdeps/pthread/pthread_cond_timedwait.c: New file.
10567 * sysdeps/pthread/pthread_cond_wait.c: New file.
10568 * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
10569 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
10570 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
10571 * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
10572 * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
10573 * sysdeps/s390/Makefile: New file.
10574 * sysdeps/s390/bits/atomic.h: New file.
10575 * sysdeps/s390/pthread_spin_init.c: New file.
10576 * sysdeps/s390/pthread_spin_lock.c: New file.
10577 * sysdeps/s390/pthread_spin_trylock.c: New file.
10578 * sysdeps/s390/pthread_spin_unlock.c: New file.
10579 * sysdeps/s390/pthreaddef.h: New file.
10580 * sysdeps/s390/tcb-offsets.sym: New file.
10581 * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
10582 * sysdeps/s390/tls.h: New file.
10583 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
10584 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
10585 * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
10586 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
10587 * sysdeps/unix/sysv/linux/s390/fork.c: New file.
10588 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
10589 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
10590 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
10591 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
10592 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
10593 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
10594 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
10595 * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
10596 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
10597 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
10598 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
10599 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
10600 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
10601 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
10602 * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
10603 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
10604 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
10605 * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
10606
10607 2003-02-04 Ulrich Drepper <drepper@redhat.com>
10608
10609 * atomic.h: Add a couple more default implementations.
10610 (atomic_compare_and_exchange_acq): Use
10611 __arch_compare_and_exchange_32_acq in return value definition. It
10612 always exists.
10613 (atomic_bit_set): Renamed from atomic_set_bit.
10614 Add missing atomic_ prefixes.
10615
10616 * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
10617 thread library is available, use correct value to mark initialized
10618 once variable.
10619
10620 2003-02-03 Ulrich Drepper <drepper@redhat.com>
10621
10622 * allocatestack.c (allocate_stack): Use __getpagesize instead of
10623 __sysconf to determine pagesize.
10624
10625 * pthread_create.c: Include <atomic.h>.
10626 * allocatestack.c (allocate_stack): Implement coloring of the
10627 allocated stack memory. Rename pagesize to pagesize_m1. It's the
10628 size minus one. Adjust users.
10629 * sysdeps/i386/i686/Makefile: New file.
10630
10631 2003-02-02 Ulrich Drepper <drepper@redhat.com>
10632
10633 * allocatestack.c: Improve comment throughout the file.
10634
10635 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
10636 (__lll_lock_wait): Add branch prediction.
10637 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
10638 (__lll_lock_wait): Likewise.
10639 (lll_unlock_wake_cb): Removed.
10640
10641 2003-01-31 Ulrich Drepper <drepper@redhat.com>
10642
10643 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
10644 _POSIX_THREAD_PRIORITY_SCHEDULING.
10645
10646 2003-01-30 Jakub Jelinek <jakub@redhat.com>
10647
10648 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
10649 Fix return type of ptr___pthread_getspecific.
10650
10651 2003-01-29 Ulrich Drepper <drepper@redhat.com>
10652
10653 * Makefile (tests): Add tst-umask1.
10654 (tst-umask1-ARGS): Define.
10655 * tst-umask1.c: New file.
10656
10657 2003-01-28 Ulrich Drepper <drepper@redhat.com>
10658
10659 * Makefile (libpthread-routines): Remove lowlevelrwlock. Add
10660 pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
10661 pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
10662 pthread_rwlock_unlock.
10663 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
10664 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
10665 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
10666 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
10667 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10668 New file.
10669 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
10670 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10671 New file.
10672 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
10673 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
10674 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
10675 New file.
10676 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
10677 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
10678 New file.
10679 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
10680 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
10681 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
10682 New file.
10683 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
10684 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
10685 New file.
10686 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
10687
10688 * Makefile (libpthread-routines): Remove lowlevelcond and
10689 lowlevelsem. Add sem_wait, sem_trywait, sem_timedwait, sem_post,
10690 pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
10691 and pthread_cond_broadcast.
10692 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
10693 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
10694 * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
10695 * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
10696 * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
10697 * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
10698 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
10699 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
10700 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
10701 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
10702 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
10703 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
10704 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
10705 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
10706 * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
10707 * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
10708 * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
10709 * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
10710 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
10711 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
10712 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
10713 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
10714 * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
10715 * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
10716 * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
10717 * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
10718 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
10719 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
10720 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
10721 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
10722 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
10723
10724 * sysdeps/unix/sysv/linux/i386/createthread.c: Define
10725 PREPARE_CREATE and TLS_VALUE with x86-specific bits. All the rest
10726 of the code is moved to ...
10727 * sysdeps/pthread/createthread.c: ...here. New file.
10728
10729 2003-01-27 Ulrich Drepper <drepper@redhat.com>
10730
10731 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
10732 (__new_sem_post): Clear %eax before returning.
10733 Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
10734
10735 * Makefile (tests): Add tst-cleanup2.
10736 * tst-cleanup2.c: New file.
10737
10738 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
10739 Interpret first parameter correctly.
10740
10741 2003-01-17 Ulrich Drepper <drepper@redhat.com>
10742
10743 * Makefile (headers): Add bits/semaphore.h.
10744
10745 2003-01-16 Jakub Jelinek <jakub@redhat.com>
10746
10747 * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
10748 if not SHARED.
10749
10750 2003-01-14 Ulrich Drepper <drepper@redhat.com>
10751
10752 * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
10753 must be used and mapping failed.
10754 Reported by Luke Elliott <luke.elliott@activfinancial.com>.
10755
10756 * Makefile (CFLAGS-pthread_self.os): Define this, not
10757 CFLAGS-pthread_self.c.
10758
10759 2003-01-13 Ulrich Drepper <drepper@redhat.com>
10760
10761 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
10762 lll_unlock_wake_cb.
10763
10764 * Makefile (libpthread-routines): Add version. Add rules to build
10765 version.os and banner.h.
10766 * version.c: New file.
10767
10768 2003-01-13 Jakub Jelinek <jakub@redhat.com>
10769
10770 * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
10771 the alias unconditional.
10772 * pthread_mutex_unlock.c (__pthread_mutex_unlock_internal): Likewise.
10773
10774 2003-01-13 Ulrich Drepper <drepper@redhat.com>
10775
10776 * Makefile (CFLAGS-pthread_self.c): New definition.
10777
10778 2003-01-06 Jakub Jelinek <jakub@redhat.com>
10779
10780 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
10781 INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
10782 * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
10783 * init.c (__pthread_initialize_minimal_internal): Likewise.
10784
10785 2003-01-07 Jakub Jelinek <jakub@redhat.com>
10786
10787 * pthreadP.h (__pthread_cond_timedwait): Add prototype.
10788
10789 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
10790 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
10791 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
10792 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
10793 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
10794 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
10795
10796 2003-01-06 Jakub Jelinek <jakub@redhat.com>
10797
10798 * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
10799 * pt-system.c (LIBC_CANCEL_HANDLED): Add.
10800 * tst-cancel-wrappers.sh: Remove all exceptions.
10801
10802 2003-01-05 Ulrich Drepper <drepper@redhat.com>
10803
10804 * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
10805 features. Reported by Marijn Ros <marijn@mad.scientist.com>.
10806
10807 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
10808 Use __libc_pthread_functions array if SHARED.
10809
10810 * pthreadP.h: Move pthread_cond_2_0_t definition to...
10811 * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
10812
10813 * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
10814 (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
10815 __libc_key_create, __libc_getspecific, __libc_setspecific): Use
10816 __libc_ptf_call instead of __libc_maybe_call.
10817 (PTF): New #define.
10818 (__libc_cleanup_region_start): Wrap function name with PTF call.
10819 (__libc_cleanup_region_end): Likewise.
10820 (__libc_cleanup_end): Likewise.
10821
10822 * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
10823 * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
10824 * pthread_key_create.c: Add __pthread_key_create_internal alias.
10825 * pthreadP.h: Add prototypes.
10826
10827 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
10828 __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
10829 __pthread_rwlock_unlock aliases.
10830 * pthreadP.h: Add prototypes for new aliases.
10831
10832 * pthreadP.h (struct pthead_functions): Moved to...
10833 * sysdeps/pthread/pthread-functions.h: ...here. New file.
10834 * init.c (pthread_functions): Add initializers for new elements.
10835
10836 * cleanup_defer.c: Add __pthread_cleanup_push_defer and
10837 __pthread_cleanup_pop_restore aliases.
10838 * pthreadP.h: Add prototypes.
10839
10840 * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
10841 and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
10842 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
10843 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
10844 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
10845 * pthreadP.h: Adjust prototypes and callers.
10846
10847 2003-01-04 Ulrich Drepper <drepper@redhat.com>
10848
10849 * Makefile (tests): Add tst-cancel7.
10850 (tst-cancel7-ARGS): New variable.
10851 * tst-cancel7.c: New file.
10852
10853 * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
10854 around gcc defficiencies.
10855 * old_pthread_cond_signal.c: Likewise.
10856 * old_pthread_cond_timedwait.c: Likewise.
10857 * old_pthread_cond_wait.c: Likewise.
10858
10859 * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
10860
10861 2003-01-03 Ulrich Drepper <drepper@redhat.com>
10862
10863 * Makefile (tests): Add tst-cond7.
10864 * tst-cond7.c: New file.
10865
10866 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
10867 (condvar_cleanup): Get condvar address from the right place.
10868
10869 * atomic.h: Correct definitions of atomic_full_barrier,
10870 atomic_read_barrier, atomic_write_barrier.
10871
10872 * old_pthread_cond_broadcast.c: Make memory allocate and initialization
10873 race-free.
10874 * old_pthread_cond_signal.c: Likewise.
10875 * old_pthread_cond_timedwait.c: Likewise.
10876 * old_pthread_cond_wait.c: Likewise.
10877
10878 2003-01-03 Jakub Jelinek <jakub@redhat.com>
10879
10880 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
10881
10882 2003-01-03 Ulrich Drepper <drepper@redhat.com>
10883
10884 * pthreadP.h (pthread_cond_2_0_t): New type.
10885 (struct pthread_functions): Use new type for 2.0 condvar callbacks.
10886 Use new type for the 2.0 condvar function prototypes.
10887 * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
10888 * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
10889 parameter.
10890 * old_pthread_cond_destroy.c: Likewise.
10891 * old_pthread_cond_broadcast.c: Likewise. Lock appropriately.
10892 * old_pthread_cond_signal.c: Likewise.
10893 * old_pthread_cond_timedwait.c: Likewise.
10894 * old_pthread_cond_wait.c: Likewise.
10895
10896 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
10897 (__pthread_cond_wait): Don't save cancellation mode and seq value
10898 in same location.
10899
10900 * herrno.c (__h_errno_location): Don't define as weak.
10901
10902 2003-01-02 Jakub Jelinek <jakub@redhat.com>
10903
10904 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
10905 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
10906 and pthread_cond_wait.
10907 * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
10908 Renamed to...
10909 (__pthread_cond_broadcast_2_0): ... this.
10910 * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
10911 Renamed to...
10912 (__pthread_cond_destroy_2_0): ... this.
10913 * old_pthread_cond_init.c (__old_pthread_cond_init):
10914 Renamed to...
10915 (__pthread_cond_init_2_0): ... this.
10916 * old_pthread_cond_signal.c (__old_pthread_cond_signal):
10917 Renamed to...
10918 (__pthread_cond_signal_2_0): ... this.
10919 * old_pthread_cond_wait.c (__old_pthread_cond_wait):
10920 Renamed to...
10921 (__pthread_cond_wait_2_0): ... this.
10922 * pthread_cond_destroy.c: Include shlib-compat.h.
10923 (pthread_cond_destroy): Change strong_alias into versioned_symbol.
10924 * pthread_cond_init.c: Include shlib-compat.h.
10925 (pthread_cond_init): Change strong_alias into versioned_symbol.
10926 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
10927 fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
10928 fields.
10929 (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
10930 __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
10931 __pthread_cond_wait_2_0): New prototypes.
10932 (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
10933 __old_pthread_cond_init, __old_pthread_cond_signal,
10934 __old_pthread_cond_wait): Removed.
10935 * init.c: Include shlib-compat.h.
10936 (pthread_functions): Guard ptr___pthread_attr_init_2_0
10937 initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
10938 Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
10939 ptr___pthread_cond_*_2_0 fields.
10940 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
10941 pthread_cond_*@GLIBC_2.0 compatibility symbols.
10942
10943 * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
10944 LIBC_SIGACTION was not yet defined.
10945 [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
10946 [!defined LIBC_SIGACTION] (__sigaction): New function and
10947 libc_hidden_weak.
10948 [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
10949 [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
10950
10951 2003-01-02 Jakub Jelinek <jakub@redhat.com>
10952
10953 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
10954
10955 2003-01-02 Ulrich Drepper <drepper@redhat.com>
10956
10957 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
10958 New, larger type definition.
10959 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
10960 implementation.
10961 * Versions [libpthread]: Add definitions for new pthread_cond_*
10962 interfaces for version GLIBC_2.3.2.
10963 * pthread_cond_init.c: Update initialization for new type definition.
10964 * Makefile (libpthread-routines): Remove pthread_cond_wait,
10965 pthread_cond_timedwait, pthread_cond_signal, and
10966 pthread_cond_broadcast. Add old_pthread_cond_init,
10967 old_pthread_cond_destroy, old_pthread_cond_wait,
10968 old_pthread_cond_timedwait, old_pthread_cond_signal, and
10969 old_pthread_cond_broadcast.
10970 * old_pthread_cond_broadcast.c: New file.
10971 * old_pthread_cond_destroy.c: New file.
10972 * old_pthread_cond_init.c: New file.
10973 * old_pthread_cond_signal.c: New file.
10974 * old_pthread_cond_timedwait.c: New file.
10975 * old_pthread_cond_wait.c: New file.
10976 * pthreadP.h: Add prototypes for the compatibility interfaces.
10977
10978 * pthread_cond_destroy.c: Don't include <errno.h>.
10979
10980 2003-01-01 Ulrich Drepper <drepper@redhat.com>
10981
10982 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
10983 unnecessary zero offset when addressing MUTEX.
10984
10985 2002-12-31 Ulrich Drepper <drepper@redhat.com>
10986
10987 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
10988 __register_atfork.
10989 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
10990 for __register_atfork.
10991
10992 2002-12-31 Jakub Jelinek <jakub@redhat.com>
10993
10994 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
10995 instead of ASSEMBLER test macro.
10996
10997 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
10998 __libc_current_sigrtmax): Add libc_hidden_def.
10999
11000 * sysdeps/pthread/list.h: Remove assert.h include.
11001
11002 2002-12-31 Ulrich Drepper <drepper@redhat.com>
11003
11004 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
11005 __pthread_initialize_minimal_internal not
11006 __pthread_initialize_minimal.
11007
11008 2002-12-30 Ulrich Drepper <drepper@redhat.com>
11009
11010 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
11011 __pthread_initialize_minimal as hidden.
11012
11013 * init.c (__pthread_initialize_minimal_internal): Don't mark as
11014 constructor.
11015
11016 2002-12-31 Jakub Jelinek <jakub@redhat.com>
11017
11018 * Makefile ($(inst_libdir)/libpthread.so): Depend on
11019 $(common-objpfx)format.lds, include that into the output script.
11020 Fix comment.
11021 (extra-B-pthread.so): Change linuxthreads/ into nptl/.
11022
11023 2002-12-28 Andreas Jaeger <aj@suse.de>
11024
11025 * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
11026 nsec resolution changes.
11027 (xstat64_conv): Likewise.
11028 (xstat32_conv): Likewise.
11029 * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
11030 struct kernel_stat.
11031 * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
11032 structs stat and stat64.
11033 * time/time.h (__timespec_defined): Define for __USE_MISC.
11034 * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
11035
11036 2002-12-30 Jakub Jelinek <jakub@redhat.com>
11037
11038 * forward.c (FORWARD2): Renamed from FORWARD3. Remove unused export
11039 argument.
11040 (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
11041 (pthread_exit): Use strong_alias to avoid warnings.
11042 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
11043 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
11044 ptr___pthread_attr_init_2_*.
11045 * init.c (pthread_functions): Adjust.
11046
11047 2002-12-29 Ulrich Drepper <drepper@redhat.com>
11048
11049 * forward.c: Make all functions available by default again. It
11050 caused too much trouble.
11051
11052 * pt-siglongjmp.c: Removed.
11053
11054 2002-12-28 Jakub Jelinek <jakub@redhat.com>
11055
11056 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
11057 (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
11058 * sysdeps/i386/Makefile: New file.
11059 * sysdeps/i386/tcb-offsets.sym: New file.
11060 * sysdeps/pthread/tcb-offsets.h: New file.
11061 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
11062 Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
11063
11064 * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
11065 __register_atfork...
11066 (GLIBC_2.3.2): ...here.
11067
11068 2002-12-28 Ulrich Drepper <drepper@redhat.com>
11069
11070 * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
11071 pthread_attr_setstackaddr with __attribute_deprecated__.
11072
11073 2002-12-27 Jakub Jelinek <jakub@redhat.com>
11074
11075 * pt-system.c (system): Remove cancellation handling.
11076 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
11077 cancellation routines.
11078
11079 2002-12-28 Ulrich Drepper <drepper@redhat.com>
11080
11081 * descr.h: Include <dl-sysdep.h>.
11082 (struct pthread): Move header.data.list to the back of the struct.
11083 * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
11084 (MULTIPLE_THREADS_OFFSET): Adjust offset.
11085 (SYSINFO_OFFSEET): Likewise.
11086
11087 2002-12-27 Jakub Jelinek <jakub@redhat.com>
11088
11089 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
11090 Define.
11091 (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
11092 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
11093 DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
11094 (USE_DL_SYSINFO): Undef.
11095
11096 2002-12-22 Jakub Jelinek <jakub@redhat.com>
11097
11098 * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
11099 $(common-objpfx)libc.so.
11100 * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
11101 it is bigger than pipe buffer size even on arches with bigger
11102 page size.
11103 (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
11104
11105 2002-12-25 Ulrich Drepper <drepper@redhat.com>
11106
11107 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
11108 correct errno access for case that USE___THREAD is not defined.
11109
11110 2002-12-24 Ulrich Drepper <drepper@redhat.com>
11111
11112 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
11113 Patch by Marijn Ros <marijn@mad.scientist.com>.
11114
11115 2002-12-22 Roland McGrath <roland@redhat.com>
11116
11117 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
11118
11119 2002-12-20 Ulrich Drepper <drepper@redhat.com>
11120
11121 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
11122
11123 2002-12-19 Ulrich Drepper <drepper@redhat.com>
11124
11125 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
11126 NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
11127 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
11128
11129 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
11130 of int $0x80.
11131 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
11132 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
11133 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
11134 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
11135 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
11136 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
11137 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
11138 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
11139
11140 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
11141 sysenter.
11142 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
11143
11144 * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
11145
11146 * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
11147 in new TCB.
11148 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
11149 that sysinfo is properly initialized.
11150 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
11151 to 1 only for ld.so.
11152
11153 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
11154 RTLD_CORRECT_DYNAMIC_WEAK.
11155
11156 2002-12-19 Jakub Jelinek <jakub@redhat.com>
11157
11158 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
11159 Use return 0 as 6th argument to FORWARD4.
11160 * pthread_equal.c: Include pthreadP.h instead of pthread.h.
11161
11162 2002-12-18 Ulrich Drepper <drepper@redhat.com>
11163
11164 * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
11165 * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
11166 Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
11167 (INIT_SYSINFO): New #define.
11168 (TLS_TP_INIT): Use INIT_SYSINFO.
11169 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
11170 At test to make sure SYSINFO_OFFSET value is correct.
11171 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
11172
11173 2002-12-18 Jakub Jelinek <jakub@redhat.com>
11174
11175 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
11176 * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
11177 * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
11178 [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
11179 __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
11180 __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
11181 __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
11182
11183 2002-12-18 Ulrich Drepper <drepper@redhat.com>
11184
11185 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
11186 macro instead of using int $0x80 directly.
11187
11188 * sysdeps/pthread/bits/stdio-lock.h: New file.
11189 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
11190 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
11191 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
11192 * Makefile (routines): Add libc-lowlevelmutex.
11193
11194 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
11195 __i686.get_pc_thunk.dx.
11196
11197 2002-12-17 Jakub Jelinek <jakub@redhat.com>
11198
11199 * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
11200 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
11201 ($(objpfx)tst-cancel-wrappers.out): New rule.
11202 * tst-cancel-wrappers.sh: New test.
11203 * tst-locale1.c: Include signal.h.
11204 (uselocale): Test static linking of __libc_current_sigrt*.
11205
11206 2002-12-17 Ulrich Drepper <drepper@redhat.com>
11207
11208 * Makefile (tests): Add tst-cancel6.
11209 * tst-cancel6.c: New file
11210
11211 2002-12-17 Jakub Jelinek <jakub@redhat.com>
11212
11213 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
11214 Define meaningfully for assembler as well.
11215 * pthreadP.h (struct pthread_functions): Remove
11216 ptr_pthread_attr_init field. Add ptr_pthread_attr_init_2_0
11217 and ptr_pthread_attr_init_2_1 fields.
11218 * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
11219 and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
11220 * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
11221 (FORWARD3): Define using FORWARD4.
11222 (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
11223 versions.
11224 * pt-system.c: Remove duplicate stdlib.h include.
11225
11226 2002-12-16 Ulrich Drepper <drepper@redhat.com>
11227
11228 * sem_init.c: Define sem_init@GLIBC_2.0.
11229 * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
11230 * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
11231
11232 * flockfile.c: Moved to...
11233 * sysdeps/pthread/flockfile.c: ...here. New file.
11234 * funlockfile.c: Moved to...
11235 * sysdeps/pthread/funlockfile.c: ...here. New file.
11236 * ftrylockfile.c: Moved to...
11237 * sysdeps/pthread/ftrylockfile.c: ...here. New file.
11238
11239 2002-12-16 Jakub Jelinek <jakub@redhat.com>
11240
11241 * libc-cancellation.c: Guard both function with
11242 #if !defined NOT_IN_libc.
11243 * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
11244 automatically provided pthread wrappers.
11245 * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
11246 CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
11247 nor in libpthread.
11248 * pt-open.c: Removed.
11249 * pt-fcntl.c: Removed.
11250 * pt-fsync.c: Removed.
11251 * pt-lseek.c: Removed.
11252 * pt-msgrcv.c: Removed.
11253 * pt-msgsnd.c: Removed.
11254 * pt-msync.c: Removed.
11255 * pt-nanosleep.c: Removed.
11256 * pt-open64.c: Removed.
11257 * pt-pause.c: Removed.
11258 * pt-pread.c: Removed.
11259 * pt-pread64.c: Removed.
11260 * pt-pwrite.c: Removed.
11261 * pt-pwrite64.c: Removed.
11262 * pt-read.c: Removed.
11263 * pt-recv.c: Removed.
11264 * pt-recvfrom.c: Removed.
11265 * pt-recvmsg.c: Removed.
11266 * pt-send.c: Removed.
11267 * pt-sendto.c: Removed.
11268 * pt-sigtimedwait.c: Removed.
11269 * pt-sigwait.c: Removed.
11270 * pt-wait.c: Removed.
11271 * pt-waitpid.c: Removed.
11272 * pt-write.c: Removed.
11273 * pt-accept.c: Removed.
11274 * pt-close.c: Removed.
11275 * pt-connect.c: Removed.
11276 * pt-lseek64.c: Removed.
11277 * pt-sendmsg.c: Removed.
11278 * pt-tcdrain.c: Removed.
11279
11280 2002-12-15 Ulrich Drepper <drepper@redhat.com>
11281
11282 * init.c (__pthread_initialize_minimal_internal): Renamed from
11283 __pthread_initialize_minimal. Make old name an alias. This
11284 converts a normal relocation into a relative relocation.
11285
11286 * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
11287
11288 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
11289 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
11290 * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
11291 pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
11292 pt-sigwaitinfo, pt-waitid, and pt-writev.
11293 * pt-creat.c: Removed.
11294 * pt-poll.c: Removed.
11295 * pt-pselect.c: Removed.
11296 * pt-readv.c: Removed.
11297 * pt-select.c: Removed.
11298 * pt-sigpause.c: Removed.
11299 * pt-sigsuspend.c: Removed.
11300 * pt-sigwaitinfo.c: Removed.
11301 * pt-waitid.c: Removed.
11302 * pt-writev.c: Removed.
11303
11304 * init.c (pthread_functions): New variable.
11305 (__pthread_initialize_minimal): Pass pointer to pthread_functions
11306 (or NULL) to __libc_pthread_init.
11307 * forward.c: Rewrite to use __libc:pthread_functions array to get
11308 function addresses.
11309 * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
11310 prototype.
11311 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
11312 Take new parameter. Copy content of variable pointed to by it
11313 to __libc_pthread_init.
11314
11315 * pthreadP.h (struct pthread_functions): New type.
11316 (__libc_pthread_init): Declare.
11317
11318 * pthread_attr_destroy.c: Add namespace protected alias.
11319 * pthread_attr_getdetachstate.c: Likewise.
11320 * pthread_attr_getinheritsched.c: Likewise.
11321 * pthread_attr_getschedparam.c: Likewise.
11322 * pthread_attr_getschedpolicy.c: Likewise.
11323 * pthread_attr_getscope.c: Likewise.
11324 * pthread_attr_setdetachstate.c: Likewise.
11325 * pthread_attr_setinheritsched.c: Likewise.
11326 * pthread_attr_setschedparam.c: Likewise.
11327 * pthread_attr_setschedpolicy.c: Likewise.
11328 * pthread_attr_setscope.c: Likewise.
11329 * pthread_cond_broadcast.c: Likewise.
11330 * pthread_cond_destroy.c: Likewise.
11331 * pthread_cond_init.c: Likewise.
11332 * pthread_cond_signal.c: Likewise.
11333 * pthread_cond_wait.c: Likewise.
11334 * pthread_condattr_destroy.c: Likewise.
11335 * pthread_condattr_init.c: Likewise.
11336 * pthread_equal.c: Likewise.
11337 * pthread_exit.c: Likewise.
11338 * pthread_getschedparam.c: Likewise.
11339 * pthread_self.c: Likewise.
11340 * pthread_setcancelstate.c: Likewise.
11341 * pthread_setschedparam.c: Likewise.
11342 * pthread_mutex_destroy.c: Likewise.
11343 * pthread_mutex_init.c: Likewise.
11344 * pthreadP.h: Add prototypes for the aliases.
11345
11346 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
11347 multiple_threads member in correct TCB to 1.
11348
11349 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
11350 SINGLE_THREAD_P. If in libc or libpthread examine multiple_thread
11351 member of thread decriptor, otherwise return unconditionally 1.
11352
11353 2002-12-14 Ulrich Drepper <drepper@redhat.com>
11354
11355 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
11356 regular Linux version. Remove file.
11357 * sysdeps/unix/sysv/linux/connect.S: Likewise. Remove file.
11358 * sysdeps/unix/sysv/linux/llseek.c: Likewise. Remove file.
11359 * sysdeps/unix/sysv/linux/msgrcv.c: Likewise. Remove file.
11360 * sysdeps/unix/sysv/linux/msgsnd.c: Likewise. Remove file.
11361 * sysdeps/unix/sysv/linux/open64.c: Likewise. Remove file.
11362 * sysdeps/unix/sysv/linux/poll.c: Likewise. Remove file.
11363 * sysdeps/unix/sysv/linux/pread.c: Likewise. Remove file.
11364 * sysdeps/unix/sysv/linux/pread64.c: Likewise. Remove file.
11365 * sysdeps/unix/sysv/linux/pselect.c: Likewise. Remove file.
11366 * sysdeps/unix/sysv/linux/pwrite.c: Likewise. Remove file.
11367 * sysdeps/unix/sysv/linux/pwrite64.c: Likewise. Remove file.
11368 * sysdeps/unix/sysv/linux/readv.c: Likewise. Remove file.
11369 * sysdeps/unix/sysv/linux/recv.S: Likewise. Remove file.
11370 * sysdeps/unix/sysv/linux/recvfrom.S: Likewise. Remove file.
11371 * sysdeps/unix/sysv/linux/recvmsg.S: Likewise. Remove file.
11372 * sysdeps/unix/sysv/linux/send.S: Likewise. Remove file.
11373 * sysdeps/unix/sysv/linux/sendmsg.S: Likewise. Remove file.
11374 * sysdeps/unix/sysv/linux/sendto.S: Likewise. Remove file.
11375 * sysdeps/unix/sysv/linux/sigpause.c: Likewise. Remove file.
11376 * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise. Remove file.
11377 * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise. Remove file.
11378 * sysdeps/unix/sysv/linux/sigwait.c: Likewise. Remove file.
11379 * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise. Remove file.
11380 * sysdeps/unix/sysv/linux/system.c: Likewise. Remove file.
11381 * sysdeps/unix/sysv/linux/tcdrain.c: Likewise. Remove file.
11382 * sysdeps/unix/sysv/linux/wait.c: Likewise. Remove file.
11383 * sysdeps/unix/sysv/linux/waitid.c: Likewise. Remove file.
11384 * sysdeps/unix/sysv/linux/waitpid.c: Likewise. Remove file.
11385 * sysdeps/unix/sysv/linux/writev.c: Likewise. Remove file.
11386 * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise. Remove file.
11387
11388 2002-12-14 Jakub Jelinek <jakub@redhat.com>
11389
11390 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
11391 * sysdeps/unix/sysv/linux/open.c: Removed.
11392 * sysdeps/unix/sysv/linux/fsync.c: Removed.
11393 * sysdeps/unix/sysv/linux/lseek.c: Removed.
11394 * sysdeps/unix/sysv/linux/msync.c: Removed.
11395 * sysdeps/unix/sysv/linux/read.c: Removed.
11396 * sysdeps/unix/sysv/linux/close.c: Removed.
11397 * sysdeps/unix/sysv/linux/creat.c: Removed.
11398 * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
11399 * sysdeps/unix/sysv/linux/pause.c: Removed.
11400 * sysdeps/unix/sysv/linux/select.c: Removed.
11401 * sysdeps/unix/sysv/linux/write.c: Removed.
11402
11403 2002-12-14 Ulrich Drepper <drepper@redhat.com>
11404
11405 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
11406 element in TCB to see whether locking is needed.
11407
11408 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
11409 MULTIPLE_THREADS_OFFSET value is correct.
11410
11411 * sysdeps/unix/sysv/linux/close.c: New file.
11412 * sysdeps/unix/sysv/linux/connect.S: New file.
11413 * sysdeps/unix/sysv/linux/creat.c: New file.
11414 * sysdeps/unix/sysv/linux/fsync.c: New file.
11415 * sysdeps/unix/sysv/linux/llseek.c: New file.
11416 * sysdeps/unix/sysv/linux/lseek.c: New file.
11417 * sysdeps/unix/sysv/linux/msgrcv.c: New file.
11418 * sysdeps/unix/sysv/linux/msgsnd.c: New file.
11419 * sysdeps/unix/sysv/linux/msync.c: New file.
11420 * sysdeps/unix/sysv/linux/nanosleep.c: New file.
11421 * sysdeps/unix/sysv/linux/open.c: New file.
11422 * sysdeps/unix/sysv/linux/open64.c: New file.
11423 * sysdeps/unix/sysv/linux/pause.c: New file.
11424 * sysdeps/unix/sysv/linux/poll.c: New file.
11425 * sysdeps/unix/sysv/linux/pread.c: New file.
11426 * sysdeps/unix/sysv/linux/pread64.c: New file.
11427 * sysdeps/unix/sysv/linux/pselect.c: New file.
11428 * sysdeps/unix/sysv/linux/pwrite.c: New file.
11429 * sysdeps/unix/sysv/linux/pwrite64.c: New file.
11430 * sysdeps/unix/sysv/linux/readv.c: New file.
11431 * sysdeps/unix/sysv/linux/recv.S: New file.
11432 * sysdeps/unix/sysv/linux/recvfrom.S: New file.
11433 * sysdeps/unix/sysv/linux/recvmsg.S: New file.
11434 * sysdeps/unix/sysv/linux/select.c: New file.
11435 * sysdeps/unix/sysv/linux/send.S: New file.
11436 * sysdeps/unix/sysv/linux/sendmsg.S: New file.
11437 * sysdeps/unix/sysv/linux/sendto.S: New file.
11438 * sysdeps/unix/sysv/linux/sigpause.c: New file.
11439 * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
11440 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
11441 * sysdeps/unix/sysv/linux/sigwait.c: New file.
11442 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
11443 * sysdeps/unix/sysv/linux/system.c: New file.
11444 * sysdeps/unix/sysv/linux/tcdrain.c: New file.
11445 * sysdeps/unix/sysv/linux/wait.c: New file.
11446 * sysdeps/unix/sysv/linux/waitid.c: New file.
11447 * sysdeps/unix/sysv/linux/waitpid.c: New file.
11448 * sysdeps/unix/sysv/linux/writev.c: New file.
11449 * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
11450
11451 * pt-readv.c: Fix comment.
11452
11453 2002-12-14 Jakub Jelinek <jakub@redhat.com>
11454
11455 * tst-cleanup1.c: Include stdlib.h.
11456
11457 * tst-cancel5.c: New test.
11458 * Makefile (tests): Add tst-cancel5.
11459 (tst-cancel5): Link against libc.so libpthread.so in that order.
11460
11461 2002-12-13 Ulrich Drepper <drepper@redhat.com>
11462
11463 * forward.c (test_loaded): Prevent recursive calls.
11464
11465 * Makefile (routines): Add libc-cancellation.
11466 * libc-cancellation.c: New file.
11467 * descr.h (struct pthread): Add multiple_threads field.
11468 * allocatestack.c (allocate_stack): Initialize multiple_header field of
11469 new thread descriptor to 1.
11470 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
11471 Initialize multiple_thread field after successful thread creation.
11472 * cancellation.c (__do_cancel): Move to pthreadP.h.
11473 (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
11474 (__pthread_disable_asynccancel): Add internal_function attribute.
11475 * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
11476 * pthread_setcancelstate.c: Likewise.
11477 * pthread_setcanceltype.c: Likewise.
11478 * pthread_exit.c: Likewise.
11479 * pthreadP.h (CANCELLATION_P): Likewise.
11480 (__do_cancel): Define as static inline.
11481 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
11482 (__libc_enable_asynccancel, __libc_disable_asynccancel): New
11483 declarations.
11484 * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
11485 fields. Define MULTIPLE_THREADS_OFFSET.
11486 * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
11487 declaration.
11488 * sysdeps/unix/sysv/linux/accept.S: New file.
11489 * sysdeps/unix/sysv/linux/read.c: New file.
11490 * sysdeps/unix/sysv/linux/write.c: New file.
11491 * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
11492 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
11493 initialization of __libc_locking_needed.
11494 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
11495 __libc_locking_needed, use multiple_threads field in TCB.
11496 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
11497
11498 2002-12-12 Ulrich Drepper <drepper@redhat.com>
11499
11500 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
11501 version.
11502 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
11503
11504 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
11505 access to __libc_locking_needed for PIC.
11506
11507 2002-12-12 Jakub Jelinek <jakub@redhat.com>
11508
11509 * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
11510 declare for libc.so.
11511 (__libc_lock_init, __libc_lock_init_recursive): Change into comma
11512 expression.
11513 (__libc_lock_lock): Put into statement expression.
11514 (__libc_lock_unlock): Remove trailing semicolon.
11515 * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
11516
11517 2002-12-12 Roland McGrath <roland@redhat.com>
11518
11519 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
11520 "m" constraint to refer to __libc_locking_needed. Declare it here.
11521
11522 2002-12-12 Ulrich Drepper <drepper@redhat.com>
11523
11524 * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
11525 * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
11526 Initialize __libc_locking_needed.
11527 * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
11528 instead of __register_pthread_fork_handler.
11529 * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
11530 * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
11531 fork-gen with libc_pthread_init.
11532 * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
11533 of __register_pthread_fork_handler.
11534 * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
11535 of __register_pthread_fork_handler.
11536 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
11537 __libc_locking_needed to determine whether lock prefix can be avoided.
11538 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
11539
11540 2002-12-11 Ulrich Drepper <drepper@redhat.com>
11541
11542 * Makefile (tests): Add tst-cleanup1.
11543 * tst-cleanup1.c: New file.
11544 * cancellation.c (__cleanup_thread): Removed.
11545 (__do_cancel): Remove call to __cleanup_thread.
11546 * pthreadP.h: Remove __cleanup_thread prorotype.
11547
11548 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
11549 Remember function and argument even if cancellation handler
11550 function is not available.
11551 (__libc_cleanup_region_end): Execute registered function directly if
11552 pthread functions are not available.
11553 (__libc_cleanup_end): Likewise.
11554
11555 * init.c (__pthread_initialize_minimal): Fix initialization in
11556 static lib by preventing gcc from being too clever.
11557
11558 2002-12-10 Ulrich Drepper <drepper@redhat.com>
11559
11560 * init.c (__pthread_initialize_minimal): Remove unneccesary
11561 sigaddset call.
11562
11563 * Makefile (tests): We can run tst-locale2 now.
11564
11565 2002-12-09 Ulrich Drepper <drepper@redhat.com>
11566
11567 * Versions: Remove duplicated sigwait entry.
11568
11569 2002-12-08 Ulrich Drepper <drepper@redhat.com>
11570
11571 * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
11572 inside libpthread.
11573
11574 * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
11575
11576 * pthreadP.h: Declare __pthread_enable_asynccancel and
11577 __pthread_disable_asynccancel.
11578 (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
11579 (CANCEL_RESET): Use __pthread_disable_asynccancel.
11580 * cancellation.c (__pthread_enable_asynccancel): New function.
11581 (__pthread_disable_asynccancel): New function.
11582 * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
11583 * pt-close.c: Likewise.
11584 * pt-connect.c: Likewise.
11585 * pt-creat.c: Likewise.
11586 * pt-fcntl.c: Likewise.
11587 * pt-fsync.c: Likewise.
11588 * pt-lseek.c: Likewise.
11589 * pt-lseek64.c: Likewise.
11590 * pt-msgrcv.c: Likewise.
11591 * pt-msgsnd.c: Likewise.
11592 * pt-msync.c: Likewise.
11593 * pt-nanosleep.c: Likewise.
11594 * pt-open.c: Likewise.
11595 * pt-open64.c: Likewise.
11596 * pt-pause.c: Likewise.
11597 * pt-poll.c: Likewise.
11598 * pt-pread.c: Likewise.
11599 * pt-pread64.c: Likewise.
11600 * pt-pselect.c: Likewise.
11601 * pt-pwrite.c: Likewise.
11602 * pt-pwrite64.c: Likewise.
11603 * pt-read.c: Likewise.
11604 * pt-readv.c: Likewise.
11605 * pt-recv.c: Likewise.
11606 * pt-recvfrom.c: Likewise.
11607 * pt-recvmsg.c: Likewise.
11608 * pt-select.c: Likewise.
11609 * pt-send.c: Likewise.
11610 * pt-sendmsg.c: Likewise.
11611 * pt-sendto.c: Likewise.
11612 * pt-sigpause.c: Likewise.
11613 * pt-sigsuspend.c: Likewise.
11614 * pt-sigtimedwait.c: Likewise.
11615 * pt-sigwait.c: Likewise.
11616 * pt-sigwaitinfo.c: Likewise.
11617 * pt-system.c: Likewise.
11618 * pt-tcdrain.c: Likewise.
11619 * pt-wait.c: Likewise.
11620 * pt-waitid.c: Likewise.
11621 * pt-waitpid.c: Likewise.
11622 * pt-write.c: Likewise.
11623 * pt-writev.c: Likewise.
11624 * pthread_join.c: Likewise.
11625 * pthread_timedjoin.c: Likewise.
11626
11627 * pt-sigpause.c (sigsuspend): Call __sigsuspend.
11628 (__xpg_sigpause): New function.
11629 * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
11630
11631 2002-12-07 Ulrich Drepper <drepper@redhat.com>
11632
11633 * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
11634
11635 * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
11636 _GI_pthread_cleanup_pop to pthreadP.h.
11637
11638 * ftrylockfile.c: Use _IO_lock_trylock instead of
11639 pthread_mutex_trylock.
11640
11641 * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
11642 (CANCEL_RESET): Likewise.
11643 (__pthread_setcanceltype_): Declare.
11644 (__pthread_mutex_lock_internal): Declare.
11645 (__pthread_mutex_unlock_internal): Declare.
11646 (__pthread_once_internal): Declare.
11647 (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
11648 (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
11649
11650 * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
11651 and pthread_mutex_unlock.
11652 * pthread_cond_wait.c: Likewise.
11653 * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
11654 * pthread_mutex_unlock.c: Likewise.
11655
11656 * pthread_setcanceltype.c: Add additional alias
11657 __pthread_setcanceltype.
11658
11659 * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
11660 * sem_open.c (sem_open): Likewise.
11661 Use __libc_open, __libc_write, and __libc_close instead of
11662 open, write, and close respectively.
11663
11664 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
11665 Rewrite as statement expression since it must return a value.
11666
11667 * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
11668 * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
11669 __pthread_kill.
11670
11671 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
11672 alias __pthread_once_internal.
11673
11674 * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
11675
11676 2002-12-06 Ulrich Drepper <drepper@redhat.com>
11677
11678 * Makefile (tests): Add tst-stdio1 and tst-stdio2.
11679 * tst-stdio1.c: New file.
11680 * tst-stdio2.c: New file.
11681
11682 * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
11683
11684 * Makefile (tests): Comment out tst-locale2 for now.
11685 (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
11686
11687 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
11688 -D_IO_MTSAFE_IO.
11689 * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
11690 Use _IO_lock_init instead of explicit assignment.
11691
11692 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
11693 Define __libc_lock_* and __libc_lock_recursive macros with
11694 lowlevellock macros, not pthread mutexes.
11695
11696 * flockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_lock instead
11697 of pthread_mutex_lock.
11698 * funlockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_unlock
11699 instead of pthread_mutex_unlock.
11700
11701 2002-12-06 Roland McGrath <roland@redhat.com>
11702
11703 * allocatestack.c (__stack_user): Use uninitialized defn.
11704 * init.c (__pthread_initialize_minimal): Initialize it here.
11705
11706 2002-12-05 Roland McGrath <roland@redhat.com>
11707
11708 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
11709 string.
11710 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
11711
11712 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
11713 missing & here too.
11714
11715 2002-12-05 Ulrich Drepper <drepper@redhat.com>
11716
11717 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
11718 lowlevellock.
11719 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
11720 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
11721 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
11722 * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
11723 for __libc_lock_* macros.
11724 * Makefile (routines): Add libc-lowlevellock.
11725
11726 2002-10-09 Roland McGrath <roland@redhat.com>
11727
11728 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
11729 Under [__PIC__], call the function via the pointer fetched for
11730 comparison rather than a call by name that uses the PLT.
11731 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
11732 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
11733 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
11734 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
11735 (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
11736
11737 2002-12-04 Roland McGrath <roland@redhat.com>
11738
11739 * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
11740
11741 * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
11742 * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
11743
11744 * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
11745
11746 2002-12-04 Ulrich Drepper <drepper@redhat.com>
11747
11748 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
11749 a completely opaque, non-integer type.
11750 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
11751
11752 2002-12-05 Jakub Jelinek <jakub@redhat.com>
11753
11754 * sysdeps/i386/tls.h: Include stdlib.h.
11755 * sysdeps/x86_64/tls.h: Likewise.
11756
11757 2002-12-04 Ulrich Drepper <drepper@redhat.com>
11758
11759 * Makefile (tests): Add tst-locale2.
11760 (tests-static): Likewise.
11761 * tst-locale2.c: New file.
11762
11763 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
11764 volatile and add memory clobbers to lock operations.
11765
11766 2002-12-03 Ulrich Drepper <drepper@redhat.com>
11767
11768 * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
11769 * sysdeps/i386/i486/bits/atomic.h: New file.
11770 * sysdeps/i386/i586/bits/atomic.h: New file.
11771 * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
11772 include i486 version.
11773 * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
11774 * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
11775 Patch by Marijn Ros <marijn@mad.scientist.com>.
11776
11777 * allocatestack.c (get_cached_stack): Don't crash if we first
11778 found a stack with a larger size then needed.
11779 Reported by Hui Huang <hui.huang@sun.com>.
11780
11781 * Makefile (tests): Add tst-sysconf.
11782 * tst-sysconf.c: New file.
11783
11784 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
11785 PTHREAD_THREADS_MAX.
11786
11787 2002-12-02 Roland McGrath <roland@redhat.com>
11788
11789 * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
11790 Declare using hidden_proto instead of attribute_hidden, so there are
11791 non-.hidden static symbols for gdb to find.
11792 (__pthread_keys): Likewise.
11793 * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
11794 * allocatestack.c (__stack_user): Likewise.
11795 * pthread_create.c (__pthread_keys): Likewise.
11796 (__nptl_threads_events, __nptl_last_event): Make these static instead
11797 of hidden.
11798 * pthread_key_create.c (__pthread_pthread_keys_max,
11799 __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
11800
11801 2002-12-02 Ulrich Drepper <drepper@redhat.com>
11802
11803 * Makefile (tests): Add tst-locale1. If buid-static is yes link
11804 statically.
11805 * tst-locale1.c: New file.
11806
11807 * pthread_cond_timedwait.c: Include <stdlib.h>.
11808
11809 * Makefile (tests): Add tst-fork2 and tst-fork3.
11810 * tst-fork2.c: New file.
11811 * tst-fork3.c: New file.
11812
11813 2002-11-28 Ulrich Drepper <drepper@redhat.com>
11814
11815 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
11816
11817 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
11818 require it to 200112L.
11819
11820 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
11821 instruction only if HAVE_CMOV is defined.
11822 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
11823
11824 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
11825
11826 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
11827
11828 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
11829
11830 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
11831
11832 2002-11-27 Ulrich Drepper <drepper@redhat.com>
11833
11834 * sysdeps/x86_64/bits/atomic.h: New file.
11835
11836 * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
11837 16-bit operations.
11838
11839 * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
11840 possible since gettid cannot fail.
11841
11842 * sysdeps/x86_64/pthreaddef.h: New file.
11843
11844 * sysdeps/i386/pthreaddef.h (gettid): Removed.
11845
11846 * sysdeps/x86_64/pthread_spin_init.c: New file.
11847 * sysdeps/x86_64/pthread_spin_lock.c: New file.
11848 * sysdeps/x86_64/pthread_spin_trylock.c: New file.
11849 * sysdeps/x86_64/pthread_spin_unlock.c: New file.
11850
11851 * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
11852 Add missing lock prefix. Minute optimization.
11853
11854 * tst-spin2.c (main): Also check successful trylock call.
11855
11856 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
11857 syscall. Fix typo in case INTERNAL_SYSCALL is not used.
11858
11859 * sysdeps/i386/pthread_spin_destroy.c: Moved to...
11860 * sysdeps/pthread/pthread_spin_destroy.c: ...here. New file.
11861
11862 * sysdeps/i386/pthread_sigmask.c: Removed. Use the generic code.
11863 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
11864 value in case of an error. Add support for INTERNAL_SYSCALL.
11865
11866 * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
11867 value in case of an error.
11868
11869 * sysdeps/x86_64/tls.h: New file.
11870
11871 2002-11-26 Ulrich Drepper <drepper@redhat.com>
11872
11873 * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface. It now
11874 takes the array member name and the index as parameters.
11875 (THREAD_SETMEM_NC): Likewise.
11876 * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
11877 * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
11878 interfaces.
11879
11880 * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
11881 to decide which code to use.
11882 (THREAD_SETMEM_NC): Likewise.
11883
11884 * allocatestack.c (queue_stack): Don't remove stack from list here.
11885 Do it in the caller. Correct condition to prematurely terminate
11886 loop to free stacks.
11887 (__deallocate_stack): Remove stack from list here.
11888
11889 2002-11-26 Ulrich Drepper <drepper@redhat.com>
11890
11891 * Makefile (tests): Add tst-stack1.
11892 * tst-stack1.c: New file.
11893
11894 * allocatestack.c (allocate_stack): Initialize the TCB on a user
11895 provided stack.
11896
11897 * pthread_attr_getstack.c: Return bottom of the thread area.
11898
11899 2002-11-25 Ulrich Drepper <drepper@redhat.com>
11900
11901 * Makefile (libpthread-routines): Add pt-allocrtsig and
11902 pthread_kill_other_threads.
11903 * pt-allocrtsig.c: New file.
11904 * pthread_kill_other_threads.c: New file.
11905 * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
11906 all three functions.
11907 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
11908 allocrtsig.
11909 * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
11910 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
11911 and __libc_allocate_rtsig_private.
11912 * Versions (libpthread): Export pthread_kill_other_threads_np,
11913 __libc_current_sigrtmin, and __libc_current_sigrtmax.
11914
11915 2002-11-24 Ulrich Drepper <drepper@redhat.com>
11916
11917 * allocatestack.c (allocate_stack): stackaddr in attribute points to
11918 the end of the stack. Adjust computations.
11919 When mprotect call fails dequeue stack and free it.
11920 * pthread_attr_setstack.c: Store top of the stack in stackaddr
11921 attribute.
11922 * pthread_getattr_np.c: Likewise.
11923
11924 * descr.h (IS_DETACHED): Add some more parenthesis to prevent
11925 surprises.
11926
11927 2002-11-23 Ulrich Drepper <drepper@redhat.com>
11928
11929 * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
11930 attribute definitions. Patch by Luca Barbieri <ldb@ldb.ods.org>.
11931
11932 2002-11-22 Ulrich Drepper <drepper@redhat.com>
11933
11934 * pthread_getspecific.c: Optimize access to first 2nd-level array.
11935 * pthread_setspecific.c: Likewise.
11936
11937 2002-11-21 Ulrich Drepper <drepper@redhat.com>
11938
11939 * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
11940 definitions. Get them from the official place.
11941 * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
11942
11943 * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
11944 Use new CLONE_ flags in clone() calls.
11945
11946 * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
11947 * sysdeps/unix/sysv/linux/i386/fork.c: New file.
11948
11949 * Versions: Add pthread_* functions for libc.
11950 * forward.c: New file.
11951
11952 * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
11953 errno-loc.
11954 * herrno.c: New file.
11955 * res.c: New file.
11956
11957 * Makefile (libpthread-routines): Remove sem_post, sem_wait,
11958 sem_trywait, and sem_timedwait. Add herrno and res.
11959 * sem_init.c: Don't initialize lock and waiters members.
11960 * sem_open.c: Likewise.
11961 * sem_post.c: Removed.
11962 * sem_wait.c: Removed.
11963 * sem_trywait.c: Removed.
11964 * sem_timedwait.c: Removed.
11965 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
11966 Includes full implementations of sem_post, sem_wait, sem_trywait,
11967 and sem_timedwait.
11968 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
11969 for new implementation.
11970 * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
11971 and waiters fields.
11972
11973 * tst-sem3.c: Improve error message.
11974 * tst-signal3.c: Likewise.
11975
11976 * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
11977 to tell the kernel about the termination futex and to initialize tid
11978 member. Don't initialize main_thread.
11979 * descr.h (struct pthread): Remove main_thread member.
11980 * cancelllation.c (__do_cancel): Remove code handling main thread.
11981 The main thread is not special anymore.
11982
11983 * allocatestack.c (__reclaim_stacks): Mark stacks as unused. Add
11984 size of the stacks to stack_cache_actsize.
11985
11986 * pt-readv.c: Add missing "defined".
11987 * pt-sigwait.c: Likewise.
11988 * pt-writev.c: Likewise.
11989
11990 2002-11-09 Ulrich Drepper <drepper@redhat.com>
11991
11992 * Versions: Export __connect from libpthread.
11993 Patch by Luca Barbieri <ldb@ldb.ods.org>.
11994
11995 * Makefile (libpthread-routines): Add pt-raise.
11996 * sysdeps/unix/sysv/linux/raise.c: New file.
11997 * sysdeps/unix/sysv/linux/pt-raise.c: New file.
11998 * sysdeps/generic/pt-raise.c: New file.
11999
12000 * pthread_cond_init.c: Initialize all data elements of the condvar
12001 structure. Patch by Luca Barbieri <ldb@ldb.ods.org>.
12002
12003 * pthread_attr_init.c: Actually implement 2.0 compatibility version.
12004 * pthread_create.c: Likewise.
12005
12006 * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
12007 * tst-key1.c: New file.
12008 * tst-key2.c: New file.
12009 * tst-key3.c: New file.
12010
12011 * Versions: Export pthread_detach for version GLIBC_2.0.
12012 Reported by Saurabh Desai <sdesai@austin.ibm.com>.
12013
12014 2002-11-08 Ulrich Drepper <drepper@redhat.com>
12015
12016 * pthread_key_create.c: Terminate search after an unused key was found.
12017 Patch by Luca Barbieri <ldb@ldb.ods.org>.
12018
12019 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
12020 Patch by Luca Barbieri <ldb@ldb.ods.org>.
12021
12022 2002-10-10 Ulrich Drepper <drepper@redhat.com>
12023
12024 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
12025 dynamic lookup for errno in PIC.
12026
12027 * allocatestack.c (get_cached_stack): Rearrange code slightly to
12028 release the stack lock as soon as possible.
12029 Call _dl_allocate_tls_init for TCB from the cache to re-initialize
12030 the static TLS block.
12031 (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
12032
12033 * cancellation.c: Renamed from cancelation.c.
12034 * Makefile: Adjust accordingly.
12035 * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
12036 * cleanup_defer.c: Use CANCELLATION_P.
12037 * pthread_testcancel.c: Likewise.
12038 * descr.h: Fix spelling in comments.
12039 * init.c: Likewise.
12040 * pthread_getattr_np.c: Likewise.
12041 * pthread_getschedparam.c: Likewise.
12042 * pthread_setschedparam.c: Likewise.
12043 * Versions: Likewise.
12044
12045 * pt-pselect.c: New file.
12046 * Makefile (libpthread-routines): Add pt-pselect.
12047 * Versions: Add pselect.
12048
12049 * tst-cancel4.c: New file.
12050 * Makefile (tests): Add tst-cancel4.
12051
12052 2002-10-09 Ulrich Drepper <drepper@redhat.com>
12053
12054 * pthread_mutex_lock.c: Always record lock ownership.
12055 * pthread_mutex_timedlock.c: Likewise.
12056 * pthread_mutex_trylock.c: Likewise.
12057
12058 * pt-readv.c: New file.
12059 * pt-writev.c: New file.
12060 * pt-creat.c: New file.
12061 * pt-msgrcv.c: New file.
12062 * pt-msgsnd.c: New file.
12063 * pt-poll.c: New file.
12064 * pt-select.c: New file.
12065 * pt-sigpause.c: New file.
12066 * pt-sigsuspend.c: New file.
12067 * pt-sigwait.c: New file.
12068 * pt-sigwaitinfo.c: New file.
12069 * pt-waitid.c: New file.
12070 * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
12071 pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
12072 pt-sigwait, pt-sigwaitinfo, and pt-waitid.
12073 * Versions: Add all the new functions.
12074
12075 * tst-exit1.c: New file.
12076 * Makefile (tests): Add tst-exit1.
12077
12078 * sem_timedwait.c: Minor optimization for more optimal fastpath.
12079
12080 2002-10-08 Ulrich Drepper <drepper@redhat.com>
12081
12082 * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
12083
12084 * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
12085 call. pthread_join is an official cancellation point.
12086 * pthread_timedjoin.c: Likewise.
12087
12088 * pthread_cond_wait.c: Revert order in which internal lock are dropped
12089 and the condvar's mutex are retrieved.
12090 * pthread_cond_timedwait.c: Likewise.
12091 Reported by dice@saros.East.Sun.COM.
12092
12093 2002-10-07 Ulrich Drepper <drepper@redhat.com>
12094
12095 * pthreadP.h: Cut out all type definitions and move them...
12096 * sysdeps/unix/sysv/linux/internaltypes.h: ...here. New file.
12097 * pthreadP.h: Include <internaltypes.h>.
12098
12099 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
12100 performance tweaks.
12101
12102 * sem_trywait.c: Shuffle #includes around to get right order.
12103 * sem_timedwait.c: Likewise.
12104 * sem_post.c: Likewise.
12105 * sem_wait.c: Likewise.
12106
12107 * nptl 0.3 released.
12108
12109 * Makefile (tests): Add tst-signal3.
12110 * tst-signal3.c: New file.
12111
12112 2002-10-05 Ulrich Drepper <drepper@redhat.com>
12113
12114 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
12115 the asms modify the sem object.
12116 (__lll_sem_timedwait): Now takes struct sem* as first parameter.
12117
12118 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
12119 the actual members.
12120 * pthreadP.h (struct sem): New type. Actual semaphore type.
12121 * semaphoreP.h: Include pthreadP.h.
12122 * sem_getvalue.c: Adjust to sem_t change.
12123 * sem_init.c: Likewise.
12124 * sem_open.c: Likewise.
12125 * sem_post.c: Likewise.
12126 * sem_timedwait.c: Likewise.
12127 * sem_trywait.c: Likewise.
12128 * sem_wait.c: Likewise.
12129
12130 2002-10-04 Ulrich Drepper <drepper@redhat.com>
12131
12132 * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
12133 * tst-basic2.c: New file.
12134 * tst-exec1.c: New file.
12135 * tst-exec2.c: New file.
12136 * tst-exec3.c: New file.
12137
12138 * tst-fork1.c: Remove extra */.
12139
12140 * nptl 0.2 released. The API for IA-32 is complete.