]> sourceware.org Git - glibc.git/blob - linuxthreads/ChangeLog
Update.
[glibc.git] / linuxthreads / ChangeLog
1 2003-01-10 Martin Schwidefsky <schwidefsky@de.ibm.com>
2
3 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Setup
4 backchain in pseudo_cancel. Minor code improvements.
5 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
6 Likewise.
7
8 2003-01-10 Martin Schwidefsky <schwidefsky@de.ibm.com>
9
10 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
11 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
12
13 2002-01-12 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
14
15 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
16
17 2002-01-09 Richard Henderson <rth@redhat.com>
18
19 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Assume only
20 ret follows pseudo, and thus avoid branch-to-branch in cancel
21 case. Use SYSCALL_ERROR_LABEL.
22
23 2003-01-11 Philip Blundell <philb@gnu.org>
24
25 * sysdeps/unix/sysv/linux/arm/vfork.S: New file.
26 * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h (PSEUDO_RET):
27 Correctly unstack lr.
28 (UNDOARGS_5): Fix ordering of pushes and pops.
29 (SINGLE_THREAD_P_PIC): New.
30 (SINGLE_THREAD_P_INT): New.
31 (SINGLE_THREAD_P): Implement in terms of above. Restore lr if it
32 was stacked.
33 (PSEUDO): Use SINGLE_THREAD_P_INT.
34
35 2003-01-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
36
37 * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
38
39 2003-01-11 Jakub Jelinek <jakub@redhat.com>
40
41 * sysdeps/ia64/tls.h (tcbhead_t): Change into dtv_t *, void *.
42 [HAVE_TLS_SUPPORT] (USE_TLS, TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN,
43 TLS_TCB_SIZE, TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, TLS_DTV_AT_TP,
44 INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV, TLS_INIT_TP, THREAD_SELF,
45 INIT_THREAD_SELF): Define.
46 [HAVE_TLS_SUPPORT]: Include descr.h.
47 (NONTLS_INIT_TP): Point __thread_self at the end of dummy
48 struct _pthread_descr_struct.
49 * sysdeps/ia64/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
50 THREAD_SETMEM, THREAD_SETMEM_NC): Define using THREAD_SELF,
51 not __thread_self.
52 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Adjust
53 computation.
54 * pthread.c (__pthread_initialize_minimal): Use tcbp, not self
55 for TCB pointer.
56 (__pthread_initialize_manager): Rename tcb to mgr.
57 Use tcbp for TCB pointer, if TLS_DTV_AT_TP set mgr to sizeof (struct
58 _pthread_descr) below tcbp, otherwise to tcbp.
59 * manager.c (pthread_handle_create): If TLS_DTV_AT_TP, set
60 new_thread to be below _dl_allocate_tls (). Adjust new_thread back
61 before freeing. Fix clone arguments if report_events and USE_TLS.
62 (pthread_free): Adjust th back before freeing.
63
64 2003-01-10 Steven Munroe <sjmunroe@us.ibm.com>
65
66 * sysdeps/unix/sysv/linux/powerpc/powerpc32/Makefile: Moved to ...
67 * sysdeps/unix/sysv/linux/powerpc/Makefile: ...here.
68 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New File.
69
70 2003-01-09 Jakub Jelinek <jakub@redhat.com>
71
72 * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
73 * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
74 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
75 [__ASSEMBLER__] (SINGLE_THREAD_P): Remove trailing ;;.
76 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
77 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
78 * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
79 * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
80 * tst-popen.c: New test.
81 * Makefile (tests): Add tst-popen.
82
83 2003-01-06 Jakub Jelinek <jakub@redhat.com>
84
85 * sysdeps/unix/sysv/linux/sigwait.c (do_sigwait): Add
86 INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
87
88 2003-01-06 Jakub Jelinek <jakub@redhat.com>
89
90 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use
91 PSEUDO_PREPARE_ARGS. Fix branch condition after SINGLE_THREAD_P.
92
93 2003-01-06 Philip Blundell <philb@gnu.org>
94
95 * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h: New file.
96
97 2003-01-06 Jakub Jelinek <jakub@redhat.com>
98
99 * internals.h (LIBC_CANCEL_HANDLED): Define.
100 * sysdeps/unix/sysv/linux/sigwait.c (LIBC_CANCEL_HANDLED): Add.
101 * signals.c (LIBC_CANCEL_HANDLED): Add.
102 * pt-system.c (LIBC_CANCEL_HANDLED): Add.
103 * tst-cancel-wrappers.sh: Remove all exceptions.
104
105 * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
106
107 2003-01-05 Andreas Schwab <schwab@suse.de>
108
109 * sysdeps/m68k/Makefile: New file, use -fPIC for nonshared
110 objects.
111
112 * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h (SINGLE_THREAD_P):
113 Fix for PIC.
114 (CENABLE): Likewise.
115 (CDISABLE): Likewise.
116
117 2003-01-05 Ulrich Drepper <drepper@redhat.com>
118
119 * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
120 features. Reported by Marijn Ros <marijn@mad.scientist.com>.
121
122 * Makefile (libc.so-no-z-defs): Define to yes.
123
124 2003-01-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
125
126 * sysdeps/sh/tls.h: Include dl-sysdep.h and stdint.h.
127 (tcbhead_t): Add multiple_threads member.
128 (TLS_INIT_TP_EXPENSIVE): Define.
129 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Don't use multi-line
130 strings. Remove unused code.
131 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
132
133 2003-01-04 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
134
135 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
136 * sysdeps/unix/sysv/linux/powerpc/powerpc32/Makefile: New file.
137
138 2003-01-04 Jakub Jelinek <jakub@redhat.com>
139
140 * internals.h (LIBC_THREAD_GETMEM, LIBC_THREAD_SETMEM): Define
141 even if NOT_IN_libc is defined.
142
143 2003-01-05 Jakub Jelinek <jakub@redhat.com>
144
145 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
146 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
147 * sysdeps/s390/Makefile: New file.
148 * sysdeps/s390/tcb-offsets.sym: New file.
149 * sysdeps/s390/tls.h: New file.
150
151 2003-01-03 Richard Henderson <rth@redhat.com>
152
153 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
154
155 2003-01-03 Andreas Jaeger <aj@suse.de>
156
157 * sysdeps/pthread/bits/libc-tsd.h: Declare weak_extern functions.
158
159 2003-01-03 Jakub Jelinek <jakub@redhat.com>
160
161 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
162
163 2003-01-02 Ulrich Drepper <drepper@redhat.com>
164
165 * tst-cancel-wrappers.sh: Exclude sigwait.c as well, it does not have
166 cancellation tests.
167
168 2003-01-02 Jakub Jelinek <jakub@redhat.com>
169
170 * internals.h (struct pthread_functions): Rename
171 ptr_pthread_cond_* fields to ptr___pthread_cond_*.
172 * pthread.c (pthread_functions): Adjust.
173 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
174 pthread_cond_*@GLIBC_2.0 compatibility symbols.
175 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
176 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
177 and pthread_cond_wait.
178
179 * sysdeps/pthread/bits/pthreadtypes.h (__pthread_cond_align_t): New
180 type.
181 (pthread_cond_t): Add __align member, shorten __padding.
182 * sysdeps/pthread/pthread.h (PHTREAD_COND_INITIALIZER): Initialize
183 __padding and __align too.
184
185 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call2): Add
186 __builtin_expect.
187 * sysdeps/pthread/sigaction.c: New file.
188 * sysdeps/unix/sysv/linux/raise.c: New file.
189 * sysdeps/unix/sysv/linux/sigwait.c: New file.
190 * sysdeps/unix/sysv/linux/fork.c (__pthread_fork): Protect
191 weak_extern with #ifndef SHARED.
192 * sysdeps/unix/sysv/linux/jmp-unwind.c (__pthread_cleanup_upto):
193 Likewise.
194 * signals.c (__sigaction): Renamed to...
195 (__pthread_sigaction): ... this.
196 (__sigaction): New strong alias, #ifdef SHARED only.
197 (sigaction): Protect with #ifdef SHARED.
198 (sigwait): Renamed to...
199 (__pthread_sigwait): ... this.
200 (sigwait): New strong alias, #ifdef SHARED only.
201 (raise): Renamed to...
202 (__pthread_raise): ... this.
203 (raise): New strong alias, #ifdef SHARED only.
204 * internals.h (__pthread_sigaction, __pthread_sigwait,
205 __pthread_raise): New prototypes.
206 (struct pthread_functions): Add ptr_pthread_sigaction,
207 ptr_pthread_sigwait, ptr_pthread_raise.
208 * pthread.c (pthread_functions): Renamed to...
209 (__pthread_functions): ... this. No longer static, no longer
210 SHARED only. Initialize ptr_pthread_sigaction, ptr_pthread_sigwait
211 and ptr_pthread_raise.
212 [SHARED] (ptr_pthread_functions): Change to &__pthread_functions.
213 * libc-cancellation.c (__pthread_thread_self): Remove weak_extern.
214 * ptfork.c (__fork, __vfork): Protect with #ifdef SHARED.
215 * ptlongjmp.c (siglongjmp, longjmp): Protect with #ifdef SHARED.
216
217 * Makefile (tests, tests-static): Add tst-cancel-static.
218 * tst-cancel-static.c: New test.
219
220 2003-01-02 Jakub Jelinek <jakub@redhat.com>
221
222 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
223
224 2003-01-02 Ulrich Drepper <drepper@redhat.com>
225
226 * sysdeps/pthread/bits/pthreadtypes.h (pthread_cond_t): Add padding.
227 * condvar.c: Add symbol versioning. The compatibility versions
228 are the same as the change in the interface does not effect this
229 implementation.
230 * Versions [libpthread]: Add definitions for new pthread_cond_*
231 interfaces for version GLIBC_2.3.2.
232
233 2002-12-31 Ulrich Drepper <drepper@redhat.com>
234
235 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
236 __register_atfork.
237 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
238 for __register_atfork.
239
240 2002-12-31 Jakub Jelinek <jakub@redhat.com>
241
242 * sysdeps/i386/i686/pt-machine.h: Use __ASSEMBLER__ instead of
243 ASSEMBLER test macro.
244 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Likewise.
245 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
246 * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h: Likewise.
247 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
248 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
249 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
250
251 * sysdeps/pthread/errno-loc.c (__errno_location): Add
252 libc_hidden_def.
253 * sysdeps/pthread/herrno-loc.c (__h_errno_location): Likewise.
254 * sysdeps/pthread/res-state.c (__res_state): Likewise.
255 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
256 __libc_current_sigrtmax): Likewise.
257 * Versions [libc] (GLIBC_PRIVATE): Remove __libc_internal_tsd_get,
258 __libc_internal_tsd_set, __libc_internal_tsd_address,
259 __libc_alloca_cutoff.
260 [libpthread] (GLIBC_PRIVATE): Remove __libc_internal_tsd_get,
261 __libc_internal_tsd_set, __libc_internal_tsd_address.
262
263 * sysdeps/pthread/list.h: Remove assert.h include.
264 * sysdeps/unix/sysv/linux/fork.c: Include <fork.h>, not "fork.h".
265
266 * sysdeps/pthread/list.h: New file.
267 * sysdeps/unix/sysv/linux/jmp-unwind.c: New file.
268 * sysdeps/unix/sysv/linux/fork.c: New file.
269 * sysdeps/unix/sysv/linux/fork.h: New file.
270 * sysdeps/unix/sysv/linux/ia64/fork.h: New file.
271 * sysdeps/unix/sysv/linux/sparc/fork.h: New file.
272 * sysdeps/unix/sysv/linux/register-atfork.c: New file.
273 * sysdeps/unix/sysv/linux/unregister-atfork.c: New file.
274 * sysdeps/unix/sysv/linux/Makefile: New file.
275 * sysdeps/unix/sysv/linux/Versions: New file.
276 * ptlongjmp.c (pthread_cleanup_upto): Rename to...
277 (__pthread_cleanup_upto): ...this. Add targetframe argument,
278 use it instead of currentframe. No longer static.
279 (siglongjmp, longjmp): Remove pthread_cleanup_upto calls.
280 * internals.h (__pthread_cleanup_upto, __pthread_fork): New prototypes.
281 (struct pthread_functions): Add ptr_pthread_fork,
282 ptr_pthread_cleanup_upto.
283 * pthread.c (pthread_functions): Initialize ptr_pthread_fork and
284 ptr_pthread_cleanup_upto.
285 * ptfork.c: Include fork.h.
286 (struct handler_list, struct handler_list_block): Remove.
287 (pthread_atfork_lock, pthread_atfork_prepare, pthread_atfork_parent,
288 pthread_atfork_child): Remove.
289 (pthread_insert_list, __pthread_atfork, pthread_call_handlers): Remove.
290 (__pthread_fork): New function.
291 (__fork, __vfork): Call __libc_fork.
292 * Makefile (libpthread-routines): Add old_pthread_atfork.
293 (libpthread-nonshared): Add pthread_atfork.
294 (others): Depend on $(objpfx)libpthread_nonshared.a.
295 ($(objpfx)libpthread_nonshared.a): New rule.
296 (install): Depend on $(inst_libdir)/libpthread.so.
297 ($(inst_libdir)/libpthread.so, $(inst_libdir)/libpthread_nonshared.a):
298 New rules.
299 (tests): Depend on libpthread_nonshared.a too.
300 * old_pthread_atfork.c: New file.
301 * pthread_atfork.c: New file.
302 * Makeconfig (shared-thread-library): Include libpthread_nonshared.a
303 too.
304
305 2002-12-30 Jakub Jelinek <jakub@redhat.com>
306
307 * forward.c: Make all functions available by default again. It
308 caused too much trouble.
309 * internals.h (struct pthread_functions): Rename ptr_pthread_exit
310 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
311 ptr___pthread_attr_init_2_*.
312 * pthread.c (pthread_functions): Adjust.
313
314 2002-12-28 Jakub Jelinek <jakub@redhat.com>
315
316 * libc_pthread_init.c (__libc_pthread_init): Remove
317 MULTIPLE_THREADS_OFFSET check.
318 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
319 (SYSINFO_OFFSET): Remove.
320 * sysdeps/i386/Makefile [csu] (gen-as-const-headers): Add
321 tcb-offsets.sym.
322 * sysdeps/i386/tcb-offsets.sym: New file.
323 * sysdeps/pthread/tcb-offsets.h: New file.
324 * sysdeps/sparc/sparc32/tls.h: Removed.
325 * sysdeps/sparc/sparc64/tls.h: Move...
326 * sysdeps/sparc/tls.h: ...here. Include tcb-offsets.h in assembler.
327 * sysdeps/sparc/Makefile: New file.
328 * sysdeps/sparc/tcb-offsets.sym: New file.
329 * sysdeps/ia64/tls.h: Include tcb-offsets.h in assembler.
330 * sysdeps/ia64/Makefile: New file.
331 * sysdeps/ia64/tcb-offsets.sym: New file.
332 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
333 (MULTIPLE_THREADS_OFFSET): Remove.
334 Replace defined MULTIPLE_THREADS_OFFSET
335 with defined FLOATING_STACKS && USE___THREAD.
336 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
337 (MULTIPLE_THREADS_OFFSET): Remove.
338 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
339 (MULTIPLE_THREADS_OFFSET): Remove.
340 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
341 (MULTIPLE_THREADS_OFFSET): Remove.
342 * pthread.c (__pthread_initialize_manager): Remove
343 MULTIPLE_THREADS_OFFSET cbeck.
344
345 * tst-cancel-wrappers.sh: Add line continuations.
346
347 2002-12-27 Jakub Jelinek <jakub@redhat.com>
348
349 * sysdeps/pthread/bits/libc-tsd.h: Include linuxthreads/descr.h
350 and bits/libc-lock.h.
351 (__libc_internal_tsd_get, __libc_internal_tsd_set,
352 __libc_internal_tsd_address): Remove.
353 (__pthread_internal_tsd_address, __pthread_internal_tsd_get,
354 __pthread_internal_tsd_set): New weak_externs.
355 (__libc_tsd_address, __libc_tsd_get, __libc_tsd_set): Define
356 using __libc_maybe_call2.
357 (__libc_tsd_key_t): Move to ...
358 * descr.h (__libc_tsd_key_t): ...here.
359 Remove bits/libc-tsd.h include.
360 * sysdeps/pthread/errno-loc.c: New file.
361 * sysdeps/pthread/herrno-loc.c: New file.
362 * sysdeps/pthread/res-state.c: New file.
363 * libc-cancellation.c (THREAD_GETMEM, THREAD_SETMEM): Remove.
364 (__libc_enable_asynccancel, __libc_disable_asynccancel): Use
365 thread_self unconditionally. Use LIBC_THREAD_[SG]ETMEM instead
366 of THREAD_[SG]ETMEM.
367 * specific.c (libc_internal_tsd_set): Renamed to...
368 __pthread_internal_tsd_set. Remove static.
369 (libc_internal_tsd_get): Renamed to...
370 __pthread_internal_tsd_get. Remove static.
371 (libc_internal_tsd_address): Renamed to...
372 __pthread_internal_tsd_address. Remove static.
373 (__libc_internal_tsd_set, __libc_internal_tsd_get,
374 __libc_internal_tsd_address, __libc_alloca_cutoff): Remove.
375 * internals.h [!NOT_IN_libc] (LIBC_THREAD_GETMEM, LIBC_THREAD_SETMEM):
376 Define.
377 (__pthread_internal_tsd_set, __pthread_internal_tsd_get,
378 __pthread_internal_tsd_address): New prototypes.
379 (struct pthread_functions): Add
380 ptr_pthread_internal_tsd_([sg]et|address) fields.
381 [!NOT_IN_libc && !FLOATING_STACKS] (thread_self): Define.
382 * pthread.c (pthread_functions) [!USE_TLS && !HAVE___THREAD]:
383 Initialize ptr_pthread_internal_tsd_([sg]et|address) fields.
384 * Versions (libpthread): Remove __libc_alloca_cutoff@GLIBC_PRIVATE.
385 * alloca_cutoff.c: New file.
386 * no-tsd.c: Removed.
387 * Makefile (routines): Remove no-tsd. Add alloca_cutoff.
388 * pt-system.c (system): Remove cancellation handling.
389 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
390 cancellation routines.
391
392 * sysdeps/i386/tls.h: Include dl-sysdep.h and stdint.h.
393 (tcbhead_t): Add sysinfo field.
394 (SYSINFO_OFFSET, INIT_SYSINFO): Define.
395 (TLS_INIT_TP): Use INIT_SYSINFO.
396 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
397 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
398 (MULTIPLE_THREADS_OFFSET): Adjust.
399 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
400 (MULTIPLE_THREADS_OFFSET): Likewise.
401 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
402 (MULTIPLE_THREADS_OFFSET): Likewise.
403 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
404 (MULTIPLE_THREADS_OFFSET): Likewise.
405 * descr.h: Include stdint.h.
406 (struct _pthread_descr_struct): Add p_header.data.sysinfo field.
407
408 2002-12-22 Jakub Jelinek <jakub@redhat.com>
409
410 * libc_pthread_init.c: Include stdlib.h.
411 * sysdeps/i386/tls.h (tcbhead_t): Add multiple_threads member.
412 (TLS_INIT_TP_EXPENSIVE): Define.
413 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call,
414 __libc_maybe_call2): In _LIBC check SHARED define.
415 * sysdeps/ia64/tls.h: New file.
416 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
417 * sysdeps/unix/sysv/linux/ia64/Makefile: New file.
418 * sysdeps/x86_64/tls.h (TLS_INIT_TP_EXPENSIVE): Define.
419 * sysdeps/sparc/sparc32/tls.h: New file.
420 * sysdeps/sparc/sparc64/tls.h: New file.
421 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
422 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
423 * Makefile (tests): Add tst-cancel[1-6].
424 (tests-reverse): Add tst-cancel5.
425 Link libc.so before libpthread.so for tests-reverse.
426 * tst-cancel1.c: New file.
427 * tst-cancel2.c: New file.
428 * tst-cancel3.c: New file.
429 * tst-cancel4.c: New file.
430 * tst-cancel5.c: New file.
431 * tst-cancel6.c: New file.
432
433 2002-12-27 Andreas Schwab <schwab@suse.de>
434
435 * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h: New file.
436
437 2002-12-22 Roland McGrath <roland@redhat.com>
438
439 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
440
441 2002-12-21 Ulrich Drepper <drepper@redhat.com>
442
443 * pthread.c (init_rtsigs): Remove incomplete __builtin_expect.
444 Reported by Art Hass <ahaas@airmail.net>.
445
446 2002-12-19 Jakub Jelinek <jakub@redhat.com>
447
448 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
449 Use return 0 as 6th argument to FORWARD4.
450
451 2002-12-18 Jakub Jelinek <jakub@redhat.com>
452
453 * sysdeps/i386/useldt.h (FLOATING_STACKS, ARCH_STACK_MAX_SIZE): Only
454 define if __ASSUME_LDT_WORKS > 0.
455 * libc-cancellation.c (THREAD_GETMEM, THREAD_SETMEM): Redefine to
456 struct member access if !FLOATING_STACKS.
457 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
458
459 2002-12-18 Jakub Jelinek <jakub@redhat.com>
460
461 * internals.h (__pthread_thread_self): New prototype.
462 (struct pthread_functions): Add ptr_pthread_thread_self field.
463 * pthread.c (pthread_functions): Initialize ptr_pthread_thread_self.
464 (__pthread_thread_self): New function.
465 * libc-cancellation.c (__pthread_thread_self): Add weak_extern.
466 (__libc_enable_asynccancel, __libc_disable_asynccancel): Don't
467 use thread_self() directly if not FLOATING_STACKS.
468
469 2002-12-18 Jakub Jelinek <jakub@redhat.com>
470
471 * sysdeps/x86_64/pt-machine.h: Guard most of the header
472 with #ifndef __ASSEMBLER__.
473 * pthread.c (pthread_functions): Use SHLIB_COMPAT around
474 pthread_attr_init_2_0 use.
475
476 2002-12-17 Jakub Jelinek <jakub@redhat.com>
477
478 * wrapsyscall.c: Removed.
479 * weaks.c: Removed.
480 * Makefile (distribute): Add tst-cancel-wrappers.sh.
481 (routines): Remove weaks. Add forward,
482 libc_pthread_init, libc-cancellation.
483 (shared-only-routines): Remove weaks. Add forward.
484 (libpthread-routines): Remove wrapsyscall.
485 Add ptw-write, ptw-read, ptw-close, ptw-fcntl, ptw-accept,
486 ptw-connect, ptw-recv, ptw-recvfrom, ptw-recvmsg, ptw-send,
487 ptw-sendmsg, ptw-sendto, ptw-fsync, ptw-lseek, ptw-lseek64,
488 ptw-llseek, ptw-msync, ptw-nanosleep, ptw-open, ptw-open64,
489 ptw-pause, ptw-pread, ptw-pread64, ptw-pwrite, ptw-pwrite64,
490 ptw-tcdrain, ptw-wait, ptw-waitpid, pt-system, pt-allocrtsig.
491 (libpthread-shared-only-routines): Add pt-allocrtsig.
492 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
493 ($(objpfx)tst-cancel-wrappers.out): New rule.
494 * sysdeps/pthread/bits/libc-lock.h: Include linuxthreads/internals.h
495 if in libc.
496 (__libc_maybe_call): In libpthread.* don't check for existance
497 of the function.
498 (__libc_maybe_call2): Define.
499 (__libc_lock_init, __libc_lock_fini, __libc_lock_lock,
500 __libc_lock_trylock, __libc_lock_unlock): Use it.
501 * sysdeps/pthread/flockfile.c: New file.
502 * sysdeps/pthread/ftrylockfile.c: New file.
503 * sysdeps/pthread/funlockfile.c: New file.
504 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
505 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
506 * sysdeps/unix/sysv/linux/allocrtsig.c: New file.
507 * libc-cancellation.c: New file.
508 * forward.c: New file.
509 * libc_pthread_init.c: New file.
510 * pt-system.c: New file.
511 * pthread.c: Remove locale.h.
512 (__pthread_manager_thread): Initialize multiple_threads.
513 (__pthread_multiple_threads): Declare.
514 (pthread_functions): New variable.
515 (__pthread_initialize_minimal): Remove __uselocale call.
516 Call __libc_pthread_init.
517 (__pthread_initialize_manager): Initialize __pthread_multiple_threads,
518 initial thread's multiple_threads and __libc_multiple_threads.
519 Check MULTIPLE_THREADS_OFFSET value. Initialize manager thread's
520 multiple_threads.
521 (pthread_setschedparam, pthread_getschedparam): Rename to __
522 prefixed variants. Add strong_alias.
523 (current_rtmin, current_rtmax, __libc_current_sigrtmin,
524 __libc_current_sigrtmax, __libc_allocate_rtsig): Remove.
525 (init_rtsigs): Use __libc_current_sigrtmin_private.
526 (pthread_initialize): Only call init_rtsigs if
527 !__ASSUME_REALTIME_SIGNALS.
528 (__pthread_require_wrappers, __pthread_require_lockfile): Remove.
529 * internals.h (__pthread_attr_destroy, __pthread_attr_setdetachstate,
530 __pthread_attr_getdetachstate, __pthread_attr_setschedparam,
531 __pthread_attr_getschedparam, __pthread_attr_setschedpolicy,
532 __pthread_attr_getschedpolicy, __pthread_attr_setinheritsched,
533 __pthread_attr_getinheritsched, __pthread_attr_setscope,
534 __pthread_attr_getscope, __pthread_cond_init,
535 __pthread_cond_destroy, __pthread_cond_wait,
536 __pthread_cond_signal, __pthread_cond_broadcast,
537 __pthread_condattr_init, __pthread_condattr_destroy,
538 __pthread_equal, __pthread_getschedparam,
539 __pthread_setschedparam, __pthread_setcancelstate,
540 __pthread_setcanceltype, __pthread_enable_asynccancel,
541 __libc_enable_asynccancel, __libc_pthread_init): New prototype.
542 (__pthread_mutex_init, __pthread_mutex_destroy,
543 __pthread_mutex_lock, __pthread_mutex_unlock,
544 __pthread_mutex_trylock): Likewise.
545 Add hidden_proto.
546 (struct pthread_functions): New type.
547 (__libc_pthread_functions): New variable.
548 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define.
549 * descr.h (struct _pthread_descr_struct): Add
550 p_header.data.multiple_threads field.
551 * manager.c (pthread_handle_create): Initialize multiple_threads.
552 * cancel.c (__pthread_enable_asynccancel,
553 __pthread_disable_asynccancel): New functions.
554 (__pthread_provide_wrappers): Remove.
555 (pthread_setcancelstate, pthread_setcanceltype): Rename to __
556 prefixed variants. Add strong_alias.
557 * condvar.c (pthread_cond_init, pthread_cond_destroy,
558 pthread_cond_wait, pthread_cond_signal, pthread_cond_broadcast,
559 pthread_condattr_init, pthread_condattr_destroy): Likewise.
560 * join.c (pthread_exit): Likewise.
561 * attr.c (pthread_attr_destroy, pthread_attr_setdetachstate,
562 pthread_attr_getdetachstate, pthread_attr_setschedparam,
563 pthread_attr_getschedparam, pthread_attr_setschedpolicy,
564 pthread_attr_getschedpolicy, pthread_attr_setinheritsched,
565 pthread_attr_getinheritsched, pthread_attr_setscope,
566 pthread_attr_getscope): Likewise.
567 * mutex.c (__pthread_mutex_init, __pthread_mutex_destroy,
568 __pthread_mutex_lock, __pthread_mutex_unlock,
569 __pthread_mutex_trylock): Add hidden_def.
570 * Versions (libc): Add __libc_pthread_init,
571 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
572 __libc_allocate_rtsig_private @@GLIBC_PRIVATE.
573 * lockfile.c: Remove some USE_IN_LIBIO guards.
574 (__pthread_provide_lockfile): Remove.
575 * pt-allocrtsig.c: New file.
576 * tst-cancel-wrappers.sh: New test.
577
578 2002-12-15 Ulrich Drepper <drepper@redhat.com>
579
580 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
581 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
582 * wrapsyscall.c: Remove creat, poll, pselect, readv, select,
583 sigpause, sigsuspend, sigwaitinfo, waitid, and writev wrappers.
584
585 2002-12-10 Ulrich Drepper <drepper@redhat.com>
586
587 * wrapsyscall.c (CANCELABLE_SYSCALL): Don't define function as
588 weak. There is no reason for that.
589 (CANCELABLE_SYSCALL_VA): Likewise.
590
591 2002-12-09 Ulrich Drepper <drepper@redhat.com>
592
593 * wrapsyscall.c: Add wrappers for creat, poll, pselect, readv, select,
594 sigpause, __xpg_sigpause, sigsuspend, sigwaitinfo, waitid, and writev.
595 * Versions: Export creat, poll, pselect, readv, select, sigpause,
596 __xpg_sigpause, sigsuspend, sigwaitinfo, waitid, and writev from
597 libpthread in version GLIBC_2.3.2.
598
599 2002-12-06 Ulrich Drepper <drepper@redhat.com>
600
601 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
602
603 2002-12-05 Roland McGrath <roland@redhat.com>
604
605 * pthread.c (__pthread_initialize_minimal)
606 [USE_TLS && SHARED && !USE___THREAD]: Initialize TLS and set up the
607 TCB if the dynamic linker didn't do it at startup.
608
609 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
610 string.
611 (TLS_DO_SET_THREAD_AREA, TLS_DO_MODIFY_LDT, TLS_SETUP_GS_SEGMENT):
612 Submacros updated.
613 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
614 * sysdeps/alpha/tls.h (TLS_INIT_TP): Likewise (always zero).
615
616 2002-12-03 Roland McGrath <roland@redhat.com>
617
618 * pthread.c (pthread_initialize) [SHARED]: Copy dl_error_tsd value
619 from dynamic linker internal cell to new libc cell.
620
621 2002-11-28 Roland McGrath <roland@redhat.com>
622
623 * tst-context.c: #define IS_IN_libpthread around #include <tls.h>
624 before other headers, so FLOATING_STACKS is not defined wrongly.
625
626 * sysdeps/i386/tls.h [!IS_IN_libpthread]: Enable TLS support
627 even if [! FLOATING_STACKS].
628 (TLS_DO_MODIFY_LDT_KERNEL_CHECK): New macro.
629 If not under [__ASSUME_LDT_WORKS > 0], then do a runtime check of
630 dl_osversion >= 2.3.99 and fatal if not.
631 (TLS_DO_MODIFY_LDT): Use it.
632
633 2002-11-28 Ulrich Drepper <drepper@redhat.com>
634
635 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
636 require it to 200112L. Remove _POSIX_POLL and _POSIX_SELECT.
637 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
638
639 2002-11-19 Ulrich Drepper <drepper@redhat.com>
640
641 * Versions (libc: GLIBC_2.0): Remove names of functions which are
642 not defined in libc.
643 * Makefile (shared-only-routines): Add weaks.
644 * weaks.c: Remove functions which are not exported from libc.so.
645
646 2002-11-14 Roland McGrath <roland@redhat.com>
647
648 * libc-tsd.c: New file.
649 * Makefile (distribute): Add it.
650 (libc-link.so): New variable.
651 ($(objpfx)libpthread.so): Depend on that instead of libc.so file name.
652 (libc-ok-for-link): New variable.
653 [$(versioning) = yes]: Include $(common-objpfx)tls.make and define
654 libc-ok-for-link to $(use-thread).
655 [$(libc-ok-for-link) = no]
656 (libc-link.so): Set to $(objpfx)libc.so, not $(common-objpfx)libc.so.
657 ($(objpfx)libc_pic_lite.a,$(objpfx)libc_pic_lite.os, $(objpfx)libc.so):
658 New targets.
659 (generated): Append them.
660 (extra-objs): Append libc-tsd.os.
661
662 * libc-tls-loc.c: New file.
663 * Makefile (libpthread-routines): Add it.
664
665 2002-11-14 Andreas Schwab <schwab@suse.de>
666
667 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Fix unterminated
668 string.
669
670 2002-11-13 Roland McGrath <roland@redhat.com>
671
672 * Examples/ex6.c (main): Improve error reporting.
673
674 2002-11-04 Ulrich Drepper <drepper@redhat.com>
675
676 * sysdeps/i386/Makefile: Compile pthread.c and sighandler.c with
677 -fno-omit-frame-pointer. Patch by Andreas Steinmetz <ast@domdv.de>.
678
679 * sysdeps/i386/useldt.h [PIC] (USETLS_LOAD_EBX): Use correct input
680 register number.
681 (DO_SET_THREAD_AREA): Mark asm output specifiers correctly.
682
683 2002-10-22 Jakub Jelinek <jakub@redhat.com>
684
685 * manager.c (pthread_start_thread): Call __uselocale even
686 if [! SHARED]. Patch by Leon Kanter <leon@geon.donetsk.ua>.
687
688 2002-10-17 Roland McGrath <roland@redhat.com>
689
690 * Makefile (unload): Don't link in libpthread.so.
691 ($(objpfx)unload.out): Do depend on it.
692 * unload.c (main): Improve error reporting.
693
694 2002-10-09 Roland McGrath <roland@redhat.com>
695
696 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
697 Under [__PIC__], call the function via the pointer fetched for
698 comparison rather than a call by name that uses the PLT.
699 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
700 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
701 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
702 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
703 (__libc_key_create, __libc_getspecific, __libc_setspecific)
704 (__libc_atfork): Use it.
705
706 * pthread.c [SHARED] (__libc_dl_error_tsd): New function.
707 (pthread_initialize) [SHARED]: Set _dl_error_catch_tsd to that.
708 * Versions (libc: GLIBC_PRIVATE): Add __libc_dl_error_tsd.
709 (ld: GLIBC_PRIVATE): Set removed.
710
711 2002-10-11 Ulrich Drepper <drepper@redhat.com>
712
713 * sysdeps/unix/sysv/linux/execve.c: New file.
714
715 2002-10-09 Jakub Jelinek <jakub@redhat.com>
716
717 * no-tsd.c: Include stdlib.h.
718
719 2002-10-07 Jakub Jelinek <jakub@redhat.com>
720
721 * sysdeps/unix/sysv/linux/allocalim.h: New file.
722 * descr.h (struct _pthread_descr_struct): Add p_alloca_cutoff
723 field.
724 * manager.c (__pthread_allocate_stack): Add out_stacksize argument.
725 Pass stack size to caller.
726 (pthread_handle_create): Set p_alloca_cutoff.
727 * pthread.c (__pthread_initial_thread): Use C99 designated
728 initializers. Set p_alloca_cutoff.
729 (__pthread_manager_thread): Likewise.
730 (__pthread_initialize_minimal) [USE_TLS]: Set p_alloca_cutoff
731 for initial thread.
732 (__pthread_init_max_stacksize): Possibly decrease p_alloca_cutoff
733 for initial thread.
734 (__pthread_initialize_manager) [USE_TLS]: Set p_alloca_cutoff
735 for manager thread.
736 * specific.c (__libc_alloca_cutoff): New function.
737 * no-tsd.c (__libc_alloca_cutoff): New function.
738 * Versions: Export __libc_alloca_cutoff@@GLIBC_PRIVATE from libc
739 and libpthread.
740
741 2002-10-02 Kaz Kojima <kkojima@rr.iij4u.or.jp>
742
743 * sysdeps/sh/pt-machine.h: Make C code ifndef'ed with __ASSEMBLER__.
744 * sysdeps/sh/tls.h: Likewise.
745 * sysdeps/unix/sysv/linux/sh/smp.h: New file.
746
747 2002-09-29 Jakub Jelinek <jakub@redhat.com>
748
749 * sysdeps/pthread/tst-timer.c (main): Clear
750 SIGEV2.sigev_notify_attributes.
751
752 2002-09-29 Ulrich Drepper <drepper@redhat.com>
753
754 * sysdeps/i386/useldt.h (DO_SET_THREAD_AREA): Don't use
755 INLINE_SYSCALL for set_thread_area syscall.
756
757 2002-09-28 Roland McGrath <roland@redhat.com>
758
759 * pthread.c (__pthread_reset_main_thread) [FLOATING_STACKS]:
760 Don't call setrlimit, since we did no prior bogon we need to undo.
761
762 2002-09-27 Roland McGrath <roland@redhat.com>
763
764 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Don't include <pt-machine.h>.
765
766 2002-09-24 Roland McGrath <roland@redhat.com>
767
768 * sysdeps/x86_64/tls.h: New file.
769
770 2002-09-23 Roland McGrath <roland@redhat.com>
771
772 * Examples/ex13.c (dump_mut): int -> size_t for counter.
773
774 2002-09-18 Bruno Haible <bruno@clisp.org>
775
776 * Examples/ex10.c (thread): Fail if pthread_mutex_timedlock() returns
777 an unexpected error code.
778
779 * internals.h (__pthread_message): Add const to first parameter type.
780 * pthread.c (__pthread_message): Likewise.
781
782 * sysdeps/unix/sysv/linux/configure: Moved to ../sysdeps/pthread.
783
784 2002-09-17 Roland McGrath <roland@redhat.com>
785
786 * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT, TLS_DO_SET_THREAD_AREA):
787 Set the descriptor limit to the full 4GB, so %gs:OFFSET works for any
788 offset (positive or negative) relative to the thread struct.
789 * sysdeps/i386/useldt.h (DO_MODIFY_LDT, DO_SET_THREAD_AREA): Likewise.
790
791 2002-09-12 Jakub Jelinek <jakub@redhat.com>
792
793 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Move...
794 * sysdeps/unix/sysv/linux/sparc/Makefile: ...here.
795 Replace /usr/lib/crt[in].o with crt[in].o too.
796
797 2002-09-11 Steven Munroe <sjmunroe@us.ibm.com>
798
799 * sysdeps/powerpc/powerpc64/pt-machine.h: New file.
800
801 2002-09-04 Bruno Haible <bruno@clisp.org>
802
803 * pthread.c: Include <sys/time.h>.
804 (is_smp_system): Move to sysdeps/unix/sysv/linux/smp.h.
805 * sysdeps/unix/sysv/linux/smp.h: New file, extracted from pthread.c.
806 * Makefile (distribute): Add smp.h to the list.
807
808 2002-09-04 Bruno Haible <bruno@clisp.org>
809
810 * sysdeps/alpha/pt-machine.h: Choose different include file location
811 on non-Linux platforms.
812
813 * wrapsyscall.c (PROMOTE_INTEGRAL_TYPE): New macro.
814 (open, open64): Change va_arg argument type to the integral type to
815 which mode_t promotes.
816
817 * sysdeps/pthread/tst-timer.c (main): Don't assume anything about
818 the structure of 'struct sigevent'.
819
820 * errno.c (__errno_location, __h_errno_location, __res_state):
821 Use prototype function definitions.
822
823 2002-07-29 Steven Munroe <sjmunroe@us.ibm.com>
824
825 * shlib-versions: Set libpthread version to 2.3 for powerpc64.
826 * sysdeps/powerpc/pt-machine.h: moved to...
827 * sysdeps/powerpc/powerpc32/pt-machine.h: ...here
828 * sysdeps/powerpc/powerpc64/pt-machine.h: New file.
829
830 2002-09-02 Roland McGrath <roland@redhat.com>
831
832 * sysdeps/powerpc/Makefile (CFLAGS-pt-initfini.s): New variable.
833
834 2002-09-01 Roland McGrath <roland@redhat.com>
835
836 * sysdeps/pthread/bits/libc-tsd.h (enum __libc_tsd_key_t): Add new keys
837 CTYPE_B, CTYPE_TOLOWER, CTYPE_TOUPPER.
838
839 * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_address): New macro.
840 (__libc_internal_tsd_address): Declare it.
841 * Versions (libc, ld, libpthread: GLIBC_PRIVATE): Add
842 __libc_internal_tsd_address.
843 * specific.c (libc_internal_tsd_address): New function.
844 (__libc_internal_tsd_address): New variable.
845 * no-tsd.c (__libc_internal_tsd_address): New variable.
846
847 2002-08-31 Ulrich Drepper <drepper@redhat.com>
848
849 * Makefile: Don't use rule for crt%.o, spell it out as rules for
850 crti.o and crtn.o.
851
852 2002-08-30 Roland McGrath <roland@redhat.com>
853
854 * Makefile (extra-objs, omit-deps): Add crtn.
855 ($(objpfx)libpthread.so): Depend on $(objpfx)crtn.o.
856 ($(objpfx)libpthread.so: +postinit): Append $(objpfx)crtn.o.
857 ($(objpfx)crtn.S): New target.
858 ($(objpfx)crt%.o): Pattern rule replaces crti.o target.
859 (generated): Add crtn.S.
860
861 * sysdeps/unix/sysv/linux/x86_64/Makefile ($(objpfx)specs): Massage
862 crtn.o pathname too.
863
864 2002-08-30 Jakub Jelinek <jakub@redhat.com>
865
866 * pthread.c (__pthread_initialize_minimal): Call __uselocale even
867 if [! SHARED].
868
869 2002-08-30 Roland McGrath <roland@redhat.com>
870
871 * tst-static-locale.c: New file.
872 * Makefile (tests, tests-static): Add it.
873
874 2002-04-24 Steven Munroe <sjmunroe@us.ibm.com>
875
876 * spinlock.c (__pthread_lock): Fix spurious wakeup
877 handling. Don't clear lowest bit of list pointer as sign the thread
878 is still on the wait list. Don't restart after spurious wakeup
879 with spinning to get the lock.
880 (__pthread_unlock): Take set lowest bit into account when handling
881 pointer to list elements.
882 Patch by Steve Munroe <sjmunroe@us.ibm.com>.
883
884 2002-08-28 Roland McGrath <roland@redhat.com>
885
886 * sysdeps/pthread/timer_routines.c (thread_func): Fix type in cast.
887
888 2002-08-28 Jakub Jelinek <jakub@redhat.com>
889
890 * sysdeps/unix/sysv/linux/hppa/aio_cancel.c: New file.
891 * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
892 * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
893
894 2002-08-28 Ulrich Drepper <drepper@redhat.com>
895
896 * sysdeps/pthread/timer_routines.c (thread_func): Change return
897 type to void and add casts in use to avoid warnings with all gcc
898 versions.
899
900 2002-08-08 Jakub Jelinek <jakub@redhat.com>
901
902 * sysdeps/unix/sysv/linux/bits/local_lim.h (PTHREAD_THREADS_MAX):
903 Bump to 16384.
904 * manager.c (__pthread_handles): Remove.
905 * pthandles.c: New file.
906 * pthread.c (__pthread_initialize_minimal): Initialize
907 __pthread_handles[0] and __pthread_handles[1].
908 * Makefile (libpthread-routines): Add pthandles (must be last).
909
910 2002-08-26 Brian Youmans <3diff@gnu.org>
911
912 * Examples/ex10.c: Corrected version number in Lesser GPL copying
913 permission notice from 2 to 2.1.
914 * Examples/ex11.c: Likewise.
915 * Examples/ex13.c: Likewise.
916 * Examples/ex8.c: Likewise.
917 * Examples/ex9.c: Likewise.
918 * barrier.c: Likewise.
919 * events.c: Likewise.
920 * lockfile.c: Likewise.
921 * no-tsd.c: Likewise.
922 * pt-machine.c: Likewise.
923 * ptclock_gettime.c: Likewise.
924 * ptclock_settime.c: Likewise.
925 * rwlock.c: Likewise.
926 * sysdeps/alpha/pspinlock.c: Likewise.
927 * sysdeps/alpha/pt-machine.h: Likewise.
928 * sysdeps/arm/pspinlock.c: Likewise.
929 * sysdeps/arm/pt-machine.h: Likewise.
930 * sysdeps/cris/pspinlock.c: Likewise.
931 * sysdeps/cris/pt-machine.h: Likewise.
932 * sysdeps/hppa/pspinlock.c: Likewise.
933 * sysdeps/hppa/pt-machine.h: Likewise.
934 * sysdeps/i386/i686/pt-machine.h: Likewise.
935 * sysdeps/i386/pspinlock.c: Likewise.
936 * sysdeps/i386/pt-machine.h: Likewise.
937 * sysdeps/i386/useldt.h: Likewise.
938 * sysdeps/ia64/pspinlock.c: Likewise.
939 * sysdeps/ia64/pt-machine.h: Likewise.
940 * sysdeps/m68k/pspinlock.c: Likewise.
941 * sysdeps/m68k/pt-machine.h: Likewise.
942 * sysdeps/mips/pspinlock.c: Likewise.
943 * sysdeps/mips/pt-machine.h: Likewise.
944 * sysdeps/powerpc/pspinlock.c: Likewise.
945 * sysdeps/powerpc/pt-machine.h: Likewise.
946 * sysdeps/pthread/bits/initspin.h: Likewise.
947 * sysdeps/pthread/bits/libc-lock.h: Likewise.
948 * sysdeps/pthread/bits/libc-tsd.h: Likewise.
949 * sysdeps/pthread/getcpuclockid.c: Likewise.
950 * sysdeps/pthread/posix-timer.h: Likewise.
951 * sysdeps/pthread/timer_create.c: Likewise.
952 * sysdeps/pthread/timer_delete.c: Likewise.
953 * sysdeps/pthread/timer_getoverr.c: Likewise.
954 * sysdeps/pthread/timer_gettime.c: Likewise.
955 * sysdeps/pthread/timer_routines.c: Likewise.
956 * sysdeps/pthread/timer_settime.c: Likewise.
957 * sysdeps/pthread/tst-timer.c: Likewise.
958 * sysdeps/s390/pspinlock.c: Likewise.
959 * sysdeps/s390/s390-32/pt-machine.h: Likewise.
960 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
961 * sysdeps/sh/pspinlock.c: Likewise.
962 * sysdeps/sh/pt-machine.h: Likewise.
963 * sysdeps/sparc/sparc32/pspinlock.c: Likewise.
964 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
965 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: Likewise.
966 * sysdeps/sparc/sparc64/pspinlock.c: Likewise.
967 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
968 * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
969 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
970 * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
971 * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
972 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
973 * tststack.c: Likewise.
974 * unload.c: Likewise.
975 * weaks.c: Likewise.
976 * wrapsyscall.c: Likewise.
977
978 * sysdeps/pthread/pt-initfini.c: Changed copying
979 permission notice to Lesser GPL from Library GPL, including the
980 references in the special exception.
981 * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: Likewise.
982 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Likewise.
983 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c:
984 Likewise.
985 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c:
986 Likewise.
987 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Likewise.
988
989 2002-08-26 Ulrich Drepper <drepper@redhat.com>
990
991 * Examples/ex10.c (thread): tv_nsec == 1000000000 is already
992 overflow [PR libc/4244].
993
994 2002-08-25 Ulrich Drepper <drepper@redhat.com>
995
996 * sysdeps/pthread/timer_routines.c (thread_func): Make the
997 compiler happy by adding a return statement which will never be
998 reached.
999
1000 * tst-context.c (main): Cast to long before casting to pointer.
1001
1002 * Examples/ex17.c (main): Use correct format string.
1003
1004 * Examples/ex9.c (thread): Remove incorrect return statement.
1005
1006 2002-08-23 Ulrich Drepper <drepper@redhat.com>
1007
1008 * pthread.c (__linuxthreads_version): New global constant.
1009
1010 2002-08-23 Andreas Jaeger <aj@suse.de>
1011
1012 * sysdeps/x86_64/pt-machine.h: Use %fs instead of %gs
1013 as thread specific register.
1014 (testandset): Fix inline asm.
1015 (THREAD_GETMEM): Fix inline asm.
1016
1017 2002-08-22 Roland McGrath <roland@redhat.com>
1018
1019 * sysdeps/i386/useldt.h (INIT_THREAD_SELF): Remove [HAVE_TLS_SUPPORT]
1020 conditional.
1021 (INIT_THREAD_SELF): Pass second arg to DO_SET_THREAD_AREA.
1022 (DO_SET_THREAD_AREA): Take second arg, pass to DO_SET_THREAD_AREA_REUSE
1023 macro. That chooses whether to reuse %gs value or let kernel set it.
1024 [USE_TLS] (DO_SET_THREAD_AREA_REUSE): New macro, always 1.
1025 [!USE_TLS] (DO_SET_THREAD_AREA_REUSE): New macro, true if arg is
1026 not constant 0.
1027
1028 2002-08-21 Ulrich Drepper <drepper@redhat.com>
1029
1030 * sysdeps/i386/tls.h (TLS_SETUP_GS_SEGMENT): Add new parameter
1031 also to the third definition of this macro.
1032
1033 2002-06-17 Andreas Jaeger <aj@suse.de>
1034
1035 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
1036 Set it.
1037
1038 2002-08-20 Ulrich Drepper <drepper@redhat.com>
1039
1040 * sysdeps/i386/useldt.h: Go back to using 16-bit instructions when
1041 loading/reading segment registers. Some old hardware doesn't
1042 handle the 32-bit instructions as expected.
1043 * sysdeps/i386/tls.h: Likewise.
1044
1045 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Second parameter is
1046 renamed to secondcall and use is negated.
1047 (TLS_SETUP_GS_SEGMENT): Likewise.
1048 (TLS_INIT_TP): Likewise.
1049 * sysdeps/sh/tls.h (TLS_INIT_TP): Second parameter is renamed to
1050 secondcall.
1051
1052 * sysdeps/i386/tls.h: Use 32-bit operations when handling segment
1053 registers. No need to mask upper 16 bits in this case.
1054 * sysdeps/i386/useldt.h: Likewise.
1055 (DO_SET_THREAD_AREA): We have to load %gs again even if the value
1056 is the same since the GDT content changed.
1057
1058 * sysdeps/i386/tls.h (TLS_INIT_TP): Add new parameter and pass it on
1059 to TLS_SETUP_GS_SEGMENT.
1060 (TLS_SETUP_GS_SEGMENT): Add new parameter and pass it on to
1061 TLS_DO_SET_THREAD_AREA.
1062 (TLS_DO_SET_THREAD_AREA): If new parameter is zero determine
1063 entry number from %gs value.
1064 * sysdeps/sh/tls.h (TLS_INIT_TP): Add new parameter and simply
1065 ignore it.
1066
1067 * manager.c (pthread_handle_create): Pass NULL to _dl_allocate_tls.
1068 Pass true to _dl_deallocate_tls.
1069 (pthread_free): Likewise.
1070 * pthread.c (__pthread_initialize_manager): Likewise.
1071
1072 2002-08-19 Ulrich Drepper <drepper@redhat.com>
1073
1074 * sysdeps/i386/useldt.h (DO_SET_THREAD_AREA): Use correct shift when
1075 computing index from %gs value.
1076
1077 2002-08-16 Roland McGrath <roland@redhat.com>
1078
1079 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Calculate segment
1080 register value from entry number properly.
1081
1082 * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): Rewrite asm to use %ebx
1083 optimally conditional on [__PIC__].
1084 (TLS_DO_SET_THREAD_AREA): New macro, implement inline syscall
1085 without touching errno, and use latest modify_ldt-like interface.
1086 (TLS_SETUP_GS_SEGMENT): Use that instead of INLINE_SYSCALL.
1087 * sysdeps/i386/useldt.h (DO_MODIFY_LDT): Set %gs in this macro.
1088 (DO_SET_THREAD_AREA): New macro, uses current syscall interface with
1089 existing %gs value as the segment to set.
1090 (INIT_THREAD_SELF): Rewritten using those. Use set_thread_area only
1091 under [HAVE_TLS_SUPPORT] so we can rely on the initialization done
1092 by the first thread's early TLS setup.
1093
1094 2002-08-15 Roland McGrath <roland@redhat.com>
1095
1096 * sysdeps/i386/tls.h (TLS_INIT_TP): Use statement expression and
1097 return a value as callers now expect.
1098
1099 2002-08-11 Roland McGrath <roland@redhat.com>
1100
1101 * pthread.c (__pthread_initialize_manager): Initialize
1102 p_header.data.tcb field of manager thread's descriptor.
1103 (__pthread_initialize_minimal): Don't initialize p_header.data.self
1104 field, already done by TLS_INIT_TP.
1105
1106 * manager.c (pthread_handle_create): Move p_header field initializers
1107 together.
1108
1109 2002-08-08 Ulrich Drepper <drepper@redhat.com>
1110
1111 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Removed.
1112
1113 2002-08-07 Ulrich Drepper <drepper@redhat.com>
1114
1115 * pthread.c (__linuxthreads_initial_report_events): New variable.
1116 (__pthread_initialize_manager): Use it to initialize p_report_events
1117 of initial thread.
1118 [TLS]: Store pointer to descriptor of manager in __pthread_handles.
1119
1120 2002-08-07 Roland McGrath <roland@redhat.com>
1121
1122 * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): Add an extra argument with
1123 an "m" constraint to the asm so the compiler knows LDT_ENTRY was used.
1124
1125 2002-08-02 Roland McGrath <roland@redhat.com>
1126
1127 * sysdeps/pthread/bits/libc-tsd.h (enum __libc_tsd_key_t):
1128 Add _LIBC_TSD_KEY_LOCALE.
1129 * manager.c (pthread_start_thread) [!(USE_TLS && HAVE___THREAD)]:
1130 Call __uselocale to initialize our per-thread locale pointer to
1131 the global one.
1132 * pthread.c (__pthread_initialize_minimal): Likewise.
1133
1134 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Add missing \s.
1135
1136 2002-08-02 Ulrich Drepper <drepper@redhat.com>
1137
1138 * pthread.c: Declare _errno, _h_errno, and _res unless we use TLS
1139 internally.
1140
1141 * cancel.c (__pthread_perform_cleanup) [USE_TLS && HAVE___THREAD]:
1142 Don't use p_libc_specific element in thread descriptor.
1143
1144 2002-07-30 Roland McGrath <roland@redhat.com>
1145
1146 * sysdeps/pthread/bits/libc-tsd.h: Include <tls.h>.
1147 [USE_TLS && HAVE___THREAD]: Just include the sysdeps/generic file,
1148 which does the right thing when __thread support is available.
1149 * descr.h (struct _pthread_descr_struct) [USE_TLS && HAVE___THREAD]:
1150 Omit `p_libc_specific', `p_errnop', `p_errno', `p_h_errnop',
1151 `p_h_errno', `p_resp', and `p_res' members.
1152 * pthread.c (__pthread_initialize_minimal) [USE_TLS && HAVE___THREAD]:
1153 Don't initialize `p_errnop' and `p_h_errnop' members.
1154 (__pthread_reset_main_thread): Likewise.
1155 (__pthread_initialize_manager): Likewise.
1156 * manager.c (__pthread_manager, pthread_handle_create): Likewise.
1157 * pthread.c (pthread_initialize) [USE_TLS && HAVE___THREAD]:
1158 Don't initialize `p_resp' member.
1159 (__pthread_reset_main_thread): Likewise.
1160 * manager.c (pthread_handle_create): Likewise.
1161 * specific.c (libc_internal_tsd_set, libc_internal_tsd_get):
1162 Conditionalize these on [!(USE_TLS && HAVE___THREAD)].
1163 * no-tsd.c: Conditionalize contents on [!(USE_TLS && HAVE___THREAD)].
1164 * errno.c [USE_TLS && HAVE___THREAD]
1165 (__h_errno_location, __res_state): Don't define these at all.
1166
1167 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens around arguments!
1168 (INSTALL_NEW_DTV, GET_DTV): Likewise.
1169 * sysdeps/sh/tls.h (INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV): Likewise.
1170
1171 * weaks.c: Don't include <errno.h> here.
1172
1173 2002-08-01 Roland McGrath <roland@redhat.com>
1174
1175 * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): New macro, broken out of
1176 TLS_INIT_TP.
1177 (TLS_DO_SET_THREAD_AREA): New macro, uses thread_set_area syscall.
1178 (TLS_SETUP_GS_SEGMENT): New macro, try one or the other or both.
1179 (TLS_INIT_TP): Use that.
1180
1181 2002-08-02 Jakub Jelinek <jakub@redhat.com>
1182
1183 * sysdeps/i386/useldt.h (DO_MODIFY_LDT): Move from INIT_THREAD_SELF.
1184 (INIT_THREAD_SELF): Use sys_thread_area syscall instead if available.
1185 (FREE_THREAD): Avoid modify_ldt if using GDT.
1186 * sysdeps/i386/pspinlock.c (__have_no_set_thread_area): New variable.
1187
1188 2002-07-25 Jakub Jelinek <jakub@redhat.com>
1189
1190 * sysdeps/i386/tls.h: Use __ASSEMBLER__ test macro not ASSEMBLER.
1191 * sysdeps/i386/pt-machine.h: Likewise.
1192 * sysdeps/i386/useldt.h: Likewise.
1193
1194 2002-07-22 Ulrich Drepper <drepper@redhat.com>
1195
1196 * pthread.c (__pthread_initialize_minimal): If !SHARED and TLS
1197 call __libc_setup_tls first.
1198 * Makefile: Actually create tst-signal.out file when running the test.
1199 (tests): Add tststatic.
1200 * Examples/tststatic.c: New file.
1201
1202 2002-07-19 Ulrich Drepper <drepper@redhat.com>
1203
1204 * errno.c (__errno_location): Don't define unless !USE_TLS
1205 || !HAVE___THREAD.
1206 * sysdeps/i386/pt-machine.c: Protect C code with #ifndef ASSEMBLER.
1207 * sysdeps/i386/tls.h: Likewise.
1208 * sysdeps/i386/useldt.h: Likewise.
1209 * sysdeps/i386/i686/pt-machine.h: Likewise.
1210
1211 2002-07-02 H.J. Lu <hjl@gnu.org>
1212
1213 * sysdeps/mips/pspinlock.c: Don't include <sgidefs.h>. Always
1214 use ll/sc.
1215 * sysdeps/mips/pt-machine.h: Likewise.
1216
1217 2002-07-14 Ulrich Drepper <drepper@redhat.com>
1218
1219 * manager.c (pthread_handle_create): Initialize self-reference in
1220 descriptor.
1221
1222 2002-07-01 Jakub Jelinek <jakub@redhat.com>
1223
1224 * Examples/ex9.c (main): Remove unused th variable.
1225
1226 2002-07-10 Ulrich Drepper <drepper@redhat.com>
1227
1228 * wrapsyscall.c: Add __nanosleep alias.
1229 * Versions (GLIBC_2.2.6): Add __nanosleep.
1230 * bug-sleep.c: New file.
1231 * Makefile (tests): Add bug-sleep.
1232
1233 2002-06-19 Steven Munroe <sjmunroe@vnet.ibm.com>
1234
1235 * Examples/ex9.c (main): Use list of children and join them.
1236 (thread): Do not call exit.
1237
1238 2002-06-20 Ulrich Drepper <drepper@redhat.com>
1239
1240 * spinlock.c (wait_node_alloc): We cannot use compare-and-exchange.
1241 Unconditionally use the code using spinlock. Use __pthread_release
1242 to free a spinlock.
1243 (wait_node_free): Likewise.
1244 (__pthread_acquire, __pthread_release): Unconditionally define.
1245
1246 2002-06-07 Jakub Jelinek <jakub@redhat.com>
1247
1248 * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Fix typo.
1249
1250 2002-05-24 Ulrich Drepper <drepper@redhat.com>
1251
1252 * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Use __sync_synchronize.
1253
1254 2002-05-21 Ulrich Drepper <drepper@redhat.com>
1255
1256 * sysdeps/pthread/pthread.h (pthread_create): Rename first
1257 parameter.
1258 (pthread_cancel): Likewise.
1259 * internals.h (__pthread_create_2_1): Likewise.
1260 * sysdeps/unix/sysv/linux/bits/sigthread.h (pthread_kill): Likewise.
1261
1262 2002-05-20 Ulrich Drepper <drepper@redhat.com>
1263
1264 * sysdeps/alpha/pt-machine.c (THREAD_SELF): Remove clobber.
1265 Patch by Glen Nakamura <gen@flex.com>.
1266
1267 2002-05-03 Ulrich Drepper <drepper@redhat.com>
1268
1269 * signals.c: Move sighandler functions to...
1270 * sighandler.c: ...here. New file.
1271 * signals.c: Move signal handler related type definitions to...
1272 * internals.h: ...here. Add prototypes for signal handlers.
1273 * Makefile (libpthread-routines): Add sighandler.
1274 (CFLAGS-sighandler.c): Add $(exceptions).
1275
1276 2002-04-30 Jakub Jelinek <jakub@redhat.com>
1277
1278 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
1279
1280 2002-04-08 Ulrich Drepper <drepper@redhat.com>
1281
1282 * sysdeps/pthread/timer_getoverr.c: Return real overrun.
1283 * sysdeps/pthread/posix-timer.h (struct timer_node): Add overrun_count.
1284 * sysdeps/pthread/timer_routines.c (thread_func): Schedule next timeout
1285 based on previous one and not on current time. Count overruns.
1286 Patch by Eric F. Sorton <eric@cctcorp.com>.
1287
1288 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add DELAYTIMER_MAX.
1289
1290 2002-04-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
1291
1292 * sysdeps/sh/pt-machine.h: Define _PT_MACHINE_H
1293 if it isn't defined yet.
1294 (FLOATING_STACKS, ARCH_STACK_MAX_SIZE): Defined.
1295 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
1296 Likewise.
1297 * sysdeps/sh/tls.h: New file.
1298
1299 2002-04-08 Jakub Jelinek <jakub@redhat.com>
1300
1301 * manager.c (__pthread_manager_event): Use self instead of arg
1302 for INIT_THREAD_SELF.
1303 * sysdeps/i386/useldt.h (INIT_THREAD_SELF): Use sizeof (struct
1304 _pthread_descr_struct) instead of sizeof (*descr).
1305
1306 2002-04-05 Ulrich Drepper <drepper@redhat.com>
1307
1308 * sysdeps/ia64/pt-machine.h: Protect against multiple inclusion.
1309 * sysdeps/alpha/pt-machine.h: Likewise.
1310 * sysdeps/arm/pt-machine.h: Likewise.
1311 * sysdeps/cris/pt-machine.h: Likewise.
1312 * sysdeps/hppa/pt-machine.h: Likewise.
1313 * sysdeps/m68k/pt-machine.h: Likewise.
1314 * sysdeps/mips/pt-machine.h: Likewise.
1315 * sysdeps/powerpc/pt-machine.h: Likewise.
1316 * sysdeps/s390/s390-32/pt-machine.h: Likewise.
1317 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
1318 * sysdeps/sh/pt-machine.h: Likewise.
1319 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
1320 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1321 * sysdeps/x86_64/pt-machine.h: Likewise.
1322
1323 2002-04-05 Jakub Jelinek <jakub@redhat.com>
1324
1325 * man/pthread_mutexattr_init.man (pthread_mutexattr_settype): Document
1326 instead of pthread_mutexattr_setkind_np.
1327 (pthread_mutexattr_gettype): Similarly.
1328 * man/pthread_mutexattr_setkind_np.man: New.
1329 * man/Makefile (SOURCES): Add pthread_mutexattr_setkind_np.man.
1330
1331 2002-04-02 Ulrich Drepper <drepper@redhat.com>
1332
1333 * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Define.
1334
1335 2002-03-22 Jakub Jelinek <jakub@redhat.com>
1336
1337 * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Remove.
1338
1339 2002-03-22 Ulrich Drepper <drepper@redhat.com>
1340
1341 * internals.h (MEMORY_BARRIER): Define as asm with memory as clobber.
1342
1343 2002-03-17 Andreas Jaeger <aj@suse.de>
1344
1345 * sysdeps/i386/pt-machine.h: Add testandset and __compare_and_swap
1346 prototpyes.
1347 * sysdeps/alpha/pt-machine.h: Likewise.
1348 * sysdeps/arm/pt-machine.h: Likewise.
1349 * sysdeps/cris/pt-machine.h: Likewise.
1350 * sysdeps/hppa/pt-machine.h: Likewise.
1351 * sysdeps/i386/i686/pt-machine.h: Likewise.
1352 * sysdeps/ia64/pt-machine.h: Likewise.
1353 * sysdeps/m68k/pt-machine.h: Likewise.
1354 * sysdeps/mips/pt-machine.h: Likewise.
1355 * sysdeps/powerpc/pt-machine.h: Likewise.
1356 * sysdeps/s390/s390-32/pt-machine.h: Likewise.
1357 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
1358 * sysdeps/sh/pt-machine.h: Likewise.
1359 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
1360 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1361 * sysdeps/x86_64/pt-machine.h: Likewise.
1362
1363 * internals.h: Move testandset and __compare_and_swap prototypes
1364 to pt-machine.h.
1365
1366 2002-03-03 Andreas Jaeger <aj@suse.de>
1367
1368 * errno.c: Include resolv.h to avoid warning.
1369
1370 2002-02-27 Ulrich Drepper <drepper@redhat.com>
1371
1372 * pthread.c [USE_TLS] (thread_self_stack): Correct check for upper
1373 stack limit.
1374
1375 2002-02-23 Ulrich Drepper <drepper@redhat.com>
1376
1377 * attr.c (pthread_getattr_np): Don't take thread descriptor size
1378 into account if USE_TLS.
1379 * manager.c (pthread_handle_create): Free TLS data structures if call
1380 failed. Pass correct stack to clone if USE_TLS.
1381 * sysdeps/i386/pt-machine.h: Handle multiple inclusion.
1382 * sysdeps/i386/i686/pt-machine.h: Likewise.
1383 * sysdeps/i386/tls.h: Unconditionally include <pt-machine.h>.
1384
1385 * descr.h (struct _pthread_descr_struct): Update p_header for TLS.
1386 Add p_stackaddr element #if USE_TLS.
1387 * internals.c: Include <tls.h>.
1388 * manager.c: Integrate creating and handling of thread descriptor
1389 for TLS.
1390 * pthread.c: Likewise.
1391 * sysdeps/i386/tls.h (tcbhead_t): Add self pointer.
1392 Include <linuxthreads/descr.h> only if TLS is really used.
1393 (GET_DTV): New macro.
1394 (TLS_INIT_TP): Initialize self pointer.
1395
1396 2002-02-17 Andreas Schwab <schwab@suse.de>
1397
1398 * signals.c (sigwait): Check for old sighandler being SIG_ERR,
1399 not NULL.
1400
1401 2002-02-12 Ulrich Drepper <drepper@redhat.com>
1402
1403 * sysdeps/i386/tls.c (INSTALL_NEW_DTV): Define.
1404 (INSTALL_DTV): Adjust for being passed pointer to element with length.
1405
1406 2002-02-08 Ulrich Drepper <drepper@redhat.com>
1407
1408 * sysdeps/i386/tls.h (TLS_INIT_TP): Also initialize %gs.
1409
1410 2002-02-08 Richard Henderson <rth@redhat.com>
1411
1412 * sysdeps/alpha/elf/pt-initfini.c: Use \n\ for multiline string.
1413
1414 2002-02-08 Ulrich Drepper <drepper@redhat.com>
1415
1416 * sysdeps/i386/tls.h: TLS cannot be supported with FLOATING_STACKS
1417 after all.
1418
1419 2002-02-07 H.J. Lu <hjl@gnu.org>
1420
1421 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Silence the
1422 gcc warning.
1423 (__pthread_spin_lock): Remove ".set noreorder".
1424 * sysdeps/mips/pt-machine.h (__compare_and_swap): Liekwise.
1425
1426 2002-02-05 H.J. Lu <hjl@gnu.org>
1427
1428 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Not use
1429 branch likely.
1430 * sysdeps/mips/pt-machine.h (testandset): Likewise.
1431 (__compare_and_swap): Likewise.
1432
1433 2002-02-07 Ulrich Drepper <drepper@redhat.com>
1434
1435 * internals.h: Move declarations/definitions of
1436 __pthread_initial_thread_bos, __pthread_initial_thread,
1437 __pthread_manager_thread_bos, __pthread_manager_thread_tos,
1438 __pthread_manager_thread, __pthread_nonstandard_stacks, STACK_SIZE,
1439 CURRENT_STACK_FRAME, __pthread_find_self, and thread_self...
1440 * descr.h: ...here.
1441 * sysdeps/i386/tls.h: Add TLS definitions also for !FLOATING_STACKS.
1442 Define THREAD_GETMEM accordingly.
1443
1444 2002-02-06 Ulrich Drepper <drepper@redhat.com>
1445
1446 * sysdeps/i386/tls.h: Include <stddef.h> for size_t.
1447
1448 * sysdeps/i386/tls.h: Define THREAD_DTV.
1449
1450 2002-02-04 Ulrich Drepper <drepper@redhat.com>
1451
1452 * internals.h: Move thread descriptor definition...
1453 * descr.h.: ...here. New file.
1454 * sysdeps/i386/tls.h: New file.
1455
1456 2002-02-01 H.J. Lu <hjl@gnu.org>
1457
1458 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Use a
1459 different register in the delayed slot. Use branch likely.
1460
1461 * sysdeps/mips/pt-machine.h (testandset): Call _test_and_set.
1462 (__compare_and_swap): Return 0 only when failed to compare. Use
1463 branch likely.
1464
1465 2002-02-01 Jakub Jelinek <jakub@redhat.com>
1466
1467 * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set,
1468 __pthread_kill_other_threads_np): Move to GLIBC_PRIVATE.
1469 * sysdeps/i386/i586/Versions: Move all symbols to GLIBC_PRIVATE.
1470 * sysdeps/i386/i686/Versions: Move all symbols to GLIBC_PRIVATE.
1471 * sysdeps/sparc/sparc32/sparcv9/Versions: New file.
1472 * sysdeps/sparc/sparc64/Versions: New file.
1473 * sysdeps/ia64/Versions: Move all symbols to GLIBC_PRIVATE.
1474
1475 2002-01-31 Ulrich Drepper <drepper@redhat.com>
1476
1477 * pthread.c: _dl_cpuclock_offset is not any longer a global variable
1478 in SHARED code, use GL(dl_cpuclock_offset).
1479
1480 2002-01-28 Andreas Jaeger <aj@suse.de>
1481
1482 * sysdeps/mips/pspinlock.c (__pthread_spin_init): Clear *LOCK to
1483 0. Patch by Machida Hiroyuki <machida@sm.sony.co.jp>.
1484
1485 2002-01-16 Martin Schwidefsky <schwidefsky@de.ibm.com>
1486
1487 * sysdeps/s390/s390-32/pt-machine.h (MEMORY_BARRIER): Define.
1488 (CURRENT_STACK_FRAME): Remove duplicate definition.
1489 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
1490
1491 2002-01-14 Martin Schwidefsky <schwidefsky@de.ibm.com>
1492
1493 * Makefile (CFLAGS-tst-cancel.c): Add -fno-inline-functions to prevent
1494 automatic inline.
1495
1496 2002-01-12 Andreas Schwab <schwab@suse.de>
1497
1498 * Makefile (test-srcs): Add tst-signal.
1499 (tests): Run tst-signal.
1500 (distribute): Add tst-signal.sh.
1501 * tst-signal.c, tst-signal.sh: New files.
1502
1503 2002-01-14 Andreas Jaeger <aj@suse.de>
1504
1505 * sysdeps/x86_64/pt-machine.h (INIT_THREAD_SELF): Avoid warning.
1506
1507 2002-01-11 Andreas Schwab <schwab@suse.de>
1508
1509 * signals.c (sighandler): Initialize all elements to SIG_ERR.
1510 (__sigaction): Don't use value from sighandler if it is SIG_ERR.
1511
1512 2002-01-06 Richard Henderson <rth@redhat.com>
1513
1514 * sysdeps/alpha/elf/pt-initfini.c: New file.
1515
1516 2001-12-29 Andreas Jaeger <aj@suse.de>
1517
1518 * Examples/ex9.c: Add noreturn attribute for thread.
1519 * Examples/ex10.c: Likewise.
1520 * Examples/ex13.c (thread_start): Likewise.
1521 * Examples/ex15.c (worker): Likewise.
1522
1523 * Examples/ex18.c: Include unistd.h for prototype of sleep.
1524
1525 2001-12-14 Ulrich Drepper <drepper@redhat.com>
1526
1527 * man/pthread_atfork.man: Adjust description of mutex handling
1528 after fork for current implementation.
1529 * linuxthreads.texi: Likewise [PR libc/2519].
1530
1531 2001-12-13 Andreas Schwab <schwab@suse.de>
1532
1533 * specific.c (pthread_key_delete): Don't contact the thread
1534 manager if no threads have been created yet.
1535
1536 2001-12-12 NIIBE Yutaka <gniibe@m17n.org>
1537
1538 * sysdeps/sh/pt-machine.h (INIT_THREAD_SELF): Added __volatile__
1539 qualifier to be safe.
1540
1541 2001-11-30 Andreas Schwab <schwab@suse.de>
1542
1543 * pthread.c (pthread_handle_sigcancel) [THREAD_SELF]: Double check
1544 that self is the manager thread, and initialize the thread
1545 register if not.
1546 (thread_self_stack) [THREAD_SELF]: New function to find self via
1547 stack pointer.
1548 * manager.c (pthread_handle_create): Don't block cancel signal any
1549 more.
1550
1551 2001-11-29 Andreas Jaeger <aj@suse.de>
1552
1553 * sysdeps/x86_64/pt-machine.h: Use %gs as thread specific register.
1554 (THREAD_SELF): New.
1555 (INIT_THREAD_SELF): New.
1556 (THREAD_GETMEM): New.
1557 (THREAD_GETMEM_NC):
1558 (THREAD_SETMEM): New.
1559 (THREAD_SETMEM_NC): New.
1560 (FLOATING_STACKS): Define.
1561 (ARCH_STACK_MAX_SIZE): Define.
1562
1563 2001-11-28 Kaz Kylheku <kaz@ashi.footprints.net>
1564
1565 Bugfix to pthread_key_delete. It was iterating over the thread
1566 manager's linked list of threads, behind the thread manager's
1567 back causing a race. The fix is to have the manager iterate over
1568 the threads instead, using a new request type for doing so.
1569 * internals.h (struct pthread_request): New manager request type
1570 REQ_FOR_EACH_THREAD.
1571 * manager.c (pthread_for_each_thread): New function.
1572 (__pthread_manager): Handle new REQ_FOR_EACH_THREAD request.
1573 * specific.c (struct pthread_key_delete_helper_args): New type.
1574 (pthread_key_delete_helper): New static function.
1575 (pthread_key_delete): Use the new thread manager
1576 REQ_FOR_EACH_THREAD function to iterate over the threads and set
1577 the delete key slot to a null value in each thread.
1578 * Examples/ex18.c: New test.
1579 * Makefile (tests): Add ex18.
1580
1581 2001-11-22 Wolfram Gloger <wg@malloc.de>
1582
1583 * pthread.c (pthread_onexit_process): Don't call free
1584 after threads have been asynchronously terminated.
1585
1586 * manager.c (pthread_handle_exit): Surround cancellation
1587 of threads with __flockfilelist()/__funlockfilelist().
1588
1589 2001-11-26 Andreas Schwab <schwab@suse.de>
1590
1591 * manager.c (pthread_handle_create): Start the child thread with
1592 the cancel signal blocked, so that it does not handle it before
1593 the thread register is set up. Save errno from failed clone call.
1594
1595 2001-11-15 Ulrich Drepper <drepper@redhat.com>
1596
1597 * sysdeps/i386/i686/Implies: Removed.
1598 * sysdeps/i386/i686/Versions: New file.
1599
1600 2001-10-31 Andreas Jaeger <aj@suse.de>
1601
1602 * sysdeps/x86_64/Makefile: Remove, we do not need it anymore.
1603
1604 2001-10-05 Kevin Buettner <kevinb@cygnus.com>
1605
1606 * pthread.c (__linuxthread_pthread_sizeof_descr): Change name
1607 to __linuxthreads_pthread_sizeof_descr to match name used by
1608 symbol_list_arr[LINUXTHREADS_PTHREAD_SIZEOF_DESCR] in
1609 linuxthreads_db/td_symbol_list.c.
1610
1611 2001-09-22 Andreas Jaeger <aj@suse.de>
1612
1613 * linuxthreads/tst-context.c: Avoid compile warning.
1614
1615 2001-09-20 Andreas Jaeger <aj@suse.de>
1616
1617 * shlib-versions: Add x86-64.
1618
1619 2001-09-19 Andreas Jaeger <aj@suse.de>
1620
1621 * sysdeps/x86_64/Makefile: New file.
1622 * sysdeps/x86_64/pspinlock.c: New file.
1623 * sysdeps/x86_64/pt-machine.h: New file.
1624
1625 2001-09-12 Jakub Jelinek <jakub@redhat.com>
1626
1627 * sysdeps/pthread/timer_delete.c (timer_delete): Thread may be NULL
1628 for SIGEV_NONE.
1629 * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
1630
1631 2001-09-11 Ulrich Drepper <drepper@redhat.com>
1632 Wolfram Gloger <wg@malloc.de>
1633
1634 * join.c: Protect all communications from and to manager with
1635 TEMP_FAILURE_RETRY.
1636 * manager.c: Likewise.
1637 * pthread.c: Likewise.
1638 * smeaphore.c: Likewise.
1639
1640 2001-08-29 Ulrich Drepper <drepper@redhat.com>
1641
1642 * spinlock.c (__pthread_lock): Top max_count value with
1643 MAX_ADAPTIVE_SPIN_COUNT.
1644 * internals.h (MAX_ADAPTIVE_SPIN_COUNT): Define if not already done.
1645
1646 * sysdeps/i386/i686/pt-machine.h (BUSY_WAIT_NOP): New macro to
1647 help P4.
1648
1649 2001-08-27 Jakub Jelinek <jakub@redhat.com>
1650
1651 * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_t): Only define to
1652 non-opaque type if __USE_UNIX98.
1653
1654 2001-08-26 Jakub Jelinek <jakub@redhat.com>
1655
1656 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_t): Define
1657 non-opaque lock types also if _IO_MTSAFE_IO is defined.
1658
1659 2001-08-23 Roland McGrath <roland@frob.com>
1660
1661 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start): Take
1662 new first argument, skip the cleanup handler if it's zero.
1663 (_LIBC_LOCK_RECURSIVE_INITIALIZER): New macro.
1664 (__libc_lock_define_initialized_recursive): Use it.
1665 * sysdeps/pthread/bits/stdio-lock.h: File removed.
1666 The sysdeps/generic file from the main tree now suffices.
1667
1668 2001-08-22 Roland McGrath <roland@frob.com>
1669
1670 * sysdeps/pthread/bits/stdio-lock.h: Include <bits/libc-lock.h>
1671 instead of <pthread.h>.
1672 (_IO_lock_t): Define this typedef using __libc_lock_define_recursive.
1673 (_IO_lock_initializer): Add braces.
1674 (_IO_lock_lock): Use __libc_lock_lock_recursive.
1675 (_IO_lock_unlock): Use __libc_lock_unlock_recursive.
1676
1677 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_recursive_t): New type.
1678 (__libc_lock_define_initialized_recursive): Use it.
1679 (__libc_lock_init_recursive): Likewise.
1680 (__libc_lock_fini_recursive): Likewise.
1681 (__libc_lock_lock_recursive): Likewise.
1682 (__libc_lock_trylock_recursive): Likewise.
1683 (__libc_lock_unlock_recursive): Likewise.
1684 (__libc_lock_define_recursive): New macro.
1685
1686 2001-08-14 Jakub Jelinek <jakub@redhat.com>
1687
1688 * lockfile.c (__pthread_provide_lockfile): New variable.
1689 * pthread.c (__pthread_require_lockfile): New variable.
1690 * cancel.c (__pthread_require_lockfile): New variable.
1691
1692 2001-07-31 Ulrich Drepper <drepper@redhat.com>
1693
1694 * tst-context.c (threadfct): Initialize context before calling
1695 makecontext.
1696
1697 * Examples/ex17.c: Make sure test thread is around long enough.
1698
1699 2001-07-26 kaz Kojima <kkojima@rr.iij4u.or.jp>
1700
1701 * sysdeps/sh/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF): Defined.
1702
1703 2001-07-24 Ulrich Drepper <drepper@redhat.com>
1704
1705 * tst-context.c (main): Print explanation before bailing out
1706 because context handling is not supported.
1707
1708 2001-07-23 Ulrich Drepper <drepper@redhat.com>
1709
1710 * Makefile (tests): Add tst-context.
1711 * tst-context.c: New file.
1712
1713 * sysdeps/pthread/bits/stdio-lock.h: Define
1714 _IO_cleanup_region_start_noarg.
1715
1716 2001-07-23 Jakub Jelinek <jakub@redhat.com>
1717
1718 * sysdeps/alpha/pt-machine.h (FLOATING_STACKS): Define.
1719 (ARCH_STACK_MAX_SIZE): Define.
1720 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
1721 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1722
1723 2001-07-19 Jakub Jelinek <jakub@redhat.com>
1724
1725 * sysdeps/i386/useldt.h: Fix typo in ARCH_STACK_MAX_SIZE comment.
1726
1727 * sysdeps/ia64/pt-machine.h (FLOATING_STACKS): Define.
1728 (ARCH_STACK_MAX_SIZE): Define.
1729 * manager.c (pthread_allocate_stack): Handle FLOATING_STACKS with
1730 NEED_SEPARATE_REGISTER_STACK.
1731
1732 2001-07-16 Andreas Schwab <schwab@suse.de>
1733
1734 * Makefile (before-compile): Don't add $(objpfx)crti.o.
1735 (omit-deps): Add crti.
1736 ($(objpfx)libpthread.so): Depend on $(objpfx)crti.o, but make sure
1737 it is filtered out of the link command.
1738
1739 2001-07-16 Ulrich Drepper <drepper@redhat.com>
1740
1741 * pthread.c (pthread_initialize): For FLOATING_STACKS don't bother
1742 to find the right value for __pthread_initial_thread_bos, it's not
1743 used. If not FLOATING_STACKS first run
1744 __pthread_init_max_stacksize.
1745
1746 2001-06-16 H.J. Lu <hjl@gnu.org>
1747
1748 * internals.h: Include <stackinfo.h>.
1749
1750 * attr.c: Don't include <stackinfo.h> here.
1751 * cancel.c: Likewise.
1752 * manager.c: Likewise.
1753 * pthread.c: Likewise.
1754 * ptlongjmp.c: Likewise.
1755
1756 2001-03-23 Matthew Wilcox <willy@ldl.fc.hp.com>
1757
1758 * attr.c: Make _STACK_GROWS_UP work.
1759 * internals.h: Likewise.
1760 * manager.c: Likewise.
1761 * pthread.c: Likewise.
1762
1763 2001-06-15 H.J. Lu <hjl@gnu.org>
1764
1765 * pthread.c (__pthread_reset_main_thread): Fix a typo.
1766
1767 2001-02-02 John S. Marvin <jsm@udlkern.fc.hp.com>
1768
1769 * semaphore.h: Use struct _pthread_fastlock as an element of
1770 sem_t instead of an identical struct.
1771 * rwlock.c: Remove casts.
1772 * semaphore.c: Likewise.
1773
1774 2001-04-30 Alan Modra <amodra@one.net.au>
1775
1776 * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: New.
1777
1778 2001-05-25 Bruce Mitchener <bruce@cubik.org>
1779
1780 * linuxthreads.texi: Spelling corrections.
1781
1782 2001-05-25 Ulrich Drepper <drepper@redhat.com>
1783
1784 * oldsemaphore.c (__old_sem_wait): Clear p_nextwaiting before
1785 returning successfully.
1786 Patch by Gene Cooperman <gene@ccs.neu.edu>.
1787
1788 2001-05-24 Ulrich Drepper <drepper@redhat.com>
1789
1790 * spinlock.c (__pthread_lock) [HAS_COMPARE_AND_SWAP]: Before doing any
1791 serious work try once whether the lock is uncontested.
1792 Remove duplicate reading of __status before loop.
1793 Change suggested by Hans Boehm <hans_boehm@hp.com>.
1794
1795 * spinlock.h (__pthread_trylock): Remove need for oldstatus variable.
1796 (__pthread_alt_trylock): Likewise.
1797
1798 2001-05-01 Kaz Kylheku <kaz@ashi.footprints.net>
1799
1800 Memory barrier overhaul following line by line inspection.
1801 * mutex.c (pthread_once): Missing memory barriers added.
1802 * pthread.c (__pthread_wait_for_restart_signal,
1803 __pthread_timedsuspend_new, __pthread_restart_new): Added
1804 memory barriers ``just in case'' and for documentary value.
1805 * spinlock.c (__pthread_release): New inline function for releasing
1806 spinlock, to complement __pthread_acquire. Includes memory
1807 barrier prior to assignment to spinlock, and __asm __volatile
1808 dance to prevent reordering or optimization of the spinlock access.
1809 * spinlock.c (__pthread_unlock, __pthread_alt_lock,
1810 __pthread_alt_timedlock, __pthread_alt_unlock,
1811 __pthread_compare_and_swap): Updated to use new __pthread_release
1812 instead of updating spinlock directly.
1813 * spinlock.c (__pthread_lock, __pthread_unlock, wait_node_alloc,
1814 wait_node_free, wait_node_dequeue, __pthread_alt_lock,
1815 __pthread_alt_timedlock, __pthread_alt_unlock, __pthread_acquire):
1816 Memory barrier overhaul. Lots of missing memory barriers added,
1817 a couple needless ones removed.
1818 * spinlock.c (__pthread_compare_and_swap): testandset optimization
1819 removed, just calls __pthread_acquire, which has the new read
1820 barrier in it before its testandset.
1821
1822 2001-05-20 Roland McGrath <roland@frob.com>
1823
1824 * Makeconfig: New file, variables used to be in main libc Makeconfig.
1825
1826 2001-05-09 Geoff Keating <geoffk@redhat.com>
1827
1828 * sysdeps/powerpc/pt-machine.h
1829 (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): Define.
1830 (__compare_and_swap): Remove memory barriers.
1831 (__compare_and_swap_with_release_semantics): New function.
1832
1833 2001-04-24 Andreas Jaeger <aj@suse.de>
1834
1835 * wrapsyscall.c: send* and recv* return ssize_t.
1836
1837 * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Unlock the
1838 mutex instead of double locking it.
1839 Reported by Pierre Artaud <partaud@sodatec.com>.
1840
1841 2001-04-23 Ulrich Drepper <drepper@redhat.com>
1842
1843 * sysdeps/pthread/getcpuclockid.c: Make function generic, test
1844 using #ifdef whether the clock is available.
1845 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: Removed.
1846
1847 * sysdeps/ia64/Versions: New file.
1848
1849 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init): We don't
1850 have to call __gmon_start__ in the libpthread DSO.
1851 * sysdeps/pthread/pt-initfini.c (_init): Likewise.
1852
1853 * Makefile (libpthread-routines): Add ptclock_gettime and
1854 ptclock_settime.
1855 * internals.h: Don't use cpuclock-init.h definitions, use
1856 hp-timing.h definitions.
1857 * pthread.c: Likewise.
1858 * manager.c: Likewise.
1859 * ptclock_gettime.c: New file.
1860 * ptclock_settime.c: New file.
1861 * internals.h: Fix parameter type for __pthread_clock_gettime and
1862 __pthread_clock_settime.
1863
1864 * sysdeps/i386/i586/ptclock_gettime.c: Removed.
1865 * sysdeps/i386/i586/ptclock_settime.c: Removed.
1866 * sysdeps/i386/i586/Makefile: Removed.
1867
1868 2001-04-22 Ulrich Drepper <drepper@redhat.com>
1869
1870 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_ASYNCH_IO.
1871 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1872
1873 2001-04-21 Andreas Jaeger <aj@suse.de>
1874
1875 * sysdeps/pthread/timer_routines.c (thread_func): Add noreturn
1876 attribute, remove statements that will never be executed.
1877 (thread_func): Remove mutex_unlock call since it's never executed.
1878 (thread_func): Fix comment as suggested by Jakub Jelinek.
1879
1880 * manager.c (__pthread_manager): Add noreturn
1881 attribute.
1882 (pthread_start_thread): Likewise, remove return statement.
1883 (pthread_start_thread_event): Likewise.
1884 Add noreturn attribute for pthread_handle_exit.
1885 * weaks.c: Add noreturn attribute for pthread_exit.
1886
1887 * internals.h: Add __pthread_clock_gettime and
1888 __pthread_clock_settime prototypes.
1889
1890 2001-04-21 Ulrich Drepper <drepper@redhat.com>
1891
1892 * internals.h: Include <cpuclock-init.h>.
1893 (struct _pthread_descr_struct): Add p_cpuclock_offset field if
1894 CPUCLOCK_VARDEF is defined.
1895 * pthread.c (__pthread_initialize_minimal): Initialize
1896 p_cpuclock_offset field for main thread if CPUCLOCK_INIT is defined.
1897 * manager.c (pthread_start_thread): Set p_cpuclock_offset field
1898 for new thread to current CPU clock value.
1899
1900 * sysdeps/i386/useldt.h: Extend all the macros to handle 8-byte values.
1901
1902 * sysdeps/i386/i586/Makefile: New file.
1903 * sysdeps/i386/i586/Versions: New file.
1904 * sysdeps/i386/i586/ptclock_gettime.c: New file.
1905 * sysdeps/i386/i586/ptclock_settime.c: New file.
1906 * sysdeps/i386/i686/Implies: New file.
1907
1908 2001-04-18 Jakub Jelinek <jakub@redhat.com>
1909
1910 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Put specs into
1911 $generated, not $postclean-generated.
1912
1913 2001-04-18 Andreas Jaeger <aj@suse.de>
1914
1915 * Makefile (otherlibs): Added.
1916
1917 2001-04-18 Jakub Jelinek <jakub@redhat.com>
1918
1919 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
1920
1921 2001-04-16 Ulrich Drepper <drepper@redhat.com>
1922
1923 * signals.c (sigwait): NSIG is no signal number. Block all
1924 signals while in signal handler for signals in SET.
1925 Patch by Manfred Spraul <manfred@colorfullife.com>.
1926
1927 2001-04-12 Ulrich Drepper <drepper@redhat.com>
1928
1929 * tst-cancel.c: Disable most tests. Add new test where all
1930 cleanup handlers must run.
1931 * Makefile (tests): Add tst-cancel again.
1932
1933 * cancel.c (__pthread_perform_cleanup): Correct condition for
1934 leaving cleanup loop early.
1935
1936 * sysdeps/i386/Makefile: Make sure gcc uses a frame pointer for
1937 all the files which use CURRENT_STACK_FRAME.
1938 * sysdeps/i386/pt-machine.h (CURRENT_STACK_FRAME): Define using
1939 __builtin_frame_address.
1940 * sysdeps/i386/i686/pt-machine.h: Likewise.
1941
1942 2001-04-11 Ulrich Drepper <drepper@redhat.com>
1943
1944 * Makefile (tests): Comment out tst-cancel for now.
1945
1946 * tst-cancel.c (main): Cleanup 4 is supposed to run. Create
1947 temporary file in object directory.
1948 * Makefile: Don't allow inlining when compiling tst-cancel.c.
1949 Pass $(objpfx) to tst-cancel.
1950
1951 2001-04-11 David S. Miller <davem@redhat.com>
1952
1953 * sysdeps/sparc/sparc32/pt-machine.h (stack_pointer): Advance
1954 up closer to user local variables so that new cleanup heuristics work.
1955 * sysdeps/sparc/sparc64/pt-machine.h (stack_pointer): Likewise.
1956
1957 2001-04-11 Ulrich Drepper <drepper@redhat.com>
1958
1959 * cancel.c (_pthread_cleanup_push): Catch invalid __prev buffer
1960 and remove it.
1961 (_pthread_cleanup_push_defer): Likewise.
1962
1963 * tst-cancel.c (main): Fix loop printing cleanup output.
1964
1965 2001-04-10 kaz Kojima <kkojima@rr.iij4u.or.jp>
1966
1967 * sysdeps/sh/pspinlock.c (__pthread_spin_lock): Fix a reverse
1968 test.
1969 (__pthread_spin_trylock): Likewise.
1970 * sysdeps/sh/pt-machine.h (testandset): Likewise.
1971
1972 2001-04-10 Ulrich Drepper <drepper@redhat.com>
1973
1974 * join.c (pthread_exit): Move code to new function __pthread_do_exit
1975 which takes an extra parameter with the current frame pointer.
1976 Call new function with CURRENT_STACK_FRAME.
1977 (__pthread_do_exit): New function. Call __pthread_perform_cleanup
1978 with the new parameter.
1979 (pthread_join): Call __pthread_do_exit instead of pthread_exit.
1980 * cancel.c (__pthread_perform_cleanup): Takes extra parameter. Use
1981 this parameter as the initial value the cleanup handler records are
1982 compared against. No active cleanup handler record must have an
1983 address lower than the previous one and the initial record must be
1984 above (below on PA) the frame address passed in.
1985 (pthread_setcancelstate): Call __pthread_do_exit instead of
1986 pthread_exit.
1987 (pthread_setcanceltype): Likewise.
1988 (pthread_testcancel): Likewise.
1989 (_pthread_cleanup_pop_restore): Likewise.
1990 * condvar.c (pthread_cond_wait): Likewise.
1991 (pthread_cond_timedwait_relative): Likewise.
1992 * manager.c (pthread_start_thread): Likewise.
1993 * oldsemaphore.c (__old_sem_wait): Likewise.
1994 * pthread.c (pthread_handle_sigcancel): Likewise.
1995 * semaphore.c (__new_sem_wait): Likewise.
1996 (sem_timedwait): Likewise.
1997 * ptlongjmp.c (pthread_cleanup_upto): Also use current stack frame
1998 to limit the cleanup handlers which get run.
1999 * internals.h: Add prototype for __pthread_do_exit. Adjust prototype
2000 for __pthread_perform_cleanup.
2001
2002 * Makefile (tests): Add tst-cancel.
2003 * tst-cancel.c: New file.
2004
2005 2001-04-08 Hans-Peter Nilsson <hp@axis.com>
2006
2007 * sysdeps/cris/pt-machine.h: New file.
2008 * sysdeps/cris/pspinlock.c: New file.
2009
2010 2001-04-09 Hans-Peter Nilsson <hp@axis.com>
2011
2012 * shlib-versions: Add case for Linux on CRIS.
2013
2014 2001-03-26 Ulrich Drepper <drepper@redhat.com>
2015
2016 * attr.c (pthread_getattr_np): Correct computation of stack size
2017 for machiens with register stack.
2018
2019 * Examples/ex17.c (main): Correct detection of failed mmap call.
2020
2021 2001-03-21 Jakub Jelinek <jakub@redhat.com>
2022
2023 * pthread.c (__pthread_initialize_manager): Fix a typo.
2024
2025 2001-03-21 Jakub Jelinek <jakub@redhat.com>
2026
2027 * attr.c (__pthread_attr_setstack): Fix alignment check.
2028 (pthread_getattr_np): __stackaddr is top of stack, not bottom.
2029 * Makefile (tests): Add ex17 test.
2030 * Examples/ex17.c: New test.
2031
2032 2001-03-20 Ulrich Drepper <drepper@redhat.com>
2033
2034 * Makefile: Define -D_RPC_THREAD_SAFE_ for cancel.c.
2035 * cancel.c (__pthread_perform_cleanup): Call __rpc_thread_destroy.
2036 * sysdeps/pthread/bits/libc-tsd.h: Define _LIBC_TSD_KEY_VARS.
2037
2038 2001-03-18 Ulrich Drepper <drepper@redhat.com>
2039
2040 * Makefile: When generating DSO link with libc_nonshared.a.
2041
2042 2001-02-26 Jakub Jelinek <jakub@redhat.com>
2043
2044 * signals.c (pthread_sighandler): Use CALL_SIGHANDLER.
2045
2046 2001-02-23 Jakub Jelinek <jakub@redhat.com>
2047
2048 * internals.h (__pthread_init_max_stacksize): New prototype.
2049 * attr.c (__pthread_attr_setstacksize): Call
2050 __pthread_init_max_stacksize if not yet initialized.
2051 * pthread.c (__pthread_init_max_stacksize): New function.
2052 (__pthread_initialize_manager): Call it.
2053 Patch by <dtc@cmucl.cons.org>.
2054
2055 2001-03-16 Ulrich Drepper <drepper@redhat.com>
2056
2057 * attr.c (pthread_getattr_np): Fix __stacksize computation for IA-64.
2058
2059 2001-03-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
2060
2061 * shlib-versions: Add rule for Linux on 64 bit S/390.
2062 * sysdeps/s390/s390-64/pt-machine.h: New file.
2063 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
2064
2065 2001-03-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
2066
2067 * sysdeps/s390/pt-machine.h: Move to...
2068 * sysdeps/s390/s390-32/pt-machine.h: ...here.
2069 Add defines for FLOATING_STACK and ARCH_STACK_MAX_SIZE.
2070
2071 2001-03-15 Ulrich Drepper <drepper@redhat.com>
2072
2073 * Versions [libpthread] (GLIBC_2.2.3): Add pthread_getattr_np.
2074 * attr.c: Implement pthread_getattr_np.
2075 * sysdeps/pthread/pthread.h: Add prototype for pthread_getattr_np.
2076 * internals.h (struct _pthread_descr_struct): Add p_inheritsched.
2077 * manager.c (pthread_handle_create): Initialize p_inheritsched.
2078
2079 2001-03-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
2080
2081 * sysdeps/unix/sysv/linux/s390/pt-initfini.c: Use 0x07 padding for
2082 code alignment.
2083
2084 2001-02-20 Hans Boehm <hans_boehm@hp.com>
2085
2086 * manager.c (manager_mask): Removed static vesion. Now always local
2087 to __pthread_manager().
2088 (manager_mask_all): Removed completely.
2089 (__pthread_manager): Remove manager_mask_all initialization.
2090 (pthread_handle_create): Remove code to set and reset signal mask
2091 around __clone2() calls.
2092
2093 2001-02-17 Jakub Jelinek <jakub@redhat.com>
2094
2095 * spinlock.c (__pthread_lock): Force lock->__status to be read from
2096 memory on every spin.
2097
2098 2001-02-10 Andreas Jaeger <aj@suse.de>
2099
2100 * Makefile (extra-objs): New.
2101
2102 2001-02-09 Jakub Jelinek <jakub@redhat.com>
2103
2104 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Add
2105 __pthread_initialize_minimal prototype.
2106
2107 2001-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
2108
2109 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
2110
2111 2001-02-06 Martin Schwidefsky <schwidefsky@de.ibm.com>
2112
2113 * sysdeps/unix/sysv/linux/s390/pt-initfini.c: New file.
2114
2115 2001-02-06 Ulrich Drepper <drepper@redhat.com>
2116
2117 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: First attempt to fix the
2118 broken code. Patch by Jes Sorensen.
2119
2120 2001-02-06 Andreas Jaeger <aj@suse.de>
2121
2122 * sysdeps/pthread/pthread.h: Move __pthread_initialize from here
2123 to...
2124 * internals.h: ...here.
2125
2126 2001-02-05 Jes Sorensen <jes@linuxcare.com>
2127
2128 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
2129
2130 2001-02-02 Ulrich Drepper <drepper@redhat.com>
2131
2132 * Versions: Remove __pthread_initialize_minimal.
2133
2134 2001-02-01 Ulrich Drepper <drepper@redhat.com>
2135
2136 * Makefile: Add rules to build crti.o and make it being used in
2137 building libpthread.so.
2138 * sysdeps/i386/Makefile: New file.
2139 * sysdeps/pthread/pt-initfini.c: New file.
2140
2141 * pthread.c: Cleanups.
2142
2143 2001-01-28 Andreas Jaeger <aj@suse.de>
2144
2145 * oldsemaphore.c (__old_sem_init): Adjust for last change.
2146 * sysdeps/pthread/bits/libc-lock.h: Likewise.
2147 * spinlock.c: Likewise.
2148
2149 2001-01-28 Ulrich Drepper <drepper@redhat.com>
2150
2151 * sysdeps/pthread/bits/initspin.h: Make all names namespace clean.
2152 * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
2153 * manager.c: Adjust for namespace cleanup in bits/initspin.h.
2154 * pthread.c: Likewise.
2155 * spinlock.h: Likewise.
2156 * sysdeps/pthread/pthread.h: Likewise.
2157
2158 2001-01-26 Ulrich Drepper <drepper@redhat.com>
2159
2160 * sysdeps/pthread/bits/pthreadtypes.h: Define pthread_attr_t also
2161 as struct __pthread_attr_s.
2162
2163 * semaphore.h (sem_t): Cleanup namespace, rename status and
2164 spinlock elements.
2165
2166 2001-01-13 Jakub Jelinek <jakub@redhat.com>
2167
2168 * pthread.c (pthread_onexit_process): Clear
2169 __pthread_manager_thread_bos after freeing it.
2170 * Makefile (tests): Add ex16.
2171 * Examples/ex16.c: New file.
2172
2173 2001-01-11 Jakub Jelinek <jakub@redhat.com>
2174
2175 * Makefile (CFLAGS-pthread.c): Pass -DHAVE_Z_NODELETE if ld supports
2176 -z nodelete.
2177 * pthread.c (pthread_exit_process): Rename to...
2178 (pthread_onexit_process): ...this.
2179 (pthread_atexit_process, pthread_atexit_retcode): New.
2180 (pthread_initialize): Call __cxa_atexit instead of __cxa_on_exit
2181 and only if HAVE_Z_NODELETE is not defined.
2182 (__pthread_initialize_manager): Register pthread_atexit_retcode
2183 with __cxa_atexit.
2184
2185 2001-01-11 Ulrich Drepper <drepper@redhat.com>
2186
2187 * pthread.c (pthread_initialize): Use __cxs_on_exit not __cxa_atexit.
2188
2189 2001-01-11 Jakub Jelinek <jakub@redhat.com>
2190
2191 * Makefile (tests): Add ex15.
2192 * Examples/ex15.c: New test.
2193
2194 2001-01-08 Ulrich Drepper <drepper@redhat.com>
2195
2196 * pthread.c (pthread_exit_process): Free memory allocated for
2197 manager stack.
2198
2199 2000-12-31 Ulrich Drepper <drepper@redhat.com>
2200
2201 * manager.c (pthread_alloca_stack): Remove MAP_FIXED from mmap calls.
2202 (pthread_free): Always unmap the stack. It's safe now that we don't
2203 use MAP_FIXED to allocate stacks.
2204
2205 2000-12-31 Ulrich Drepper <drepper@redhat.com>
2206
2207 * sysdeps/powerpc/pspinlock.c: Don't include pt-machine.h here.
2208
2209 * manager.c (pthread_allocate_stack): Prepare for removal of MAP_FIXED.
2210
2211 2000-11-15 Wolfram Gloger <wg@malloc.de>
2212
2213 * manager.c (pthread_free): [!FLOATING_STACKS]: Only remap the
2214 stack to PROT_NONE, don't unmap it, avoiding collisions with malloc.
2215
2216 2000-12-27 Andreas Jaeger <aj@suse.de>
2217
2218 * Examples/ex13.c: Make local functions static.
2219 * ecmutex.c: Likewise.
2220 * joinrace.c: Likewise.
2221 * Examples/ex14.c: Likewise.
2222
2223 * Examples/ex2.c: Make local functions static; reformat.
2224 * Examples/ex1.c: Likewise.
2225 * Examples/ex4.c: Likewise.
2226 * Examples/ex5.c: Likewise.
2227 * Examples/ex7.c: Likewise.
2228
2229 * oldsemaphore.c: Add prototypes to shut up GCC.
2230 * pt-machine.c: Likewise.
2231
2232 * weaks.c: Add prototype for pthread_exit.
2233
2234 * internals.h: Add some prototypes, format prototypes and add
2235 missing externs.
2236 Move __libc_waitpid prototype to include/sys/wait.h.
2237
2238 * rwlock.c: Include <bits/libc-lock.h> for prototypes.
2239 * mutex.c: Likewise.
2240 * specific.c: Likewise.
2241 * ptfork.c: Likewise.
2242
2243 * lockfile.c: Include internals.h to get prototypes.
2244 * events.c: Likewise.
2245 * sysdeps/alpha/pspinlock.c: Likewise.
2246 * sysdeps/arm/pspinlock.c: Likewise.
2247 * sysdeps/hppa/pspinlock.c: Likewise.
2248 * sysdeps/i386/pspinlock.c: Likewise.
2249 * sysdeps/ia64/pspinlock.c: Likewise.
2250 * sysdeps/m68k/pspinlock.c: Likewise.
2251 * sysdeps/mips/pspinlock.c: Likewise.
2252 * sysdeps/powerpc/pspinlock.c: Likewise.
2253 * sysdeps/s390/pspinlock.c: Likewise.
2254 * sysdeps/sh/pspinlock.c: Likewise.
2255 * sysdeps/sparc/sparc32/pspinlock.c: Likewise.
2256 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: Likewise.
2257 * sysdeps/sparc/sparc64/pspinlock.c: Likewise.
2258
2259 2000-12-27 Ulrich Drepper <drepper@redhat.com>
2260
2261 * attr.c (__pthread_attr_setstack): Fix setting of __stackaddr element.
2262 (__pthread_attr_getstack): Return correct address.
2263 Add warnings for using pthread_attr_getstackaddr and
2264 pthread_attr_setstackaddr.
2265
2266 2000-12-26 Ulrich Drepper <drepper@redhat.com>
2267
2268 * Examples/ex6.c (test_thread): Make static.
2269 * Examples/ex12.c (test_thread): Make static and add noreturn
2270 attribute.
2271
2272 2000-12-18 Jes Sorensen <jes@linuxcare.com>
2273
2274 * linuxthreads/sysdeps/ia64/pt-machine.h: __compare_and_swap
2275 and compare_and_swap_with_release_semantics returns int not long.
2276
2277 2000-12-17 Andreas Jaeger <aj@suse.de>
2278
2279 * sysdeps/s390/pt-machine.h (testandset): Use long int as return
2280 value.
2281 * sysdeps/arm/pt-machine.h (testandset): Likewise.
2282 * sysdeps/hppa/pt-machine.h (testandset): Likewise.
2283 * sysdeps/m68k/pt-machine.h (testandset): Likewise.
2284 * sysdeps/sh/pt-machine.h (testandset): Likewise.
2285 * sysdeps/sparc/sparc32/pt-machine.h (testandset): Likewise.
2286 * sysdeps/sparc/sparc64/pt-machine.h (testandset): Likewise.
2287
2288 2000-12-17 Ulrich Drepper <drepper@redhat.com>
2289
2290 * sysdeps/i386/pt-machine.h (testandset): Adjust for prototype change.
2291 * sysdeps/i386/i686/pt-machine.h (testandset): Likewise.
2292
2293 2000-12-17 Andreas Jaeger <aj@suse.de>
2294
2295 * internals.h: Add prototypes for testandset and
2296 __compare_and_swap to shut up gcc warnings.
2297
2298 2000-12-06 Wolfram Gloger <wg@malloc.de>
2299
2300 * join.c (pthread_detach): Allow case where the thread has already
2301 terminated.
2302
2303 2000-12-05 Andreas Jaeger <aj@suse.de>
2304
2305 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Don't set mips2.
2306 * sysdeps/mips/pt-machine.h (testandset): Likewise.
2307 (__compare_and_swap): Likewise.
2308 Patches by Maciej W. Rozycki <macro@ds2.pg.gda.pl>.
2309
2310 2000-11-20 Jakub Jelinek <jakub@redhat.com>
2311
2312 * Examples/ex3.c (main): Cast int to long before casting to void *.
2313 (search): Cast void * to long, not int.
2314 * Examples/ex8.c (main, thread): Similarly.
2315 * Examples/ex11.c (main): Similarly.
2316 * Examples/ex14.c (worker, do_test): Similarly.
2317 * ecmutex.c (worker, do_test): Similarly.
2318 (nlocks): Cast to int.
2319
2320 2000-11-08 Bruce Mitchener <bruce@cubik.org>
2321
2322 * linuxthreads.texi: Add documentation for pthreads attributes
2323 guardsize, stackaddr, stacksize, and stack. Fix typo in previous
2324 patch. Document pthread_[sg]etconcurrency(). Mark
2325 pthread_mutexattr_[sg]ettype() as POSIX rather than GNU.
2326
2327 2000-11-07 Ulrich Drepper <drepper@redhat.com>
2328
2329 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
2330 Don't define it.
2331 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2332 Reported by Christopher Yeoh <cyeoh@linuxcare.com.au>.
2333
2334 2000-11-06 Ulrich Drepper <drepper@redhat.com>
2335
2336 * cancel.c (pthread_cancel): Always set p_canceled, even if we are
2337 not doing it right now.
2338 Reported by Kaz Kylheku <kaz@ashi.footprints.net>.
2339
2340 2000-10-30 Ulrich Drepper <drepper@redhat.com>
2341
2342 * Examples/ex4.c (main): Don't use exit() to avoid warning with
2343 broken compilers.
2344
2345 2000-10-29 Ulrich Drepper <drepper@redhat.com>
2346
2347 * attr.c (__pthread_attr_setguardsize): Don't round guardsize
2348 here. Reported by Bruce Mitchener <bruce@cubik.org>.
2349
2350 * linuxthreads.texi: Changes terminology to 'type' from 'kind' when
2351 discussing mutexes. (As per the Unix98 name for the API.)
2352 Changes documentation for pthread_mutexattr_setkind_np() and
2353 pthread_mutexattr_getkind_np() over to the Unix98 APIs for the
2354 same: pthread_mutexattr_settype() and pthread_mutexattr_gettype().
2355 Changes references to PTHREAD_MUTEXATTR_FAST_NP to
2356 PTHREAD_MUTEXATTR_ADAPTIVE_NP.
2357 Begins to introduce discussion of the ``timed'' mutex type. This
2358 discussion is currently incomplete.
2359 Patch by Bruce Mitchener <bruce@cubik.org>.
2360
2361 2000-10-26 Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
2362 Yutaka Niibe <gniibe@chroot.org>
2363
2364 * sysdeps/sh/pt-machine.h (testandset): Since the operand of TAS.B
2365 has restrictions, use register.
2366
2367 2000-10-23 Andreas Schwab <schwab@suse.de>
2368
2369 * Examples/ex14.c (TIMEOUT): Override default timeout.
2370
2371 2000-10-16 Ulrich Drepper <drepper@redhat.com>
2372
2373 * specific.c: Protect tsd array modification in thread data
2374 structures by getting the thread lock in pthread_key_delete and
2375 __pthread_destroy_specifics.
2376 Patch by Wolfram Gloger <Wolfram.Gloger@dent.med.uni-muenchen.de>.
2377
2378 2000-10-12 Alan Modra <alan@linuxcare.com.au>
2379
2380 * sysdeps/pthread/bits/initspin.h: New file.
2381 * spinlock.h: Move LOCK_INITIALIZER definition to <bits/initspin.h>.
2382 (__pthread_init_lock): Initialize lock with LT_SPINLOCK_INIT.
2383 (__pthread_alt_init_lock): Likewise.
2384 (__pthread_alt_trylock): Release lock with LT_SPINLOCK_INIT.
2385
2386 2000-10-12 David Huggins-Daines <dhd@linuxcare.com>
2387
2388 * oldsemaphore.c (__old_sem_init): Release lock with
2389 LT_SPINLOCK_INIT, not zero.
2390 * spinlock.c (__pthread_unlock): Likewise.
2391 (__pthread_alt_lock): Likewise.
2392 (__pthread_alt_timedlock): Likewise.
2393 (__pthread_alt_unlock): Likewise.
2394 * sysdeps/pthread/bits/libc-lock.h: Initialize locks with
2395 LT_SPINLOCK_INIT if it is non-zero. Likewise for init-once flags.
2396 * sysdeps/pthread/pthread.h: Include bits/initspin.h. Use
2397 LT_SPINLOCK_INIT do initialize spinlocks not 0.
2398
2399 2000-10-12 David Huggins-Daines <dhd@linuxcare.com>
2400
2401 * shlib-versions: Add version definitions for hppa-linux.
2402
2403 2000-10-12 Alan Modra <alan@linuxcare.com.au>
2404
2405 * sysdeps/hppa/pspinlock.c: New file.
2406 * sysdeps/hppa/pt-machine.h: New file.
2407 * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: New file.
2408
2409 2000-10-05 Jakub Jelinek <jakub@redhat.com>
2410
2411 * mutex.c (__pthread_mutex_destroy): Correct test of
2412 busy mutex for mutexes using alternate fastlocks.
2413 Patch by dtc@cmucl.cons.org.
2414
2415 2000-09-28 Martin Schwidefsksy <schwidefsky@de.ibm.com>
2416
2417 * sysdeps/s390/pt-machine.h: Make %a0 the thread register.
2418
2419 2000-09-28 Ulrich Drepper <drepper@redhat.com>
2420
2421 * mutex.c (__pthread_mutex_unlock): For PTHREAD_MUTEX_RECURSIVE_NP
2422 test for owner first.
2423 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2424
2425 * cancel.c (pthread_cancel): Don't do anything if cancelation is
2426 disabled.
2427
2428 2000-09-26 Ulrich Drepper <drepper@redhat.com>
2429
2430 * spinlock.h (__pthread_set_own_extricate_if): Optimize a bit.
2431 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2432
2433 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
2434 _POSIX_MONOTONIC_CLOCK.
2435
2436 * spinlock.h (__pthread_set_own_extricate_if): Add back locking
2437 and explain why.
2438
2439 2000-09-20 Andreas Jaeger <aj@suse.de>
2440
2441 * pthread.c [!__ASSUME_REALTIME_SIGNALS]: Make inclusion of
2442 "testrtsig.h" conditional.
2443
2444 2000-09-11 Ulrich Drepper <drepper@redhat.com>
2445
2446 * sysdeps/pthread/pthread.h: Declare pthread_attr_getstack and
2447 pthread_attr_setstack.
2448 * Versions [libpthread] (GLIBC_2.2): Export pthread_attr_getstack and
2449 pthread_attr_setstack.
2450 * attr.c (pthread_attr_getstack, pthread_attr_setstack): New functions.
2451
2452 2000-09-05 Ulrich Drepper <drepper@redhat.com>
2453
2454 * Examples/ex14.c: New file.
2455 * Makefile (tests): Add ex14.
2456
2457 * mutex.c (__pthread_mutex_unlock): Correct test for already unlocked
2458 mutex. Patch by dtc@cmucl.cons.org.
2459
2460 * ecmutex.c: New file.
2461 * Makefile (tests): Add ecmutex.
2462
2463 2000-09-04 H.J. Lu <hjl@gnu.org>
2464
2465 * attr.c (__pthread_attr_setguardsize): Use page_roundup
2466 instead of roundup to round up to the page size.
2467
2468 2000-09-03 Mark Kettenis <kettenis@gnu.org>
2469
2470 * manager.c (pthread_exited): Correctly report event as TD_REAP
2471 instead of TD_DEATH. Fix comments.
2472
2473 2000-09-03 Ulrich Drepper <drepper@redhat.com>
2474
2475 * spinlock.h (testandset): Add cast to avoid warning.
2476 Patch by Franz Sirl <Franz.Sirl-kernel@lauterbach.com>.
2477
2478 2000-09-02 Andreas Jaeger <aj@suse.de>
2479
2480 * sysdeps/pthread/timer_routines.c: Include stdlib.h for abort
2481 prototype.
2482
2483 2000-09-01 Ulrich Drepper <drepper@redhat.com>
2484
2485 * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
2486 Fix typo in last patch (_mode -> _flags).
2487
2488 * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
2489 Provide definition which respects _IO_USER_LOCK flag.
2490
2491 2000-08-30 Ulrich Drepper <drepper@redhat.com>
2492
2493 * manager.c (pthread_allocate_stack): Clear descriptor only if not
2494 mmaped.
2495
2496 2000-08-25 Ulrich Drepper <drepper@redhat.com>
2497
2498 * Makefile: Add rules to build and run unload.
2499 * unload.c: New file.
2500
2501 * pthread.c (pthread_exit_process): Move thread_self use inside `if'.
2502
2503 * sysdeps/pthread/pthread.h
2504 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Defined.
2505 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: Defined.
2506
2507 2000-08-24 Andreas Jaeger <aj@suse.de>
2508
2509 * Examples/ex13.c: Include <string.h> for strerror prototype and
2510 <stdlib.h> for abort prototype.
2511 (pthr_cond_signal_mutex): Rewrite to silence GCC.
2512 (thread_start): Remove unused variable err.
2513 (main): Silence GCC warnings.
2514
2515 2000-08-22 Andreas Jaeger <aj@suse.de>
2516
2517 * Examples/ex13.c: New test by Kurt Garloff <garloff@suse.de>.
2518
2519 * Makefile (tests): Add ex13.
2520
2521 2000-08-20 Ulrich Drepper <drepper@redhat.com>
2522
2523 * semaphore.h: Add restrict where required by AGd4.
2524 * sysdeps/pthread/pthread.h: Likewise.
2525 * sysdeps/pthread/unix/sysv/linux/bits/sigthread.h: Likewise.
2526
2527 2000-08-15 Ulrich Drepper <drepper@redhat.com>
2528
2529 * Makefile (tests): Add ex12. Add rule to build it.
2530 * Examples/ex12.c: New file.
2531
2532 2000-08-13 Ulrich Drepper <drepper@redhat.com>
2533
2534 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_SEMAPHORES
2535 even though the implementation is not quite complete (but it reports
2536 it). Define _POSIX_MESSAGE_PASSING to -1.
2537 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2538
2539 2000-08-12 Andreas Jaeger <aj@suse.de>
2540
2541 * sysdeps/mips/pt-machine.h (testandset): Add .set mips2 for
2542 assembler.
2543 (__compare_and_swap): Likewise.
2544 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Likewise.
2545
2546 2000-08-10 Ulrich Drepper <drepper@redhat.com>
2547
2548 * pthread.c (__pthread_initial_thread): Initialize p_errnop and
2549 p_h_errnop correctly and not to NULL.
2550
2551 2000-08-05 Ulrich Drepper <drepper@redhat.com>
2552
2553 * Banner: Bump version number to 0.9.
2554
2555 2000-08-04 Ulrich Drepper <drepper@redhat.com>
2556
2557 * Makefile (tests): Add tststack. Add rule to build the program.
2558 * tststack.c: New file.
2559
2560 * internals.h: Declare __pthread_max_stacksize.
2561 * pthread.c (__pthread_max_stacksize): New variable.
2562 (__pthread_initialize_manager): Determine __pthread_initialize_manager
2563 value.
2564 * manager.c (thread_segment): Return always NULL if FLOATING_STACKS.
2565 (pthread_allocate_stack): Allow kernel to choose stack address if
2566 FLOATING_STACKS. This also handles variable-sized stacks.
2567 Always allocate stack and guardpage together. Use mprotect to
2568 change guardpage access.
2569 * sysdeps/i386/useldt.h: Define FLOATING_STACKS and
2570 ARCH_STACK_MAX_SIZE.
2571
2572 * attr.c (__pthread_attr_setstacksize): Also test value against
2573 upper limit.
2574
2575 * manager.c (__pthread_nonstandard_stacks): Define only if
2576 THREAD_SELF is not defined.
2577 (pthread_allocate_stack): Always initialize gardaddr to a correct
2578 value.
2579 (pthread_handle_create): Unmap thread with one call.
2580 (pthread_free): Remove test for initial thread before removing stack.
2581 Unmap stack with one call.
2582
2583 * pthread.c (__pthread_initial_thread): Initialize p_userstack to
2584 1 to avoid removing the stack.
2585
2586 2000-07-27 Jes Sorensen <jes@linuxcare.com>
2587
2588 * sysdeps/ia64/pspinlock.c (__pthread_spin_lock): Add
2589 load of spin lock to prime the cache before the atomic compare and
2590 exchange operation (cmpxchg4). This avoids the spinning on the
2591 cmpxchg4 instruction and reduces movement of the cache line back
2592 and forth between the processors (explanation by Asis K. Mallick
2593 from Intel). This basically makes the implementation operate the
2594 same as the Linux kernel implementation.
2595
2596 * shlib-versions: Use GLIBC_2_2 for Linux/ia64.
2597 * sysdeps/ia64/pspinlock.c: New file.
2598
2599 2000-08-03 Ulrich Drepper <drepper@redhat.com>
2600
2601 * pthread.c: Move definition of __pthread_set_own_extricate_if...
2602 * spinlock.h: ...here. Remove locking.
2603 * internals.h: Remove __pthread_set_own_extricate_if prototype.
2604
2605 * rwlock.c: Use THREAD_GETMEM And THREAD_SETMEM.
2606 (rwlock_rd_extricate_func): Don't determine self, let
2607 __pthread_lock do it.
2608 (rwlock_wr_extricate_func): Likewise.
2609 (rwlock_have_already): Optimize *pself handling a bit.
2610
2611 * mutex.c: Use __builtin_expect.
2612 * pthread.c: Likewise.
2613
2614 2000-08-02 Andreas Jaeger <aj@suse.de>
2615
2616 * sysdeps/s390/pspinlock.c: New file.
2617 * sysdeps/s390/pt-machine.h: New file.
2618 Patches by Martin Schwidefsky <schwidefsky@de.ibm.com>.
2619
2620 2000-07-12 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
2621
2622 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Implement for
2623 R3K.
2624 * sysdeps/mips/pt-machine.h (testandset): Likewise.
2625
2626 2000-07-26 Andreas Jaeger <aj@suse.de>
2627
2628 * pthread.c: Initialize p_sem_avail.
2629
2630 2000-07-25 Ulrich Drepper <drepper@redhat.com>
2631
2632 * internals.h (struct __pthread_descr_struct): Add p_sem_avail.
2633 * semaphore.c: Handle spurious wakeups.
2634
2635 * sysdeps/pthread/pthread.h: Add back PTHREAD_MUTX_FAST_NP as an alias
2636 for PTHREAD_MUTEX_ADAPTIVE_NP for source code compatibility.
2637
2638 * pthread.c (__pthread_set_own_extricate): Use THREAD_GETMEM.
2639 (__pthread_wait_for_restart): Likewise.
2640
2641 * condvar.c (pthread_cond_wait): Also check whether thread is
2642 cancelable before aborting loop.
2643 (pthread_cond_timedwait): Likewise.
2644
2645 * signals.c (pthread_sighandler): Remove special code to restrore
2646 %gs on x86.
2647 (pthread_sighandler_t): Likewise.
2648
2649 2000-07-25 Mark Kettenis <kettenis@gnu.org>
2650
2651 * internals.h (__RES_PTHREAD_INTERNAL): Remove define.
2652 * pthread.c: Include <resolv.h>.
2653 (_res): Undefine. Add extern declaration.
2654
2655 2000-07-24 Ulrich Drepper <drepper@redhat.com>
2656
2657 * pthread.c (__pthread_initial_thread): Update initializer.
2658 (__pthread_manager_thread): Likewise.
2659 (pthread_initialize): Move setrlimit call to...
2660 (__pthread_initialize_manager): ...here.
2661 (__pthread_reset_main_thread): Reset also soft limit on stack size.
2662
2663 * condvar.c: Handle spurious wakeups. [PR libc/1749].
2664 * internals.h (struct _pthread_descr_struct): Add p_condvar_avail.
2665
2666 2000-07-21 Ulrich Drepper <drepper@redhat.com>
2667
2668 * spinlock.h: If IMPLEMENT_TAS_WITH_CAS is defined use
2669 __compare_and_swap to define testandset.
2670 * sysdeps/powerpc/pt-machine.h: Add volatile to asms.
2671 Define IMPLEMENT_TAS_WITH_CAS.
2672
2673 2000-07-20 Ulrich Drepper <drepper@redhat.com>
2674
2675 * Makefile: Pass -z nodelete to linker for libpthread.so
2676 generation if it understand this option.
2677
2678 2000-07-18 Mark Kettenis <kettenis@gnu.org>
2679
2680 * manager.c (pthread_handle_create): Remove initialization of
2681 new_thread->p_res._sock.
2682
2683 2000-07-19 Kaz Kylheku <kaz@ashi.footprints.net>
2684
2685 Bugfixes to the variant of the code for machines with no compare
2686 and swap.
2687
2688 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Wait
2689 node was not being properly enqueued, due to failing to update
2690 the lock->__status field.
2691
2692 * spinlock.c (__pthread_alt_timedlock): The oldstatus variable was
2693 being set inappropriately, causing the suspend function to be called
2694 with a null self pointer and crash.
2695
2696 2000-07-18 Ulrich Drepper <drepper@redhat.com>
2697
2698 * spinlock.h (__pthread_alt_trylock): Fix code used if no
2699 compare&swap is available.
2700
2701 * spinlock.h (__pthread_trylock): Use __compare_and_swap, not
2702 compare_and_swap.
2703
2704 * pthread.c (pthread_initialize): Don't use sysconf to determine
2705 whether the machine has more than one processor.
2706
2707 * spinlock.c (__pthread_alt_timedlock): Add back one of the
2708 removed thread_self calls.
2709
2710 2000-07-18 Kaz Kylheku <kaz@ashi.footprints.net>
2711
2712 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Changed
2713 __compare_and_swap to compare_and_swap in code which assumes
2714 compare swap is available.
2715
2716 2000-07-18 Kaz Kylheku <kaz@ashi.footprints.net>
2717
2718 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Fixed
2719 bug whereby thr field of waitnode structure would not be correctly
2720 set unless a null self pointer is passed to the functions.
2721 Eliminated redundant calls to thread_self().
2722
2723 2000-07-18 Jakub Jelinek <jakub@redhat.com>
2724
2725 * pthread.c (__pthread_initialize_manager): Lock
2726 __pthread_manager_thread.p_lock before calling clone.
2727
2728 2000-05-05 H.J. Lu <hjl@gnu.org>
2729
2730 * sysdeps/ia64/pt-machine.h (__compare_and_swap): Change it to
2731 have acquire semantics.
2732 (__compare_and_swap_with_release_semantics): New inline
2733 function.
2734 (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): New macro.
2735
2736 2000-01-28 Hans Boehm <hboehm@exch.hpl.hp.com>
2737
2738 * manager.c: Fix the problem with signals at startup.
2739 Change the way that thread stacks are allocated on IA64.
2740 Clean up some of the guard page allocation stuff.
2741
2742 1999-12-19 H.J. Lu <hjl@gnu.org>
2743
2744 * internals.h (page_roundup): New.
2745 * attr.c (__pthread_attr_setguardsize); Use page_roundup
2746 instead of roundup.
2747 * manager.c (pthread_allocate_stack): Make sure guardaddr is
2748 page aligned with page_roundup if NEED_SEPARATE_REGISTER_STACK
2749 is define.
2750
2751 1999-12-17 Hans Boehm <hboehm@exch.hpl.hp.com>
2752
2753 * manager.c (pthread_allocate_stack): Unmap the stack top
2754 if failed to map the stack bottom.
2755 Fix the guard page.
2756 (pthread_free): Fix the guard page.
2757
2758 * pthread.c (pthread_initialize): Set rlimit correctly for
2759 NEED_SEPARATE_REGISTER_STACK.
2760
2761 1999-12-16 H.J. Lu <hjl@gnu.org>
2762
2763 * pthread.c (__pthread_initialize_manager): Pass
2764 __pthread_manager_thread_bos instead of
2765 __pthread_manager_thread_tos to __clone2.
2766
2767 1999-12-16 H.J. Lu <hjl@gnu.org>
2768
2769 * manager.c (pthread_allocate_stack): Correct the calculation
2770 of "new_thread_bottom". Remove MAP_GROWSDOWN from mmap for
2771 stack bottom.
2772
2773 1999-12-13 H.J. Lu <hjl@gnu.org>
2774
2775 * sysdeps/ia64/pt-machine.h (__compare_and_swap): Added a stop
2776 bit after setting ar.ccv.
2777
2778 1999-12-12 H.J. Lu <hjl@gnu.org>
2779
2780 * manager.c (pthread_allocate_stack): Make the starting
2781 address of the stack bottom page aligned. FIXME: it may
2782 need changes in other places.
2783 (pthread_handle_create): Likewise.
2784
2785 1999-12-11 Hans Boehm <hboehm@exch.hpl.hp.com>
2786
2787 * manager.c (pthread_allocate_stack): Handle
2788 NEED_SEPARATE_REGISTER_STACK.
2789 (pthread_handle_create): Likewise.
2790 * pthread.c (__pthread_initialize_manager): Likewise.
2791
2792 * sysdeps/ia64/pt-machine.h: Use r13 for thread pointer.
2793
2794 1999-12-02 H.J. Lu <hjl@gnu.org>
2795
2796 * sysdeps/ia64/pt-machine.h: New.
2797
2798 2000-07-13 Ulrich Drepper <drepper@redhat.com>
2799
2800 * wrapsyscall.c: Mark non-__ protected names as weak.
2801 PR libc/1466.
2802
2803 2000-07-12 Bruno Haible <haible@clisp.cons.org>
2804
2805 * Examples/ex8.c: Include <sys/wait.h>, not <wait.h>.
2806
2807 2000-07-12 Ulrich Drepper <drepper@redhat.com>
2808
2809 * spinlock.c: Fix code for TEST_FOR_COMPARE_AND_SWAP being defined.
2810 Add tests also to new alternative spinlock implementation.
2811 * spinlock.h: Likewise.
2812 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2813
2814 2000-07-06 Ulrich Drepper <drepper@redhat.com>
2815
2816 * Version: Export __sigaction.
2817 * signals.c: Define __sigaction alias. Use __libc_sigaction instead
2818 of __sigaction.
2819 * pthread.c: Use __libc_sigaction instead of __sigaction.
2820
2821 * condvar.c: Implement pthread_condattr_getpshared and
2822 pthread_condattr_setpshared.
2823 * mutex.c: Implement pthread_mutexattr_getpshared and
2824 pthread_mutexattr_setpshared.
2825 * Versions: Export new functions.
2826 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
2827
2828 * rwlock.c (pthread_rwlockattr_init): Use PTHREAD_PROCESS_PRIVATE.
2829 (pthread_rwlockattr_setpshared): Fail if PTHREAD_PROCESS_PRIVATE
2830 is not selected.
2831
2832 2000-07-04 Greg McGary <greg@mcgary.org>
2833
2834 * sysdeps/pthread/bits/libc-lock.h: Remove BP_SYM from
2835 pragmas. Include bp-sym.h only if _LIBC.
2836
2837 2000-07-04 Ulrich Drepper <drepper@redhat.com>
2838
2839 * spinlock.c (__pthread_unlock): Properly place write barrier.
2840 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2841
2842 2000-07-03 Ulrich Drepper <drepper@redhat.com>
2843
2844 * spinlock.c: Replace fast spinlocks by adaptive spinlocks which are
2845 faster on SMP systems. No more emulation of compare&swap for adaptive
2846 spinlocks.
2847 * spinlock.h: Likewise.
2848 * sysdeps/pthread/pthread.h: Shuffle PTHREAD_MUTEX_* values around.
2849 Replace fast with adaptive mutex.
2850 * mutex.c: Rewrite for replacement of fast by adaptive mutex.
2851 * condvar.c: Likewise.
2852 * pthread.c: Define and initialize __pthread_smp_kernel variable.
2853 * internals.h: Declare __pthread_smp_kernel.
2854 * sysdeps/pthread/bits/pthreadtypes.h: Update comment of
2855 _pthread_fastlock structure.
2856 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2857
2858 * pthread.c: Remove initialization to zero from global variables.
2859
2860 2000-06-29 Jakub Jelinek <jakub@redhat.com>
2861
2862 * shlib-versions: Make sparc64 GLIBC_2.2+ only.
2863
2864 2000-06-28 Greg McGary <greg@mcgary.org>
2865
2866 * weaks.c: Wrap BP_SYM () around weak extern declarations of
2867 pthread functions that have pointers in their return+arg signatures.
2868
2869 2000-06-27 Greg McGary <greg@mcgary.org>
2870
2871 * sysdeps/pthread/bits/libc-lock.h: Wrap BP_SYM () around weak
2872 extern declarations of pthread functions that have pointers in
2873 their return+arg signatures.
2874
2875 2000-06-26 Ulrich Drepper <drepper@redhat.com>
2876
2877 * Makefile (tests): Add ex11. Add rules to build it.
2878 * Examples/ex11.c: New file.
2879 * rwlock.c: Fix complete braindamaged previous try to implement
2880 timedout functions.
2881
2882 * spinlock.c: Pretty print.
2883
2884 2000-06-25 Ulrich Drepper <drepper@redhat.com>
2885
2886 * Makefile (tests): Add ex10. Add rules to build it.
2887 * Versions [GLIBC_2.2] (libpthread): Add pthread_mutex_timedlock,
2888 pthread_rwlock_timedrdlock, and pthread_rwlock_timedwrlock.
2889 * condvar.c (pthread_cond_wait): Allow mutex of kind
2890 PTHREAD_MUTEX_TIMED_NP.
2891 (pthread_cond_timedwait_relative): Likewise.
2892 * mutex.c (__pthread_mutex_init): Default is PTHREAD_MUTEX_TIMED_NP.
2893 (__pthread_mutex_trylock): Use __pthread_alt_trylock for
2894 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
2895 (__pthread_mutex_lock): Use __pthread_alt_lock for
2896 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
2897 (__pthread_mutex_timedlock): New function.
2898 (__pthread_mutex_unlock): Use __pthread_alt_unlock for
2899 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
2900 (__pthread_mutexattr_init): Use PTHREAD_MUTEX_TIMED_NP.
2901 (__pthread_mutexattr_settype): Allow PTHREAD_MUTEX_TIMED_NP.
2902 * spinlock.c: Implement alternate fastlocks.
2903 * spinlock.h: Add prototypes.
2904 * Examples/ex10.c: New file.
2905 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
2906 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2907
2908 * rwlock.c (__pthread_rwlock_rdlock): Optimize loop a bit.
2909 (__pthread_rwlock_timedrdlock): New function.
2910 (__pthread_rwlock_timedwrlock): New function.
2911 Use laternate fastlock function everywhere.
2912
2913 2000-06-21 Andreas Jaeger <aj@suse.de>
2914
2915 * sysdeps/pthread/timer_routines.c: Include <string.h> for memset
2916 prototype.
2917
2918 * join.c: Include <stdlib.h> for exit prototype.
2919
2920 2000-06-20 Ulrich Drepper <drepper@redhat.com>
2921
2922 * sysdeps/i386/useldt.h: Include <stdlib.h>.
2923
2924 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_BARRIERS.
2925 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2926
2927 * Makefile (libpthread-routines): Add barrier.
2928 (tests): Add ex9. Add rule to build ex9.
2929 * Versions: Export barrier functions.
2930 * barrier.c: New file.
2931 * Examples/ex9.c: New file.
2932 * sysdeps/pthread/pthread.h: Add barrier data types and declarations.
2933 * sysdeps/pthread/bits/pthreadtypes.h: Likewise.
2934 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2935
2936 2000-06-19 H.J. Lu <hjl@gnu.org>
2937
2938 * spinlock.h (HAS_COMPARE_AND_SWAP): Defined if
2939 HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS is defined.
2940 (compare_and_swap_with_release_semantics): New. Default to
2941 compare_and_swap if HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS
2942 is not defined.
2943
2944 * spinlock.c (__pthread_unlock): Call
2945 compare_and_swap_with_release_semantics () instead of
2946 compare_and_swap ().
2947
2948 2000-06-19 Ulrich Drepper <drepper@redhat.com>
2949
2950 * sysdeps/pthread/timer_create.c: Use _set_errno instead of assigning
2951 to errno directly.
2952 * sysdeps/pthread/timer_delete.c: Likewise.
2953 * sysdeps/pthread/timer_getoverr.c: Likewise.
2954 * sysdeps/pthread/timer_gettime.c: Likewise.
2955 * sysdeps/pthread/timer_settime.c: Likewise.
2956
2957 2000-06-13 Kaz Kylheku <kaz@ashi.footprints.net>
2958
2959 Timer nodes are now reference counted, and can be marked
2960 as deleted. This allows for the safe release of the global mutex
2961 in the middle without losing the timer being operated on.
2962
2963 * sysdeps/pthread/posix-timer.h (struct timer_node): The inuse
2964 member is now an enum with three values, so that an intermediate
2965 state can be represented (deleted but not free for reuse yet).
2966 New refcount member added.
2967 * sysdeps/pthread/timer_routines.c: Likewise.
2968
2969 * sysdeps/pthread/posix-timer.h (timer_addref, timer_delref,
2970 timer_valid): New inline functions added.
2971
2972 * sysdeps/pthread/timer_gettime.c (timer_gettime): Function
2973 restructured, recursive deadlock bug fixed.
2974
2975 * sysdeps/pthread/timer_gettime.c (timer_gettime): Uses new
2976 timer_addref to ensure that timer won't be deleted while mutex is not
2977 held. Also uses timer_invalid to perform validation of timer handle.
2978 * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
2979 * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Likewise.
2980
2981 2000-06-14 Ulrich Drepper <drepper@redhat.com>
2982
2983 * shlib-versions: Add entry for SH.
2984 Patch by Kaz Kojima <kkojima@rr.iij4u.or.jp>.
2985
2986 2000-06-13 Kaz Kylheku <kaz@ashi.footprints.net>
2987
2988 A few optimizations. Got rid of unnecessary wakeups of timer threads,
2989 tightened up some critical regions and micro-optimized some list
2990 manipulation code.
2991
2992 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
2993 Returns int value now to indicate whether timer was queued at head.
2994 * sysdeps/pthread/posix-timer.h: Likewise.
2995 * sysdeps/pthread/timer_settime.c (timer_settime): Takes advantage of
2996 new return value from __timer_thread_queue_timer to avoid waking
2997 up timer thread unnecessarily.
2998
2999 * sysdeps/pthread/posix-timer.h (timer_id2ptr): No longer checks
3000 inuse flag, because this requires mutex to be held. Callers updated
3001 to do the check when they have the mutex.
3002 * sysdeps/pthread/timer_getoverr.c: Add check for inuse here.
3003
3004 * sysdeps/pthread/timer_settime.c (timer_settime): Tighter critical
3005 regions: avoids making system calls while holding timer mutex, and
3006 a few computations were moved outside of the mutex as well.
3007 * sysdeps/pthread/timer_gettime.c (timer_gettime): Likewise.
3008
3009 * sysdeps/pthread/posix-timer.h (list_unlink_ip): Function name changed
3010 to list_unlink_ip, meaning idempotent. Pointer manipulation
3011 changed to get better better code out of gcc.
3012 * sysdeps/pthread/timer_routines.c (list_unlink): Non-idempotent
3013 version of list_unlink added here.
3014 * sysdeps/pthread/timer_delete.c: Use appropriate list unlink
3015 function in all places: idempotent one for timers, non-idempotent
3016 one for thread nodes.
3017 * sysdeps/pthread/timer_settime: Likewise.
3018 * sysdeps/pthread/timer_routines.c: Likewise.
3019
3020 2000-06-13 Ulrich Drepper <drepper@redhat.com>
3021
3022 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_TIMERS): Define.
3023 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3024
3025 * sysdeps/pthread/Makefile: Remove tests definition.
3026
3027 2000-06-12 Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
3028 Yutaka Niibe <gniibe@chroot.org>
3029
3030 * sysdeps/sh/pspinlock.c: New file.
3031 * sysdeps/sh/pt-machine.h: New file.
3032
3033 2000-06-12 Ulrich Drepper <drepper@redhat.com>
3034
3035 * Makefile (tests): Add joinrace.
3036
3037 * Examples/ex6.c: Test return value of pthread_join.
3038
3039 2000-06-11 Geoff Keating <geoffk@cygnus.com>
3040
3041 * sysdeps/powerpc/pspinlock.c (__pthread_spin_lock): Implement.
3042 (__pthread_spin_trylock): Implement.
3043 (__pthread_spin_unlock): Implement.
3044 (__pthread_spin_init): Implement.
3045 (__pthread_spin_destroy): Implement.
3046
3047 2000-06-10 Ulrich Drepper <drepper@redhat.com>
3048
3049 * sysdeps/pthread/timer_routines.c (list_append): Little fix to
3050 really append the entry.
3051
3052 2000-06-10 Andreas Jaeger <aj@suse.de>
3053
3054 * lockfile.c (__fresetlockfiles): Remove unused variable fp.
3055
3056 2000-06-10 Kaz Kylheku <kaz@ashi.footprints.net>
3057
3058 * sysdeps/pthread/timer_create.c: Thread matching now done on
3059 clock type as well as thread attributes.
3060 There are individual global signal-delivering threads for
3061 different clock types.
3062 * sysdeps/pthread/posix-timer.h: Likewise.
3063 * sysdeps/pthread/timer_routines.c: Likewise.
3064
3065 * sysdeps/pthread/timer_routines.c: Thread allocation and
3066 deallocation function now remembers to put thread on active
3067 list and remove from active list.
3068 Thus now the feature of binding multiple timers
3069 to a single thread actually works.
3070
3071 2000-06-10 Ulrich Drepper <drepper@redhat.com>
3072
3073 * pthread.c (__pthread_create_2_1): Optimize a bit.
3074
3075 * internals.h (invalid_handle): Also test for p_terminated != 0.
3076 (nonexisting_handle): New function. Same as old invalid_handle.
3077 * join.c (pthread_join): Use nonexisting_handle instead of
3078 invalid_handle to test for acceptable thread handle.
3079 * manager.c (pthread_handle_free): Likewise.
3080 * joinrace.c: New file.
3081 Reported by Permaine Cheung <pcheung@cygnus.com>.
3082
3083 2000-06-08 Ulrich Drepper <drepper@redhat.com>
3084
3085 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
3086 Correct handling of matching variable.
3087
3088 * sysdeps/pthread/tst-timer.c (main): Rewrite initializers to
3089 avoid warnings.
3090
3091 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
3092 Be prepared for empty timer list.
3093
3094 * sysdeps/pthread/timer_create.c (timer_create): Correct names of
3095 CPUTIME clock ID. Add support for thread clocks.
3096
3097 * sysdeps/pthread/posix-timer.h (timer_ptr2id): Operands in
3098 subtraction were switched.
3099
3100 * sysdeps/pthread/timer_routines.c (init_module): Use
3101 THREAD_MAXNODES threads.
3102
3103 * sysdeps/pthread/posix-timer.h (struct timer_node): Add creator_pid.
3104 * sysdeps/pthread/timer_create.c: Fill in creator_pid.
3105 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Send signal
3106 with sigqueueinfo is this system call is available.
3107
3108 * sysdeps/pthread/timer_create.c (timer_create): Allow
3109 CLOCK_CPUTIME if _POSIX_CPUTIME is defined.
3110
3111 * sysdeps/pthread/Makefile: New file. Add rules to build timer
3112 functionality.
3113 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add TIMER_MAX.
3114
3115 2000-06-04 Kaz Kylheku <kaz@ashi.footprints.net>
3116
3117 * sysdeps/pthread/posix-timer.h: New file.
3118 * sysdeps/pthread/timer_create.c: New file.
3119 * sysdeps/pthread/timer_delete.c: New file.
3120 * sysdeps/pthread/timer_getoverr.c: New file.
3121 * sysdeps/pthread/timer_gettime.c: New file.
3122 * sysdeps/pthread/timer_routines.c: New file.
3123 * sysdeps/pthread/timer_settime.c: New file.
3124 * sysdeps/pthread/tst-timer.c: New file.
3125
3126 2000-06-08 Ulrich Drepper <drepper@redhat.com>
3127
3128 * sysdeps/unix/sysv/linux/bits/local_lim.h: Remove OPEN_MAX and
3129 LINK_MAX definitions if necessary.
3130
3131 2000-06-04 Kaz Kylheku <kaz@ashi.footprints.net>
3132
3133 Added missing fork time handling of global libio lock.
3134
3135 * lockfile.c (__fresetlockfiles): Now also resets the list lock,
3136 not just the individual stream locks. Rewritten to use new
3137 iterator interface provided by libio rather than accessing
3138 global variable.
3139
3140 * lockfile.c (__flockfilelist, _funlockfilelist): New functions
3141 which lock and unlock the stream list using the new interface
3142 provied by libio.
3143 * internals.h: Likewise.
3144
3145 * ptfork.c (__fork): Now calls __flockfilelist before fork,
3146 and __funlockfilelist in the parent after the fork.
3147 Child still calls __fresetlockfiles as before.
3148
3149 * linuxthreads.texi: Now explains what happens to streams at
3150 fork time. Also whole new section on forking and thread added.
3151 Definition of pthread_atfork moved out of Miscellaneous Functions
3152 to this new section.
3153
3154 2000-06-04 Jakub Jelinek <jakub@redhat.com>
3155
3156 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c (__pthread_spin_lock):
3157 Add missing register.
3158 * sysdeps/sparc/sparc64/pspinlock.c (__pthread_spin_lock): Likewise.
3159
3160 2000-06-02 Jakub Jelinek <jakub@redhat.com>
3161
3162 * sysdeps/sparc/sparc32/pspinlock.c: Implement spinlocks.
3163 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: New.
3164 * sysdeps/sparc/sparc64/pspinlock.c: Implement spinlocks.
3165
3166 2000-05-31 Andreas Jaeger <aj@suse.de>
3167
3168 * sysdeps/mips/pspinlock.c: Implement spinlocks.
3169
3170 2000-05-28 Ulrich Drepper <drepper@redhat.com>
3171
3172 * spinlock.c (__pthread_lock): Remove ASSERT.
3173
3174 * Makefile (tests): Add ex8.
3175 * Examples/ex8.c: New file.
3176
3177 2000-05-12 Kaz Kylheku <kaz@ashi.footprints.net>
3178
3179 Bugfix: The pthread_atfork mechanism now takes care of its
3180 own internal mutex at fork time.
3181
3182 * ptfork.c (__fork): Revised so that the mutex is held across
3183 the fork operation and while the handlers are called, and so that
3184 the child resets the mutex.
3185
3186 * linuxthreads.texi: Updated pthread_atfork documentation to make
3187 it clear that fork and pthread_atfork can't be reentered from
3188 atfork handlers, that pthread_atfork and fork are mutually atomic,
3189 and that the handlers are inherited by the child process.
3190
3191 2000-05-24 Ulrich Drepper <drepper@redhat.com>
3192
3193 * Makefile (libpthread-routines): Add pspinlock.
3194 * cancel.c: Rename __pthread_spin_unlock back to __pthread_unlock.
3195 Use struct _pthread_fastlock instead of pthread_spinlock_t.
3196 * condvar.c: Likewise.
3197 * internals.h: Likewise.
3198 * join.c: Likewise.
3199 * manager.c: Likewise.
3200 * mutex.c: Likewise.
3201 * pthread.c: Likewise.
3202 * rwlock.c: Likewise.
3203 * semaphore.c: Likewise.
3204 * signals.c: Likewise.
3205 * spinlock.h: Likewise.
3206 * spinlock.c: Likewise. Remove pthread_spin_lock functions.
3207 * sysdeps/alpha/pspinlock.c: New file.
3208 * sysdeps/arm/pspinlock.c: New file.
3209 * sysdeps/i386/pspinlock.c: New file.
3210 * sysdeps/m68k/pspinlock.c: New file.
3211 * sysdeps/mips/pspinlock.c: New file.
3212 * sysdeps/powerpc/pspinlock.c: New file.
3213 * sysdeps/sparc/sparc32/pspinlock.c: New file.
3214 * sysdeps/sparc/sparc64/pspinlock.c: New file.
3215 * sysdeps/pthread/bits/pthreadtypes.h: Remove pthread_spinlock_t
3216 back to _pthread_fastlock. Define new pthread_spinlock_t.
3217
3218 2000-05-24 Andreas Jaeger <aj@suse.de>
3219
3220 * sysdeps/i386/i686/pt-machine.h: Only use LDT on newer kernels.
3221
3222 2000-05-21 Jakub Jelinek <jakub@redhat.com>
3223
3224 * manager.c (pthread_handle_create): Initialize p_res._sock to -1.
3225
3226 2000-05-13 Jakub Jelinek <jakub@redhat.com>
3227
3228 * internals.h (__RES_PTHREAD_INTERNAL): Define.
3229
3230 2000-05-06 Kaz Kylheku <kaz@ashi.footprints.net>
3231
3232 * mutex.c (pthread_once): IN_PROGRESS state of pthread_once_t
3233 object state is represented with additional bits which distinguish
3234 whether that state was set up in the current process, or
3235 in an ancestor process. If that state was set in an ancestor,
3236 it means that a fork happened while thread was executing the init
3237 function. In that case, the state is reset to NEVER.
3238 * mutex.c (__pthread_once_fork_prepare): New function.
3239 (__pthread_once_fork_child): Likewise
3240 (__pthread_once_fork_parent): Likewise
3241 (__pthread_reset_pthread_once): Removed.
3242 * ptfork.c (__fork): Call new handlers in mutex.c.
3243 * internals.h: Declarations of new mutex.c functions added.
3244 Declaration of removed function deleted.
3245 * linuxthreads.texi: Updated documentation about pthread_once
3246 to clarify what happens under cancellation and forking.
3247
3248 2000-05-06 Kaz Kylheku <kaz@ashi.footprints.net>
3249
3250 * internals.h: New thread manager request type, REQ_KICK.
3251 * join.c (pthread_exit): main thread now calls exit() instead
3252 of _exit() in order to proper process cleanup.
3253 * manager.c (__pthread_manager): Do not terminate manager
3254 after unblocking main thread; wait for main thread's
3255 REQ_PROCESS_EXIT request instead.
3256 Also, added REQ_KICK case to handle new request; this just does
3257 nothing.
3258 * manager.c (pthread_exited): Do not terminate manager after
3259 unblocking main thread.
3260 * manager.c (__pthread_manager_sighandler): If the main thread
3261 is waiting for all other threads to die, send a REQ_KICK into
3262 the thread manager request pipe to get it to clean out the threads
3263 and unblock the main thread as soon as possible. This fixes
3264 the 2000 millisecond hang on shutdown bug.
3265 * Examples/ex7.c: New file, tests shutdown behavior when all threads
3266 including the main one call pthread_exit(), or implicitly do so.
3267 * Makefile (tests): Add ex7.
3268
3269 2000-05-05 Andreas Jaeger <aj@suse.de>
3270
3271 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
3272 (pthread_getcpuclockid): Correct test for ourselves.
3273
3274 2000-05-05 Ulrich Drepper <drepper@redhat.com>
3275
3276 * internals.h (struct _pthread_descr_struct): Reorganization.
3277 Allocate room for 16 pointers at head of the structure for future
3278 thread-local data handling. Move p_self member in this area.
3279 * manager.c (pthread_handle_create): Adjust use of p_self.
3280 * sysdeps/i386/useldt.h (THREAD_SELF): Likewise.
3281 * pthread.c (__pthread_initial_thread): Adjust initialization.
3282 (__pthread_manager_thread): Likewise.
3283
3284 2000-04-29 Bruno Haible <haible@clisp.cons.org>
3285
3286 * join.c (pthread_exit): Use THREAD_GETMEM_NC instead of THREAD_GETMEM
3287 for eventmask larger than 1 word.
3288
3289 2000-04-27 Ulrich Drepper <drepper@redhat.com>
3290
3291 * Versions [libpthread] (GLIBC_2.2): Add __pthread_initialize_minimal.
3292 * pthread.c (__pthread_initialize_minimal): New function. Perform
3293 minimal initialization.
3294 (pthread_initialize): Remove this code here.
3295 * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h" again. We
3296 are working around the problem in glibc.
3297
3298 2000-04-25 Ulrich Drepper <drepper@redhat.com>
3299
3300 * sysdeps/i386/i686/pt-machine.h: Do not use "../useldt.h" for
3301 now. First gcc must be fixed (more concrete: libgcc).
3302
3303 2000-04-24 Ulrich Drepper <drepper@redhat.com>
3304
3305 * pthread.c: Remove special treatement for interrupt handlers on x86.
3306 * manager.c (pthread_free): Use FREE_THREAD not FREE_THREAD_SELF.
3307 * sysdeps/i386/useldt.h: Use "q" constraint instead of "r" where
3308 necessary.
3309 * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h".
3310
3311 2000-04-24 Mark Kettenis <kettenis@gnu.org>
3312
3313 * join.c (pthread_exit): Set p_terminated after reporting the
3314 termination event instead of before.
3315
3316 2000-04-20 Jakub Jelinek <jakub@redhat.com>
3317
3318 * sysdeps/pthread/bits/libc-lock.h: Only declare __pthread_rwlock_*
3319 if __USE_UNIX98.
3320
3321 2000-04-18 Andreas Jaeger <aj@suse.de>
3322
3323 * Versions: Use ld instead of ld.so.
3324
3325 2000-04-18 Jakub Jelinek <jakub@redhat.com>
3326
3327 * sysdeps/unix/sysv/linux/sparc/bits/sigcontext.h (struct sigcontext):
3328 Remove the typedef keyword.
3329
3330 2000-04-18 Jakub Jelinek <jakub@redhat.com>
3331
3332 * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Use membar,
3333 not stbar.
3334 (READ_MEMORY_BARRIER): Define.
3335 * spinlock.c (__pthread_spin_unlock): Use READ_MEMORY_BARRIER, not
3336 MEMORY_BARRIER.
3337 * internals.h (READ_MEMORY_BARRIER): Define if not defined in sysdep
3338 headers.
3339
3340 2000-04-17 Ulrich Drepper <drepper@redhat.com>
3341
3342 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
3343 (pthread_getcpuclockid): Don't compare thread_id with thread_self,
3344 use thread_handle().
3345
3346 2000-04-16 Ulrich Drepper <drepper@redhat.com>
3347
3348 * condvar.c (pthread_cond_timedwait_relative): Don't test for owner
3349 if fast mutex is used. Don't initialize `already_canceled' twice.
3350 Correctly test for return value of timedsuspend.
3351
3352 * pthread.c: Correct long-time braino. We never set SA_SIGINFO and
3353 therefore don't need the _rt versions of the signal handlers.
3354
3355 2000-04-15 Ulrich Drepper <drepper@redhat.com>
3356
3357 * pthread.c (pthread_yield): New function.
3358 * sysdeps/pthread/pthread.h (pthread_yield): Add prototype.
3359 * Versions [libpthread] (GLIBC_2.2): Add pthread_yield.
3360 * internals.h: Declare __pthread_yield.
3361
3362 * pthread.c (pthread_initialize): Avoid a bit more code if
3363 realtime signals are known to exist.
3364
3365 * pthread.c: Is __ASSUME_REALTIME_SIGNALS then avoid generating code
3366 to dynamically detect RT signals and avoid generating compatibility
3367 functions with old kernel.
3368 * restart.h (restart) [__ASSUME_REALTIME_SIGNALS]: Use
3369 __pthread_restart_new directly.
3370 (suspend) [__ASSUME_REALTIME_SIGNALS]: Use
3371 __pthread_wait_for_restart_signal directly.
3372 (timedsuspend) [__ASSUME_REALTIME_SIGNALS]: Use
3373 __pthread_timedsuspend_new directly.
3374
3375 2000-04-15 Ulrich Drepper <drepper@redhat.com>
3376
3377 * condvar.c: Remove all the special code to handle cond_timedwait.
3378 Use timedsuspend instead.
3379 * internals.h: Declare __pthread_timedsuspend_old,
3380 __pthread_timedsuspend_new, and __pthread_timedsuspend.
3381 Remove declaration of __pthread_init_condvar.
3382 * pthread.c: Define __pthread_timedsuspend variable.
3383 (__pthread_timedsuspend_old): New function. Timed suspension
3384 implementation for old Linux kernels.
3385 (__pthread_timedsuspend_new): New function. Timed suspension
3386 implementation for new Linux kernels.
3387 * restart.h (timedsuspend): New function. Call appropriate
3388 suspension function through __pthread_timedsuspend.
3389 * semaphore.c (sem_timedwait): Use timedsuspend, don't duplicate
3390 the code.
3391 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
3392
3393 * internals.h (WRITE_MEMORY_BARRIER): Define as MEMORY_BARRIER if
3394 undefined.
3395 * spinlock.c: Use WRITE_MEMORY_BARRIER instead of MEMORY_BARRIER
3396 where possible.
3397 * sysdeps/alpha/pt-machine.h: Define WRITE_MEMORY_BARRIER.
3398 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
3399
3400 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _POSIX_SPAWN.
3401 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3402
3403 2000-04-14 Andreas Jaeger <aj@suse.de>
3404
3405 * weaks.c: Fix typo.
3406
3407 * shlib-versions (mips.*-.*-linux.*): Support only GLIBC 2.0 and
3408 2.2 for linuxthreads.
3409
3410 2000-04-13 Ulrich Drepper <drepper@redhat.com>
3411
3412 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
3413 (pthread_getcpuclockid): Fix typo.
3414
3415 2000-04-12 Ulrich Drepper <drepper@redhat.com>
3416
3417 * Makefile (libpthread-routines): Add getcpuclockid.
3418 * Versions [libpthread] (GLIBC_2.2): Add pthread_getcpuclockid.
3419 * sysdeps/pthread/getcpuclockid.c: New file.
3420 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: New file.
3421 * sysdeps/pthread/pthread.h: Add prototype for pthread_getcpuclockid.
3422
3423 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_SPIN_LOCKS):
3424 Defined.
3425 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3426
3427 * sysdeps/pthread/pthread.h: Add prototypes for pthread_spin_init,
3428 pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
3429 and pthread_spin_unlock.
3430 * sysdeps/pthread/bits/pthreadtypes.h: Change struct _pthread_fastlock
3431 into pthread_spinlock_t. Change all uses.
3432 * spinlock.c: Implement pthread_spin_lock.
3433 Rename __pthread_unlock to __pthread_spin_unlock and define weak
3434 alias for real name.
3435 Define pthread_spin_trylock, pthread_spin_init, and
3436 pthread_spin_destroy.
3437 Change all uses of _pthread_fastlock to pthread_spinlock_t.
3438 * spinlock.h: Rename __pthread_unlock to __pthread_spin_unlock.
3439 Change all uses of _pthread_fastlock to pthread_spinlock_t.
3440 * Versions [libpthread] (GLIBC_2.2): Add pthread_spin_init,
3441 pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
3442 and pthread_spin_unlock.
3443 * cancel.c: Use __pthread_spin_unlock instead of __pthread_unlock.
3444 Change all uses of _pthread_fastlock to pthread_spinlock_t.
3445 * condvar.c: Likewise.
3446 * internals.h: Likewise.
3447 * join.c: Likewise.
3448 * manager.c: Likewise.
3449 * mutex.c: Likewise.
3450 * pthread.c: Likewise.
3451 * rwlock.c: Likewise.
3452 * semaphore.c: Likewise.
3453 * signals.c: Likewise.
3454
3455 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add various new POSIX
3456 macros.
3457 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
3458
3459 2000-04-11 Ulrich Drepper <drepper@redhat.com>
3460
3461 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add
3462 _POSIX_SHARED_MEMORY_OBJECTS.
3463
3464 2000-04-11 Andreas Jaeger <aj@suse.de>
3465
3466 * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Define.
3467 (__compare_and_swap): Mark as modifying memory.
3468
3469 2000-04-11 Geoff Keating <geoffk@cygnus.com>
3470
3471 * sysdeps/powerpc/pt-machine.h (MEMORY_BARRIER): Don't be
3472 __volatile__.
3473 (__compare_and_swap): Replace other 'sync' with MEMORY_BARRIER.
3474 Don't have the 'asm' __volatile__.
3475
3476 2000-04-11 Ulrich Drepper <drepper@redhat.com>
3477
3478 * internals.h: Define MEMORY_BARRIER as empty if not defined already.
3479 * spinlock.c (__pthread_lock): Add memory barriers.
3480 (__pthread_unlock): Likewise.
3481 * sysdeps/alpha/pt-machine.h (MEMORY_BARRIER): Define using mb
3482 instruction.
3483 (RELEASE): Not needed anymore.
3484 (__compare_and_swap): Mark asm as modifying memory.
3485 * sysdeps/powerpc/pt-machine.h (sync): Remove. Replace with definition
3486 of MEMORY_BARRIER.
3487 (__compare_and_swap): Use MEMORY_BARRIER instead of sync.
3488 * sysdeps/sparc/sparc32/pt-machine.h (RELEASE): Not needed anymore.
3489 (MEMORY_BARRIER): Define using stbar.
3490 * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Define using
3491 stbar.
3492 (__compare_and_swap): Use MEMORY_BARRIER to ensure ordering.
3493 Patch by Xavier Leroy <Xavier.Leroy@inria.fr> based on comments by
3494 Mike Burrows <m3b@pa.dec.com>.
3495
3496 2000-04-09 Ulrich Drepper <drepper@redhat.com>
3497
3498 * signals.c (sigaction): Fix return value for the case SIG is one
3499 of the signals the implementation uses.
3500 Patch by Xavier.Leroy@inria.fr.
3501
3502 2000-04-01 Andreas Jaeger <aj@suse.de>
3503
3504 * attr.c: Use shlib-compat macros.
3505 * oldsemaphore.c: Likewise.
3506 * pthread.c: Likewise.
3507 * weaks.c: Likewise.
3508
3509 2000-03-26 Ulrich Drepper <drepper@redhat.com>
3510
3511 * semaphore.c (sem_timedwait): New function.
3512 Patch by Carl Mailloux <carlm@oricom.ca>.
3513 * semaphore.h: Declare sem_timedwait.
3514 * Versions [libpthread] (GLIBC_2.2): Add sem_timedwait.
3515
3516 2000-03-26 Roland McGrath <roland@baalperazim.frob.com>
3517
3518 * sysdeps/pthread/Makefile: File removed.
3519
3520 2000-03-23 Ulrich Drepper <drepper@redhat.com>
3521
3522 * mutex.c (__pthread_reset_pthread_once): Reset once_masterlock.
3523 * internals.h (__pthread_reset_pthread_once): Add prototype.
3524 * ptfork.c (__fork): Call __pthread_reset_pthread_once.
3525
3526 * manager.c (pthread_handle_create): Store ID of new thread before
3527 clone call.
3528
3529 2000-03-21 Ulrich Drepper <drepper@redhat.com>
3530
3531 * attr.c: Use new macros from shlib-compat.h to define versions.
3532 * oldsemaphore.c: Likewise.
3533 * semaphore.c: Likewise.
3534 * weaks.c: Likewise.
3535
3536 * pthread.c: Update for new SHLIB_COMPAT definition.
3537
3538 * manager.c (__pthread_manager): Unmask debug signal.
3539
3540 * pthread.c (pthread_initialize): Test for address of __dso_handle
3541 being NULL, not value. Use __on_exit, not on_exit.
3542 Patch by Andreas Jaeger <aj@suse.de>.
3543
3544 * pthread.c: Use new macros from shlib-compat.h to define versions.
3545
3546 2000-03-19 Ulrich Drepper <drepper@redhat.com>
3547
3548 * pthread.c (pthread_initialize): Instead of on_exit use
3549 __cxa_atexit if __dso_label is available to allow unloading the
3550 libpthread shared library.
3551
3552 2000-03-16 Ulrich Drepper <drepper@redhat.com>
3553
3554 * condvar.c: Make tests for ownership of mutex less strict.
3555
3556 2000-03-14 Ulrich Drepper <drepper@redhat.com>
3557
3558 * condvar.c (pthread_cond_wait): Check whether mutex is owned by
3559 current thread and return error if not.
3560 (pthread_cond_timedwait_relative_old): Likewise.
3561 (pthread_cond_timedwait_relative_new): Likewise.
3562
3563 * mutex.c (__pthread_once): Handle cancelled init function correctly.
3564 (pthread_once_cancelhandler): New function.
3565 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
3566
3567 2000-03-14 Andreas Jaeger <aj@suse.de>
3568
3569 * pthread.c (pthread_handle_sigcancel_rt): GS has been renamed to
3570 REG_GS.
3571 (pthread_handle_sigrestart_rt): Likewise.
3572 * signals.c (pthread_sighandler_rt): Likewise.
3573
3574 2000-03-02 Andreas Jaeger <aj@suse.de>
3575
3576 * sysdeps/pthread/bits/libc-lock.h: Fix typo.
3577 Reported by Sean Chen <sean.chen@turbolinux.com>.
3578
3579 2000-02-28 Andreas Jaeger <aj@suse.de>
3580
3581 * rwlock.c: Fix typo.
3582
3583 2000-02-27 Ulrich Drepper <drepper@redhat.com>
3584
3585 * rwlock.c: Define __* variants of the functions and make old names
3586 aliases.
3587 * Versions [GLIBC_2.2]: Export the __pthread_rwlock_* functions.
3588 * sysdeps/pthread/bits/libc-lock.h: Define __libc_rwlock_* macros.
3589
3590 2000-02-25 Andreas Jaeger <aj@suse.de>
3591
3592 * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
3593 pwrite64, lseek64, open64, and __open64 with version 2.2.
3594
3595 2000-02-22 Ulrich Drepper <drepper@redhat.com>
3596
3597 * semaphore.h (SEM_FAILED): Use 0 not NULL.
3598
3599 2000-02-14 Ulrich Drepper <drepper@redhat.com>
3600
3601 * condvar.c (pthread_cond_timedwait_relative_old): Tight loop with
3602 nanosleep does not work either. Get absolute time inside the
3603 loop.
3604 (pthread_cond_timedwait_relative_new): Likewise.
3605 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
3606
3607 2000-02-13 Andreas Jaeger <aj@suse.de>
3608
3609 * condvar.c (pthread_cond_timedwait_relative_new): Fix last patch.
3610 (pthread_cond_timedwait_relative_old): Likewise.
3611
3612 2000-02-13 Ulrich Drepper <drepper@redhat.com>
3613
3614 * condvar.c (pthread_cond_timedwait_relative_old): Undo last patch
3615 but keep the code around. A bug in the kernel prevent us from
3616 using the code.
3617 (pthread_cond_timedwait_relative_new): Likewise.
3618 (PR libc/1597 and libc/1598).
3619
3620 2000-02-01 Kaz Kylheku <kaz@ashi.footprints.net>
3621
3622 * condvar.c (pthread_cond_timedwait_relative_old): Do tight
3623 loop around nanosleep calls instead of around most of the function
3624 (pthread_cond_timedwait_relative_new): Likewise.
3625 body. Got rid of backwards goto and one local.
3626
3627 2000-01-31 Ulrich Drepper <drepper@redhat.com>
3628
3629 * condvar.c (pthread_cond_timedwait_relative_old): Recompute time
3630 before every nanosleep call to account for time spent in the rest
3631 of the function.
3632 (pthread_cond_timedwait_relative_new): Likewise.
3633 Patch by khendricks@ivey.uwo.ca (PR libc/1564).
3634
3635 2000-01-29 Ulrich Drepper <drepper@redhat.com>
3636
3637 * condvar.c (pthread_cond_timedwait_relative_old): Get remaining time
3638 from nanosleep call so that in case we restart we only wait for the
3639 remaining time.
3640 (pthread_cond_timedwait_relative_new): Likewise.
3641 Patch by khendricks@ivey.uwo.ca (PR libc/1561).
3642
3643 2000-01-18 Ulrich Drepper <drepper@cygnus.com>
3644
3645 * manager.c (pthread_allocate_stack): Compute guard page address
3646 correctly. Patch by HJ Lu.
3647
3648 * sysdeps/pthread/pthread.h: Define
3649 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP.
3650
3651 2000-01-16 Ulrich Drepper <drepper@cygnus.com>
3652
3653 * rwlock.c (pthread_rwlock_unlock): Correct one more problem with
3654 preference handling.
3655 (pthread_rwlockattr_setkind_np): Allow
3656 PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP.
3657 Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
3658
3659 2000-01-12 Ulrich Drepper <drepper@cygnus.com>
3660
3661 * internals.h (pthread_readlock_info): New structure.
3662 (_pthread_descr_struct): Add p_readlock_list, p_readlock_free, and
3663 p_untracked_readlock_count.
3664 * pthread.c (__pthread_initial_thread, pthread_manager_thread):
3665 Add initializers for new fields.
3666 * manager.c (pthread_free): Free read/write lock lists.
3667 * queue.h (queue_is_empty): New function.
3668 * rwlock.c: Implement requirements about when readers should get
3669 locks assigned.
3670 * sysdeps/pthread/pthread.h
3671 (PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP): New definition.
3672 * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_rwlock_t):
3673 Define this name as well.
3674 Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
3675
3676 2000-01-05 Ulrich Drepper <drepper@cygnus.com>
3677
3678 * pthread.c (__pthread_initial_thread, pthread_manager_thread):
3679 Adjust initializers for struct _pthread_descr_struct change.
3680 * internals.h (struct _pthread_descr_struct): Move new elements to
3681 the end.
3682
3683 2000-01-03 Kaz Kylheku <kaz@ashi.footprints.net>
3684
3685 Redesigned how cancellation unblocks a thread from internal
3686 cancellation points (sem_wait, pthread_join,
3687 pthread_cond_{wait,timedwait}).
3688 Cancellation won't eat a signal in any of these functions
3689 (*required* by POSIX and Single Unix Spec!).
3690 * condvar.c: Spontaneous wakeup on pthread_cond_timedwait won't eat a
3691 simultaneous condition variable signal (not required by POSIX
3692 or Single Unix Spec, but nice).
3693 * spinlock.c: __pthread_lock queues back any received restarts
3694 that don't belong to it instead of assuming ownership of lock
3695 upon any restart; fastlock can no longer be acquired by two threads
3696 simultaneously.
3697 * restart.h: Restarts queue even on kernels that don't have
3698 queued real time signals (2.0, early 2.1), thanks to atomic counter,
3699 avoiding a rare race condition in pthread_cond_timedwait.
3700
3701 1999-12-31 Andreas Jaeger <aj@suse.de>
3702
3703 * internals.h: Remove duplicate prototype declarations.
3704
3705 * weaks.c: Remove __THROW from prototypes since the file is not
3706 compiled by a C++ compiler.
3707 * internals.h: Likewise.
3708
3709 1999-12-30 Andreas Jaeger <aj@suse.de>
3710
3711 * sysdeps/pthread/pthread.h: Move internal functions to...
3712 * sysdeps/pthread/bits/libc-lock.h: ...here.
3713
3714 1999-12-29 Andreas Jaeger <aj@suse.de>
3715
3716 * sysdeps/pthread/pthread.h: Fix typos, reformat comments.
3717
3718 1999-12-28 Ulrich Drepper <drepper@cygnus.com>
3719
3720 * sysdeps/alpha/pt-machine.h: Move stack_pointer definition to the
3721 beginning.
3722
3723 * manager.c (__pthread_start): Add one more cast to prevent
3724 warning on 64bit machines.
3725
3726 1999-12-21 Ulrich Drepper <drepper@cygnus.com>
3727
3728 * manager.c (pthread_handle_create): Set p_pid of new thread
3729 before calling the callback function to report a new thread.
3730
3731 1999-12-20 Andreas Jaeger <aj@suse.de>
3732
3733 * pthread.c (pthread_initialize): Move getrlimit call after
3734 setting of errno.
3735
3736 1999-12-18 Ulrich Drepper <drepper@cygnus.com>
3737
3738 * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
3739 pwrite64, lseek64, open64, and __open64.
3740 * wrapsyscall.c: Define pread, __pread64, pread64, pwrite, __pwrite64,
3741 pwrite64, lseek64, open64, and __open64.
3742
3743 * manager.c (pthread_allocate_stack): Correct computation of
3744 new_thread_bottom. Correct handling of stack size and when the
3745 rlimit method to guard for stack growth is used.
3746 * pthread.c (pthread_initialize): Stack limit must be STACK_SIZE
3747 minus one pagesize (not two).
3748
3749 1999-12-03 Andreas Jaeger <aj@suse.de>
3750
3751 * Versions: Add __res_state with version GLIBC_2.2.
3752
3753 * errno.c (__res_state): New function to return thread specific
3754 resolver state.
3755
3756 * pthread.c (pthread_initialize): Initialize p_resp.
3757 (__pthread_reset_main_thread): Also set p_resp.
3758
3759 * manager.c (pthread_handle_create): Initialize p_resp.
3760
3761 * internals.h: Add thread specific resolver state.
3762 Based on patches by Adam D. Bradley <artdodge@cs.bu.edu>.
3763
3764 1999-12-01 Ulrich Drepper <drepper@cygnus.com>
3765
3766 * sysdeps/i386/pt-machine.h: Move stack_pointer definition to the
3767 beginning.
3768 * sysdeps/i386/i686/pt-machine.h: Likewise.
3769 Patches by Alan Modra <alan@SPRI.Levels.UniSA.Edu.Au>.
3770
3771 1999-11-23 Ulrich Drepper <drepper@cygnus.com>
3772
3773 * manager.c (pthread_start_thread_event): Initialize p_pid already
3774 here.
3775
3776 1999-11-22 Ulrich Drepper <drepper@cygnus.com>
3777
3778 * internals.h: Add prototype for __pthread_manager_event.
3779 * manager.c (__pthread_manager_event): New function.
3780 (pthread_start_thread_event): Correct computation of self.
3781 Use INIT_THREAD_SELF.
3782 * pthread.c (__pthread_manager_thread): Initialize p_lock.
3783 (__pthread_initialize_manager): Respect event flags also for creation
3784 of the manager thread.
3785
3786 1999-11-08 Ulrich Drepper <drepper@cygnus.com>
3787
3788 * pthread.c (__pthread_initialize_manager): Initialize
3789 __pthread_manager_thread.p_tid.
3790
3791 1999-11-02 Ulrich Drepper <drepper@cygnus.com>
3792
3793 * internals.h: Declare __pthread_last_event.
3794 * manager.c: Define __pthread_last_event.
3795 (pthread_handle_create): Set __pthread_last_event.
3796 (pthread_exited): Likewise.
3797 * join.c (pthread_exit): Likewise.
3798
3799 * Makefile (libpthread-routines): Add events.
3800 * events.c: New file.
3801 * internals.h: Protect against multiple inclusion.
3802 Include thread_dbP.h header.
3803 (struct _pthread_descr_struct): Add new fields p_report_events and
3804 p_eventbuf.
3805 Declare event reporting functions.
3806 * join.c (pthread_exit): Signal event if this is wanted.
3807 * manager.c (__pthread_threads_events): New variable.
3808 (pthread_handle_create): Take new parameters with event information.
3809 Signal TD_CREATE event if wanted.
3810 (__pthread_manager): Adjust pthread_handle_create call.
3811 (pthread_start_thread_event): New function. Block until manager is
3812 finished and then call pthread_start_thread.
3813 (pthread_exited): Signal TD_REAP event if wanted.
3814
3815 1999-10-26 Ulrich Drepper <drepper@cygnus.com>
3816
3817 * restart.h (suspend_with_cancellation): Rewrite as a macro.
3818
3819 * condvar.c (pthread_cond_timedwait_relative): Don't mark as inline.
3820
3821 1999-10-25 Andreas Jaeger <aj@suse.de>
3822
3823 * internals.h: Remove K&R compatibility.
3824 * no-tsd.c: Likewise.
3825 * semaphore.h: Likewise.
3826 * signals.c: Likewise.
3827 * sysdeps/pthread/bits/libc-tsd.h: Likewise.
3828 * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
3829 * weaks.c: Likewise.
3830
3831 1999-10-21 Xavier Leroy <Xavier.Leroy@inria.fr>
3832
3833 * pthread.c: For i386, wrap pthread_handle_sigrestart and
3834 pthread_handle_sigcancel with functions that restore %gs from the
3835 signal context. For each signal handling function, two wrappers
3836 are required, one for a non-RT signal and one for a RT signal.
3837 * signal.c: For i386, add code to restore %gs from the signal
3838 context in pthread_sighandler and pthread_sighandler_rt.
3839
3840 1999-10-17 Ulrich Drepper <drepper@cygnus.com>
3841
3842 * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add cast.
3843
3844 1999-10-14 Ulrich Drepper <drepper@cygnus.com>
3845
3846 * pthread.c (__pthread_initial_thread): Pass argument to
3847 PTHREAD_START_ARGS_INITIALIZER.
3848 (__pthread_manager_thread): Likewise.
3849
3850 * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add parameter to
3851 initialize function.
3852
3853 * manager.c (pthread_handle_create): Remove p_startfct initialization.
3854
3855 * internals.h (_pthread_descr_struct): We don't need p_startfct field.
3856
3857 1999-10-12 Ulrich Drepper <drepper@cygnus.com>
3858
3859 * internals.h: Correct return types for __libc_read and __libc_write.
3860
3861 1999-10-09 Andreas Jaeger <aj@suse.de>
3862
3863 * internals.h: Add __new_sem_post to get prototype in
3864 manager.c; include semaphore.h for needed types.
3865
3866 1999-10-08 Ulrich Drepper <drepper@cygnus.com>
3867
3868 * manager.c (__pthread_manager) [REQ_POST]: Use __new_sem_post
3869 directly instead of calling sem_post which should not be necessary
3870 but is faster and might help in some case to work around problems.
3871 Patch by khendricks@ivey.uwo.ca [libc/1382].
3872
3873 1999-10-08 Andreas Schwab <schwab@suse.de>
3874
3875 * sysdeps/pthread/Subdirs: New file.
3876 * Implies: Removed.
3877
3878 1999-10-07 Ulrich Drepper <drepper@cygnus.com>
3879
3880 * Implies: New file.
3881 * internals.h (struct _pthread_descr_struct): Add p_startfct.
3882 * manager.c (pthread_handle_create): Initialize p_startfct.
3883 * pthread.c: Define __linuxthread_pthread_sizeof_descr variable.
3884
3885 1999-09-25 Ulrich Drepper <drepper@cygnus.com>
3886
3887 * manager.c (__linuxthreads_pthread_threads_max): New variable.
3888 * specific.c (__linuxthreads_pthread_keys_max): New variable.
3889 (__linuxthreads_pthread_key_2ndlevel_size): New variable.
3890
3891 * condvar.c (pthread_cond_timedwait_relative): Never return with
3892 EINTR. Patch by Andreas Schwab.
3893
3894 1999-09-19 Ulrich Drepper <drepper@cygnus.com>
3895
3896 * signals.c (sigaction): Correct last patch. Don't select
3897 pthread_sighandler_rt based on the signal number but instead of
3898 the SA_SIGINFO flag.
3899
3900 1999-09-23 Ulrich Drepper <drepper@cygnus.com>
3901
3902 * specific.c: Move definitions of struct pthread_key_struct and
3903 destr_function to ...
3904 * internals.h: ...here.
3905
3906 1999-09-18 Ulrich Drepper <drepper@cygnus.com>
3907
3908 * pthread.c (pthread_handle_sigrestart_rt): New function. Use
3909 this instead of pthread_handle_sigrestart if the signal is an RT
3910 signal.
3911
3912 * signals.c: Handle passing through of sighandler arguments also
3913 for real-time signals.
3914
3915 1999-09-03 Andreas Schwab <schwab@suse.de>
3916
3917 * ptfork.c (__fork): Renamed from fork and use __libc_fork. Add
3918 fork as weak alias.
3919 (__vfork): New function, alias vfork.
3920 * Versions: Export __fork, vfork, and __vfork in libpthread.
3921
3922 1999-08-23 Andreas Schwab <schwab@suse.de>
3923
3924 * signals.c (pthread_sighandler): Add SIGCONTEXT_EXTRA_ARGS to
3925 call to signal handler.
3926
3927 1999-08-20 Ulrich Drepper <drepper@cygnus.com>
3928
3929 * pthread.c (__pthread_reset_main_thread): Undo last change.
3930 (__pthread_kill_other_threads_np): Reset signal handlers for the
3931 signals we used in the thread implementation here.
3932
3933 1999-08-19 Ulrich Drepper <drepper@cygnus.com>
3934
3935 * pthread.c (__pthread_reset_main_thread): Reset signal handlers
3936 for the signals we used in the thread implementation [PR libc/1234].
3937
3938 * Versions: Export __pthread_kill_other_threads_np from libpthread
3939 for GLIBC_2.1.2.
3940
3941 * signals.c: Pass sigcontext through wrapper to the user function.
3942
3943 1999-08-01 Ulrich Drepper <drepper@cygnus.com>
3944
3945 * Versions [ld.so] (GLIBC_2.0): Export __libc_internal_tsd_get and
3946 __libc_internal_tsd_set.
3947
3948 1999-07-29 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3949
3950 * manager.c: Remove inclusion of <linux/tasks.h> since it's not
3951 needed anymore.
3952
3953 1999-07-16 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3954
3955 * internals.h: Align _pthread_descr_struct to 32 bytes.
3956 Reported by Tim Hockin <thockin@cobaltnet.com>, close PR
3957 libc/1206.
3958
3959 1999-07-09 Ulrich Drepper <drepper@cygnus.com>
3960
3961 * oldsemaphore.c (sem_compare_and_swap): Fix use of compare and
3962 swap function.
3963
3964 1999-07-09 Cristian Gafton <gafton@redhat.com>
3965
3966 * Makefile (libpthread-routines): Add oldsemaphore routine.
3967 * Versions: Add sem_destroy, sem_getvalue, sem_init, sem_post,
3968 sem_trywait, and sem_wait to GLIBC_2.1.
3969 * oldsemaphore.c: New file.
3970 * semaphore.c: Add default_symbol_versions for the changed functions.
3971 (__new_sem_init): Rename from sem_init.
3972 (__new_sem_post): Rename from sem_post.
3973 (__new_sem_wait): Rename from sem_wait.
3974 (__new_sem_trywait): Rename from sem_trywait.
3975 (__new_sem_getvalue): Rename from sem_getvalue.
3976 (__new_sem_destroy): Rename from sem_destroy.
3977
3978 1999-06-23 Robey Pointer <robey@netscape.com>
3979
3980 * internals.h: Added p_nextlock entry to separate queueing for a
3981 lock from queueing for a CV (sometimes a thread queues on a lock
3982 to serialize removing itself from a CV queue).
3983 * pthread.c: Added p_nextlock to initializers.
3984 * spinlock.c: Changed to use p_nextlock instead of p_nextwaiting.
3985
3986 1999-07-09 Ulrich Drepper <drepper@cygnus.com>
3987
3988 * manager.c (pthread_handle_create): Free mmap region after stack
3989 if clone failed. Patch by Kaz Kylheku <kaz@ashi.FootPrints.net>.
3990
3991 1999-05-23 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3992
3993 * man/pthread_cond_init.man: Correct example.
3994 Reported by Tomas Berndtsson <tomas@nocrew.org>.
3995
3996 * linuxthreads.texi (Condition Variables): Likewise.
3997
3998 1999-05-18 Jakub Jelinek <jj@ultra.linux.cz>
3999
4000 * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): Use
4001 casx not cas, also successful casx returns the old value in rd
4002 and not the new value.
4003
4004 1999-05-16 Xavier Leroy <Xavier.Leroy@inria.fr>
4005
4006 * manager.c: If pthread_create() is given a NULL attribute
4007 and the thread manager runs with a realtime policy, set the
4008 scheduling policy of the newly created thread back to SCHED_OTHER.
4009 * manager.c: If the PTHREAD_INHERIT_SCHED attribute is given,
4010 initialize the schedpolicy field of new_thread->p_start_args
4011 to that of the calling thread.
4012
4013 1999-04-29 Ulrich Drepper <drepper@cygnus.com>
4014
4015 * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): cas
4016 instruction does not allow memory element to use offset.
4017
4018 1999-04-28 Ulrich Drepper <drepper@cygnus.com>
4019
4020 * manager.c (pthread_allocate_stack): Optimize initialization of new
4021 thread descriptor.
4022
4023 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_define_initialized):
4024 Don't use initializer since it is all zeroes.
4025 (__libc_once_define): Likewise.
4026
4027 1999-04-16 Andreas Jaeger <aj@arthur.rhein-neckar.de>
4028
4029 * sysdeps/arm/Implies: Removed since cmpxchg/no-cmpxchg
4030 doesn't exist anymore.
4031 * sysdeps/i386/Implies: Likewise.
4032 * sysdeps/m68k/Implies: Likewise.
4033 * sysdeps/mips/Implies: Likewise.
4034 * sysdeps/powerpc/Implies: Likewise.
4035 * sysdeps/sparc/sparc32/Implies: Likewise.
4036 * sysdeps/sparc/sparc64/Implies: Likewise.
4037
4038 1999-04-15 Ulrich Drepper <drepper@cygnus.com>
4039
4040 * sysdeps/alpha/bits/semaphore.h: Removed.
4041 * sysdeps/powerpc/bits/semaphore.h: Removed.
4042 * sysdeps/pthread/cmpxchg/bits/semaphore.h: Removed.
4043 * sysdeps/pthread/no-cmpxchg/bits/semaphore.h: Removed.
4044 * Makefile (headers): Remove bits/semaphore.h.
4045
4046 * semaphore.h: Define _pthread_descr if necessary.
4047 Don't include limits.h. Define SEM_VALUE_MAX directly.
4048 Define SEM_FAILED.
4049 (sem_t): Protect element names with leading __.
4050 Add declarations for sem_close, sem_open, and sem_unlink.
4051 * semaphore.c: Adjust all functions for new element names.
4052 Define sem_close, sem_open, and sem_unlink.
4053 * Versions (libthread): Add sem_close, sem_open, and sem_unlink for
4054 GLIBC_2.1.1.
4055 * sysdeps/pthread/bits/pthreadtypes.h: Define _pthread_descr only if
4056 necessary.
4057
4058 1999-03-16 H.J. Lu <hjl@gnu.org>
4059
4060 * specific.c (pthread_key_delete): Check th->p_terminated to see
4061 if the thread is running.
4062
4063 * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set):
4064 Added to GLIBC_2.0 for libc.so.
4065
4066 1999-02-12 H.J. Lu <hjl@gnu.org>
4067
4068 * Versions (__libc_current_sigrtmin, __libc_current_sigrtmax,
4069 __libc_allocate_rtsig): Added to GLIBC_2.1.
4070
4071 * internals.h (DEFAULT_SIG_RESTART): Removed.
4072 (DEFAULT_SIG_CANCEL): Removed.
4073
4074 * pthread.c (init_rtsigs, __libc_current_sigrtmin,
4075 __libc_current_sigrtmax, __libc_allocate_rtsig): New functions.
4076 (__pthread_sig_restart, __pthread_sig_cancel,
4077 __pthread_sig_debug): Initialized.
4078 (pthread_initialize): Call init_rtsigs () to initialize
4079 real-time signals.
4080
4081 1999-02-03 H.J. Lu <hjl@gnu.org>
4082
4083 * manager.c (__pthread_manager): Do block __pthread_sig_debug.
4084 Don't restart the thread which sent REQ_DEBUG.
4085 (pthread_start_thread): Check if __pthread_sig_debug > 0
4086 before debugging.
4087
4088 * pthread.c (__pthread_initialize_manager): Suspend ourself
4089 after sending __pthread_sig_debug to gdb instead of
4090 __pthread_sig_cancel.
4091
4092 1999-01-24 H.J. Lu <hjl@gnu.org>
4093
4094 * manager.c (__pthread_manager): Delete __pthread_sig_debug
4095 from mask if __pthread_sig_debug > 0.
4096 (pthread_handle_create): Increment __pthread_handles_num.
4097
4098 * manager.c (pthread_handle_create): Don't pass CLONE_PTRACE to clone.
4099 * pthread.c (__pthread_initialize_manager): Likewise.
4100
4101 * pthread.c (pthread_initialize): Use __libc_allocate_rtsig (1)
4102 instead of __libc_allocate_rtsig (2).
4103 (__pthread_initialize_manager): Send __pthread_sig_debug to gdb
4104 instead of __pthread_sig_cancel.
4105 (pthread_handle_sigdebug): Fix comments.
4106
4107 1999-01-21 Ulrich Drepper <drepper@cygnus.com>
4108
4109 * manager.c (pthread_allocate_stack): Set
4110 __pthread_nonstandard_stacks if user-specified stack is used.
4111
4112 1999-01-16 Ulrich Drepper <drepper@cygnus.com>
4113
4114 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _LFS_ASYNCHRONOUS_IO,
4115 _LFS_LARGEFILE, _LFS64_LARGEFILE, and _LFS64_STDIO from Unix98.
4116
4117 1999-01-07 Xavier Leroy <Xavier.Leroy@inria.fr>
4118
4119 * pthread.c: Use a third signal __pthread_sig_debug distinct
4120 from __pthread_sig_cancel to notify gdb when a thread is
4121 created
4122 * manager.c: Likewise.
4123 * internals.h: Likewise.
4124 * signals.c: The implementation of sigwait(s) assumed that
4125 all signals in s have signal handlers already attached.
4126 This is not required by the standard, so make it work
4127 also if some of the signals have no handlers.
4128
4129 1999-01-05 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
4130
4131 * linuxthreads.texi: Remove pointers from first @node. Move old
4132 @node spec inside comment.
4133
4134 1998-12-31 Ulrich Drepper <drepper@cygnus.com>
4135
4136 * sysdeps/pthread/bits/stdio-lock.h: Define _IO_lock_lock and
4137 _IO_lock_unlock.
4138
4139 1998-12-29 Ulrich Drepper <drepper@cygnus.com>
4140
4141 * semaphore.c (sem_trywait): Don't forget to unlock the semaphore
4142 lock. Patch by Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>.
4143
4144 1998-12-21 Ulrich Drepper <drepper@cygnus.com>
4145
4146 * manager.c: Threads now send __pthread_sig_cancel on termination.
4147 Change clone call and signal masks.
4148 * thread.c (pthread_handle_sigrestart): Remove special code for
4149 manager.
4150 (pthread_handle_sigcancel): In manager thread call
4151 __pthread_manager_sighandler.
4152 * sysdeps/i386/pt-machine.h (__compare_and_swap): Add memory clobber.
4153 * sysdeps/i386/i686/pt-machine.h: Likewise.
4154 Patches by Xavier Leroy.
4155
4156 1998-12-14 Ulrich Drepper <drepper@cygnus.com>
4157
4158 * spinlock.c (__pthread_unlock): Don't crash if called for an
4159 untaken mutex. Reported by Ruslan V. Brushkoff <rus@Snif.Te.Net.UA>.
4160
4161 * Examples/ex6.c: Unbuffer stdout and reduce sleep time to reduce
4162 overall runtime.
4163
4164 1998-12-13 Ulrich Drepper <drepper@cygnus.com>
4165
4166 * Examples/ex3.c: Wait until all threads are started before
4167 searching for the number to avoid race condition on very fast
4168 systems.
4169
4170 1998-12-08 Andreas Jaeger <aj@arthur.rhein-neckar.de>
4171
4172 * sysdeps/pthread/pthread.h: Remove __pthread_setcanceltype
4173 declaration since it's not needed.
4174
4175 * sysdeps/pthread/pthread.h: Move internal functions to ...
4176 * internals.h: ...here.
4177
4178 1998-12-02 H.J. Lu <hjl@gnu.org>
4179
4180 * pthread.c (__pthread_sig_restart): Initiliaze to 0 if
4181 SIGRTMIN is defined.
4182 (__pthread_sig_cancel): Likewise.
4183
4184 1998-12-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
4185
4186 * wrapsyscall.c: Include <sys/mman.h> for msync,
4187 <stdlib.h> for system and <termios.h> for tcdrain prototype.
4188 Correct msync declaration.
4189
4190 1998-11-29 Roland McGrath <roland@baalperazim.frob.com>
4191
4192 * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_define, __libc_tsd_get,
4193 __libc_tsd_set): New macros for new interface.
4194 * no-tsd.c: New file, provide uninitialized defns of
4195 __libc_internal_tsd_get and __libc_internal_tsd_set.
4196 * Makefile (routines): Add no-tsd.
4197
4198 1998-10-12 Roland McGrath <roland@baalperazim.frob.com>
4199
4200 * internals.h: Include <bits/libc-tsd.h>, not <bits/libc-lock.h>.
4201 * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
4202 __libc_internal_tsd_set): Move decls to ...
4203 * sysdeps/pthread/bits/libc-tsd.h: New file for __libc_internal_tsd_*
4204 declarations.
4205
4206 * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
4207 __libc_internal_tsd_set): Make these pointers to functions, not
4208 functions; remove #pragma weak decls for them.
4209 * specific.c (__libc_internal_tsd_get, __libc_internal_tsd_set):
4210 Define static functions and initialized pointers to them.
4211
4212 1998-11-18 Ulrich Drepper <drepper@cygnus.com>
4213
4214 * Makefile (CFLAGS-mutex.c): Define as -D__NO_WEAK_PTHREAD_ALIASES.
4215 (CFLAGS-specific.c): Likewise.
4216 (CFLAGS-pthread.c): Likewise.
4217 (CFLAGS-ptfork.c): Likewise.
4218 (CFLAGS-cancel.c): Likewise.
4219 * sysdeps/pthread/bits/libc-lock.h: Don't mark __pthread_* functions
4220 as weak references if __NO_WEAK_PTHREAD_ALIASES is defined.
4221
4222 * mutex.c (pthread_mutex_init): Define as strong symbol.
4223 (pthread_mutex_destroy): Likewise.
4224 (pthread_mutex_trylock): Likewise.
4225 (pthread_mutex_lock): Likewise.
4226 (pthread_mutex_unlock): Likewise.
4227 (pthread_mutexattr_init): Likewise.
4228 (pthread_mutexattr_destroy): Likewise.
4229 (pthread_once): Likewise.
4230 * ptfork.c (pthread_atfork): Likewise.
4231 * specific.c (pthread_key_create): Likewise.
4232 (pthread_setspecific): Likewise.
4233 (pthread_getspecific): Likewise.
4234
4235 1998-11-15 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
4236
4237 * linuxthreads.texi: Fix punctuation after xref.
4238
4239 1998-11-10 H.J. Lu <hjl@gnu.org>
4240
4241 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine NR_OPEN
4242 if it is defined in <linux/limits.h>.
4243
4244 1998-10-29 14:28 Ulrich Drepper <drepper@cygnus.com>
4245
4246 * spinlock.h (__pthread_trylock): Define inline.
4247 (__pthread_lock): Add extra parameter to declaration. Declare
4248 using internal_function.
4249 (__pthread_unlock): Declare using internal_function.
4250 * spinlock.c (__pthread_lock): Add new parameter. Use it instead
4251 of local variable self. Avoid recomputing self. Define using
4252 internal_function.
4253 (__pthread_trylock): Remove.
4254 (__pthread_unlock): Define using internal_function.
4255 * cancel.c: Adjust for __pthread_lock interface change. Use already
4256 computed self value is possible.
4257 * condvar.c: Likewise.
4258 * join.c: Likewise.
4259 * manager.c: Likewise.
4260 * mutex.c: Likewise.
4261 * pthread.c: Likewise.
4262 * rwlock.c: Likewise.
4263 * semaphore.c: Likewise.
4264 * signals.c: Likewise.
4265
4266 1998-10-27 13:46 Ulrich Drepper <drepper@cygnus.com>
4267
4268 * sysdeps/pthread/pthread.h (struct _pthread_cleanup_buffer): Prepend
4269 __ to field names of the struct.
4270 * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_fastlock):
4271 Likewise.
4272 (pthread_attr_t): Likewise.
4273 (pthread_cond_t): Likewise.
4274 (pthread_condattr_t): Likewise.
4275 (pthread_mutex_t): Likewise.
4276 (pthread_mutexattr_t): Likewise.
4277 (pthread_rwlock_t): Likewise.
4278 (pthread_rwlockattr_t): Likewise.
4279 * attr.c: Adjust for pthread.h and pthreadtypes.h change.
4280 * cancel.c: Likewise.
4281 * condvar.c: Likewise.
4282 * manager.c: Likewise.
4283 * mutex.c: Likewise.
4284 * pthread.c: Likewise.
4285 * ptlongjmp.c: Likewise.
4286 * rwlock.c: Likewise.
4287 * spinlock.c: Likewise.
4288
4289 1998-10-09 Ulrich Drepper <drepper@cygnus.com>
4290
4291 * sysdeps/i386/pt-machine.h (get_eflags, set_eflags): Mark these
4292 also with PT_EI.
4293
4294 * sysdeps/i386/i686/pt-machine.h: Remove unused inline
4295 definitions.
4296
4297 * Makefile (libpthread-routines): Add pt-machine.
4298 * pt-machine.c: New file.
4299 * sysdeps/alpha/pt-machine.h: Define PT_EI as extern inline is not
4300 yet defined. Use PT_EI in extern inline definitions.
4301 * sysdeps/arm/pt-machine.h: Likewise.
4302 * sysdeps/i386/pt-machine.h: Likewise.
4303 * sysdeps/i386/i686/pt-machine.h: Likewise.
4304 * sysdeps/m68k/pt-machine.h: Likewise.
4305 * sysdeps/mips/pt-machine.h: Likewise.
4306 * sysdeps/powerpc/pt-machine.h: Likewise.
4307 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
4308 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
4309
4310 1998-10-02 Andreas Jaeger <aj@arthur.rhein-neckar.de>
4311
4312 * semaphore.h: Include <sys/types.h> so that _pthread_descr
4313 is declared.
4314
4315 1998-09-15 David S. Miller <davem@pierdol.cobaltmicro.com>
4316
4317 * sysdeps/sparc/sparc32/pt-machine.h (INIT_THREAD_SELF): Add nr
4318 argument.
4319 * sysdeps/sparc/sparc64/pt-machine.h (INIT_THREAD_SELF): Likewise.
4320
4321 1998-09-12 14:24 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
4322
4323 * sysdeps/unix/sysv/linux/bits/sigthread.h: Add multiple inclusion
4324 guard.
4325
4326 1998-09-02 11:08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
4327
4328 * signals.c (sigaction): Check that sig is less than NSIG to avoid
4329 array index overflow.
4330
4331 1998-09-06 10:56 Ulrich Drepper <drepper@cygnus.com>
4332
4333 * sysdeps/pthread/semaphore.h: New file.
4334
4335 1998-09-06 09:08 Ulrich Drepper <drepper@cygnus.com>
4336
4337 * sysdeps/pthread/bits/libc-lock.h (enum __libc_tsd_key_t): Add
4338 _LIBC_TSD_KEY_DL_ERROR.
4339
4340 1998-08-31 Ulrich Drepper <drepper@cygnus.com>
4341
4342 * sysdeps/i386/i686/pt-machine.h (testandset): Add memory clobber.
4343 * sysdeps/i386/pt-machine.h: Likewise.
4344 Suggested by Roland McGrath.
4345
4346 1998-08-28 13:58 Ulrich Drepper <drepper@cygnus.com>
4347
4348 * internals.h: Also define THREAD_GETMEM_NC and THREAD_SETMEM_NC to
4349 access thread data with non-constant offsets.
4350 * specific.c: Use THREAD_GETMEM_NC and THREAD_SETMEM_NC where
4351 necessary.
4352
4353 * sysdeps/i386/useldt.h: Fix typo. Add THREAD_GETMEM_NC and
4354 THREAD_SETMEM_NC definitions.
4355
4356 * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM_NC and
4357 THREAD_SETMEM_NC.
4358 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
4359
4360 1998-08-26 15:46 Ulrich Drepper <drepper@cygnus.com>
4361
4362 * internals.h: Define THREAD_GETMEM and THREAD_SETMEM to default if
4363 not already defined.
4364 (struct _pthread_descr_struct): Add p_self and p_nr field.
4365 * manager.c (__pthread_handles): Define second element to point
4366 to manager thread.
4367 (__pthread_handles_num): Initialize to 2.
4368 (__pthread_manager): Use INIT_THREAD_SELF with two arguments.
4369 (pthread_start_thread): Likewise.
4370 (pthread_handle_create): Start search for free slot at entry 2.
4371 Initialize new fields p_self and p_nr.
4372 Call __clone with CLONE_PTRACE if available.
4373 (pthread_free): Call FREE_THREAD_SELF if available.
4374 * pthread.c (__pthread_initial_thread): Initialize new fields.
4375 (__pthread_manager_thread): Likewise.
4376 (__pthread_initialize_manager): Call __clone with CLONE_PTRACE.
4377
4378 * cancel.c: Use THREAD_GETMEM and THREAD_SETMEM to access the
4379 elements of the thread descriptor.
4380 * condvar.c: Likewise.
4381 * errno.c: Likewise.
4382 * join.c: Likewise.
4383 * manager.c: Likewise.
4384 * pthread.c: Likewise.
4385 * ptlongjmp.c: Likewise.
4386 * semaphore.c: Likewise.
4387 * signals.c: Likewise.
4388 * specific.c: Likewise.
4389 * spinlock.c: Likewise.
4390
4391 * sysdeps/alpha/pt-machine.h (INIT_THREAD_SELF): Add extra parameter.
4392
4393 * sysdeps/i386/useldt.h: New file.
4394 * sysdeps/i386/i686/pt-machine.h: Show how to use this file.
4395
4396 * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM and
4397 THREAD_SETMEM using __thread_self.
4398 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
4399
4400 1998-08-24 Geoff Keating <geoffk@ozemail.com.au>
4401
4402 * spinlock.c (__pthread_lock): Reset p_nextwaiting to NULL if it
4403 turned out that we didn't need to queue after all.
4404
4405 1998-08-22 Geoff Keating <geoffk@ozemail.com.au>
4406
4407 * sysdeps/powerpc/pt-machine.h: Remove testandset, it's not used
4408 and wastes space; correct types.
4409
4410 1998-08-08 11:18 H.J. Lu <hjl@gnu.org>
4411
4412 * signals.c (sigaction): Handle NULL argument.
4413
4414 1998-08-04 Ulrich Drepper <drepper@cygnus.com>
4415
4416 * sysdeps/unix/sysv/linux/bits/sigthread.h: Use __sigset_t instead
4417 of sigset_t.
4418
4419 1998-08-02 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
4420
4421 * Makefile (linuxthreads-version): Extract correct number from
4422 Banner.
4423
4424 1998-07-29 Xavier Leroy <Xavier.Leroy@inria.fr>
4425
4426 * Banner: Bump version number to 0.8
4427 * FAQ.html: Many updates, in particular w.r.t. debugging.
4428 * manager.c: Support for non-default stacksize for
4429 LinuxThreads-allocated stacks;
4430 don't use guard pages for stacks with default size, rely on
4431 rlimit(RLIMIT_STACK) instead (it's cheaper).
4432 * attr.c: Likewise.
4433 * cancel.c: Use __pthread_sig_cancel and __pthread_sig_restart
4434 everywhere instead of PTHREAD_SIG_CANCEL and PTHREAD_SIG_RESTART.
4435 * condvar.c: Likewise.
4436 * internals.h: Likewise.
4437 * restart.h: Likewise.
4438 * signals.c: Likewise.
4439 * pthread.c: Likewise; set rlimit(RLIMIT_STACK) as we need it.
4440
4441 1998-07-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
4442
4443 * weaks.c: Define pthread_mutexattr_[sg]ettype instead of
4444 __pthread_mutexattr_[sg]ettype. Add more weak aliases.
4445 * Versions: Put __pthread_mutexattr_settype under version
4446 GLIBC_2.0. Don't export __pthread_mutexattr_setkind_np and
4447 __pthread_mutexattr_gettype.
4448
4449 1998-07-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
4450
4451 * sysdeps/pthread/bits/libc-lock.h: Make
4452 __pthread_mutexattr_settype weak. Don't make
4453 __pthread_mutexattr_setkind_np weak.
4454
4455 1998-07-16 10:52 Ulrich Drepper <drepper@cygnus.com>
4456
4457 * manager.c (pthread_handle_create): Check whether sched_setscheduler
4458 call can succeed here.
4459
4460 * mutex.c: Define __pthread_mutexattr_settype and make
4461 __pthread_mutexattr_setkind_np an alias.
4462 Likewise for __pthread_mutexattr_gettype.
4463
4464 1998-07-15 11:00 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
4465
4466 * attr.c (pthread_attr_setschedpolicy): Don't check whether caller
4467 is root.
4468
4469 1998-07-14 19:38 Ulrich Drepper <drepper@cygnus.com>
4470
4471 * sysdeps/pthread/bits/libc-lock.h: Define __libc_cleanup_end.
4472
4473 1998-07-11 Andreas Jaeger <aj@arthur.rhein-neckar.de>
4474
4475 * Examples/ex6.c: Include <unistd.h> for usleep.
4476
4477 1998-06-13 11:04 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
4478
4479 * Examples/ex4.c (main): Use exit, not pthread_exit.
4480
4481 1998-07-09 13:39 Ulrich Drepper <drepper@cygnus.com>
4482
4483 * Versions: Add __pthread_mutexattr_gettype and
4484 __pthread_mutexattr_settype.
4485 * lockfile.c: Use __pthread_mutexattr_settype instead of
4486 __pthread_mutexattr_setkind_np.
4487 * mutex.c: Define __pthread_mutexattr_gettype and
4488 __pthread_mutexattr_settype.
4489 * weak.c: Likewise.
4490 * sysdeps/pthread/pthread.h: Declare __pthread_mutexattr_gettype and
4491 __pthread_mutexattr_settype.
4492 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_init_recursive):
4493 Use __pthread_mutexattr_settype.
4494
4495 1998-07-08 22:26 Ulrich Drepper <drepper@cygnus.com>
4496
4497 * Versions: Add pthread_mutexattr_gettype, pthread_mutexattr_settype.
4498 * mutex.c: Define weak alias pthread_mutexattr_gettype and
4499 pthread_mutexattr_settype.
4500 * sysdeps/pthread/pthread.h: Declare these functions.
4501 Move pthread_sigmask and pthread_kill declaration in separate header.
4502 * sysdeps/unix/sysv/linux/bits/sigthread.h: New file.
4503
4504 1998-07-07 15:20 Ulrich Drepper <drepper@cygnus.com>
4505
4506 * Makefile: Add rules to compile and run tests.
4507 * Examples/ex1.c: Little changes to fix warnings.
4508 * Examples/ex2.c: Likewise.
4509 * Examples/ex3.c: Likewise.
4510 * Examples/ex4.c: Likewise.
4511 * Examples/ex5.c: Likewise.
4512 * Examples/ex6.c: New file.
4513
4514 1998-07-05 11:54 Ulrich Drepper <drepper@cygnus.com>
4515
4516 * Versions: Add pthread_attr_init to GLIBC_2.1 version in libc.
4517
4518 1998-07-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
4519
4520 * attr.c: Include <string.h>.
4521
4522 1998-06-30 11:47 Ulrich Drepper <drepper@cygnus.com>
4523
4524 * attr.c: Include errno.h. Use memcpy to copy sched_param.
4525 * internals.h: Include limits.h.
4526 * manager.c: Use memcpy to copy sched_param.
4527 * ptfork.c: Include errno.h.
4528 * pthread.c: Likewise.
4529 * semaphore.c: Likewise.
4530 * specific.c: Likewise.
4531 * spinlock.h: Likewise.
4532 * sysdeps/pthread/pthread.h: Include only allowed headers. Move
4533 type definition to ...
4534 * sysdeps/pthread/bits/pthreadtypes.h: ...here. New file.
4535
4536 1998-06-29 12:34 Ulrich Drepper <drepper@cygnus.com>
4537
4538 * sysdeps/pthread/pthread.h: Use __PMT not __P for function pointers.
4539
4540 * sysdeps/pthread/pthread.h: Define various PTHREAD_* symbols also
4541 as macros as demanded in POSIX.1, Annex C.
4542
4543 1998-06-29 12:29 Ulrich Drepper <drepper@cygnus.com>
4544
4545 * internals.h (struct pthread_request): For free use pthread_t
4546 instead of pthread_descr.
4547 * join.c (pthread_join): Pass thread_id, not th to manager.
4548 (pthread_detach): Likewise.
4549 * manager.c (__pthread_manager): Except thread ID in FREE_REQ case.
4550 (pthread_exited): Remove detached queue code.
4551 (pthread_handle_free): Expect thread ID parameter and use it to
4552 validate the thread decsriptor. Don't use detached queue.
4553 Patches by Xavier Leroy.
4554
4555 1998-06-27 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
4556
4557 * libpthread.map: Export accept, longjmp, sigaction, siglongjmp,
4558 _IO_flockfile, _IO_ftrylockfile, _IO_funlockfile,
4559 __pthread_atfork, __pthread_key_create, __pthread_once.
4560 * internals.h: Doc fix.
4561 * pthread.c (__pthread_initialize): Define again.
4562
4563 1998-06-26 Ulrich Drepper <drepper@cygnus.com>
4564
4565 * manager.c (pthread_exited): If thread is not detached put it on
4566 special list.
4567 (pthread_handle_free): If thread is not on list with living threads
4568 search on list with detached threads.
4569
4570 * sysdeps/pthread/pthread.h (PTHREAD_RWLOCK_INITIALIZER): Correct
4571 for new definition of pthread_rwlock_t.
4572
4573 * spinlock.c: Correct test whether to compile
4574 __pthread_compare_and_swap or not.
4575
4576 1998-06-25 19:27 Ulrich Drepper <drepper@cygnus.com>
4577
4578 * attr.c: Finish user stack support. Change locking code to be safe
4579 in situations with different priorities.
4580 * cancel.c: Likewise.
4581 * condvar.c: Likewise.
4582 * internals.h: Likewise.
4583 * join.c: Likewise.
4584 * manager.c: Likewise.
4585 * mutex.c: Likewise.
4586 * pthread.c: Likewise.
4587 * ptlongjmp.c: Likewise.
4588 * queue.h: Likewise.
4589 * rwlock.c: Likewise.
4590 * semaphore.c: Likewise.
4591 * semaphore.h: Likewise.
4592 * signals.c: Likewise.
4593 * spinlock.c: Likewise.
4594 * spinlock.h: Likewise.
4595 * sysdeps/pthread/pthread.h: Likewise.
4596 Patches by Xavier Leroy.
4597
4598 * sysdeps/i386/i686/pt-machine.h: New file.
4599
4600 1998-06-25 Ulrich Drepper <drepper@cygnus.com>
4601
4602 * sysdeps/pthread/pthread.h: Make [sg]et_stacksize and
4603 [sg]et_stackaddr prototypes always available.
4604
4605 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
4606 _POSIX_THREAD_ATTR_STACKSIZE and _POSIX_THREAD_ATTR_STACKADDR.
4607
4608 1998-06-24 Ulrich Drepper <drepper@cygnus.com>
4609
4610 * manager.c (pthread_free): Undo patch from 980430.
4611 Reported by David Wragg <dpw@doc.ic.ac.uk>.
4612
4613 1998-06-09 15:07 Ulrich Drepper <drepper@cygnus.com>
4614
4615 * manager.c: Define __pthread_manager_adjust_prio and use it to
4616 increase priority when needed.
4617 * internals.h: Add prototype for __pthread_manager_adjust_prio.
4618 * mutex.c: Optimize mutexes to wake up only one thread.
4619 * pthread.c: Move PID of manager for global variable in structure
4620 element.
4621 Patches by Xavier Leroy.
4622
4623 1998-06-07 13:47 Ulrich Drepper <drepper@cygnus.com>
4624
4625 * sysdeps/pthread/bits/libc-lock.h: Optimize cleanup handlers a bit.
4626
4627 1998-06-03 Andreas Jaeger <aj@arthur.rhein-neckar.de>
4628
4629 * attr.c: Correct typo.
4630
4631 1998-05-01 Ulrich Drepper <drepper@cygnus.com>
4632
4633 * manager.c (pthread_free): Unmap guard before the stack.
4634 Patch by Matthias Urlichs.
4635
4636 1998-04-30 Ulrich Drepper <drepper@cygnus.com>
4637
4638 * manager.c (pthread_free): Detect already free child.
4639 Patch by Xavier Leroy, reported by Matthias Urlichs.
4640
4641 1998-04-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
4642
4643 * Makefile (linuxthreads-version): Renamed back from
4644 libpthread-version.
4645
4646 1998-04-21 Ulrich Drepper <drepper@cygnus.com>
4647
4648 * ptlongjmp.c: Add prototypes for __libc_siglongjmp and
4649 __libc_longjmp.
4650
4651 1998-04-20 14:55 Ulrich Drepper <drepper@cygnus.com>
4652
4653 * Makefile (libpthread-routines): Add ptlongjmp and spinlock.
4654 * internals.h: Add definitions for new spinlock implementation.
4655 * ptlongjmp.c: New file.
4656 * spinlock.c: New file.
4657 * spinlock.h (acquire): Don't reschedule using __sched_yield, use
4658 new function __pthread_acquire to prevent deadlocks with thread
4659 with different priorities.
4660 Patches by Xavier Leroy <Xavier.Leroy@inria.fr>.
4661
4662 1998-03-16 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
4663
4664 * manager.c (__pthread_manager): Reduce first argument to select
4665 to include just the needed file descriptor.
4666
4667 1998-03-17 00:06 Ulrich Drepper <drepper@cygnus.com>
4668
4669 * manager.c: Fix last patch which caused core dumps.
4670
4671 * pthread.c: Correctly handle missing SIGRTMIN.
4672
4673 1998-03-15 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
4674
4675 * libpthread.map: Add __libc_internal_tsd_get and
4676 __libc_internal_tsd_set. Add missing cancelable functions. Export
4677 libc internal versions of the cancelable functions.
4678
4679 1998-03-13 16:51 Ulrich Drepper <drepper@cygnus.com>
4680
4681 * weaks.c: Define pthread_attr_init as GLIBC_2.0 and GLIBC_2.1.
4682
4683 1998-03-13 00:46 Ulrich Drepper <drepper@cygnus.com>
4684
4685 * attr.c: Implement pthread_attr_[gs]etguardsize,
4686 pthread_attr_[gs]setstackaddr, pthread_attr_[gs]etstacksize.
4687 Change pthread_attr_init to have two interfaces.
4688 * internals.h (struct _pthread_descr_struct): Add new fields for
4689 above functions.
4690 * libpthread.map: Add names in GLIBC_2.1 section.
4691 * manager.c (pthread_handle_create): Implement guardsize and
4692 user stack.
4693 (pthread_free): Likewise.
4694 * pthread.c (pthread_create): Add new interface for changed
4695 pthread_attr_t.
4696 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
4697 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add definition of
4698 PTHREAD_STACK_MIN.
4699
4700 1998-03-11 00:42 Wolfram Gloger <wmglo@dent.med.uni-muenchen.de>
4701
4702 * manager.c: Enable resetting of the thread scheduling policy
4703 to SCHED_OTHER when the parent thread has a different one.
4704
4705 1998-02-01 13:51 Ulrich Drepper <drepper@cygnus.com>
4706
4707 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
4708 _POSIX_ASYNCHRONOUS_IO.
4709
4710 * sysdeps/pthread/pthread.h: Define bits for Unix98 variants of
4711 mutexes.
4712 * mutex.c: Implement new mutex types.
4713
4714 * internals.h: Include <signal.h>.
4715
4716 * libpthread.map: Add __erno_location and __h_errno_location.
4717
4718 * errno.c: Return pointer to variable actually in use. This might
4719 not be the one in the thread structure.
4720 * internals.h (struct _pthread_descr_struct): Add new fields p_errnop
4721 and p_h_errnop.
4722 * manager.c (__pthread_manager): Set p_errnop and p_h_errnop member
4723 of manager thread structure.
4724 (pthread_handle_create): Set p_errnop and p_h_errnop members for new
4725 thread.
4726 * pthread.c: Adapt initializer for thread structures.
4727 (__pthread_initial_thread): Set p_errnop and p_h_errnop member.
4728 (__pthread_reset_main_thread): Reset p_errnop and p_h_errnop of
4729 current thread to global variables.
4730
4731 1998-01-31 17:27 Ulrich Drepper <drepper@cygnus.com>
4732
4733 * rwlock.c: New file.
4734 * Makefile (libpthread-routines): Add rwlock.
4735 * sysdeps/pthread/pthread.h: Define data structures and declare
4736 functions.
4737 * libpthread.map: Add new functions.
4738
4739 1997-12-18 13:50 Philip Blundell <pb@nexus.co.uk>
4740
4741 * sysdeps/arm/pt-machine.h: New file; add ARM support.
4742 * sysdeps/arm/Implies: likewise.
4743 * README: Document it.
4744
4745 1997-12-13 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
4746
4747 * signals.c: Remove unneeded initializer for sigwaited, saving a
4748 warning.
4749
4750 1997-04-11 01:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
4751
4752 * semaphore.c (sem_init): Set sem_spinlock only if available.
4753
4754 1997-12-04 01:48 Ulrich Drepper <drepper@cygnus.com>
4755
4756 * mutex.c: Implement PTHREAD_MUTEX_CHECKERROR.
4757 * sysdeps/pthread/pthread.h: Define PTHREAD_MUTEX_CHECKERROR.
4758
4759 * Makefile: Update from LinuxThreads 0.7.
4760 * internals.h. Likewise.
4761 * manager.c: Likewise.
4762 * mutex.c: Likewise.
4763 * pthread.c: Likewise.
4764 * signals.c: Likewise.
4765 * specific.c: Likewise.
4766 * Examples/ex3.c: Likewise.
4767
4768 1997-11-20 18:13 Ulrich Drepper <drepper@cygnus.com>
4769
4770 * pthread.c (__pthread_reset_main_thread): Close pipe only if still
4771 open.
4772
4773 1997-10-29 05:38 Ulrich Drepper <drepper@cygnus.com>
4774
4775 * wrapsyscall.c: Add socket functions which are also cancelation
4776 points.
4777
4778 1997-10-19 21:40 Wolfram Gloger <wg@wolfram.dent.med.uni-muenchen.de>
4779
4780 * specific.c (__libc_internal_tsd_set, __libc_internal_tsd_get):
4781 New functions for fast thread specific data within libc.
4782
4783 * internals.h: Add new array p_libc_specific to struct
4784 _pthread_descr_struct.
4785
4786 * sysdeps/pthread/bits/libc-lock.h: Declare new functions.
4787
4788 1997-10-13 05:39 Ulrich Drepper <drepper@cygnus.com>
4789
4790 * semaphore.h: Add __BEGIN_DECLS/__END_DECLS.
4791 Reported by Ralf Corsepius <corsepiu@faw.uni-ulm.de>.
4792
4793 1997-08-29 03:05 Ulrich Drepper <drepper@cygnus.com>
4794
4795 * internals.h (struct _pthread_descr_struct): Add definitions for
4796 two-level specific key handling.
4797 * manager.c (pthread_handle_create): Initialize specific memory array.
4798 * specific.c: Implement two-level key handling.
4799 * weaks.c: Don't provide dummy key handling.
4800 * sysdeps/pthread/bits/libc-lock.h: Typedef __libc_lock_t (no #define).
4801 Add definition of __libc_key_t.
4802 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define PTHREAD_KEYS_MAX
4803 as 1024.
4804 Add definition of _POSIX_THREAD_DESTRUCTOR_ITERATIONS and
4805 PTHREAD_DESTRUCTOR_ITERATIONS.
4806
4807 * manager.c (pthread_handle_create): Compare mmap result with
4808 MAP_FAILED.
4809
4810 * ptfork.c: Rename to __pthread_atfork and make old name a weak alias.
4811 * sysdeps/pthread/bits/pthread.h: Add prototype for __pthread_atfork.
4812
4813 1997-08-22 19:04 Richard Henderson <rth@cygnus.com>
4814
4815 sysdeps/sparc -> sysdeps/sparc/sparc32
4816 sysdeps/sparc64 -> sysdeps/sparc/sparc64
4817
4818 * internals.h: Change definition of THREAD_SELF to be an expression,
4819 not a statement that did a return.
4820 * sysdeps/alpha/pt-machine.h (THREAD_SELF): Update accordingly.
4821 * sysdeps/sparc/sparc32/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
4822 Follow Solaris and use a "system reserved" register (%g6) to hold
4823 the thread descriptor.
4824 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
4825
4826 1997-08-03 00:09 Ulrich Drepper <drepper@cygnus.com>
4827
4828 * mutex.c: Correct pthread_once. Patch by Xavier Leroy.
4829 * sysdeps/pthread/pthread.h: Add prototype for __pthread_once.
4830 * sysdeps/pthread/bits/pthread.h: Add macros for __libc_once.
4831
4832 * semaphore.c: Include spinlock.h only when needed.
4833
4834 * specific.c (__pthread_setsepcific, __pthread_getspecific): Reject
4835 keys for entries not in use.
4836
4837 * weaks.c: Implement key handling functions for real.
4838
4839 1997-06-29 01:04 Richard Henderson <richard@gnu.ai.mit.edu>
4840
4841 Initial sparc64-linux support:
4842 * sysdeps/sparc64/Implies: New file.
4843 * sysdeps/sparc64/pt-machine.h: Likewise.
4844
4845 1997-06-29 00:48 Ulrich Drepper <drepper@cygnus.com>
4846
4847 * semaphore.c: Include spinlock.h at correct place.
4848 Patch by HJ Lu.
4849
4850 1997-06-13 10:06 Richard Henderson <rth@tamu.edu>
4851
4852 The Great Bit File Move:
4853 * sysdeps/alpha/semaphorebits.h: -> .../bits/semaphore.h.
4854 * sysdeps/powerpc/semaphorebits.h: Likewise.
4855 * sysdeps/pthread/cmpxchg/semaphorebits.h: Likewise.
4856 * sysdeps/pthread/no-cmpxchg/semaphorebits.h: Likewise.
4857 * sysdeps/pthread/libc-lock.h: -> bits/
4858 * sysdeps/pthread/stdio-lock.h: Likewise.
4859 * sysdeps/unix/sysv/linux/local_lim.h: Likewise.
4860 * sysdeps/unix/sysv/linux/posix_opt.h: Likewise.
4861 * semaphore.h: Likewise.
4862 * sysdeps/pthread/pthread.h: Likewise.
4863
4864 * lockfile.c: <foo.h> -> <bits/foo.h>.
4865 * semaphore.h: Likewise.
4866
4867 * Makefile: (headers): foo.h -> bits/foo.h.
4868 * sysdeps/pthread/Makefile: Likewise.
4869
4870 1997-04-11 01:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
4871
4872 * semaphore.c (sem_init): Set sem_spinlock only if available.
4873
4874 * sysdeps/m68k/pt-machine.h (testandset, __compare_and_swap): Fix
4875 asm constraints.
4876
4877 1997-04-09 03:00 Ulrich Drepper <drepper@cygnus.com>
4878
4879 Update from LinuxThreads 0.6.
4880
4881 * attr.c (pthread_attr_getdetachstate): Use __sched_get_priority_max
4882 and __sched_get_priority_min instead of names without `__'.
4883
4884 * manager.c: Rewrite large parts to implement opaque pthread_t.
4885
4886 * cancel.c: Adapt for opaque pthread_t type.
4887 * condvar.c: Likewise.
4888 * errno.c: Likewise.
4889 * join.c: Likewise.
4890 * mutex.c: Likewise.
4891 * pthread.c: Likewise.
4892 * signals.c: Likewise.
4893 * specific.c: Likewise.
4894 * restart.h: Likewise.
4895 * queue.h: Likewise.
4896 * Examples/ex3.c: Likewise.
4897 * Examples/ex4.c: Likewise.
4898 * sysdeps/pthread/pthread.h: Likewise.
4899
4900 * pthread.c: Accumulate time for all threads in thread manager.
4901
4902 * semaphore.c: Implement fallback implementation for architectures
4903 sometimes missing compare-exchange operations.
4904
4905 * cancel.c (pthread_cancel): Validate handle argument.
4906 * join.c (pthread_join): Likewise.
4907 (pthread_detach): Likewise.
4908 * signals.c (pthread_kill): Likewise.
4909
4910 * spinlock.h (acquire): Use __sched_yield not sched_yield.
4911
4912 * queue.h (enqueue): Enqueue thread according to priority.
4913
4914 * internals.c (struct pthread_start_args): New struct for passing
4915 args to cloning function.
4916 (struct _pthread): Rename to _pthread_descr_struct and adapt for
4917 opaque pthread_t.
4918
4919 * Examples/Makefile (clean): Pass -f option to rm.
4920
4921 * sysdeps/i386/pt-machine.h: Add check for compare-exchange instruction
4922 and define TEST_FOR_COMPARE_AND_SWAP.
4923 * sysdeps/i386/i486/pt-machine.h: Removed.
4924
4925 * sysdeps/unix/sysv/linux/local_lim.h (PTHREAD_THREADS_MAX): Increase
4926 to 1024.
4927
4928 1997-04-04 16:38 Ulrich Drepper <drepper@cygnus.com>
4929
4930 * restart.h (suspend): Clear p_signal before suspending.
4931 (suspend_with_cancellation): Likewise.
4932 Patch by Xavier Leroy <Xavier.Leroy@inria.fr>.
4933
4934 * weaks.c: Make __pthread_key_create return 1.
4935 * sysdeps/pthread/libc-lock.h: Define __libc_key_create,
4936 __libc_getspecific, __libc_setspecific, and __libc_key_t.
4937 * sysdeps/pthread/stdio-lock.h: Don't care for implementation not
4938 using libio.
4939
4940 1997-03-19 15:13 Miguel de Icaza <miguel@nuclecu.unam.mx>
4941
4942 * sysdeps/sparc/pt-machine (RELEASE): Fix.
4943
4944 1997-03-01 07:55 Geoff Keating <geoffk@ozemail.com.au>
4945
4946 * sysdeps/powerpc/Implies: Added.
4947 * sysdeps/powerpc/pt-machine.h: Added.
4948 * sysdeps/powerpc/semaphorebits.h: Added.
4949
4950 1997-01-22 01:22 Ulrich Drepper <drepper@cygnus.com>
4951
4952 * pthread.c (__pthread_initial_thread): Correct
4953 initializer.
4954 (__pthread_manager_thread): Likewise.
4955 Reported by Andreas Jaeger.
4956
4957 1997-01-18 22:15 Richard Henderson <rth@tamu.edu>
4958
4959 Since sigset_t no longer fits in a register, we can't pass in the
4960 thread's initial mask so easily. Take this opportunity to simplify
4961 the clone implementation by only accepting a single void* argument.
4962
4963 * manager.c (__pthread_manager): Put thread vitals in the thread
4964 struct instead of as arguments through clone.
4965 (pthread_start_thread): Look for them there.
4966 * internals.h (struct _pthread): Add p_initial_fn,
4967 p_initial_fn_arg, p_initial_mask. Fix __pthread_manager proto.
4968 * pthread.c (pthread_initialize_manager): Revise clone invocation.
This page took 0.260933 seconds and 5 git commands to generate.