1 2003-01-05 Andreas Schwab <schwab@suse.de>
3 * sysdeps/m68k/Makefile: New file, use -fPIC for nonshared
6 * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h (SINGLE_THREAD_P):
11 2003-01-05 Ulrich Drepper <drepper@redhat.com>
13 * Makefile (libc.so-no-z-defs): Define to yes.
15 2003-01-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
17 * sysdeps/sh/tls.h: Include dl-sysdep.h and stdint.h.
18 (tcbhead_t): Add multiple_threads member.
19 (TLS_INIT_TP_EXPENSIVE): Define.
20 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Don't use multi-line
21 strings. Remove unused code.
22 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
24 2003-01-04 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
26 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
27 * sysdeps/unix/sysv/linux/powerpc/powerpc32/Makefile: New file.
29 2003-01-04 Jakub Jelinek <jakub@redhat.com>
31 * internals.h (LIBC_THREAD_GETMEM, LIBC_THREAD_SETMEM): Define
32 even if NOT_IN_libc is defined.
34 2003-01-05 Jakub Jelinek <jakub@redhat.com>
36 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
37 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
38 * sysdeps/s390/Makefile: New file.
39 * sysdeps/s390/tcb-offsets.sym: New file.
40 * sysdeps/s390/tls.h: New file.
42 2003-01-03 Richard Henderson <rth@redhat.com>
44 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
46 2003-01-03 Andreas Jaeger <aj@suse.de>
48 * sysdeps/pthread/bits/libc-tsd.h: Declare weak_extern functions.
50 2003-01-03 Jakub Jelinek <jakub@redhat.com>
52 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
54 2003-01-02 Ulrich Drepper <drepper@redhat.com>
56 * tst-cancel-wrappers.sh: Exclude sigwait.c as well, it does not have
59 2003-01-02 Jakub Jelinek <jakub@redhat.com>
61 * internals.h (struct pthread_functions): Rename
62 ptr_pthread_cond_* fields to ptr___pthread_cond_*.
63 * pthread.c (pthread_functions): Adjust.
64 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
65 pthread_cond_*@GLIBC_2.0 compatibility symbols.
66 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
67 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
68 and pthread_cond_wait.
70 * sysdeps/pthread/bits/pthreadtypes.h (__pthread_cond_align_t): New
72 (pthread_cond_t): Add __align member, shorten __padding.
73 * sysdeps/pthread/pthread.h (PHTREAD_COND_INITIALIZER): Initialize
74 __padding and __align too.
76 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call2): Add
78 * sysdeps/pthread/sigaction.c: New file.
79 * sysdeps/unix/sysv/linux/raise.c: New file.
80 * sysdeps/unix/sysv/linux/sigwait.c: New file.
81 * sysdeps/unix/sysv/linux/fork.c (__pthread_fork): Protect
82 weak_extern with #ifndef SHARED.
83 * sysdeps/unix/sysv/linux/jmp-unwind.c (__pthread_cleanup_upto):
85 * signals.c (__sigaction): Renamed to...
86 (__pthread_sigaction): ... this.
87 (__sigaction): New strong alias, #ifdef SHARED only.
88 (sigaction): Protect with #ifdef SHARED.
89 (sigwait): Renamed to...
90 (__pthread_sigwait): ... this.
91 (sigwait): New strong alias, #ifdef SHARED only.
92 (raise): Renamed to...
93 (__pthread_raise): ... this.
94 (raise): New strong alias, #ifdef SHARED only.
95 * internals.h (__pthread_sigaction, __pthread_sigwait,
96 __pthread_raise): New prototypes.
97 (struct pthread_functions): Add ptr_pthread_sigaction,
98 ptr_pthread_sigwait, ptr_pthread_raise.
99 * pthread.c (pthread_functions): Renamed to...
100 (__pthread_functions): ... this. No longer static, no longer
101 SHARED only. Initialize ptr_pthread_sigaction, ptr_pthread_sigwait
102 and ptr_pthread_raise.
103 [SHARED] (ptr_pthread_functions): Change to &__pthread_functions.
104 * libc-cancellation.c (__pthread_thread_self): Remove weak_extern.
105 * ptfork.c (__fork, __vfork): Protect with #ifdef SHARED.
106 * ptlongjmp.c (siglongjmp, longjmp): Protect with #ifdef SHARED.
108 * Makefile (tests, tests-static): Add tst-cancel-static.
109 * tst-cancel-static.c: New test.
111 2003-01-02 Jakub Jelinek <jakub@redhat.com>
113 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
115 2003-01-02 Ulrich Drepper <drepper@redhat.com>
117 * sysdeps/pthread/bits/pthreadtypes.h (pthread_cond_t): Add padding.
118 * condvar.c: Add symbol versioning. The compatibility versions
119 are the same as the change in the interface does not effect this
121 * Versions [libpthread]: Add definitions for new pthread_cond_*
122 interfaces for version GLIBC_2.3.2.
124 2002-12-31 Ulrich Drepper <drepper@redhat.com>
126 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
128 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
129 for __register_atfork.
131 2002-12-31 Jakub Jelinek <jakub@redhat.com>
133 * sysdeps/i386/i686/pt-machine.h: Use __ASSEMBLER__ instead of
134 ASSEMBLER test macro.
135 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Likewise.
136 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
137 * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h: Likewise.
138 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
139 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
140 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
142 * sysdeps/pthread/errno-loc.c (__errno_location): Add
144 * sysdeps/pthread/herrno-loc.c (__h_errno_location): Likewise.
145 * sysdeps/pthread/res-state.c (__res_state): Likewise.
146 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
147 __libc_current_sigrtmax): Likewise.
148 * Versions [libc] (GLIBC_PRIVATE): Remove __libc_internal_tsd_get,
149 __libc_internal_tsd_set, __libc_internal_tsd_address,
150 __libc_alloca_cutoff.
151 [libpthread] (GLIBC_PRIVATE): Remove __libc_internal_tsd_get,
152 __libc_internal_tsd_set, __libc_internal_tsd_address.
154 * sysdeps/pthread/list.h: Remove assert.h include.
155 * sysdeps/unix/sysv/linux/fork.c: Include <fork.h>, not "fork.h".
157 * sysdeps/pthread/list.h: New file.
158 * sysdeps/unix/sysv/linux/jmp-unwind.c: New file.
159 * sysdeps/unix/sysv/linux/fork.c: New file.
160 * sysdeps/unix/sysv/linux/fork.h: New file.
161 * sysdeps/unix/sysv/linux/ia64/fork.h: New file.
162 * sysdeps/unix/sysv/linux/sparc/fork.h: New file.
163 * sysdeps/unix/sysv/linux/register-atfork.c: New file.
164 * sysdeps/unix/sysv/linux/unregister-atfork.c: New file.
165 * sysdeps/unix/sysv/linux/Makefile: New file.
166 * sysdeps/unix/sysv/linux/Versions: New file.
167 * ptlongjmp.c (pthread_cleanup_upto): Rename to...
168 (__pthread_cleanup_upto): ...this. Add targetframe argument,
169 use it instead of currentframe. No longer static.
170 (siglongjmp, longjmp): Remove pthread_cleanup_upto calls.
171 * internals.h (__pthread_cleanup_upto, __pthread_fork): New prototypes.
172 (struct pthread_functions): Add ptr_pthread_fork,
173 ptr_pthread_cleanup_upto.
174 * pthread.c (pthread_functions): Initialize ptr_pthread_fork and
175 ptr_pthread_cleanup_upto.
176 * ptfork.c: Include fork.h.
177 (struct handler_list, struct handler_list_block): Remove.
178 (pthread_atfork_lock, pthread_atfork_prepare, pthread_atfork_parent,
179 pthread_atfork_child): Remove.
180 (pthread_insert_list, __pthread_atfork, pthread_call_handlers): Remove.
181 (__pthread_fork): New function.
182 (__fork, __vfork): Call __libc_fork.
183 * Makefile (libpthread-routines): Add old_pthread_atfork.
184 (libpthread-nonshared): Add pthread_atfork.
185 (others): Depend on $(objpfx)libpthread_nonshared.a.
186 ($(objpfx)libpthread_nonshared.a): New rule.
187 (install): Depend on $(inst_libdir)/libpthread.so.
188 ($(inst_libdir)/libpthread.so, $(inst_libdir)/libpthread_nonshared.a):
190 (tests): Depend on libpthread_nonshared.a too.
191 * old_pthread_atfork.c: New file.
192 * pthread_atfork.c: New file.
193 * Makeconfig (shared-thread-library): Include libpthread_nonshared.a
196 2002-12-30 Jakub Jelinek <jakub@redhat.com>
198 * forward.c: Make all functions available by default again. It
199 caused too much trouble.
200 * internals.h (struct pthread_functions): Rename ptr_pthread_exit
201 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
202 ptr___pthread_attr_init_2_*.
203 * pthread.c (pthread_functions): Adjust.
205 2002-12-28 Jakub Jelinek <jakub@redhat.com>
207 * libc_pthread_init.c (__libc_pthread_init): Remove
208 MULTIPLE_THREADS_OFFSET check.
209 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
210 (SYSINFO_OFFSET): Remove.
211 * sysdeps/i386/Makefile [csu] (gen-as-const-headers): Add
213 * sysdeps/i386/tcb-offsets.sym: New file.
214 * sysdeps/pthread/tcb-offsets.h: New file.
215 * sysdeps/sparc/sparc32/tls.h: Removed.
216 * sysdeps/sparc/sparc64/tls.h: Move...
217 * sysdeps/sparc/tls.h: ...here. Include tcb-offsets.h in assembler.
218 * sysdeps/sparc/Makefile: New file.
219 * sysdeps/sparc/tcb-offsets.sym: New file.
220 * sysdeps/ia64/tls.h: Include tcb-offsets.h in assembler.
221 * sysdeps/ia64/Makefile: New file.
222 * sysdeps/ia64/tcb-offsets.sym: New file.
223 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
224 (MULTIPLE_THREADS_OFFSET): Remove.
225 Replace defined MULTIPLE_THREADS_OFFSET
226 with defined FLOATING_STACKS && USE___THREAD.
227 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
228 (MULTIPLE_THREADS_OFFSET): Remove.
229 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
230 (MULTIPLE_THREADS_OFFSET): Remove.
231 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
232 (MULTIPLE_THREADS_OFFSET): Remove.
233 * pthread.c (__pthread_initialize_manager): Remove
234 MULTIPLE_THREADS_OFFSET cbeck.
236 * tst-cancel-wrappers.sh: Add line continuations.
238 2002-12-27 Jakub Jelinek <jakub@redhat.com>
240 * sysdeps/pthread/bits/libc-tsd.h: Include linuxthreads/descr.h
241 and bits/libc-lock.h.
242 (__libc_internal_tsd_get, __libc_internal_tsd_set,
243 __libc_internal_tsd_address): Remove.
244 (__pthread_internal_tsd_address, __pthread_internal_tsd_get,
245 __pthread_internal_tsd_set): New weak_externs.
246 (__libc_tsd_address, __libc_tsd_get, __libc_tsd_set): Define
247 using __libc_maybe_call2.
248 (__libc_tsd_key_t): Move to ...
249 * descr.h (__libc_tsd_key_t): ...here.
250 Remove bits/libc-tsd.h include.
251 * sysdeps/pthread/errno-loc.c: New file.
252 * sysdeps/pthread/herrno-loc.c: New file.
253 * sysdeps/pthread/res-state.c: New file.
254 * libc-cancellation.c (THREAD_GETMEM, THREAD_SETMEM): Remove.
255 (__libc_enable_asynccancel, __libc_disable_asynccancel): Use
256 thread_self unconditionally. Use LIBC_THREAD_[SG]ETMEM instead
258 * specific.c (libc_internal_tsd_set): Renamed to...
259 __pthread_internal_tsd_set. Remove static.
260 (libc_internal_tsd_get): Renamed to...
261 __pthread_internal_tsd_get. Remove static.
262 (libc_internal_tsd_address): Renamed to...
263 __pthread_internal_tsd_address. Remove static.
264 (__libc_internal_tsd_set, __libc_internal_tsd_get,
265 __libc_internal_tsd_address, __libc_alloca_cutoff): Remove.
266 * internals.h [!NOT_IN_libc] (LIBC_THREAD_GETMEM, LIBC_THREAD_SETMEM):
268 (__pthread_internal_tsd_set, __pthread_internal_tsd_get,
269 __pthread_internal_tsd_address): New prototypes.
270 (struct pthread_functions): Add
271 ptr_pthread_internal_tsd_([sg]et|address) fields.
272 [!NOT_IN_libc && !FLOATING_STACKS] (thread_self): Define.
273 * pthread.c (pthread_functions) [!USE_TLS && !HAVE___THREAD]:
274 Initialize ptr_pthread_internal_tsd_([sg]et|address) fields.
275 * Versions (libpthread): Remove __libc_alloca_cutoff@GLIBC_PRIVATE.
276 * alloca_cutoff.c: New file.
278 * Makefile (routines): Remove no-tsd. Add alloca_cutoff.
279 * pt-system.c (system): Remove cancellation handling.
280 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
281 cancellation routines.
283 * sysdeps/i386/tls.h: Include dl-sysdep.h and stdint.h.
284 (tcbhead_t): Add sysinfo field.
285 (SYSINFO_OFFSET, INIT_SYSINFO): Define.
286 (TLS_INIT_TP): Use INIT_SYSINFO.
287 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
288 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
289 (MULTIPLE_THREADS_OFFSET): Adjust.
290 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
291 (MULTIPLE_THREADS_OFFSET): Likewise.
292 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
293 (MULTIPLE_THREADS_OFFSET): Likewise.
294 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
295 (MULTIPLE_THREADS_OFFSET): Likewise.
296 * descr.h: Include stdint.h.
297 (struct _pthread_descr_struct): Add p_header.data.sysinfo field.
299 2002-12-22 Jakub Jelinek <jakub@redhat.com>
301 * libc_pthread_init.c: Include stdlib.h.
302 * sysdeps/i386/tls.h (tcbhead_t): Add multiple_threads member.
303 (TLS_INIT_TP_EXPENSIVE): Define.
304 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call,
305 __libc_maybe_call2): In _LIBC check SHARED define.
306 * sysdeps/ia64/tls.h: New file.
307 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
308 * sysdeps/unix/sysv/linux/ia64/Makefile: New file.
309 * sysdeps/x86_64/tls.h (TLS_INIT_TP_EXPENSIVE): Define.
310 * sysdeps/sparc/sparc32/tls.h: New file.
311 * sysdeps/sparc/sparc64/tls.h: New file.
312 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
313 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
314 * Makefile (tests): Add tst-cancel[1-6].
315 (tests-reverse): Add tst-cancel5.
316 Link libc.so before libpthread.so for tests-reverse.
317 * tst-cancel1.c: New file.
318 * tst-cancel2.c: New file.
319 * tst-cancel3.c: New file.
320 * tst-cancel4.c: New file.
321 * tst-cancel5.c: New file.
322 * tst-cancel6.c: New file.
324 2002-12-27 Andreas Schwab <schwab@suse.de>
326 * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h: New file.
328 2002-12-22 Roland McGrath <roland@redhat.com>
330 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
332 2002-12-21 Ulrich Drepper <drepper@redhat.com>
334 * pthread.c (init_rtsigs): Remove incomplete __builtin_expect.
335 Reported by Art Hass <ahaas@airmail.net>.
337 2002-12-19 Jakub Jelinek <jakub@redhat.com>
339 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
340 Use return 0 as 6th argument to FORWARD4.
342 2002-12-18 Jakub Jelinek <jakub@redhat.com>
344 * sysdeps/i386/useldt.h (FLOATING_STACKS, ARCH_STACK_MAX_SIZE): Only
345 define if __ASSUME_LDT_WORKS > 0.
346 * libc-cancellation.c (THREAD_GETMEM, THREAD_SETMEM): Redefine to
347 struct member access if !FLOATING_STACKS.
348 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
350 2002-12-18 Jakub Jelinek <jakub@redhat.com>
352 * internals.h (__pthread_thread_self): New prototype.
353 (struct pthread_functions): Add ptr_pthread_thread_self field.
354 * pthread.c (pthread_functions): Initialize ptr_pthread_thread_self.
355 (__pthread_thread_self): New function.
356 * libc-cancellation.c (__pthread_thread_self): Add weak_extern.
357 (__libc_enable_asynccancel, __libc_disable_asynccancel): Don't
358 use thread_self() directly if not FLOATING_STACKS.
360 2002-12-18 Jakub Jelinek <jakub@redhat.com>
362 * sysdeps/x86_64/pt-machine.h: Guard most of the header
363 with #ifndef __ASSEMBLER__.
364 * pthread.c (pthread_functions): Use SHLIB_COMPAT around
365 pthread_attr_init_2_0 use.
367 2002-12-17 Jakub Jelinek <jakub@redhat.com>
369 * wrapsyscall.c: Removed.
371 * Makefile (distribute): Add tst-cancel-wrappers.sh.
372 (routines): Remove weaks. Add forward,
373 libc_pthread_init, libc-cancellation.
374 (shared-only-routines): Remove weaks. Add forward.
375 (libpthread-routines): Remove wrapsyscall.
376 Add ptw-write, ptw-read, ptw-close, ptw-fcntl, ptw-accept,
377 ptw-connect, ptw-recv, ptw-recvfrom, ptw-recvmsg, ptw-send,
378 ptw-sendmsg, ptw-sendto, ptw-fsync, ptw-lseek, ptw-lseek64,
379 ptw-llseek, ptw-msync, ptw-nanosleep, ptw-open, ptw-open64,
380 ptw-pause, ptw-pread, ptw-pread64, ptw-pwrite, ptw-pwrite64,
381 ptw-tcdrain, ptw-wait, ptw-waitpid, pt-system, pt-allocrtsig.
382 (libpthread-shared-only-routines): Add pt-allocrtsig.
383 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
384 ($(objpfx)tst-cancel-wrappers.out): New rule.
385 * sysdeps/pthread/bits/libc-lock.h: Include linuxthreads/internals.h
387 (__libc_maybe_call): In libpthread.* don't check for existance
389 (__libc_maybe_call2): Define.
390 (__libc_lock_init, __libc_lock_fini, __libc_lock_lock,
391 __libc_lock_trylock, __libc_lock_unlock): Use it.
392 * sysdeps/pthread/flockfile.c: New file.
393 * sysdeps/pthread/ftrylockfile.c: New file.
394 * sysdeps/pthread/funlockfile.c: New file.
395 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
396 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
397 * sysdeps/unix/sysv/linux/allocrtsig.c: New file.
398 * libc-cancellation.c: New file.
399 * forward.c: New file.
400 * libc_pthread_init.c: New file.
401 * pt-system.c: New file.
402 * pthread.c: Remove locale.h.
403 (__pthread_manager_thread): Initialize multiple_threads.
404 (__pthread_multiple_threads): Declare.
405 (pthread_functions): New variable.
406 (__pthread_initialize_minimal): Remove __uselocale call.
407 Call __libc_pthread_init.
408 (__pthread_initialize_manager): Initialize __pthread_multiple_threads,
409 initial thread's multiple_threads and __libc_multiple_threads.
410 Check MULTIPLE_THREADS_OFFSET value. Initialize manager thread's
412 (pthread_setschedparam, pthread_getschedparam): Rename to __
413 prefixed variants. Add strong_alias.
414 (current_rtmin, current_rtmax, __libc_current_sigrtmin,
415 __libc_current_sigrtmax, __libc_allocate_rtsig): Remove.
416 (init_rtsigs): Use __libc_current_sigrtmin_private.
417 (pthread_initialize): Only call init_rtsigs if
418 !__ASSUME_REALTIME_SIGNALS.
419 (__pthread_require_wrappers, __pthread_require_lockfile): Remove.
420 * internals.h (__pthread_attr_destroy, __pthread_attr_setdetachstate,
421 __pthread_attr_getdetachstate, __pthread_attr_setschedparam,
422 __pthread_attr_getschedparam, __pthread_attr_setschedpolicy,
423 __pthread_attr_getschedpolicy, __pthread_attr_setinheritsched,
424 __pthread_attr_getinheritsched, __pthread_attr_setscope,
425 __pthread_attr_getscope, __pthread_cond_init,
426 __pthread_cond_destroy, __pthread_cond_wait,
427 __pthread_cond_signal, __pthread_cond_broadcast,
428 __pthread_condattr_init, __pthread_condattr_destroy,
429 __pthread_equal, __pthread_getschedparam,
430 __pthread_setschedparam, __pthread_setcancelstate,
431 __pthread_setcanceltype, __pthread_enable_asynccancel,
432 __libc_enable_asynccancel, __libc_pthread_init): New prototype.
433 (__pthread_mutex_init, __pthread_mutex_destroy,
434 __pthread_mutex_lock, __pthread_mutex_unlock,
435 __pthread_mutex_trylock): Likewise.
437 (struct pthread_functions): New type.
438 (__libc_pthread_functions): New variable.
439 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define.
440 * descr.h (struct _pthread_descr_struct): Add
441 p_header.data.multiple_threads field.
442 * manager.c (pthread_handle_create): Initialize multiple_threads.
443 * cancel.c (__pthread_enable_asynccancel,
444 __pthread_disable_asynccancel): New functions.
445 (__pthread_provide_wrappers): Remove.
446 (pthread_setcancelstate, pthread_setcanceltype): Rename to __
447 prefixed variants. Add strong_alias.
448 * condvar.c (pthread_cond_init, pthread_cond_destroy,
449 pthread_cond_wait, pthread_cond_signal, pthread_cond_broadcast,
450 pthread_condattr_init, pthread_condattr_destroy): Likewise.
451 * join.c (pthread_exit): Likewise.
452 * attr.c (pthread_attr_destroy, pthread_attr_setdetachstate,
453 pthread_attr_getdetachstate, pthread_attr_setschedparam,
454 pthread_attr_getschedparam, pthread_attr_setschedpolicy,
455 pthread_attr_getschedpolicy, pthread_attr_setinheritsched,
456 pthread_attr_getinheritsched, pthread_attr_setscope,
457 pthread_attr_getscope): Likewise.
458 * mutex.c (__pthread_mutex_init, __pthread_mutex_destroy,
459 __pthread_mutex_lock, __pthread_mutex_unlock,
460 __pthread_mutex_trylock): Add hidden_def.
461 * Versions (libc): Add __libc_pthread_init,
462 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
463 __libc_allocate_rtsig_private @@GLIBC_PRIVATE.
464 * lockfile.c: Remove some USE_IN_LIBIO guards.
465 (__pthread_provide_lockfile): Remove.
466 * pt-allocrtsig.c: New file.
467 * tst-cancel-wrappers.sh: New test.
469 2002-12-15 Ulrich Drepper <drepper@redhat.com>
471 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
472 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
473 * wrapsyscall.c: Remove creat, poll, pselect, readv, select,
474 sigpause, sigsuspend, sigwaitinfo, waitid, and writev wrappers.
476 2002-12-10 Ulrich Drepper <drepper@redhat.com>
478 * wrapsyscall.c (CANCELABLE_SYSCALL): Don't define function as
479 weak. There is no reason for that.
480 (CANCELABLE_SYSCALL_VA): Likewise.
482 2002-12-09 Ulrich Drepper <drepper@redhat.com>
484 * wrapsyscall.c: Add wrappers for creat, poll, pselect, readv, select,
485 sigpause, __xpg_sigpause, sigsuspend, sigwaitinfo, waitid, and writev.
486 * Versions: Export creat, poll, pselect, readv, select, sigpause,
487 __xpg_sigpause, sigsuspend, sigwaitinfo, waitid, and writev from
488 libpthread in version GLIBC_2.3.2.
490 2002-12-06 Ulrich Drepper <drepper@redhat.com>
492 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
494 2002-12-05 Roland McGrath <roland@redhat.com>
496 * pthread.c (__pthread_initialize_minimal)
497 [USE_TLS && SHARED && !USE___THREAD]: Initialize TLS and set up the
498 TCB if the dynamic linker didn't do it at startup.
500 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
502 (TLS_DO_SET_THREAD_AREA, TLS_DO_MODIFY_LDT, TLS_SETUP_GS_SEGMENT):
504 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
505 * sysdeps/alpha/tls.h (TLS_INIT_TP): Likewise (always zero).
507 2002-12-03 Roland McGrath <roland@redhat.com>
509 * pthread.c (pthread_initialize) [SHARED]: Copy dl_error_tsd value
510 from dynamic linker internal cell to new libc cell.
512 2002-11-28 Roland McGrath <roland@redhat.com>
514 * tst-context.c: #define IS_IN_libpthread around #include <tls.h>
515 before other headers, so FLOATING_STACKS is not defined wrongly.
517 * sysdeps/i386/tls.h [!IS_IN_libpthread]: Enable TLS support
518 even if [! FLOATING_STACKS].
519 (TLS_DO_MODIFY_LDT_KERNEL_CHECK): New macro.
520 If not under [__ASSUME_LDT_WORKS > 0], then do a runtime check of
521 dl_osversion >= 2.3.99 and fatal if not.
522 (TLS_DO_MODIFY_LDT): Use it.
524 2002-11-28 Ulrich Drepper <drepper@redhat.com>
526 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
527 require it to 200112L. Remove _POSIX_POLL and _POSIX_SELECT.
528 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
530 2002-11-19 Ulrich Drepper <drepper@redhat.com>
532 * Versions (libc: GLIBC_2.0): Remove names of functions which are
534 * Makefile (shared-only-routines): Add weaks.
535 * weaks.c: Remove functions which are not exported from libc.so.
537 2002-11-14 Roland McGrath <roland@redhat.com>
539 * libc-tsd.c: New file.
540 * Makefile (distribute): Add it.
541 (libc-link.so): New variable.
542 ($(objpfx)libpthread.so): Depend on that instead of libc.so file name.
543 (libc-ok-for-link): New variable.
544 [$(versioning) = yes]: Include $(common-objpfx)tls.make and define
545 libc-ok-for-link to $(use-thread).
546 [$(libc-ok-for-link) = no]
547 (libc-link.so): Set to $(objpfx)libc.so, not $(common-objpfx)libc.so.
548 ($(objpfx)libc_pic_lite.a,$(objpfx)libc_pic_lite.os, $(objpfx)libc.so):
550 (generated): Append them.
551 (extra-objs): Append libc-tsd.os.
553 * libc-tls-loc.c: New file.
554 * Makefile (libpthread-routines): Add it.
556 2002-11-14 Andreas Schwab <schwab@suse.de>
558 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Fix unterminated
561 2002-11-13 Roland McGrath <roland@redhat.com>
563 * Examples/ex6.c (main): Improve error reporting.
565 2002-11-04 Ulrich Drepper <drepper@redhat.com>
567 * sysdeps/i386/Makefile: Compile pthread.c and sighandler.c with
568 -fno-omit-frame-pointer. Patch by Andreas Steinmetz <ast@domdv.de>.
570 * sysdeps/i386/useldt.h [PIC] (USETLS_LOAD_EBX): Use correct input
572 (DO_SET_THREAD_AREA): Mark asm output specifiers correctly.
574 2002-10-22 Jakub Jelinek <jakub@redhat.com>
576 * manager.c (pthread_start_thread): Call __uselocale even
577 if [! SHARED]. Patch by Leon Kanter <leon@geon.donetsk.ua>.
579 2002-10-17 Roland McGrath <roland@redhat.com>
581 * Makefile (unload): Don't link in libpthread.so.
582 ($(objpfx)unload.out): Do depend on it.
583 * unload.c (main): Improve error reporting.
585 2002-10-09 Roland McGrath <roland@redhat.com>
587 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
588 Under [__PIC__], call the function via the pointer fetched for
589 comparison rather than a call by name that uses the PLT.
590 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
591 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
592 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
593 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
594 (__libc_key_create, __libc_getspecific, __libc_setspecific)
595 (__libc_atfork): Use it.
597 * pthread.c [SHARED] (__libc_dl_error_tsd): New function.
598 (pthread_initialize) [SHARED]: Set _dl_error_catch_tsd to that.
599 * Versions (libc: GLIBC_PRIVATE): Add __libc_dl_error_tsd.
600 (ld: GLIBC_PRIVATE): Set removed.
602 2002-10-11 Ulrich Drepper <drepper@redhat.com>
604 * sysdeps/unix/sysv/linux/execve.c: New file.
606 2002-10-09 Jakub Jelinek <jakub@redhat.com>
608 * no-tsd.c: Include stdlib.h.
610 2002-10-07 Jakub Jelinek <jakub@redhat.com>
612 * sysdeps/unix/sysv/linux/allocalim.h: New file.
613 * descr.h (struct _pthread_descr_struct): Add p_alloca_cutoff
615 * manager.c (__pthread_allocate_stack): Add out_stacksize argument.
616 Pass stack size to caller.
617 (pthread_handle_create): Set p_alloca_cutoff.
618 * pthread.c (__pthread_initial_thread): Use C99 designated
619 initializers. Set p_alloca_cutoff.
620 (__pthread_manager_thread): Likewise.
621 (__pthread_initialize_minimal) [USE_TLS]: Set p_alloca_cutoff
623 (__pthread_init_max_stacksize): Possibly decrease p_alloca_cutoff
625 (__pthread_initialize_manager) [USE_TLS]: Set p_alloca_cutoff
627 * specific.c (__libc_alloca_cutoff): New function.
628 * no-tsd.c (__libc_alloca_cutoff): New function.
629 * Versions: Export __libc_alloca_cutoff@@GLIBC_PRIVATE from libc
632 2002-10-02 Kaz Kojima <kkojima@rr.iij4u.or.jp>
634 * sysdeps/sh/pt-machine.h: Make C code ifndef'ed with __ASSEMBLER__.
635 * sysdeps/sh/tls.h: Likewise.
636 * sysdeps/unix/sysv/linux/sh/smp.h: New file.
638 2002-09-29 Jakub Jelinek <jakub@redhat.com>
640 * sysdeps/pthread/tst-timer.c (main): Clear
641 SIGEV2.sigev_notify_attributes.
643 2002-09-29 Ulrich Drepper <drepper@redhat.com>
645 * sysdeps/i386/useldt.h (DO_SET_THREAD_AREA): Don't use
646 INLINE_SYSCALL for set_thread_area syscall.
648 2002-09-28 Roland McGrath <roland@redhat.com>
650 * pthread.c (__pthread_reset_main_thread) [FLOATING_STACKS]:
651 Don't call setrlimit, since we did no prior bogon we need to undo.
653 2002-09-27 Roland McGrath <roland@redhat.com>
655 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Don't include <pt-machine.h>.
657 2002-09-24 Roland McGrath <roland@redhat.com>
659 * sysdeps/x86_64/tls.h: New file.
661 2002-09-23 Roland McGrath <roland@redhat.com>
663 * Examples/ex13.c (dump_mut): int -> size_t for counter.
665 2002-09-18 Bruno Haible <bruno@clisp.org>
667 * Examples/ex10.c (thread): Fail if pthread_mutex_timedlock() returns
668 an unexpected error code.
670 * internals.h (__pthread_message): Add const to first parameter type.
671 * pthread.c (__pthread_message): Likewise.
673 * sysdeps/unix/sysv/linux/configure: Moved to ../sysdeps/pthread.
675 2002-09-17 Roland McGrath <roland@redhat.com>
677 * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT, TLS_DO_SET_THREAD_AREA):
678 Set the descriptor limit to the full 4GB, so %gs:OFFSET works for any
679 offset (positive or negative) relative to the thread struct.
680 * sysdeps/i386/useldt.h (DO_MODIFY_LDT, DO_SET_THREAD_AREA): Likewise.
682 2002-09-12 Jakub Jelinek <jakub@redhat.com>
684 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Move...
685 * sysdeps/unix/sysv/linux/sparc/Makefile: ...here.
686 Replace /usr/lib/crt[in].o with crt[in].o too.
688 2002-09-11 Steven Munroe <sjmunroe@us.ibm.com>
690 * sysdeps/powerpc/powerpc64/pt-machine.h: New file.
692 2002-09-04 Bruno Haible <bruno@clisp.org>
694 * pthread.c: Include <sys/time.h>.
695 (is_smp_system): Move to sysdeps/unix/sysv/linux/smp.h.
696 * sysdeps/unix/sysv/linux/smp.h: New file, extracted from pthread.c.
697 * Makefile (distribute): Add smp.h to the list.
699 2002-09-04 Bruno Haible <bruno@clisp.org>
701 * sysdeps/alpha/pt-machine.h: Choose different include file location
702 on non-Linux platforms.
704 * wrapsyscall.c (PROMOTE_INTEGRAL_TYPE): New macro.
705 (open, open64): Change va_arg argument type to the integral type to
706 which mode_t promotes.
708 * sysdeps/pthread/tst-timer.c (main): Don't assume anything about
709 the structure of 'struct sigevent'.
711 * errno.c (__errno_location, __h_errno_location, __res_state):
712 Use prototype function definitions.
714 2002-07-29 Steven Munroe <sjmunroe@us.ibm.com>
716 * shlib-versions: Set libpthread version to 2.3 for powerpc64.
717 * sysdeps/powerpc/pt-machine.h: moved to...
718 * sysdeps/powerpc/powerpc32/pt-machine.h: ...here
719 * sysdeps/powerpc/powerpc64/pt-machine.h: New file.
721 2002-09-02 Roland McGrath <roland@redhat.com>
723 * sysdeps/powerpc/Makefile (CFLAGS-pt-initfini.s): New variable.
725 2002-09-01 Roland McGrath <roland@redhat.com>
727 * sysdeps/pthread/bits/libc-tsd.h (enum __libc_tsd_key_t): Add new keys
728 CTYPE_B, CTYPE_TOLOWER, CTYPE_TOUPPER.
730 * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_address): New macro.
731 (__libc_internal_tsd_address): Declare it.
732 * Versions (libc, ld, libpthread: GLIBC_PRIVATE): Add
733 __libc_internal_tsd_address.
734 * specific.c (libc_internal_tsd_address): New function.
735 (__libc_internal_tsd_address): New variable.
736 * no-tsd.c (__libc_internal_tsd_address): New variable.
738 2002-08-31 Ulrich Drepper <drepper@redhat.com>
740 * Makefile: Don't use rule for crt%.o, spell it out as rules for
743 2002-08-30 Roland McGrath <roland@redhat.com>
745 * Makefile (extra-objs, omit-deps): Add crtn.
746 ($(objpfx)libpthread.so): Depend on $(objpfx)crtn.o.
747 ($(objpfx)libpthread.so: +postinit): Append $(objpfx)crtn.o.
748 ($(objpfx)crtn.S): New target.
749 ($(objpfx)crt%.o): Pattern rule replaces crti.o target.
750 (generated): Add crtn.S.
752 * sysdeps/unix/sysv/linux/x86_64/Makefile ($(objpfx)specs): Massage
755 2002-08-30 Jakub Jelinek <jakub@redhat.com>
757 * pthread.c (__pthread_initialize_minimal): Call __uselocale even
760 2002-08-30 Roland McGrath <roland@redhat.com>
762 * tst-static-locale.c: New file.
763 * Makefile (tests, tests-static): Add it.
765 2002-04-24 Steven Munroe <sjmunroe@us.ibm.com>
767 * spinlock.c (__pthread_lock): Fix spurious wakeup
768 handling. Don't clear lowest bit of list pointer as sign the thread
769 is still on the wait list. Don't restart after spurious wakeup
770 with spinning to get the lock.
771 (__pthread_unlock): Take set lowest bit into account when handling
772 pointer to list elements.
773 Patch by Steve Munroe <sjmunroe@us.ibm.com>.
775 2002-08-28 Roland McGrath <roland@redhat.com>
777 * sysdeps/pthread/timer_routines.c (thread_func): Fix type in cast.
779 2002-08-28 Jakub Jelinek <jakub@redhat.com>
781 * sysdeps/unix/sysv/linux/hppa/aio_cancel.c: New file.
782 * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
783 * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
785 2002-08-28 Ulrich Drepper <drepper@redhat.com>
787 * sysdeps/pthread/timer_routines.c (thread_func): Change return
788 type to void and add casts in use to avoid warnings with all gcc
791 2002-08-08 Jakub Jelinek <jakub@redhat.com>
793 * sysdeps/unix/sysv/linux/bits/local_lim.h (PTHREAD_THREADS_MAX):
795 * manager.c (__pthread_handles): Remove.
796 * pthandles.c: New file.
797 * pthread.c (__pthread_initialize_minimal): Initialize
798 __pthread_handles[0] and __pthread_handles[1].
799 * Makefile (libpthread-routines): Add pthandles (must be last).
801 2002-08-26 Brian Youmans <3diff@gnu.org>
803 * Examples/ex10.c: Corrected version number in Lesser GPL copying
804 permission notice from 2 to 2.1.
805 * Examples/ex11.c: Likewise.
806 * Examples/ex13.c: Likewise.
807 * Examples/ex8.c: Likewise.
808 * Examples/ex9.c: Likewise.
809 * barrier.c: Likewise.
810 * events.c: Likewise.
811 * lockfile.c: Likewise.
812 * no-tsd.c: Likewise.
813 * pt-machine.c: Likewise.
814 * ptclock_gettime.c: Likewise.
815 * ptclock_settime.c: Likewise.
816 * rwlock.c: Likewise.
817 * sysdeps/alpha/pspinlock.c: Likewise.
818 * sysdeps/alpha/pt-machine.h: Likewise.
819 * sysdeps/arm/pspinlock.c: Likewise.
820 * sysdeps/arm/pt-machine.h: Likewise.
821 * sysdeps/cris/pspinlock.c: Likewise.
822 * sysdeps/cris/pt-machine.h: Likewise.
823 * sysdeps/hppa/pspinlock.c: Likewise.
824 * sysdeps/hppa/pt-machine.h: Likewise.
825 * sysdeps/i386/i686/pt-machine.h: Likewise.
826 * sysdeps/i386/pspinlock.c: Likewise.
827 * sysdeps/i386/pt-machine.h: Likewise.
828 * sysdeps/i386/useldt.h: Likewise.
829 * sysdeps/ia64/pspinlock.c: Likewise.
830 * sysdeps/ia64/pt-machine.h: Likewise.
831 * sysdeps/m68k/pspinlock.c: Likewise.
832 * sysdeps/m68k/pt-machine.h: Likewise.
833 * sysdeps/mips/pspinlock.c: Likewise.
834 * sysdeps/mips/pt-machine.h: Likewise.
835 * sysdeps/powerpc/pspinlock.c: Likewise.
836 * sysdeps/powerpc/pt-machine.h: Likewise.
837 * sysdeps/pthread/bits/initspin.h: Likewise.
838 * sysdeps/pthread/bits/libc-lock.h: Likewise.
839 * sysdeps/pthread/bits/libc-tsd.h: Likewise.
840 * sysdeps/pthread/getcpuclockid.c: Likewise.
841 * sysdeps/pthread/posix-timer.h: Likewise.
842 * sysdeps/pthread/timer_create.c: Likewise.
843 * sysdeps/pthread/timer_delete.c: Likewise.
844 * sysdeps/pthread/timer_getoverr.c: Likewise.
845 * sysdeps/pthread/timer_gettime.c: Likewise.
846 * sysdeps/pthread/timer_routines.c: Likewise.
847 * sysdeps/pthread/timer_settime.c: Likewise.
848 * sysdeps/pthread/tst-timer.c: Likewise.
849 * sysdeps/s390/pspinlock.c: Likewise.
850 * sysdeps/s390/s390-32/pt-machine.h: Likewise.
851 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
852 * sysdeps/sh/pspinlock.c: Likewise.
853 * sysdeps/sh/pt-machine.h: Likewise.
854 * sysdeps/sparc/sparc32/pspinlock.c: Likewise.
855 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
856 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: Likewise.
857 * sysdeps/sparc/sparc64/pspinlock.c: Likewise.
858 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
859 * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
860 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
861 * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
862 * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
863 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
864 * tststack.c: Likewise.
865 * unload.c: Likewise.
867 * wrapsyscall.c: Likewise.
869 * sysdeps/pthread/pt-initfini.c: Changed copying
870 permission notice to Lesser GPL from Library GPL, including the
871 references in the special exception.
872 * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: Likewise.
873 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Likewise.
874 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c:
876 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c:
878 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Likewise.
880 2002-08-26 Ulrich Drepper <drepper@redhat.com>
882 * Examples/ex10.c (thread): tv_nsec == 1000000000 is already
883 overflow [PR libc/4244].
885 2002-08-25 Ulrich Drepper <drepper@redhat.com>
887 * sysdeps/pthread/timer_routines.c (thread_func): Make the
888 compiler happy by adding a return statement which will never be
891 * tst-context.c (main): Cast to long before casting to pointer.
893 * Examples/ex17.c (main): Use correct format string.
895 * Examples/ex9.c (thread): Remove incorrect return statement.
897 2002-08-23 Ulrich Drepper <drepper@redhat.com>
899 * pthread.c (__linuxthreads_version): New global constant.
901 2002-08-23 Andreas Jaeger <aj@suse.de>
903 * sysdeps/x86_64/pt-machine.h: Use %fs instead of %gs
904 as thread specific register.
905 (testandset): Fix inline asm.
906 (THREAD_GETMEM): Fix inline asm.
908 2002-08-22 Roland McGrath <roland@redhat.com>
910 * sysdeps/i386/useldt.h (INIT_THREAD_SELF): Remove [HAVE_TLS_SUPPORT]
912 (INIT_THREAD_SELF): Pass second arg to DO_SET_THREAD_AREA.
913 (DO_SET_THREAD_AREA): Take second arg, pass to DO_SET_THREAD_AREA_REUSE
914 macro. That chooses whether to reuse %gs value or let kernel set it.
915 [USE_TLS] (DO_SET_THREAD_AREA_REUSE): New macro, always 1.
916 [!USE_TLS] (DO_SET_THREAD_AREA_REUSE): New macro, true if arg is
919 2002-08-21 Ulrich Drepper <drepper@redhat.com>
921 * sysdeps/i386/tls.h (TLS_SETUP_GS_SEGMENT): Add new parameter
922 also to the third definition of this macro.
924 2002-06-17 Andreas Jaeger <aj@suse.de>
926 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
929 2002-08-20 Ulrich Drepper <drepper@redhat.com>
931 * sysdeps/i386/useldt.h: Go back to using 16-bit instructions when
932 loading/reading segment registers. Some old hardware doesn't
933 handle the 32-bit instructions as expected.
934 * sysdeps/i386/tls.h: Likewise.
936 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Second parameter is
937 renamed to secondcall and use is negated.
938 (TLS_SETUP_GS_SEGMENT): Likewise.
939 (TLS_INIT_TP): Likewise.
940 * sysdeps/sh/tls.h (TLS_INIT_TP): Second parameter is renamed to
943 * sysdeps/i386/tls.h: Use 32-bit operations when handling segment
944 registers. No need to mask upper 16 bits in this case.
945 * sysdeps/i386/useldt.h: Likewise.
946 (DO_SET_THREAD_AREA): We have to load %gs again even if the value
947 is the same since the GDT content changed.
949 * sysdeps/i386/tls.h (TLS_INIT_TP): Add new parameter and pass it on
950 to TLS_SETUP_GS_SEGMENT.
951 (TLS_SETUP_GS_SEGMENT): Add new parameter and pass it on to
952 TLS_DO_SET_THREAD_AREA.
953 (TLS_DO_SET_THREAD_AREA): If new parameter is zero determine
954 entry number from %gs value.
955 * sysdeps/sh/tls.h (TLS_INIT_TP): Add new parameter and simply
958 * manager.c (pthread_handle_create): Pass NULL to _dl_allocate_tls.
959 Pass true to _dl_deallocate_tls.
960 (pthread_free): Likewise.
961 * pthread.c (__pthread_initialize_manager): Likewise.
963 2002-08-19 Ulrich Drepper <drepper@redhat.com>
965 * sysdeps/i386/useldt.h (DO_SET_THREAD_AREA): Use correct shift when
966 computing index from %gs value.
968 2002-08-16 Roland McGrath <roland@redhat.com>
970 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Calculate segment
971 register value from entry number properly.
973 * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): Rewrite asm to use %ebx
974 optimally conditional on [__PIC__].
975 (TLS_DO_SET_THREAD_AREA): New macro, implement inline syscall
976 without touching errno, and use latest modify_ldt-like interface.
977 (TLS_SETUP_GS_SEGMENT): Use that instead of INLINE_SYSCALL.
978 * sysdeps/i386/useldt.h (DO_MODIFY_LDT): Set %gs in this macro.
979 (DO_SET_THREAD_AREA): New macro, uses current syscall interface with
980 existing %gs value as the segment to set.
981 (INIT_THREAD_SELF): Rewritten using those. Use set_thread_area only
982 under [HAVE_TLS_SUPPORT] so we can rely on the initialization done
983 by the first thread's early TLS setup.
985 2002-08-15 Roland McGrath <roland@redhat.com>
987 * sysdeps/i386/tls.h (TLS_INIT_TP): Use statement expression and
988 return a value as callers now expect.
990 2002-08-11 Roland McGrath <roland@redhat.com>
992 * pthread.c (__pthread_initialize_manager): Initialize
993 p_header.data.tcb field of manager thread's descriptor.
994 (__pthread_initialize_minimal): Don't initialize p_header.data.self
995 field, already done by TLS_INIT_TP.
997 * manager.c (pthread_handle_create): Move p_header field initializers
1000 2002-08-08 Ulrich Drepper <drepper@redhat.com>
1002 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Removed.
1004 2002-08-07 Ulrich Drepper <drepper@redhat.com>
1006 * pthread.c (__linuxthreads_initial_report_events): New variable.
1007 (__pthread_initialize_manager): Use it to initialize p_report_events
1009 [TLS]: Store pointer to descriptor of manager in __pthread_handles.
1011 2002-08-07 Roland McGrath <roland@redhat.com>
1013 * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): Add an extra argument with
1014 an "m" constraint to the asm so the compiler knows LDT_ENTRY was used.
1016 2002-08-02 Roland McGrath <roland@redhat.com>
1018 * sysdeps/pthread/bits/libc-tsd.h (enum __libc_tsd_key_t):
1019 Add _LIBC_TSD_KEY_LOCALE.
1020 * manager.c (pthread_start_thread) [!(USE_TLS && HAVE___THREAD)]:
1021 Call __uselocale to initialize our per-thread locale pointer to
1023 * pthread.c (__pthread_initialize_minimal): Likewise.
1025 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Add missing \s.
1027 2002-08-02 Ulrich Drepper <drepper@redhat.com>
1029 * pthread.c: Declare _errno, _h_errno, and _res unless we use TLS
1032 * cancel.c (__pthread_perform_cleanup) [USE_TLS && HAVE___THREAD]:
1033 Don't use p_libc_specific element in thread descriptor.
1035 2002-07-30 Roland McGrath <roland@redhat.com>
1037 * sysdeps/pthread/bits/libc-tsd.h: Include <tls.h>.
1038 [USE_TLS && HAVE___THREAD]: Just include the sysdeps/generic file,
1039 which does the right thing when __thread support is available.
1040 * descr.h (struct _pthread_descr_struct) [USE_TLS && HAVE___THREAD]:
1041 Omit `p_libc_specific', `p_errnop', `p_errno', `p_h_errnop',
1042 `p_h_errno', `p_resp', and `p_res' members.
1043 * pthread.c (__pthread_initialize_minimal) [USE_TLS && HAVE___THREAD]:
1044 Don't initialize `p_errnop' and `p_h_errnop' members.
1045 (__pthread_reset_main_thread): Likewise.
1046 (__pthread_initialize_manager): Likewise.
1047 * manager.c (__pthread_manager, pthread_handle_create): Likewise.
1048 * pthread.c (pthread_initialize) [USE_TLS && HAVE___THREAD]:
1049 Don't initialize `p_resp' member.
1050 (__pthread_reset_main_thread): Likewise.
1051 * manager.c (pthread_handle_create): Likewise.
1052 * specific.c (libc_internal_tsd_set, libc_internal_tsd_get):
1053 Conditionalize these on [!(USE_TLS && HAVE___THREAD)].
1054 * no-tsd.c: Conditionalize contents on [!(USE_TLS && HAVE___THREAD)].
1055 * errno.c [USE_TLS && HAVE___THREAD]
1056 (__h_errno_location, __res_state): Don't define these at all.
1058 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens around arguments!
1059 (INSTALL_NEW_DTV, GET_DTV): Likewise.
1060 * sysdeps/sh/tls.h (INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV): Likewise.
1062 * weaks.c: Don't include <errno.h> here.
1064 2002-08-01 Roland McGrath <roland@redhat.com>
1066 * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): New macro, broken out of
1068 (TLS_DO_SET_THREAD_AREA): New macro, uses thread_set_area syscall.
1069 (TLS_SETUP_GS_SEGMENT): New macro, try one or the other or both.
1070 (TLS_INIT_TP): Use that.
1072 2002-08-02 Jakub Jelinek <jakub@redhat.com>
1074 * sysdeps/i386/useldt.h (DO_MODIFY_LDT): Move from INIT_THREAD_SELF.
1075 (INIT_THREAD_SELF): Use sys_thread_area syscall instead if available.
1076 (FREE_THREAD): Avoid modify_ldt if using GDT.
1077 * sysdeps/i386/pspinlock.c (__have_no_set_thread_area): New variable.
1079 2002-07-25 Jakub Jelinek <jakub@redhat.com>
1081 * sysdeps/i386/tls.h: Use __ASSEMBLER__ test macro not ASSEMBLER.
1082 * sysdeps/i386/pt-machine.h: Likewise.
1083 * sysdeps/i386/useldt.h: Likewise.
1085 2002-07-22 Ulrich Drepper <drepper@redhat.com>
1087 * pthread.c (__pthread_initialize_minimal): If !SHARED and TLS
1088 call __libc_setup_tls first.
1089 * Makefile: Actually create tst-signal.out file when running the test.
1090 (tests): Add tststatic.
1091 * Examples/tststatic.c: New file.
1093 2002-07-19 Ulrich Drepper <drepper@redhat.com>
1095 * errno.c (__errno_location): Don't define unless !USE_TLS
1097 * sysdeps/i386/pt-machine.c: Protect C code with #ifndef ASSEMBLER.
1098 * sysdeps/i386/tls.h: Likewise.
1099 * sysdeps/i386/useldt.h: Likewise.
1100 * sysdeps/i386/i686/pt-machine.h: Likewise.
1102 2002-07-02 H.J. Lu <hjl@gnu.org>
1104 * sysdeps/mips/pspinlock.c: Don't include <sgidefs.h>. Always
1106 * sysdeps/mips/pt-machine.h: Likewise.
1108 2002-07-14 Ulrich Drepper <drepper@redhat.com>
1110 * manager.c (pthread_handle_create): Initialize self-reference in
1113 2002-07-01 Jakub Jelinek <jakub@redhat.com>
1115 * Examples/ex9.c (main): Remove unused th variable.
1117 2002-07-10 Ulrich Drepper <drepper@redhat.com>
1119 * wrapsyscall.c: Add __nanosleep alias.
1120 * Versions (GLIBC_2.2.6): Add __nanosleep.
1121 * bug-sleep.c: New file.
1122 * Makefile (tests): Add bug-sleep.
1124 2002-06-19 Steven Munroe <sjmunroe@vnet.ibm.com>
1126 * Examples/ex9.c (main): Use list of children and join them.
1127 (thread): Do not call exit.
1129 2002-06-20 Ulrich Drepper <drepper@redhat.com>
1131 * spinlock.c (wait_node_alloc): We cannot use compare-and-exchange.
1132 Unconditionally use the code using spinlock. Use __pthread_release
1134 (wait_node_free): Likewise.
1135 (__pthread_acquire, __pthread_release): Unconditionally define.
1137 2002-06-07 Jakub Jelinek <jakub@redhat.com>
1139 * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Fix typo.
1141 2002-05-24 Ulrich Drepper <drepper@redhat.com>
1143 * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Use __sync_synchronize.
1145 2002-05-21 Ulrich Drepper <drepper@redhat.com>
1147 * sysdeps/pthread/pthread.h (pthread_create): Rename first
1149 (pthread_cancel): Likewise.
1150 * internals.h (__pthread_create_2_1): Likewise.
1151 * sysdeps/unix/sysv/linux/bits/sigthread.h (pthread_kill): Likewise.
1153 2002-05-20 Ulrich Drepper <drepper@redhat.com>
1155 * sysdeps/alpha/pt-machine.c (THREAD_SELF): Remove clobber.
1156 Patch by Glen Nakamura <gen@flex.com>.
1158 2002-05-03 Ulrich Drepper <drepper@redhat.com>
1160 * signals.c: Move sighandler functions to...
1161 * sighandler.c: ...here. New file.
1162 * signals.c: Move signal handler related type definitions to...
1163 * internals.h: ...here. Add prototypes for signal handlers.
1164 * Makefile (libpthread-routines): Add sighandler.
1165 (CFLAGS-sighandler.c): Add $(exceptions).
1167 2002-04-30 Jakub Jelinek <jakub@redhat.com>
1169 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
1171 2002-04-08 Ulrich Drepper <drepper@redhat.com>
1173 * sysdeps/pthread/timer_getoverr.c: Return real overrun.
1174 * sysdeps/pthread/posix-timer.h (struct timer_node): Add overrun_count.
1175 * sysdeps/pthread/timer_routines.c (thread_func): Schedule next timeout
1176 based on previous one and not on current time. Count overruns.
1177 Patch by Eric F. Sorton <eric@cctcorp.com>.
1179 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add DELAYTIMER_MAX.
1181 2002-04-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
1183 * sysdeps/sh/pt-machine.h: Define _PT_MACHINE_H
1184 if it isn't defined yet.
1185 (FLOATING_STACKS, ARCH_STACK_MAX_SIZE): Defined.
1186 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
1188 * sysdeps/sh/tls.h: New file.
1190 2002-04-08 Jakub Jelinek <jakub@redhat.com>
1192 * manager.c (__pthread_manager_event): Use self instead of arg
1193 for INIT_THREAD_SELF.
1194 * sysdeps/i386/useldt.h (INIT_THREAD_SELF): Use sizeof (struct
1195 _pthread_descr_struct) instead of sizeof (*descr).
1197 2002-04-05 Ulrich Drepper <drepper@redhat.com>
1199 * sysdeps/ia64/pt-machine.h: Protect against multiple inclusion.
1200 * sysdeps/alpha/pt-machine.h: Likewise.
1201 * sysdeps/arm/pt-machine.h: Likewise.
1202 * sysdeps/cris/pt-machine.h: Likewise.
1203 * sysdeps/hppa/pt-machine.h: Likewise.
1204 * sysdeps/m68k/pt-machine.h: Likewise.
1205 * sysdeps/mips/pt-machine.h: Likewise.
1206 * sysdeps/powerpc/pt-machine.h: Likewise.
1207 * sysdeps/s390/s390-32/pt-machine.h: Likewise.
1208 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
1209 * sysdeps/sh/pt-machine.h: Likewise.
1210 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
1211 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1212 * sysdeps/x86_64/pt-machine.h: Likewise.
1214 2002-04-05 Jakub Jelinek <jakub@redhat.com>
1216 * man/pthread_mutexattr_init.man (pthread_mutexattr_settype): Document
1217 instead of pthread_mutexattr_setkind_np.
1218 (pthread_mutexattr_gettype): Similarly.
1219 * man/pthread_mutexattr_setkind_np.man: New.
1220 * man/Makefile (SOURCES): Add pthread_mutexattr_setkind_np.man.
1222 2002-04-02 Ulrich Drepper <drepper@redhat.com>
1224 * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Define.
1226 2002-03-22 Jakub Jelinek <jakub@redhat.com>
1228 * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Remove.
1230 2002-03-22 Ulrich Drepper <drepper@redhat.com>
1232 * internals.h (MEMORY_BARRIER): Define as asm with memory as clobber.
1234 2002-03-17 Andreas Jaeger <aj@suse.de>
1236 * sysdeps/i386/pt-machine.h: Add testandset and __compare_and_swap
1238 * sysdeps/alpha/pt-machine.h: Likewise.
1239 * sysdeps/arm/pt-machine.h: Likewise.
1240 * sysdeps/cris/pt-machine.h: Likewise.
1241 * sysdeps/hppa/pt-machine.h: Likewise.
1242 * sysdeps/i386/i686/pt-machine.h: Likewise.
1243 * sysdeps/ia64/pt-machine.h: Likewise.
1244 * sysdeps/m68k/pt-machine.h: Likewise.
1245 * sysdeps/mips/pt-machine.h: Likewise.
1246 * sysdeps/powerpc/pt-machine.h: Likewise.
1247 * sysdeps/s390/s390-32/pt-machine.h: Likewise.
1248 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
1249 * sysdeps/sh/pt-machine.h: Likewise.
1250 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
1251 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1252 * sysdeps/x86_64/pt-machine.h: Likewise.
1254 * internals.h: Move testandset and __compare_and_swap prototypes
1257 2002-03-03 Andreas Jaeger <aj@suse.de>
1259 * errno.c: Include resolv.h to avoid warning.
1261 2002-02-27 Ulrich Drepper <drepper@redhat.com>
1263 * pthread.c [USE_TLS] (thread_self_stack): Correct check for upper
1266 2002-02-23 Ulrich Drepper <drepper@redhat.com>
1268 * attr.c (pthread_getattr_np): Don't take thread descriptor size
1269 into account if USE_TLS.
1270 * manager.c (pthread_handle_create): Free TLS data structures if call
1271 failed. Pass correct stack to clone if USE_TLS.
1272 * sysdeps/i386/pt-machine.h: Handle multiple inclusion.
1273 * sysdeps/i386/i686/pt-machine.h: Likewise.
1274 * sysdeps/i386/tls.h: Unconditionally include <pt-machine.h>.
1276 * descr.h (struct _pthread_descr_struct): Update p_header for TLS.
1277 Add p_stackaddr element #if USE_TLS.
1278 * internals.c: Include <tls.h>.
1279 * manager.c: Integrate creating and handling of thread descriptor
1281 * pthread.c: Likewise.
1282 * sysdeps/i386/tls.h (tcbhead_t): Add self pointer.
1283 Include <linuxthreads/descr.h> only if TLS is really used.
1284 (GET_DTV): New macro.
1285 (TLS_INIT_TP): Initialize self pointer.
1287 2002-02-17 Andreas Schwab <schwab@suse.de>
1289 * signals.c (sigwait): Check for old sighandler being SIG_ERR,
1292 2002-02-12 Ulrich Drepper <drepper@redhat.com>
1294 * sysdeps/i386/tls.c (INSTALL_NEW_DTV): Define.
1295 (INSTALL_DTV): Adjust for being passed pointer to element with length.
1297 2002-02-08 Ulrich Drepper <drepper@redhat.com>
1299 * sysdeps/i386/tls.h (TLS_INIT_TP): Also initialize %gs.
1301 2002-02-08 Richard Henderson <rth@redhat.com>
1303 * sysdeps/alpha/elf/pt-initfini.c: Use \n\ for multiline string.
1305 2002-02-08 Ulrich Drepper <drepper@redhat.com>
1307 * sysdeps/i386/tls.h: TLS cannot be supported with FLOATING_STACKS
1310 2002-02-07 H.J. Lu <hjl@gnu.org>
1312 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Silence the
1314 (__pthread_spin_lock): Remove ".set noreorder".
1315 * sysdeps/mips/pt-machine.h (__compare_and_swap): Liekwise.
1317 2002-02-05 H.J. Lu <hjl@gnu.org>
1319 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Not use
1321 * sysdeps/mips/pt-machine.h (testandset): Likewise.
1322 (__compare_and_swap): Likewise.
1324 2002-02-07 Ulrich Drepper <drepper@redhat.com>
1326 * internals.h: Move declarations/definitions of
1327 __pthread_initial_thread_bos, __pthread_initial_thread,
1328 __pthread_manager_thread_bos, __pthread_manager_thread_tos,
1329 __pthread_manager_thread, __pthread_nonstandard_stacks, STACK_SIZE,
1330 CURRENT_STACK_FRAME, __pthread_find_self, and thread_self...
1332 * sysdeps/i386/tls.h: Add TLS definitions also for !FLOATING_STACKS.
1333 Define THREAD_GETMEM accordingly.
1335 2002-02-06 Ulrich Drepper <drepper@redhat.com>
1337 * sysdeps/i386/tls.h: Include <stddef.h> for size_t.
1339 * sysdeps/i386/tls.h: Define THREAD_DTV.
1341 2002-02-04 Ulrich Drepper <drepper@redhat.com>
1343 * internals.h: Move thread descriptor definition...
1344 * descr.h.: ...here. New file.
1345 * sysdeps/i386/tls.h: New file.
1347 2002-02-01 H.J. Lu <hjl@gnu.org>
1349 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Use a
1350 different register in the delayed slot. Use branch likely.
1352 * sysdeps/mips/pt-machine.h (testandset): Call _test_and_set.
1353 (__compare_and_swap): Return 0 only when failed to compare. Use
1356 2002-02-01 Jakub Jelinek <jakub@redhat.com>
1358 * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set,
1359 __pthread_kill_other_threads_np): Move to GLIBC_PRIVATE.
1360 * sysdeps/i386/i586/Versions: Move all symbols to GLIBC_PRIVATE.
1361 * sysdeps/i386/i686/Versions: Move all symbols to GLIBC_PRIVATE.
1362 * sysdeps/sparc/sparc32/sparcv9/Versions: New file.
1363 * sysdeps/sparc/sparc64/Versions: New file.
1364 * sysdeps/ia64/Versions: Move all symbols to GLIBC_PRIVATE.
1366 2002-01-31 Ulrich Drepper <drepper@redhat.com>
1368 * pthread.c: _dl_cpuclock_offset is not any longer a global variable
1369 in SHARED code, use GL(dl_cpuclock_offset).
1371 2002-01-28 Andreas Jaeger <aj@suse.de>
1373 * sysdeps/mips/pspinlock.c (__pthread_spin_init): Clear *LOCK to
1374 0. Patch by Machida Hiroyuki <machida@sm.sony.co.jp>.
1376 2002-01-16 Martin Schwidefsky <schwidefsky@de.ibm.com>
1378 * sysdeps/s390/s390-32/pt-machine.h (MEMORY_BARRIER): Define.
1379 (CURRENT_STACK_FRAME): Remove duplicate definition.
1380 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
1382 2002-01-14 Martin Schwidefsky <schwidefsky@de.ibm.com>
1384 * Makefile (CFLAGS-tst-cancel.c): Add -fno-inline-functions to prevent
1387 2002-01-12 Andreas Schwab <schwab@suse.de>
1389 * Makefile (test-srcs): Add tst-signal.
1390 (tests): Run tst-signal.
1391 (distribute): Add tst-signal.sh.
1392 * tst-signal.c, tst-signal.sh: New files.
1394 2002-01-14 Andreas Jaeger <aj@suse.de>
1396 * sysdeps/x86_64/pt-machine.h (INIT_THREAD_SELF): Avoid warning.
1398 2002-01-11 Andreas Schwab <schwab@suse.de>
1400 * signals.c (sighandler): Initialize all elements to SIG_ERR.
1401 (__sigaction): Don't use value from sighandler if it is SIG_ERR.
1403 2002-01-06 Richard Henderson <rth@redhat.com>
1405 * sysdeps/alpha/elf/pt-initfini.c: New file.
1407 2001-12-29 Andreas Jaeger <aj@suse.de>
1409 * Examples/ex9.c: Add noreturn attribute for thread.
1410 * Examples/ex10.c: Likewise.
1411 * Examples/ex13.c (thread_start): Likewise.
1412 * Examples/ex15.c (worker): Likewise.
1414 * Examples/ex18.c: Include unistd.h for prototype of sleep.
1416 2001-12-14 Ulrich Drepper <drepper@redhat.com>
1418 * man/pthread_atfork.man: Adjust description of mutex handling
1419 after fork for current implementation.
1420 * linuxthreads.texi: Likewise [PR libc/2519].
1422 2001-12-13 Andreas Schwab <schwab@suse.de>
1424 * specific.c (pthread_key_delete): Don't contact the thread
1425 manager if no threads have been created yet.
1427 2001-12-12 NIIBE Yutaka <gniibe@m17n.org>
1429 * sysdeps/sh/pt-machine.h (INIT_THREAD_SELF): Added __volatile__
1430 qualifier to be safe.
1432 2001-11-30 Andreas Schwab <schwab@suse.de>
1434 * pthread.c (pthread_handle_sigcancel) [THREAD_SELF]: Double check
1435 that self is the manager thread, and initialize the thread
1437 (thread_self_stack) [THREAD_SELF]: New function to find self via
1439 * manager.c (pthread_handle_create): Don't block cancel signal any
1442 2001-11-29 Andreas Jaeger <aj@suse.de>
1444 * sysdeps/x86_64/pt-machine.h: Use %gs as thread specific register.
1446 (INIT_THREAD_SELF): New.
1447 (THREAD_GETMEM): New.
1449 (THREAD_SETMEM): New.
1450 (THREAD_SETMEM_NC): New.
1451 (FLOATING_STACKS): Define.
1452 (ARCH_STACK_MAX_SIZE): Define.
1454 2001-11-28 Kaz Kylheku <kaz@ashi.footprints.net>
1456 Bugfix to pthread_key_delete. It was iterating over the thread
1457 manager's linked list of threads, behind the thread manager's
1458 back causing a race. The fix is to have the manager iterate over
1459 the threads instead, using a new request type for doing so.
1460 * internals.h (struct pthread_request): New manager request type
1461 REQ_FOR_EACH_THREAD.
1462 * manager.c (pthread_for_each_thread): New function.
1463 (__pthread_manager): Handle new REQ_FOR_EACH_THREAD request.
1464 * specific.c (struct pthread_key_delete_helper_args): New type.
1465 (pthread_key_delete_helper): New static function.
1466 (pthread_key_delete): Use the new thread manager
1467 REQ_FOR_EACH_THREAD function to iterate over the threads and set
1468 the delete key slot to a null value in each thread.
1469 * Examples/ex18.c: New test.
1470 * Makefile (tests): Add ex18.
1472 2001-11-22 Wolfram Gloger <wg@malloc.de>
1474 * pthread.c (pthread_onexit_process): Don't call free
1475 after threads have been asynchronously terminated.
1477 * manager.c (pthread_handle_exit): Surround cancellation
1478 of threads with __flockfilelist()/__funlockfilelist().
1480 2001-11-26 Andreas Schwab <schwab@suse.de>
1482 * manager.c (pthread_handle_create): Start the child thread with
1483 the cancel signal blocked, so that it does not handle it before
1484 the thread register is set up. Save errno from failed clone call.
1486 2001-11-15 Ulrich Drepper <drepper@redhat.com>
1488 * sysdeps/i386/i686/Implies: Removed.
1489 * sysdeps/i386/i686/Versions: New file.
1491 2001-10-31 Andreas Jaeger <aj@suse.de>
1493 * sysdeps/x86_64/Makefile: Remove, we do not need it anymore.
1495 2001-10-05 Kevin Buettner <kevinb@cygnus.com>
1497 * pthread.c (__linuxthread_pthread_sizeof_descr): Change name
1498 to __linuxthreads_pthread_sizeof_descr to match name used by
1499 symbol_list_arr[LINUXTHREADS_PTHREAD_SIZEOF_DESCR] in
1500 linuxthreads_db/td_symbol_list.c.
1502 2001-09-22 Andreas Jaeger <aj@suse.de>
1504 * linuxthreads/tst-context.c: Avoid compile warning.
1506 2001-09-20 Andreas Jaeger <aj@suse.de>
1508 * shlib-versions: Add x86-64.
1510 2001-09-19 Andreas Jaeger <aj@suse.de>
1512 * sysdeps/x86_64/Makefile: New file.
1513 * sysdeps/x86_64/pspinlock.c: New file.
1514 * sysdeps/x86_64/pt-machine.h: New file.
1516 2001-09-12 Jakub Jelinek <jakub@redhat.com>
1518 * sysdeps/pthread/timer_delete.c (timer_delete): Thread may be NULL
1520 * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
1522 2001-09-11 Ulrich Drepper <drepper@redhat.com>
1523 Wolfram Gloger <wg@malloc.de>
1525 * join.c: Protect all communications from and to manager with
1527 * manager.c: Likewise.
1528 * pthread.c: Likewise.
1529 * smeaphore.c: Likewise.
1531 2001-08-29 Ulrich Drepper <drepper@redhat.com>
1533 * spinlock.c (__pthread_lock): Top max_count value with
1534 MAX_ADAPTIVE_SPIN_COUNT.
1535 * internals.h (MAX_ADAPTIVE_SPIN_COUNT): Define if not already done.
1537 * sysdeps/i386/i686/pt-machine.h (BUSY_WAIT_NOP): New macro to
1540 2001-08-27 Jakub Jelinek <jakub@redhat.com>
1542 * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_t): Only define to
1543 non-opaque type if __USE_UNIX98.
1545 2001-08-26 Jakub Jelinek <jakub@redhat.com>
1547 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_t): Define
1548 non-opaque lock types also if _IO_MTSAFE_IO is defined.
1550 2001-08-23 Roland McGrath <roland@frob.com>
1552 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start): Take
1553 new first argument, skip the cleanup handler if it's zero.
1554 (_LIBC_LOCK_RECURSIVE_INITIALIZER): New macro.
1555 (__libc_lock_define_initialized_recursive): Use it.
1556 * sysdeps/pthread/bits/stdio-lock.h: File removed.
1557 The sysdeps/generic file from the main tree now suffices.
1559 2001-08-22 Roland McGrath <roland@frob.com>
1561 * sysdeps/pthread/bits/stdio-lock.h: Include <bits/libc-lock.h>
1562 instead of <pthread.h>.
1563 (_IO_lock_t): Define this typedef using __libc_lock_define_recursive.
1564 (_IO_lock_initializer): Add braces.
1565 (_IO_lock_lock): Use __libc_lock_lock_recursive.
1566 (_IO_lock_unlock): Use __libc_lock_unlock_recursive.
1568 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_recursive_t): New type.
1569 (__libc_lock_define_initialized_recursive): Use it.
1570 (__libc_lock_init_recursive): Likewise.
1571 (__libc_lock_fini_recursive): Likewise.
1572 (__libc_lock_lock_recursive): Likewise.
1573 (__libc_lock_trylock_recursive): Likewise.
1574 (__libc_lock_unlock_recursive): Likewise.
1575 (__libc_lock_define_recursive): New macro.
1577 2001-08-14 Jakub Jelinek <jakub@redhat.com>
1579 * lockfile.c (__pthread_provide_lockfile): New variable.
1580 * pthread.c (__pthread_require_lockfile): New variable.
1581 * cancel.c (__pthread_require_lockfile): New variable.
1583 2001-07-31 Ulrich Drepper <drepper@redhat.com>
1585 * tst-context.c (threadfct): Initialize context before calling
1588 * Examples/ex17.c: Make sure test thread is around long enough.
1590 2001-07-26 kaz Kojima <kkojima@rr.iij4u.or.jp>
1592 * sysdeps/sh/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF): Defined.
1594 2001-07-24 Ulrich Drepper <drepper@redhat.com>
1596 * tst-context.c (main): Print explanation before bailing out
1597 because context handling is not supported.
1599 2001-07-23 Ulrich Drepper <drepper@redhat.com>
1601 * Makefile (tests): Add tst-context.
1602 * tst-context.c: New file.
1604 * sysdeps/pthread/bits/stdio-lock.h: Define
1605 _IO_cleanup_region_start_noarg.
1607 2001-07-23 Jakub Jelinek <jakub@redhat.com>
1609 * sysdeps/alpha/pt-machine.h (FLOATING_STACKS): Define.
1610 (ARCH_STACK_MAX_SIZE): Define.
1611 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
1612 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1614 2001-07-19 Jakub Jelinek <jakub@redhat.com>
1616 * sysdeps/i386/useldt.h: Fix typo in ARCH_STACK_MAX_SIZE comment.
1618 * sysdeps/ia64/pt-machine.h (FLOATING_STACKS): Define.
1619 (ARCH_STACK_MAX_SIZE): Define.
1620 * manager.c (pthread_allocate_stack): Handle FLOATING_STACKS with
1621 NEED_SEPARATE_REGISTER_STACK.
1623 2001-07-16 Andreas Schwab <schwab@suse.de>
1625 * Makefile (before-compile): Don't add $(objpfx)crti.o.
1626 (omit-deps): Add crti.
1627 ($(objpfx)libpthread.so): Depend on $(objpfx)crti.o, but make sure
1628 it is filtered out of the link command.
1630 2001-07-16 Ulrich Drepper <drepper@redhat.com>
1632 * pthread.c (pthread_initialize): For FLOATING_STACKS don't bother
1633 to find the right value for __pthread_initial_thread_bos, it's not
1634 used. If not FLOATING_STACKS first run
1635 __pthread_init_max_stacksize.
1637 2001-06-16 H.J. Lu <hjl@gnu.org>
1639 * internals.h: Include <stackinfo.h>.
1641 * attr.c: Don't include <stackinfo.h> here.
1642 * cancel.c: Likewise.
1643 * manager.c: Likewise.
1644 * pthread.c: Likewise.
1645 * ptlongjmp.c: Likewise.
1647 2001-03-23 Matthew Wilcox <willy@ldl.fc.hp.com>
1649 * attr.c: Make _STACK_GROWS_UP work.
1650 * internals.h: Likewise.
1651 * manager.c: Likewise.
1652 * pthread.c: Likewise.
1654 2001-06-15 H.J. Lu <hjl@gnu.org>
1656 * pthread.c (__pthread_reset_main_thread): Fix a typo.
1658 2001-02-02 John S. Marvin <jsm@udlkern.fc.hp.com>
1660 * semaphore.h: Use struct _pthread_fastlock as an element of
1661 sem_t instead of an identical struct.
1662 * rwlock.c: Remove casts.
1663 * semaphore.c: Likewise.
1665 2001-04-30 Alan Modra <amodra@one.net.au>
1667 * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: New.
1669 2001-05-25 Bruce Mitchener <bruce@cubik.org>
1671 * linuxthreads.texi: Spelling corrections.
1673 2001-05-25 Ulrich Drepper <drepper@redhat.com>
1675 * oldsemaphore.c (__old_sem_wait): Clear p_nextwaiting before
1676 returning successfully.
1677 Patch by Gene Cooperman <gene@ccs.neu.edu>.
1679 2001-05-24 Ulrich Drepper <drepper@redhat.com>
1681 * spinlock.c (__pthread_lock) [HAS_COMPARE_AND_SWAP]: Before doing any
1682 serious work try once whether the lock is uncontested.
1683 Remove duplicate reading of __status before loop.
1684 Change suggested by Hans Boehm <hans_boehm@hp.com>.
1686 * spinlock.h (__pthread_trylock): Remove need for oldstatus variable.
1687 (__pthread_alt_trylock): Likewise.
1689 2001-05-01 Kaz Kylheku <kaz@ashi.footprints.net>
1691 Memory barrier overhaul following line by line inspection.
1692 * mutex.c (pthread_once): Missing memory barriers added.
1693 * pthread.c (__pthread_wait_for_restart_signal,
1694 __pthread_timedsuspend_new, __pthread_restart_new): Added
1695 memory barriers ``just in case'' and for documentary value.
1696 * spinlock.c (__pthread_release): New inline function for releasing
1697 spinlock, to complement __pthread_acquire. Includes memory
1698 barrier prior to assignment to spinlock, and __asm __volatile
1699 dance to prevent reordering or optimization of the spinlock access.
1700 * spinlock.c (__pthread_unlock, __pthread_alt_lock,
1701 __pthread_alt_timedlock, __pthread_alt_unlock,
1702 __pthread_compare_and_swap): Updated to use new __pthread_release
1703 instead of updating spinlock directly.
1704 * spinlock.c (__pthread_lock, __pthread_unlock, wait_node_alloc,
1705 wait_node_free, wait_node_dequeue, __pthread_alt_lock,
1706 __pthread_alt_timedlock, __pthread_alt_unlock, __pthread_acquire):
1707 Memory barrier overhaul. Lots of missing memory barriers added,
1708 a couple needless ones removed.
1709 * spinlock.c (__pthread_compare_and_swap): testandset optimization
1710 removed, just calls __pthread_acquire, which has the new read
1711 barrier in it before its testandset.
1713 2001-05-20 Roland McGrath <roland@frob.com>
1715 * Makeconfig: New file, variables used to be in main libc Makeconfig.
1717 2001-05-09 Geoff Keating <geoffk@redhat.com>
1719 * sysdeps/powerpc/pt-machine.h
1720 (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): Define.
1721 (__compare_and_swap): Remove memory barriers.
1722 (__compare_and_swap_with_release_semantics): New function.
1724 2001-04-24 Andreas Jaeger <aj@suse.de>
1726 * wrapsyscall.c: send* and recv* return ssize_t.
1728 * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Unlock the
1729 mutex instead of double locking it.
1730 Reported by Pierre Artaud <partaud@sodatec.com>.
1732 2001-04-23 Ulrich Drepper <drepper@redhat.com>
1734 * sysdeps/pthread/getcpuclockid.c: Make function generic, test
1735 using #ifdef whether the clock is available.
1736 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: Removed.
1738 * sysdeps/ia64/Versions: New file.
1740 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init): We don't
1741 have to call __gmon_start__ in the libpthread DSO.
1742 * sysdeps/pthread/pt-initfini.c (_init): Likewise.
1744 * Makefile (libpthread-routines): Add ptclock_gettime and
1746 * internals.h: Don't use cpuclock-init.h definitions, use
1747 hp-timing.h definitions.
1748 * pthread.c: Likewise.
1749 * manager.c: Likewise.
1750 * ptclock_gettime.c: New file.
1751 * ptclock_settime.c: New file.
1752 * internals.h: Fix parameter type for __pthread_clock_gettime and
1753 __pthread_clock_settime.
1755 * sysdeps/i386/i586/ptclock_gettime.c: Removed.
1756 * sysdeps/i386/i586/ptclock_settime.c: Removed.
1757 * sysdeps/i386/i586/Makefile: Removed.
1759 2001-04-22 Ulrich Drepper <drepper@redhat.com>
1761 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_ASYNCH_IO.
1762 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1764 2001-04-21 Andreas Jaeger <aj@suse.de>
1766 * sysdeps/pthread/timer_routines.c (thread_func): Add noreturn
1767 attribute, remove statements that will never be executed.
1768 (thread_func): Remove mutex_unlock call since it's never executed.
1769 (thread_func): Fix comment as suggested by Jakub Jelinek.
1771 * manager.c (__pthread_manager): Add noreturn
1773 (pthread_start_thread): Likewise, remove return statement.
1774 (pthread_start_thread_event): Likewise.
1775 Add noreturn attribute for pthread_handle_exit.
1776 * weaks.c: Add noreturn attribute for pthread_exit.
1778 * internals.h: Add __pthread_clock_gettime and
1779 __pthread_clock_settime prototypes.
1781 2001-04-21 Ulrich Drepper <drepper@redhat.com>
1783 * internals.h: Include <cpuclock-init.h>.
1784 (struct _pthread_descr_struct): Add p_cpuclock_offset field if
1785 CPUCLOCK_VARDEF is defined.
1786 * pthread.c (__pthread_initialize_minimal): Initialize
1787 p_cpuclock_offset field for main thread if CPUCLOCK_INIT is defined.
1788 * manager.c (pthread_start_thread): Set p_cpuclock_offset field
1789 for new thread to current CPU clock value.
1791 * sysdeps/i386/useldt.h: Extend all the macros to handle 8-byte values.
1793 * sysdeps/i386/i586/Makefile: New file.
1794 * sysdeps/i386/i586/Versions: New file.
1795 * sysdeps/i386/i586/ptclock_gettime.c: New file.
1796 * sysdeps/i386/i586/ptclock_settime.c: New file.
1797 * sysdeps/i386/i686/Implies: New file.
1799 2001-04-18 Jakub Jelinek <jakub@redhat.com>
1801 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Put specs into
1802 $generated, not $postclean-generated.
1804 2001-04-18 Andreas Jaeger <aj@suse.de>
1806 * Makefile (otherlibs): Added.
1808 2001-04-18 Jakub Jelinek <jakub@redhat.com>
1810 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
1812 2001-04-16 Ulrich Drepper <drepper@redhat.com>
1814 * signals.c (sigwait): NSIG is no signal number. Block all
1815 signals while in signal handler for signals in SET.
1816 Patch by Manfred Spraul <manfred@colorfullife.com>.
1818 2001-04-12 Ulrich Drepper <drepper@redhat.com>
1820 * tst-cancel.c: Disable most tests. Add new test where all
1821 cleanup handlers must run.
1822 * Makefile (tests): Add tst-cancel again.
1824 * cancel.c (__pthread_perform_cleanup): Correct condition for
1825 leaving cleanup loop early.
1827 * sysdeps/i386/Makefile: Make sure gcc uses a frame pointer for
1828 all the files which use CURRENT_STACK_FRAME.
1829 * sysdeps/i386/pt-machine.h (CURRENT_STACK_FRAME): Define using
1830 __builtin_frame_address.
1831 * sysdeps/i386/i686/pt-machine.h: Likewise.
1833 2001-04-11 Ulrich Drepper <drepper@redhat.com>
1835 * Makefile (tests): Comment out tst-cancel for now.
1837 * tst-cancel.c (main): Cleanup 4 is supposed to run. Create
1838 temporary file in object directory.
1839 * Makefile: Don't allow inlining when compiling tst-cancel.c.
1840 Pass $(objpfx) to tst-cancel.
1842 2001-04-11 David S. Miller <davem@redhat.com>
1844 * sysdeps/sparc/sparc32/pt-machine.h (stack_pointer): Advance
1845 up closer to user local variables so that new cleanup heuristics work.
1846 * sysdeps/sparc/sparc64/pt-machine.h (stack_pointer): Likewise.
1848 2001-04-11 Ulrich Drepper <drepper@redhat.com>
1850 * cancel.c (_pthread_cleanup_push): Catch invalid __prev buffer
1852 (_pthread_cleanup_push_defer): Likewise.
1854 * tst-cancel.c (main): Fix loop printing cleanup output.
1856 2001-04-10 kaz Kojima <kkojima@rr.iij4u.or.jp>
1858 * sysdeps/sh/pspinlock.c (__pthread_spin_lock): Fix a reverse
1860 (__pthread_spin_trylock): Likewise.
1861 * sysdeps/sh/pt-machine.h (testandset): Likewise.
1863 2001-04-10 Ulrich Drepper <drepper@redhat.com>
1865 * join.c (pthread_exit): Move code to new function __pthread_do_exit
1866 which takes an extra parameter with the current frame pointer.
1867 Call new function with CURRENT_STACK_FRAME.
1868 (__pthread_do_exit): New function. Call __pthread_perform_cleanup
1869 with the new parameter.
1870 (pthread_join): Call __pthread_do_exit instead of pthread_exit.
1871 * cancel.c (__pthread_perform_cleanup): Takes extra parameter. Use
1872 this parameter as the initial value the cleanup handler records are
1873 compared against. No active cleanup handler record must have an
1874 address lower than the previous one and the initial record must be
1875 above (below on PA) the frame address passed in.
1876 (pthread_setcancelstate): Call __pthread_do_exit instead of
1878 (pthread_setcanceltype): Likewise.
1879 (pthread_testcancel): Likewise.
1880 (_pthread_cleanup_pop_restore): Likewise.
1881 * condvar.c (pthread_cond_wait): Likewise.
1882 (pthread_cond_timedwait_relative): Likewise.
1883 * manager.c (pthread_start_thread): Likewise.
1884 * oldsemaphore.c (__old_sem_wait): Likewise.
1885 * pthread.c (pthread_handle_sigcancel): Likewise.
1886 * semaphore.c (__new_sem_wait): Likewise.
1887 (sem_timedwait): Likewise.
1888 * ptlongjmp.c (pthread_cleanup_upto): Also use current stack frame
1889 to limit the cleanup handlers which get run.
1890 * internals.h: Add prototype for __pthread_do_exit. Adjust prototype
1891 for __pthread_perform_cleanup.
1893 * Makefile (tests): Add tst-cancel.
1894 * tst-cancel.c: New file.
1896 2001-04-08 Hans-Peter Nilsson <hp@axis.com>
1898 * sysdeps/cris/pt-machine.h: New file.
1899 * sysdeps/cris/pspinlock.c: New file.
1901 2001-04-09 Hans-Peter Nilsson <hp@axis.com>
1903 * shlib-versions: Add case for Linux on CRIS.
1905 2001-03-26 Ulrich Drepper <drepper@redhat.com>
1907 * attr.c (pthread_getattr_np): Correct computation of stack size
1908 for machiens with register stack.
1910 * Examples/ex17.c (main): Correct detection of failed mmap call.
1912 2001-03-21 Jakub Jelinek <jakub@redhat.com>
1914 * pthread.c (__pthread_initialize_manager): Fix a typo.
1916 2001-03-21 Jakub Jelinek <jakub@redhat.com>
1918 * attr.c (__pthread_attr_setstack): Fix alignment check.
1919 (pthread_getattr_np): __stackaddr is top of stack, not bottom.
1920 * Makefile (tests): Add ex17 test.
1921 * Examples/ex17.c: New test.
1923 2001-03-20 Ulrich Drepper <drepper@redhat.com>
1925 * Makefile: Define -D_RPC_THREAD_SAFE_ for cancel.c.
1926 * cancel.c (__pthread_perform_cleanup): Call __rpc_thread_destroy.
1927 * sysdeps/pthread/bits/libc-tsd.h: Define _LIBC_TSD_KEY_VARS.
1929 2001-03-18 Ulrich Drepper <drepper@redhat.com>
1931 * Makefile: When generating DSO link with libc_nonshared.a.
1933 2001-02-26 Jakub Jelinek <jakub@redhat.com>
1935 * signals.c (pthread_sighandler): Use CALL_SIGHANDLER.
1937 2001-02-23 Jakub Jelinek <jakub@redhat.com>
1939 * internals.h (__pthread_init_max_stacksize): New prototype.
1940 * attr.c (__pthread_attr_setstacksize): Call
1941 __pthread_init_max_stacksize if not yet initialized.
1942 * pthread.c (__pthread_init_max_stacksize): New function.
1943 (__pthread_initialize_manager): Call it.
1944 Patch by <dtc@cmucl.cons.org>.
1946 2001-03-16 Ulrich Drepper <drepper@redhat.com>
1948 * attr.c (pthread_getattr_np): Fix __stacksize computation for IA-64.
1950 2001-03-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
1952 * shlib-versions: Add rule for Linux on 64 bit S/390.
1953 * sysdeps/s390/s390-64/pt-machine.h: New file.
1954 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
1956 2001-03-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
1958 * sysdeps/s390/pt-machine.h: Move to...
1959 * sysdeps/s390/s390-32/pt-machine.h: ...here.
1960 Add defines for FLOATING_STACK and ARCH_STACK_MAX_SIZE.
1962 2001-03-15 Ulrich Drepper <drepper@redhat.com>
1964 * Versions [libpthread] (GLIBC_2.2.3): Add pthread_getattr_np.
1965 * attr.c: Implement pthread_getattr_np.
1966 * sysdeps/pthread/pthread.h: Add prototype for pthread_getattr_np.
1967 * internals.h (struct _pthread_descr_struct): Add p_inheritsched.
1968 * manager.c (pthread_handle_create): Initialize p_inheritsched.
1970 2001-03-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
1972 * sysdeps/unix/sysv/linux/s390/pt-initfini.c: Use 0x07 padding for
1975 2001-02-20 Hans Boehm <hans_boehm@hp.com>
1977 * manager.c (manager_mask): Removed static vesion. Now always local
1978 to __pthread_manager().
1979 (manager_mask_all): Removed completely.
1980 (__pthread_manager): Remove manager_mask_all initialization.
1981 (pthread_handle_create): Remove code to set and reset signal mask
1982 around __clone2() calls.
1984 2001-02-17 Jakub Jelinek <jakub@redhat.com>
1986 * spinlock.c (__pthread_lock): Force lock->__status to be read from
1987 memory on every spin.
1989 2001-02-10 Andreas Jaeger <aj@suse.de>
1991 * Makefile (extra-objs): New.
1993 2001-02-09 Jakub Jelinek <jakub@redhat.com>
1995 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Add
1996 __pthread_initialize_minimal prototype.
1998 2001-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
2000 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
2002 2001-02-06 Martin Schwidefsky <schwidefsky@de.ibm.com>
2004 * sysdeps/unix/sysv/linux/s390/pt-initfini.c: New file.
2006 2001-02-06 Ulrich Drepper <drepper@redhat.com>
2008 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: First attempt to fix the
2009 broken code. Patch by Jes Sorensen.
2011 2001-02-06 Andreas Jaeger <aj@suse.de>
2013 * sysdeps/pthread/pthread.h: Move __pthread_initialize from here
2015 * internals.h: ...here.
2017 2001-02-05 Jes Sorensen <jes@linuxcare.com>
2019 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
2021 2001-02-02 Ulrich Drepper <drepper@redhat.com>
2023 * Versions: Remove __pthread_initialize_minimal.
2025 2001-02-01 Ulrich Drepper <drepper@redhat.com>
2027 * Makefile: Add rules to build crti.o and make it being used in
2028 building libpthread.so.
2029 * sysdeps/i386/Makefile: New file.
2030 * sysdeps/pthread/pt-initfini.c: New file.
2032 * pthread.c: Cleanups.
2034 2001-01-28 Andreas Jaeger <aj@suse.de>
2036 * oldsemaphore.c (__old_sem_init): Adjust for last change.
2037 * sysdeps/pthread/bits/libc-lock.h: Likewise.
2038 * spinlock.c: Likewise.
2040 2001-01-28 Ulrich Drepper <drepper@redhat.com>
2042 * sysdeps/pthread/bits/initspin.h: Make all names namespace clean.
2043 * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
2044 * manager.c: Adjust for namespace cleanup in bits/initspin.h.
2045 * pthread.c: Likewise.
2046 * spinlock.h: Likewise.
2047 * sysdeps/pthread/pthread.h: Likewise.
2049 2001-01-26 Ulrich Drepper <drepper@redhat.com>
2051 * sysdeps/pthread/bits/pthreadtypes.h: Define pthread_attr_t also
2052 as struct __pthread_attr_s.
2054 * semaphore.h (sem_t): Cleanup namespace, rename status and
2057 2001-01-13 Jakub Jelinek <jakub@redhat.com>
2059 * pthread.c (pthread_onexit_process): Clear
2060 __pthread_manager_thread_bos after freeing it.
2061 * Makefile (tests): Add ex16.
2062 * Examples/ex16.c: New file.
2064 2001-01-11 Jakub Jelinek <jakub@redhat.com>
2066 * Makefile (CFLAGS-pthread.c): Pass -DHAVE_Z_NODELETE if ld supports
2068 * pthread.c (pthread_exit_process): Rename to...
2069 (pthread_onexit_process): ...this.
2070 (pthread_atexit_process, pthread_atexit_retcode): New.
2071 (pthread_initialize): Call __cxa_atexit instead of __cxa_on_exit
2072 and only if HAVE_Z_NODELETE is not defined.
2073 (__pthread_initialize_manager): Register pthread_atexit_retcode
2076 2001-01-11 Ulrich Drepper <drepper@redhat.com>
2078 * pthread.c (pthread_initialize): Use __cxs_on_exit not __cxa_atexit.
2080 2001-01-11 Jakub Jelinek <jakub@redhat.com>
2082 * Makefile (tests): Add ex15.
2083 * Examples/ex15.c: New test.
2085 2001-01-08 Ulrich Drepper <drepper@redhat.com>
2087 * pthread.c (pthread_exit_process): Free memory allocated for
2090 2000-12-31 Ulrich Drepper <drepper@redhat.com>
2092 * manager.c (pthread_alloca_stack): Remove MAP_FIXED from mmap calls.
2093 (pthread_free): Always unmap the stack. It's safe now that we don't
2094 use MAP_FIXED to allocate stacks.
2096 2000-12-31 Ulrich Drepper <drepper@redhat.com>
2098 * sysdeps/powerpc/pspinlock.c: Don't include pt-machine.h here.
2100 * manager.c (pthread_allocate_stack): Prepare for removal of MAP_FIXED.
2102 2000-11-15 Wolfram Gloger <wg@malloc.de>
2104 * manager.c (pthread_free): [!FLOATING_STACKS]: Only remap the
2105 stack to PROT_NONE, don't unmap it, avoiding collisions with malloc.
2107 2000-12-27 Andreas Jaeger <aj@suse.de>
2109 * Examples/ex13.c: Make local functions static.
2110 * ecmutex.c: Likewise.
2111 * joinrace.c: Likewise.
2112 * Examples/ex14.c: Likewise.
2114 * Examples/ex2.c: Make local functions static; reformat.
2115 * Examples/ex1.c: Likewise.
2116 * Examples/ex4.c: Likewise.
2117 * Examples/ex5.c: Likewise.
2118 * Examples/ex7.c: Likewise.
2120 * oldsemaphore.c: Add prototypes to shut up GCC.
2121 * pt-machine.c: Likewise.
2123 * weaks.c: Add prototype for pthread_exit.
2125 * internals.h: Add some prototypes, format prototypes and add
2127 Move __libc_waitpid prototype to include/sys/wait.h.
2129 * rwlock.c: Include <bits/libc-lock.h> for prototypes.
2130 * mutex.c: Likewise.
2131 * specific.c: Likewise.
2132 * ptfork.c: Likewise.
2134 * lockfile.c: Include internals.h to get prototypes.
2135 * events.c: Likewise.
2136 * sysdeps/alpha/pspinlock.c: Likewise.
2137 * sysdeps/arm/pspinlock.c: Likewise.
2138 * sysdeps/hppa/pspinlock.c: Likewise.
2139 * sysdeps/i386/pspinlock.c: Likewise.
2140 * sysdeps/ia64/pspinlock.c: Likewise.
2141 * sysdeps/m68k/pspinlock.c: Likewise.
2142 * sysdeps/mips/pspinlock.c: Likewise.
2143 * sysdeps/powerpc/pspinlock.c: Likewise.
2144 * sysdeps/s390/pspinlock.c: Likewise.
2145 * sysdeps/sh/pspinlock.c: Likewise.
2146 * sysdeps/sparc/sparc32/pspinlock.c: Likewise.
2147 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: Likewise.
2148 * sysdeps/sparc/sparc64/pspinlock.c: Likewise.
2150 2000-12-27 Ulrich Drepper <drepper@redhat.com>
2152 * attr.c (__pthread_attr_setstack): Fix setting of __stackaddr element.
2153 (__pthread_attr_getstack): Return correct address.
2154 Add warnings for using pthread_attr_getstackaddr and
2155 pthread_attr_setstackaddr.
2157 2000-12-26 Ulrich Drepper <drepper@redhat.com>
2159 * Examples/ex6.c (test_thread): Make static.
2160 * Examples/ex12.c (test_thread): Make static and add noreturn
2163 2000-12-18 Jes Sorensen <jes@linuxcare.com>
2165 * linuxthreads/sysdeps/ia64/pt-machine.h: __compare_and_swap
2166 and compare_and_swap_with_release_semantics returns int not long.
2168 2000-12-17 Andreas Jaeger <aj@suse.de>
2170 * sysdeps/s390/pt-machine.h (testandset): Use long int as return
2172 * sysdeps/arm/pt-machine.h (testandset): Likewise.
2173 * sysdeps/hppa/pt-machine.h (testandset): Likewise.
2174 * sysdeps/m68k/pt-machine.h (testandset): Likewise.
2175 * sysdeps/sh/pt-machine.h (testandset): Likewise.
2176 * sysdeps/sparc/sparc32/pt-machine.h (testandset): Likewise.
2177 * sysdeps/sparc/sparc64/pt-machine.h (testandset): Likewise.
2179 2000-12-17 Ulrich Drepper <drepper@redhat.com>
2181 * sysdeps/i386/pt-machine.h (testandset): Adjust for prototype change.
2182 * sysdeps/i386/i686/pt-machine.h (testandset): Likewise.
2184 2000-12-17 Andreas Jaeger <aj@suse.de>
2186 * internals.h: Add prototypes for testandset and
2187 __compare_and_swap to shut up gcc warnings.
2189 2000-12-06 Wolfram Gloger <wg@malloc.de>
2191 * join.c (pthread_detach): Allow case where the thread has already
2194 2000-12-05 Andreas Jaeger <aj@suse.de>
2196 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Don't set mips2.
2197 * sysdeps/mips/pt-machine.h (testandset): Likewise.
2198 (__compare_and_swap): Likewise.
2199 Patches by Maciej W. Rozycki <macro@ds2.pg.gda.pl>.
2201 2000-11-20 Jakub Jelinek <jakub@redhat.com>
2203 * Examples/ex3.c (main): Cast int to long before casting to void *.
2204 (search): Cast void * to long, not int.
2205 * Examples/ex8.c (main, thread): Similarly.
2206 * Examples/ex11.c (main): Similarly.
2207 * Examples/ex14.c (worker, do_test): Similarly.
2208 * ecmutex.c (worker, do_test): Similarly.
2209 (nlocks): Cast to int.
2211 2000-11-08 Bruce Mitchener <bruce@cubik.org>
2213 * linuxthreads.texi: Add documentation for pthreads attributes
2214 guardsize, stackaddr, stacksize, and stack. Fix typo in previous
2215 patch. Document pthread_[sg]etconcurrency(). Mark
2216 pthread_mutexattr_[sg]ettype() as POSIX rather than GNU.
2218 2000-11-07 Ulrich Drepper <drepper@redhat.com>
2220 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
2222 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2223 Reported by Christopher Yeoh <cyeoh@linuxcare.com.au>.
2225 2000-11-06 Ulrich Drepper <drepper@redhat.com>
2227 * cancel.c (pthread_cancel): Always set p_canceled, even if we are
2228 not doing it right now.
2229 Reported by Kaz Kylheku <kaz@ashi.footprints.net>.
2231 2000-10-30 Ulrich Drepper <drepper@redhat.com>
2233 * Examples/ex4.c (main): Don't use exit() to avoid warning with
2236 2000-10-29 Ulrich Drepper <drepper@redhat.com>
2238 * attr.c (__pthread_attr_setguardsize): Don't round guardsize
2239 here. Reported by Bruce Mitchener <bruce@cubik.org>.
2241 * linuxthreads.texi: Changes terminology to 'type' from 'kind' when
2242 discussing mutexes. (As per the Unix98 name for the API.)
2243 Changes documentation for pthread_mutexattr_setkind_np() and
2244 pthread_mutexattr_getkind_np() over to the Unix98 APIs for the
2245 same: pthread_mutexattr_settype() and pthread_mutexattr_gettype().
2246 Changes references to PTHREAD_MUTEXATTR_FAST_NP to
2247 PTHREAD_MUTEXATTR_ADAPTIVE_NP.
2248 Begins to introduce discussion of the ``timed'' mutex type. This
2249 discussion is currently incomplete.
2250 Patch by Bruce Mitchener <bruce@cubik.org>.
2252 2000-10-26 Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
2253 Yutaka Niibe <gniibe@chroot.org>
2255 * sysdeps/sh/pt-machine.h (testandset): Since the operand of TAS.B
2256 has restrictions, use register.
2258 2000-10-23 Andreas Schwab <schwab@suse.de>
2260 * Examples/ex14.c (TIMEOUT): Override default timeout.
2262 2000-10-16 Ulrich Drepper <drepper@redhat.com>
2264 * specific.c: Protect tsd array modification in thread data
2265 structures by getting the thread lock in pthread_key_delete and
2266 __pthread_destroy_specifics.
2267 Patch by Wolfram Gloger <Wolfram.Gloger@dent.med.uni-muenchen.de>.
2269 2000-10-12 Alan Modra <alan@linuxcare.com.au>
2271 * sysdeps/pthread/bits/initspin.h: New file.
2272 * spinlock.h: Move LOCK_INITIALIZER definition to <bits/initspin.h>.
2273 (__pthread_init_lock): Initialize lock with LT_SPINLOCK_INIT.
2274 (__pthread_alt_init_lock): Likewise.
2275 (__pthread_alt_trylock): Release lock with LT_SPINLOCK_INIT.
2277 2000-10-12 David Huggins-Daines <dhd@linuxcare.com>
2279 * oldsemaphore.c (__old_sem_init): Release lock with
2280 LT_SPINLOCK_INIT, not zero.
2281 * spinlock.c (__pthread_unlock): Likewise.
2282 (__pthread_alt_lock): Likewise.
2283 (__pthread_alt_timedlock): Likewise.
2284 (__pthread_alt_unlock): Likewise.
2285 * sysdeps/pthread/bits/libc-lock.h: Initialize locks with
2286 LT_SPINLOCK_INIT if it is non-zero. Likewise for init-once flags.
2287 * sysdeps/pthread/pthread.h: Include bits/initspin.h. Use
2288 LT_SPINLOCK_INIT do initialize spinlocks not 0.
2290 2000-10-12 David Huggins-Daines <dhd@linuxcare.com>
2292 * shlib-versions: Add version definitions for hppa-linux.
2294 2000-10-12 Alan Modra <alan@linuxcare.com.au>
2296 * sysdeps/hppa/pspinlock.c: New file.
2297 * sysdeps/hppa/pt-machine.h: New file.
2298 * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: New file.
2300 2000-10-05 Jakub Jelinek <jakub@redhat.com>
2302 * mutex.c (__pthread_mutex_destroy): Correct test of
2303 busy mutex for mutexes using alternate fastlocks.
2304 Patch by dtc@cmucl.cons.org.
2306 2000-09-28 Martin Schwidefsksy <schwidefsky@de.ibm.com>
2308 * sysdeps/s390/pt-machine.h: Make %a0 the thread register.
2310 2000-09-28 Ulrich Drepper <drepper@redhat.com>
2312 * mutex.c (__pthread_mutex_unlock): For PTHREAD_MUTEX_RECURSIVE_NP
2313 test for owner first.
2314 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2316 * cancel.c (pthread_cancel): Don't do anything if cancelation is
2319 2000-09-26 Ulrich Drepper <drepper@redhat.com>
2321 * spinlock.h (__pthread_set_own_extricate_if): Optimize a bit.
2322 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2324 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
2325 _POSIX_MONOTONIC_CLOCK.
2327 * spinlock.h (__pthread_set_own_extricate_if): Add back locking
2330 2000-09-20 Andreas Jaeger <aj@suse.de>
2332 * pthread.c [!__ASSUME_REALTIME_SIGNALS]: Make inclusion of
2333 "testrtsig.h" conditional.
2335 2000-09-11 Ulrich Drepper <drepper@redhat.com>
2337 * sysdeps/pthread/pthread.h: Declare pthread_attr_getstack and
2338 pthread_attr_setstack.
2339 * Versions [libpthread] (GLIBC_2.2): Export pthread_attr_getstack and
2340 pthread_attr_setstack.
2341 * attr.c (pthread_attr_getstack, pthread_attr_setstack): New functions.
2343 2000-09-05 Ulrich Drepper <drepper@redhat.com>
2345 * Examples/ex14.c: New file.
2346 * Makefile (tests): Add ex14.
2348 * mutex.c (__pthread_mutex_unlock): Correct test for already unlocked
2349 mutex. Patch by dtc@cmucl.cons.org.
2351 * ecmutex.c: New file.
2352 * Makefile (tests): Add ecmutex.
2354 2000-09-04 H.J. Lu <hjl@gnu.org>
2356 * attr.c (__pthread_attr_setguardsize): Use page_roundup
2357 instead of roundup to round up to the page size.
2359 2000-09-03 Mark Kettenis <kettenis@gnu.org>
2361 * manager.c (pthread_exited): Correctly report event as TD_REAP
2362 instead of TD_DEATH. Fix comments.
2364 2000-09-03 Ulrich Drepper <drepper@redhat.com>
2366 * spinlock.h (testandset): Add cast to avoid warning.
2367 Patch by Franz Sirl <Franz.Sirl-kernel@lauterbach.com>.
2369 2000-09-02 Andreas Jaeger <aj@suse.de>
2371 * sysdeps/pthread/timer_routines.c: Include stdlib.h for abort
2374 2000-09-01 Ulrich Drepper <drepper@redhat.com>
2376 * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
2377 Fix typo in last patch (_mode -> _flags).
2379 * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
2380 Provide definition which respects _IO_USER_LOCK flag.
2382 2000-08-30 Ulrich Drepper <drepper@redhat.com>
2384 * manager.c (pthread_allocate_stack): Clear descriptor only if not
2387 2000-08-25 Ulrich Drepper <drepper@redhat.com>
2389 * Makefile: Add rules to build and run unload.
2390 * unload.c: New file.
2392 * pthread.c (pthread_exit_process): Move thread_self use inside `if'.
2394 * sysdeps/pthread/pthread.h
2395 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Defined.
2396 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: Defined.
2398 2000-08-24 Andreas Jaeger <aj@suse.de>
2400 * Examples/ex13.c: Include <string.h> for strerror prototype and
2401 <stdlib.h> for abort prototype.
2402 (pthr_cond_signal_mutex): Rewrite to silence GCC.
2403 (thread_start): Remove unused variable err.
2404 (main): Silence GCC warnings.
2406 2000-08-22 Andreas Jaeger <aj@suse.de>
2408 * Examples/ex13.c: New test by Kurt Garloff <garloff@suse.de>.
2410 * Makefile (tests): Add ex13.
2412 2000-08-20 Ulrich Drepper <drepper@redhat.com>
2414 * semaphore.h: Add restrict where required by AGd4.
2415 * sysdeps/pthread/pthread.h: Likewise.
2416 * sysdeps/pthread/unix/sysv/linux/bits/sigthread.h: Likewise.
2418 2000-08-15 Ulrich Drepper <drepper@redhat.com>
2420 * Makefile (tests): Add ex12. Add rule to build it.
2421 * Examples/ex12.c: New file.
2423 2000-08-13 Ulrich Drepper <drepper@redhat.com>
2425 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_SEMAPHORES
2426 even though the implementation is not quite complete (but it reports
2427 it). Define _POSIX_MESSAGE_PASSING to -1.
2428 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2430 2000-08-12 Andreas Jaeger <aj@suse.de>
2432 * sysdeps/mips/pt-machine.h (testandset): Add .set mips2 for
2434 (__compare_and_swap): Likewise.
2435 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Likewise.
2437 2000-08-10 Ulrich Drepper <drepper@redhat.com>
2439 * pthread.c (__pthread_initial_thread): Initialize p_errnop and
2440 p_h_errnop correctly and not to NULL.
2442 2000-08-05 Ulrich Drepper <drepper@redhat.com>
2444 * Banner: Bump version number to 0.9.
2446 2000-08-04 Ulrich Drepper <drepper@redhat.com>
2448 * Makefile (tests): Add tststack. Add rule to build the program.
2449 * tststack.c: New file.
2451 * internals.h: Declare __pthread_max_stacksize.
2452 * pthread.c (__pthread_max_stacksize): New variable.
2453 (__pthread_initialize_manager): Determine __pthread_initialize_manager
2455 * manager.c (thread_segment): Return always NULL if FLOATING_STACKS.
2456 (pthread_allocate_stack): Allow kernel to choose stack address if
2457 FLOATING_STACKS. This also handles variable-sized stacks.
2458 Always allocate stack and guardpage together. Use mprotect to
2459 change guardpage access.
2460 * sysdeps/i386/useldt.h: Define FLOATING_STACKS and
2461 ARCH_STACK_MAX_SIZE.
2463 * attr.c (__pthread_attr_setstacksize): Also test value against
2466 * manager.c (__pthread_nonstandard_stacks): Define only if
2467 THREAD_SELF is not defined.
2468 (pthread_allocate_stack): Always initialize gardaddr to a correct
2470 (pthread_handle_create): Unmap thread with one call.
2471 (pthread_free): Remove test for initial thread before removing stack.
2472 Unmap stack with one call.
2474 * pthread.c (__pthread_initial_thread): Initialize p_userstack to
2475 1 to avoid removing the stack.
2477 2000-07-27 Jes Sorensen <jes@linuxcare.com>
2479 * sysdeps/ia64/pspinlock.c (__pthread_spin_lock): Add
2480 load of spin lock to prime the cache before the atomic compare and
2481 exchange operation (cmpxchg4). This avoids the spinning on the
2482 cmpxchg4 instruction and reduces movement of the cache line back
2483 and forth between the processors (explanation by Asis K. Mallick
2484 from Intel). This basically makes the implementation operate the
2485 same as the Linux kernel implementation.
2487 * shlib-versions: Use GLIBC_2_2 for Linux/ia64.
2488 * sysdeps/ia64/pspinlock.c: New file.
2490 2000-08-03 Ulrich Drepper <drepper@redhat.com>
2492 * pthread.c: Move definition of __pthread_set_own_extricate_if...
2493 * spinlock.h: ...here. Remove locking.
2494 * internals.h: Remove __pthread_set_own_extricate_if prototype.
2496 * rwlock.c: Use THREAD_GETMEM And THREAD_SETMEM.
2497 (rwlock_rd_extricate_func): Don't determine self, let
2498 __pthread_lock do it.
2499 (rwlock_wr_extricate_func): Likewise.
2500 (rwlock_have_already): Optimize *pself handling a bit.
2502 * mutex.c: Use __builtin_expect.
2503 * pthread.c: Likewise.
2505 2000-08-02 Andreas Jaeger <aj@suse.de>
2507 * sysdeps/s390/pspinlock.c: New file.
2508 * sysdeps/s390/pt-machine.h: New file.
2509 Patches by Martin Schwidefsky <schwidefsky@de.ibm.com>.
2511 2000-07-12 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
2513 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Implement for
2515 * sysdeps/mips/pt-machine.h (testandset): Likewise.
2517 2000-07-26 Andreas Jaeger <aj@suse.de>
2519 * pthread.c: Initialize p_sem_avail.
2521 2000-07-25 Ulrich Drepper <drepper@redhat.com>
2523 * internals.h (struct __pthread_descr_struct): Add p_sem_avail.
2524 * semaphore.c: Handle spurious wakeups.
2526 * sysdeps/pthread/pthread.h: Add back PTHREAD_MUTX_FAST_NP as an alias
2527 for PTHREAD_MUTEX_ADAPTIVE_NP for source code compatibility.
2529 * pthread.c (__pthread_set_own_extricate): Use THREAD_GETMEM.
2530 (__pthread_wait_for_restart): Likewise.
2532 * condvar.c (pthread_cond_wait): Also check whether thread is
2533 cancelable before aborting loop.
2534 (pthread_cond_timedwait): Likewise.
2536 * signals.c (pthread_sighandler): Remove special code to restrore
2538 (pthread_sighandler_t): Likewise.
2540 2000-07-25 Mark Kettenis <kettenis@gnu.org>
2542 * internals.h (__RES_PTHREAD_INTERNAL): Remove define.
2543 * pthread.c: Include <resolv.h>.
2544 (_res): Undefine. Add extern declaration.
2546 2000-07-24 Ulrich Drepper <drepper@redhat.com>
2548 * pthread.c (__pthread_initial_thread): Update initializer.
2549 (__pthread_manager_thread): Likewise.
2550 (pthread_initialize): Move setrlimit call to...
2551 (__pthread_initialize_manager): ...here.
2552 (__pthread_reset_main_thread): Reset also soft limit on stack size.
2554 * condvar.c: Handle spurious wakeups. [PR libc/1749].
2555 * internals.h (struct _pthread_descr_struct): Add p_condvar_avail.
2557 2000-07-21 Ulrich Drepper <drepper@redhat.com>
2559 * spinlock.h: If IMPLEMENT_TAS_WITH_CAS is defined use
2560 __compare_and_swap to define testandset.
2561 * sysdeps/powerpc/pt-machine.h: Add volatile to asms.
2562 Define IMPLEMENT_TAS_WITH_CAS.
2564 2000-07-20 Ulrich Drepper <drepper@redhat.com>
2566 * Makefile: Pass -z nodelete to linker for libpthread.so
2567 generation if it understand this option.
2569 2000-07-18 Mark Kettenis <kettenis@gnu.org>
2571 * manager.c (pthread_handle_create): Remove initialization of
2572 new_thread->p_res._sock.
2574 2000-07-19 Kaz Kylheku <kaz@ashi.footprints.net>
2576 Bugfixes to the variant of the code for machines with no compare
2579 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Wait
2580 node was not being properly enqueued, due to failing to update
2581 the lock->__status field.
2583 * spinlock.c (__pthread_alt_timedlock): The oldstatus variable was
2584 being set inappropriately, causing the suspend function to be called
2585 with a null self pointer and crash.
2587 2000-07-18 Ulrich Drepper <drepper@redhat.com>
2589 * spinlock.h (__pthread_alt_trylock): Fix code used if no
2590 compare&swap is available.
2592 * spinlock.h (__pthread_trylock): Use __compare_and_swap, not
2595 * pthread.c (pthread_initialize): Don't use sysconf to determine
2596 whether the machine has more than one processor.
2598 * spinlock.c (__pthread_alt_timedlock): Add back one of the
2599 removed thread_self calls.
2601 2000-07-18 Kaz Kylheku <kaz@ashi.footprints.net>
2603 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Changed
2604 __compare_and_swap to compare_and_swap in code which assumes
2605 compare swap is available.
2607 2000-07-18 Kaz Kylheku <kaz@ashi.footprints.net>
2609 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Fixed
2610 bug whereby thr field of waitnode structure would not be correctly
2611 set unless a null self pointer is passed to the functions.
2612 Eliminated redundant calls to thread_self().
2614 2000-07-18 Jakub Jelinek <jakub@redhat.com>
2616 * pthread.c (__pthread_initialize_manager): Lock
2617 __pthread_manager_thread.p_lock before calling clone.
2619 2000-05-05 H.J. Lu <hjl@gnu.org>
2621 * sysdeps/ia64/pt-machine.h (__compare_and_swap): Change it to
2622 have acquire semantics.
2623 (__compare_and_swap_with_release_semantics): New inline
2625 (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): New macro.
2627 2000-01-28 Hans Boehm <hboehm@exch.hpl.hp.com>
2629 * manager.c: Fix the problem with signals at startup.
2630 Change the way that thread stacks are allocated on IA64.
2631 Clean up some of the guard page allocation stuff.
2633 1999-12-19 H.J. Lu <hjl@gnu.org>
2635 * internals.h (page_roundup): New.
2636 * attr.c (__pthread_attr_setguardsize); Use page_roundup
2638 * manager.c (pthread_allocate_stack): Make sure guardaddr is
2639 page aligned with page_roundup if NEED_SEPARATE_REGISTER_STACK
2642 1999-12-17 Hans Boehm <hboehm@exch.hpl.hp.com>
2644 * manager.c (pthread_allocate_stack): Unmap the stack top
2645 if failed to map the stack bottom.
2647 (pthread_free): Fix the guard page.
2649 * pthread.c (pthread_initialize): Set rlimit correctly for
2650 NEED_SEPARATE_REGISTER_STACK.
2652 1999-12-16 H.J. Lu <hjl@gnu.org>
2654 * pthread.c (__pthread_initialize_manager): Pass
2655 __pthread_manager_thread_bos instead of
2656 __pthread_manager_thread_tos to __clone2.
2658 1999-12-16 H.J. Lu <hjl@gnu.org>
2660 * manager.c (pthread_allocate_stack): Correct the calculation
2661 of "new_thread_bottom". Remove MAP_GROWSDOWN from mmap for
2664 1999-12-13 H.J. Lu <hjl@gnu.org>
2666 * sysdeps/ia64/pt-machine.h (__compare_and_swap): Added a stop
2667 bit after setting ar.ccv.
2669 1999-12-12 H.J. Lu <hjl@gnu.org>
2671 * manager.c (pthread_allocate_stack): Make the starting
2672 address of the stack bottom page aligned. FIXME: it may
2673 need changes in other places.
2674 (pthread_handle_create): Likewise.
2676 1999-12-11 Hans Boehm <hboehm@exch.hpl.hp.com>
2678 * manager.c (pthread_allocate_stack): Handle
2679 NEED_SEPARATE_REGISTER_STACK.
2680 (pthread_handle_create): Likewise.
2681 * pthread.c (__pthread_initialize_manager): Likewise.
2683 * sysdeps/ia64/pt-machine.h: Use r13 for thread pointer.
2685 1999-12-02 H.J. Lu <hjl@gnu.org>
2687 * sysdeps/ia64/pt-machine.h: New.
2689 2000-07-13 Ulrich Drepper <drepper@redhat.com>
2691 * wrapsyscall.c: Mark non-__ protected names as weak.
2694 2000-07-12 Bruno Haible <haible@clisp.cons.org>
2696 * Examples/ex8.c: Include <sys/wait.h>, not <wait.h>.
2698 2000-07-12 Ulrich Drepper <drepper@redhat.com>
2700 * spinlock.c: Fix code for TEST_FOR_COMPARE_AND_SWAP being defined.
2701 Add tests also to new alternative spinlock implementation.
2702 * spinlock.h: Likewise.
2703 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2705 2000-07-06 Ulrich Drepper <drepper@redhat.com>
2707 * Version: Export __sigaction.
2708 * signals.c: Define __sigaction alias. Use __libc_sigaction instead
2710 * pthread.c: Use __libc_sigaction instead of __sigaction.
2712 * condvar.c: Implement pthread_condattr_getpshared and
2713 pthread_condattr_setpshared.
2714 * mutex.c: Implement pthread_mutexattr_getpshared and
2715 pthread_mutexattr_setpshared.
2716 * Versions: Export new functions.
2717 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
2719 * rwlock.c (pthread_rwlockattr_init): Use PTHREAD_PROCESS_PRIVATE.
2720 (pthread_rwlockattr_setpshared): Fail if PTHREAD_PROCESS_PRIVATE
2723 2000-07-04 Greg McGary <greg@mcgary.org>
2725 * sysdeps/pthread/bits/libc-lock.h: Remove BP_SYM from
2726 pragmas. Include bp-sym.h only if _LIBC.
2728 2000-07-04 Ulrich Drepper <drepper@redhat.com>
2730 * spinlock.c (__pthread_unlock): Properly place write barrier.
2731 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2733 2000-07-03 Ulrich Drepper <drepper@redhat.com>
2735 * spinlock.c: Replace fast spinlocks by adaptive spinlocks which are
2736 faster on SMP systems. No more emulation of compare&swap for adaptive
2738 * spinlock.h: Likewise.
2739 * sysdeps/pthread/pthread.h: Shuffle PTHREAD_MUTEX_* values around.
2740 Replace fast with adaptive mutex.
2741 * mutex.c: Rewrite for replacement of fast by adaptive mutex.
2742 * condvar.c: Likewise.
2743 * pthread.c: Define and initialize __pthread_smp_kernel variable.
2744 * internals.h: Declare __pthread_smp_kernel.
2745 * sysdeps/pthread/bits/pthreadtypes.h: Update comment of
2746 _pthread_fastlock structure.
2747 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2749 * pthread.c: Remove initialization to zero from global variables.
2751 2000-06-29 Jakub Jelinek <jakub@redhat.com>
2753 * shlib-versions: Make sparc64 GLIBC_2.2+ only.
2755 2000-06-28 Greg McGary <greg@mcgary.org>
2757 * weaks.c: Wrap BP_SYM () around weak extern declarations of
2758 pthread functions that have pointers in their return+arg signatures.
2760 2000-06-27 Greg McGary <greg@mcgary.org>
2762 * sysdeps/pthread/bits/libc-lock.h: Wrap BP_SYM () around weak
2763 extern declarations of pthread functions that have pointers in
2764 their return+arg signatures.
2766 2000-06-26 Ulrich Drepper <drepper@redhat.com>
2768 * Makefile (tests): Add ex11. Add rules to build it.
2769 * Examples/ex11.c: New file.
2770 * rwlock.c: Fix complete braindamaged previous try to implement
2773 * spinlock.c: Pretty print.
2775 2000-06-25 Ulrich Drepper <drepper@redhat.com>
2777 * Makefile (tests): Add ex10. Add rules to build it.
2778 * Versions [GLIBC_2.2] (libpthread): Add pthread_mutex_timedlock,
2779 pthread_rwlock_timedrdlock, and pthread_rwlock_timedwrlock.
2780 * condvar.c (pthread_cond_wait): Allow mutex of kind
2781 PTHREAD_MUTEX_TIMED_NP.
2782 (pthread_cond_timedwait_relative): Likewise.
2783 * mutex.c (__pthread_mutex_init): Default is PTHREAD_MUTEX_TIMED_NP.
2784 (__pthread_mutex_trylock): Use __pthread_alt_trylock for
2785 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
2786 (__pthread_mutex_lock): Use __pthread_alt_lock for
2787 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
2788 (__pthread_mutex_timedlock): New function.
2789 (__pthread_mutex_unlock): Use __pthread_alt_unlock for
2790 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
2791 (__pthread_mutexattr_init): Use PTHREAD_MUTEX_TIMED_NP.
2792 (__pthread_mutexattr_settype): Allow PTHREAD_MUTEX_TIMED_NP.
2793 * spinlock.c: Implement alternate fastlocks.
2794 * spinlock.h: Add prototypes.
2795 * Examples/ex10.c: New file.
2796 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
2797 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2799 * rwlock.c (__pthread_rwlock_rdlock): Optimize loop a bit.
2800 (__pthread_rwlock_timedrdlock): New function.
2801 (__pthread_rwlock_timedwrlock): New function.
2802 Use laternate fastlock function everywhere.
2804 2000-06-21 Andreas Jaeger <aj@suse.de>
2806 * sysdeps/pthread/timer_routines.c: Include <string.h> for memset
2809 * join.c: Include <stdlib.h> for exit prototype.
2811 2000-06-20 Ulrich Drepper <drepper@redhat.com>
2813 * sysdeps/i386/useldt.h: Include <stdlib.h>.
2815 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_BARRIERS.
2816 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2818 * Makefile (libpthread-routines): Add barrier.
2819 (tests): Add ex9. Add rule to build ex9.
2820 * Versions: Export barrier functions.
2821 * barrier.c: New file.
2822 * Examples/ex9.c: New file.
2823 * sysdeps/pthread/pthread.h: Add barrier data types and declarations.
2824 * sysdeps/pthread/bits/pthreadtypes.h: Likewise.
2825 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2827 2000-06-19 H.J. Lu <hjl@gnu.org>
2829 * spinlock.h (HAS_COMPARE_AND_SWAP): Defined if
2830 HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS is defined.
2831 (compare_and_swap_with_release_semantics): New. Default to
2832 compare_and_swap if HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS
2835 * spinlock.c (__pthread_unlock): Call
2836 compare_and_swap_with_release_semantics () instead of
2837 compare_and_swap ().
2839 2000-06-19 Ulrich Drepper <drepper@redhat.com>
2841 * sysdeps/pthread/timer_create.c: Use _set_errno instead of assigning
2843 * sysdeps/pthread/timer_delete.c: Likewise.
2844 * sysdeps/pthread/timer_getoverr.c: Likewise.
2845 * sysdeps/pthread/timer_gettime.c: Likewise.
2846 * sysdeps/pthread/timer_settime.c: Likewise.
2848 2000-06-13 Kaz Kylheku <kaz@ashi.footprints.net>
2850 Timer nodes are now reference counted, and can be marked
2851 as deleted. This allows for the safe release of the global mutex
2852 in the middle without losing the timer being operated on.
2854 * sysdeps/pthread/posix-timer.h (struct timer_node): The inuse
2855 member is now an enum with three values, so that an intermediate
2856 state can be represented (deleted but not free for reuse yet).
2857 New refcount member added.
2858 * sysdeps/pthread/timer_routines.c: Likewise.
2860 * sysdeps/pthread/posix-timer.h (timer_addref, timer_delref,
2861 timer_valid): New inline functions added.
2863 * sysdeps/pthread/timer_gettime.c (timer_gettime): Function
2864 restructured, recursive deadlock bug fixed.
2866 * sysdeps/pthread/timer_gettime.c (timer_gettime): Uses new
2867 timer_addref to ensure that timer won't be deleted while mutex is not
2868 held. Also uses timer_invalid to perform validation of timer handle.
2869 * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
2870 * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Likewise.
2872 2000-06-14 Ulrich Drepper <drepper@redhat.com>
2874 * shlib-versions: Add entry for SH.
2875 Patch by Kaz Kojima <kkojima@rr.iij4u.or.jp>.
2877 2000-06-13 Kaz Kylheku <kaz@ashi.footprints.net>
2879 A few optimizations. Got rid of unnecessary wakeups of timer threads,
2880 tightened up some critical regions and micro-optimized some list
2883 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
2884 Returns int value now to indicate whether timer was queued at head.
2885 * sysdeps/pthread/posix-timer.h: Likewise.
2886 * sysdeps/pthread/timer_settime.c (timer_settime): Takes advantage of
2887 new return value from __timer_thread_queue_timer to avoid waking
2888 up timer thread unnecessarily.
2890 * sysdeps/pthread/posix-timer.h (timer_id2ptr): No longer checks
2891 inuse flag, because this requires mutex to be held. Callers updated
2892 to do the check when they have the mutex.
2893 * sysdeps/pthread/timer_getoverr.c: Add check for inuse here.
2895 * sysdeps/pthread/timer_settime.c (timer_settime): Tighter critical
2896 regions: avoids making system calls while holding timer mutex, and
2897 a few computations were moved outside of the mutex as well.
2898 * sysdeps/pthread/timer_gettime.c (timer_gettime): Likewise.
2900 * sysdeps/pthread/posix-timer.h (list_unlink_ip): Function name changed
2901 to list_unlink_ip, meaning idempotent. Pointer manipulation
2902 changed to get better better code out of gcc.
2903 * sysdeps/pthread/timer_routines.c (list_unlink): Non-idempotent
2904 version of list_unlink added here.
2905 * sysdeps/pthread/timer_delete.c: Use appropriate list unlink
2906 function in all places: idempotent one for timers, non-idempotent
2907 one for thread nodes.
2908 * sysdeps/pthread/timer_settime: Likewise.
2909 * sysdeps/pthread/timer_routines.c: Likewise.
2911 2000-06-13 Ulrich Drepper <drepper@redhat.com>
2913 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_TIMERS): Define.
2914 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2916 * sysdeps/pthread/Makefile: Remove tests definition.
2918 2000-06-12 Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
2919 Yutaka Niibe <gniibe@chroot.org>
2921 * sysdeps/sh/pspinlock.c: New file.
2922 * sysdeps/sh/pt-machine.h: New file.
2924 2000-06-12 Ulrich Drepper <drepper@redhat.com>
2926 * Makefile (tests): Add joinrace.
2928 * Examples/ex6.c: Test return value of pthread_join.
2930 2000-06-11 Geoff Keating <geoffk@cygnus.com>
2932 * sysdeps/powerpc/pspinlock.c (__pthread_spin_lock): Implement.
2933 (__pthread_spin_trylock): Implement.
2934 (__pthread_spin_unlock): Implement.
2935 (__pthread_spin_init): Implement.
2936 (__pthread_spin_destroy): Implement.
2938 2000-06-10 Ulrich Drepper <drepper@redhat.com>
2940 * sysdeps/pthread/timer_routines.c (list_append): Little fix to
2941 really append the entry.
2943 2000-06-10 Andreas Jaeger <aj@suse.de>
2945 * lockfile.c (__fresetlockfiles): Remove unused variable fp.
2947 2000-06-10 Kaz Kylheku <kaz@ashi.footprints.net>
2949 * sysdeps/pthread/timer_create.c: Thread matching now done on
2950 clock type as well as thread attributes.
2951 There are individual global signal-delivering threads for
2952 different clock types.
2953 * sysdeps/pthread/posix-timer.h: Likewise.
2954 * sysdeps/pthread/timer_routines.c: Likewise.
2956 * sysdeps/pthread/timer_routines.c: Thread allocation and
2957 deallocation function now remembers to put thread on active
2958 list and remove from active list.
2959 Thus now the feature of binding multiple timers
2960 to a single thread actually works.
2962 2000-06-10 Ulrich Drepper <drepper@redhat.com>
2964 * pthread.c (__pthread_create_2_1): Optimize a bit.
2966 * internals.h (invalid_handle): Also test for p_terminated != 0.
2967 (nonexisting_handle): New function. Same as old invalid_handle.
2968 * join.c (pthread_join): Use nonexisting_handle instead of
2969 invalid_handle to test for acceptable thread handle.
2970 * manager.c (pthread_handle_free): Likewise.
2971 * joinrace.c: New file.
2972 Reported by Permaine Cheung <pcheung@cygnus.com>.
2974 2000-06-08 Ulrich Drepper <drepper@redhat.com>
2976 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
2977 Correct handling of matching variable.
2979 * sysdeps/pthread/tst-timer.c (main): Rewrite initializers to
2982 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
2983 Be prepared for empty timer list.
2985 * sysdeps/pthread/timer_create.c (timer_create): Correct names of
2986 CPUTIME clock ID. Add support for thread clocks.
2988 * sysdeps/pthread/posix-timer.h (timer_ptr2id): Operands in
2989 subtraction were switched.
2991 * sysdeps/pthread/timer_routines.c (init_module): Use
2992 THREAD_MAXNODES threads.
2994 * sysdeps/pthread/posix-timer.h (struct timer_node): Add creator_pid.
2995 * sysdeps/pthread/timer_create.c: Fill in creator_pid.
2996 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Send signal
2997 with sigqueueinfo is this system call is available.
2999 * sysdeps/pthread/timer_create.c (timer_create): Allow
3000 CLOCK_CPUTIME if _POSIX_CPUTIME is defined.
3002 * sysdeps/pthread/Makefile: New file. Add rules to build timer
3004 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add TIMER_MAX.
3006 2000-06-04 Kaz Kylheku <kaz@ashi.footprints.net>
3008 * sysdeps/pthread/posix-timer.h: New file.
3009 * sysdeps/pthread/timer_create.c: New file.
3010 * sysdeps/pthread/timer_delete.c: New file.
3011 * sysdeps/pthread/timer_getoverr.c: New file.
3012 * sysdeps/pthread/timer_gettime.c: New file.
3013 * sysdeps/pthread/timer_routines.c: New file.
3014 * sysdeps/pthread/timer_settime.c: New file.
3015 * sysdeps/pthread/tst-timer.c: New file.
3017 2000-06-08 Ulrich Drepper <drepper@redhat.com>
3019 * sysdeps/unix/sysv/linux/bits/local_lim.h: Remove OPEN_MAX and
3020 LINK_MAX definitions if necessary.
3022 2000-06-04 Kaz Kylheku <kaz@ashi.footprints.net>
3024 Added missing fork time handling of global libio lock.
3026 * lockfile.c (__fresetlockfiles): Now also resets the list lock,
3027 not just the individual stream locks. Rewritten to use new
3028 iterator interface provided by libio rather than accessing
3031 * lockfile.c (__flockfilelist, _funlockfilelist): New functions
3032 which lock and unlock the stream list using the new interface
3034 * internals.h: Likewise.
3036 * ptfork.c (__fork): Now calls __flockfilelist before fork,
3037 and __funlockfilelist in the parent after the fork.
3038 Child still calls __fresetlockfiles as before.
3040 * linuxthreads.texi: Now explains what happens to streams at
3041 fork time. Also whole new section on forking and thread added.
3042 Definition of pthread_atfork moved out of Miscellaneous Functions
3043 to this new section.
3045 2000-06-04 Jakub Jelinek <jakub@redhat.com>
3047 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c (__pthread_spin_lock):
3048 Add missing register.
3049 * sysdeps/sparc/sparc64/pspinlock.c (__pthread_spin_lock): Likewise.
3051 2000-06-02 Jakub Jelinek <jakub@redhat.com>
3053 * sysdeps/sparc/sparc32/pspinlock.c: Implement spinlocks.
3054 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: New.
3055 * sysdeps/sparc/sparc64/pspinlock.c: Implement spinlocks.
3057 2000-05-31 Andreas Jaeger <aj@suse.de>
3059 * sysdeps/mips/pspinlock.c: Implement spinlocks.
3061 2000-05-28 Ulrich Drepper <drepper@redhat.com>
3063 * spinlock.c (__pthread_lock): Remove ASSERT.
3065 * Makefile (tests): Add ex8.
3066 * Examples/ex8.c: New file.
3068 2000-05-12 Kaz Kylheku <kaz@ashi.footprints.net>
3070 Bugfix: The pthread_atfork mechanism now takes care of its
3071 own internal mutex at fork time.
3073 * ptfork.c (__fork): Revised so that the mutex is held across
3074 the fork operation and while the handlers are called, and so that
3075 the child resets the mutex.
3077 * linuxthreads.texi: Updated pthread_atfork documentation to make
3078 it clear that fork and pthread_atfork can't be reentered from
3079 atfork handlers, that pthread_atfork and fork are mutually atomic,
3080 and that the handlers are inherited by the child process.
3082 2000-05-24 Ulrich Drepper <drepper@redhat.com>
3084 * Makefile (libpthread-routines): Add pspinlock.
3085 * cancel.c: Rename __pthread_spin_unlock back to __pthread_unlock.
3086 Use struct _pthread_fastlock instead of pthread_spinlock_t.
3087 * condvar.c: Likewise.
3088 * internals.h: Likewise.
3090 * manager.c: Likewise.
3091 * mutex.c: Likewise.
3092 * pthread.c: Likewise.
3093 * rwlock.c: Likewise.
3094 * semaphore.c: Likewise.
3095 * signals.c: Likewise.
3096 * spinlock.h: Likewise.
3097 * spinlock.c: Likewise. Remove pthread_spin_lock functions.
3098 * sysdeps/alpha/pspinlock.c: New file.
3099 * sysdeps/arm/pspinlock.c: New file.
3100 * sysdeps/i386/pspinlock.c: New file.
3101 * sysdeps/m68k/pspinlock.c: New file.
3102 * sysdeps/mips/pspinlock.c: New file.
3103 * sysdeps/powerpc/pspinlock.c: New file.
3104 * sysdeps/sparc/sparc32/pspinlock.c: New file.
3105 * sysdeps/sparc/sparc64/pspinlock.c: New file.
3106 * sysdeps/pthread/bits/pthreadtypes.h: Remove pthread_spinlock_t
3107 back to _pthread_fastlock. Define new pthread_spinlock_t.
3109 2000-05-24 Andreas Jaeger <aj@suse.de>
3111 * sysdeps/i386/i686/pt-machine.h: Only use LDT on newer kernels.
3113 2000-05-21 Jakub Jelinek <jakub@redhat.com>
3115 * manager.c (pthread_handle_create): Initialize p_res._sock to -1.
3117 2000-05-13 Jakub Jelinek <jakub@redhat.com>
3119 * internals.h (__RES_PTHREAD_INTERNAL): Define.
3121 2000-05-06 Kaz Kylheku <kaz@ashi.footprints.net>
3123 * mutex.c (pthread_once): IN_PROGRESS state of pthread_once_t
3124 object state is represented with additional bits which distinguish
3125 whether that state was set up in the current process, or
3126 in an ancestor process. If that state was set in an ancestor,
3127 it means that a fork happened while thread was executing the init
3128 function. In that case, the state is reset to NEVER.
3129 * mutex.c (__pthread_once_fork_prepare): New function.
3130 (__pthread_once_fork_child): Likewise
3131 (__pthread_once_fork_parent): Likewise
3132 (__pthread_reset_pthread_once): Removed.
3133 * ptfork.c (__fork): Call new handlers in mutex.c.
3134 * internals.h: Declarations of new mutex.c functions added.
3135 Declaration of removed function deleted.
3136 * linuxthreads.texi: Updated documentation about pthread_once
3137 to clarify what happens under cancellation and forking.
3139 2000-05-06 Kaz Kylheku <kaz@ashi.footprints.net>
3141 * internals.h: New thread manager request type, REQ_KICK.
3142 * join.c (pthread_exit): main thread now calls exit() instead
3143 of _exit() in order to proper process cleanup.
3144 * manager.c (__pthread_manager): Do not terminate manager
3145 after unblocking main thread; wait for main thread's
3146 REQ_PROCESS_EXIT request instead.
3147 Also, added REQ_KICK case to handle new request; this just does
3149 * manager.c (pthread_exited): Do not terminate manager after
3150 unblocking main thread.
3151 * manager.c (__pthread_manager_sighandler): If the main thread
3152 is waiting for all other threads to die, send a REQ_KICK into
3153 the thread manager request pipe to get it to clean out the threads
3154 and unblock the main thread as soon as possible. This fixes
3155 the 2000 millisecond hang on shutdown bug.
3156 * Examples/ex7.c: New file, tests shutdown behavior when all threads
3157 including the main one call pthread_exit(), or implicitly do so.
3158 * Makefile (tests): Add ex7.
3160 2000-05-05 Andreas Jaeger <aj@suse.de>
3162 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
3163 (pthread_getcpuclockid): Correct test for ourselves.
3165 2000-05-05 Ulrich Drepper <drepper@redhat.com>
3167 * internals.h (struct _pthread_descr_struct): Reorganization.
3168 Allocate room for 16 pointers at head of the structure for future
3169 thread-local data handling. Move p_self member in this area.
3170 * manager.c (pthread_handle_create): Adjust use of p_self.
3171 * sysdeps/i386/useldt.h (THREAD_SELF): Likewise.
3172 * pthread.c (__pthread_initial_thread): Adjust initialization.
3173 (__pthread_manager_thread): Likewise.
3175 2000-04-29 Bruno Haible <haible@clisp.cons.org>
3177 * join.c (pthread_exit): Use THREAD_GETMEM_NC instead of THREAD_GETMEM
3178 for eventmask larger than 1 word.
3180 2000-04-27 Ulrich Drepper <drepper@redhat.com>
3182 * Versions [libpthread] (GLIBC_2.2): Add __pthread_initialize_minimal.
3183 * pthread.c (__pthread_initialize_minimal): New function. Perform
3184 minimal initialization.
3185 (pthread_initialize): Remove this code here.
3186 * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h" again. We
3187 are working around the problem in glibc.
3189 2000-04-25 Ulrich Drepper <drepper@redhat.com>
3191 * sysdeps/i386/i686/pt-machine.h: Do not use "../useldt.h" for
3192 now. First gcc must be fixed (more concrete: libgcc).
3194 2000-04-24 Ulrich Drepper <drepper@redhat.com>
3196 * pthread.c: Remove special treatement for interrupt handlers on x86.
3197 * manager.c (pthread_free): Use FREE_THREAD not FREE_THREAD_SELF.
3198 * sysdeps/i386/useldt.h: Use "q" constraint instead of "r" where
3200 * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h".
3202 2000-04-24 Mark Kettenis <kettenis@gnu.org>
3204 * join.c (pthread_exit): Set p_terminated after reporting the
3205 termination event instead of before.
3207 2000-04-20 Jakub Jelinek <jakub@redhat.com>
3209 * sysdeps/pthread/bits/libc-lock.h: Only declare __pthread_rwlock_*
3212 2000-04-18 Andreas Jaeger <aj@suse.de>
3214 * Versions: Use ld instead of ld.so.
3216 2000-04-18 Jakub Jelinek <jakub@redhat.com>
3218 * sysdeps/unix/sysv/linux/sparc/bits/sigcontext.h (struct sigcontext):
3219 Remove the typedef keyword.
3221 2000-04-18 Jakub Jelinek <jakub@redhat.com>
3223 * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Use membar,
3225 (READ_MEMORY_BARRIER): Define.
3226 * spinlock.c (__pthread_spin_unlock): Use READ_MEMORY_BARRIER, not
3228 * internals.h (READ_MEMORY_BARRIER): Define if not defined in sysdep
3231 2000-04-17 Ulrich Drepper <drepper@redhat.com>
3233 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
3234 (pthread_getcpuclockid): Don't compare thread_id with thread_self,
3235 use thread_handle().
3237 2000-04-16 Ulrich Drepper <drepper@redhat.com>
3239 * condvar.c (pthread_cond_timedwait_relative): Don't test for owner
3240 if fast mutex is used. Don't initialize `already_canceled' twice.
3241 Correctly test for return value of timedsuspend.
3243 * pthread.c: Correct long-time braino. We never set SA_SIGINFO and
3244 therefore don't need the _rt versions of the signal handlers.
3246 2000-04-15 Ulrich Drepper <drepper@redhat.com>
3248 * pthread.c (pthread_yield): New function.
3249 * sysdeps/pthread/pthread.h (pthread_yield): Add prototype.
3250 * Versions [libpthread] (GLIBC_2.2): Add pthread_yield.
3251 * internals.h: Declare __pthread_yield.
3253 * pthread.c (pthread_initialize): Avoid a bit more code if
3254 realtime signals are known to exist.
3256 * pthread.c: Is __ASSUME_REALTIME_SIGNALS then avoid generating code
3257 to dynamically detect RT signals and avoid generating compatibility
3258 functions with old kernel.
3259 * restart.h (restart) [__ASSUME_REALTIME_SIGNALS]: Use
3260 __pthread_restart_new directly.
3261 (suspend) [__ASSUME_REALTIME_SIGNALS]: Use
3262 __pthread_wait_for_restart_signal directly.
3263 (timedsuspend) [__ASSUME_REALTIME_SIGNALS]: Use
3264 __pthread_timedsuspend_new directly.
3266 2000-04-15 Ulrich Drepper <drepper@redhat.com>
3268 * condvar.c: Remove all the special code to handle cond_timedwait.
3269 Use timedsuspend instead.
3270 * internals.h: Declare __pthread_timedsuspend_old,
3271 __pthread_timedsuspend_new, and __pthread_timedsuspend.
3272 Remove declaration of __pthread_init_condvar.
3273 * pthread.c: Define __pthread_timedsuspend variable.
3274 (__pthread_timedsuspend_old): New function. Timed suspension
3275 implementation for old Linux kernels.
3276 (__pthread_timedsuspend_new): New function. Timed suspension
3277 implementation for new Linux kernels.
3278 * restart.h (timedsuspend): New function. Call appropriate
3279 suspension function through __pthread_timedsuspend.
3280 * semaphore.c (sem_timedwait): Use timedsuspend, don't duplicate
3282 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
3284 * internals.h (WRITE_MEMORY_BARRIER): Define as MEMORY_BARRIER if
3286 * spinlock.c: Use WRITE_MEMORY_BARRIER instead of MEMORY_BARRIER
3288 * sysdeps/alpha/pt-machine.h: Define WRITE_MEMORY_BARRIER.
3289 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
3291 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _POSIX_SPAWN.
3292 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3294 2000-04-14 Andreas Jaeger <aj@suse.de>
3296 * weaks.c: Fix typo.
3298 * shlib-versions (mips.*-.*-linux.*): Support only GLIBC 2.0 and
3299 2.2 for linuxthreads.
3301 2000-04-13 Ulrich Drepper <drepper@redhat.com>
3303 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
3304 (pthread_getcpuclockid): Fix typo.
3306 2000-04-12 Ulrich Drepper <drepper@redhat.com>
3308 * Makefile (libpthread-routines): Add getcpuclockid.
3309 * Versions [libpthread] (GLIBC_2.2): Add pthread_getcpuclockid.
3310 * sysdeps/pthread/getcpuclockid.c: New file.
3311 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: New file.
3312 * sysdeps/pthread/pthread.h: Add prototype for pthread_getcpuclockid.
3314 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_SPIN_LOCKS):
3316 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3318 * sysdeps/pthread/pthread.h: Add prototypes for pthread_spin_init,
3319 pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
3320 and pthread_spin_unlock.
3321 * sysdeps/pthread/bits/pthreadtypes.h: Change struct _pthread_fastlock
3322 into pthread_spinlock_t. Change all uses.
3323 * spinlock.c: Implement pthread_spin_lock.
3324 Rename __pthread_unlock to __pthread_spin_unlock and define weak
3325 alias for real name.
3326 Define pthread_spin_trylock, pthread_spin_init, and
3327 pthread_spin_destroy.
3328 Change all uses of _pthread_fastlock to pthread_spinlock_t.
3329 * spinlock.h: Rename __pthread_unlock to __pthread_spin_unlock.
3330 Change all uses of _pthread_fastlock to pthread_spinlock_t.
3331 * Versions [libpthread] (GLIBC_2.2): Add pthread_spin_init,
3332 pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
3333 and pthread_spin_unlock.
3334 * cancel.c: Use __pthread_spin_unlock instead of __pthread_unlock.
3335 Change all uses of _pthread_fastlock to pthread_spinlock_t.
3336 * condvar.c: Likewise.
3337 * internals.h: Likewise.
3339 * manager.c: Likewise.
3340 * mutex.c: Likewise.
3341 * pthread.c: Likewise.
3342 * rwlock.c: Likewise.
3343 * semaphore.c: Likewise.
3344 * signals.c: Likewise.
3346 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add various new POSIX
3348 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
3350 2000-04-11 Ulrich Drepper <drepper@redhat.com>
3352 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add
3353 _POSIX_SHARED_MEMORY_OBJECTS.
3355 2000-04-11 Andreas Jaeger <aj@suse.de>
3357 * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Define.
3358 (__compare_and_swap): Mark as modifying memory.
3360 2000-04-11 Geoff Keating <geoffk@cygnus.com>
3362 * sysdeps/powerpc/pt-machine.h (MEMORY_BARRIER): Don't be
3364 (__compare_and_swap): Replace other 'sync' with MEMORY_BARRIER.
3365 Don't have the 'asm' __volatile__.
3367 2000-04-11 Ulrich Drepper <drepper@redhat.com>
3369 * internals.h: Define MEMORY_BARRIER as empty if not defined already.
3370 * spinlock.c (__pthread_lock): Add memory barriers.
3371 (__pthread_unlock): Likewise.
3372 * sysdeps/alpha/pt-machine.h (MEMORY_BARRIER): Define using mb
3374 (RELEASE): Not needed anymore.
3375 (__compare_and_swap): Mark asm as modifying memory.
3376 * sysdeps/powerpc/pt-machine.h (sync): Remove. Replace with definition
3378 (__compare_and_swap): Use MEMORY_BARRIER instead of sync.
3379 * sysdeps/sparc/sparc32/pt-machine.h (RELEASE): Not needed anymore.
3380 (MEMORY_BARRIER): Define using stbar.
3381 * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Define using
3383 (__compare_and_swap): Use MEMORY_BARRIER to ensure ordering.
3384 Patch by Xavier Leroy <Xavier.Leroy@inria.fr> based on comments by
3385 Mike Burrows <m3b@pa.dec.com>.
3387 2000-04-09 Ulrich Drepper <drepper@redhat.com>
3389 * signals.c (sigaction): Fix return value for the case SIG is one
3390 of the signals the implementation uses.
3391 Patch by Xavier.Leroy@inria.fr.
3393 2000-04-01 Andreas Jaeger <aj@suse.de>
3395 * attr.c: Use shlib-compat macros.
3396 * oldsemaphore.c: Likewise.
3397 * pthread.c: Likewise.
3398 * weaks.c: Likewise.
3400 2000-03-26 Ulrich Drepper <drepper@redhat.com>
3402 * semaphore.c (sem_timedwait): New function.
3403 Patch by Carl Mailloux <carlm@oricom.ca>.
3404 * semaphore.h: Declare sem_timedwait.
3405 * Versions [libpthread] (GLIBC_2.2): Add sem_timedwait.
3407 2000-03-26 Roland McGrath <roland@baalperazim.frob.com>
3409 * sysdeps/pthread/Makefile: File removed.
3411 2000-03-23 Ulrich Drepper <drepper@redhat.com>
3413 * mutex.c (__pthread_reset_pthread_once): Reset once_masterlock.
3414 * internals.h (__pthread_reset_pthread_once): Add prototype.
3415 * ptfork.c (__fork): Call __pthread_reset_pthread_once.
3417 * manager.c (pthread_handle_create): Store ID of new thread before
3420 2000-03-21 Ulrich Drepper <drepper@redhat.com>
3422 * attr.c: Use new macros from shlib-compat.h to define versions.
3423 * oldsemaphore.c: Likewise.
3424 * semaphore.c: Likewise.
3425 * weaks.c: Likewise.
3427 * pthread.c: Update for new SHLIB_COMPAT definition.
3429 * manager.c (__pthread_manager): Unmask debug signal.
3431 * pthread.c (pthread_initialize): Test for address of __dso_handle
3432 being NULL, not value. Use __on_exit, not on_exit.
3433 Patch by Andreas Jaeger <aj@suse.de>.
3435 * pthread.c: Use new macros from shlib-compat.h to define versions.
3437 2000-03-19 Ulrich Drepper <drepper@redhat.com>
3439 * pthread.c (pthread_initialize): Instead of on_exit use
3440 __cxa_atexit if __dso_label is available to allow unloading the
3441 libpthread shared library.
3443 2000-03-16 Ulrich Drepper <drepper@redhat.com>
3445 * condvar.c: Make tests for ownership of mutex less strict.
3447 2000-03-14 Ulrich Drepper <drepper@redhat.com>
3449 * condvar.c (pthread_cond_wait): Check whether mutex is owned by
3450 current thread and return error if not.
3451 (pthread_cond_timedwait_relative_old): Likewise.
3452 (pthread_cond_timedwait_relative_new): Likewise.
3454 * mutex.c (__pthread_once): Handle cancelled init function correctly.
3455 (pthread_once_cancelhandler): New function.
3456 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
3458 2000-03-14 Andreas Jaeger <aj@suse.de>
3460 * pthread.c (pthread_handle_sigcancel_rt): GS has been renamed to
3462 (pthread_handle_sigrestart_rt): Likewise.
3463 * signals.c (pthread_sighandler_rt): Likewise.
3465 2000-03-02 Andreas Jaeger <aj@suse.de>
3467 * sysdeps/pthread/bits/libc-lock.h: Fix typo.
3468 Reported by Sean Chen <sean.chen@turbolinux.com>.
3470 2000-02-28 Andreas Jaeger <aj@suse.de>
3472 * rwlock.c: Fix typo.
3474 2000-02-27 Ulrich Drepper <drepper@redhat.com>
3476 * rwlock.c: Define __* variants of the functions and make old names
3478 * Versions [GLIBC_2.2]: Export the __pthread_rwlock_* functions.
3479 * sysdeps/pthread/bits/libc-lock.h: Define __libc_rwlock_* macros.
3481 2000-02-25 Andreas Jaeger <aj@suse.de>
3483 * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
3484 pwrite64, lseek64, open64, and __open64 with version 2.2.
3486 2000-02-22 Ulrich Drepper <drepper@redhat.com>
3488 * semaphore.h (SEM_FAILED): Use 0 not NULL.
3490 2000-02-14 Ulrich Drepper <drepper@redhat.com>
3492 * condvar.c (pthread_cond_timedwait_relative_old): Tight loop with
3493 nanosleep does not work either. Get absolute time inside the
3495 (pthread_cond_timedwait_relative_new): Likewise.
3496 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
3498 2000-02-13 Andreas Jaeger <aj@suse.de>
3500 * condvar.c (pthread_cond_timedwait_relative_new): Fix last patch.
3501 (pthread_cond_timedwait_relative_old): Likewise.
3503 2000-02-13 Ulrich Drepper <drepper@redhat.com>
3505 * condvar.c (pthread_cond_timedwait_relative_old): Undo last patch
3506 but keep the code around. A bug in the kernel prevent us from
3508 (pthread_cond_timedwait_relative_new): Likewise.
3509 (PR libc/1597 and libc/1598).
3511 2000-02-01 Kaz Kylheku <kaz@ashi.footprints.net>
3513 * condvar.c (pthread_cond_timedwait_relative_old): Do tight
3514 loop around nanosleep calls instead of around most of the function
3515 (pthread_cond_timedwait_relative_new): Likewise.
3516 body. Got rid of backwards goto and one local.
3518 2000-01-31 Ulrich Drepper <drepper@redhat.com>
3520 * condvar.c (pthread_cond_timedwait_relative_old): Recompute time
3521 before every nanosleep call to account for time spent in the rest
3523 (pthread_cond_timedwait_relative_new): Likewise.
3524 Patch by khendricks@ivey.uwo.ca (PR libc/1564).
3526 2000-01-29 Ulrich Drepper <drepper@redhat.com>
3528 * condvar.c (pthread_cond_timedwait_relative_old): Get remaining time
3529 from nanosleep call so that in case we restart we only wait for the
3531 (pthread_cond_timedwait_relative_new): Likewise.
3532 Patch by khendricks@ivey.uwo.ca (PR libc/1561).
3534 2000-01-18 Ulrich Drepper <drepper@cygnus.com>
3536 * manager.c (pthread_allocate_stack): Compute guard page address
3537 correctly. Patch by HJ Lu.
3539 * sysdeps/pthread/pthread.h: Define
3540 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP.
3542 2000-01-16 Ulrich Drepper <drepper@cygnus.com>
3544 * rwlock.c (pthread_rwlock_unlock): Correct one more problem with
3545 preference handling.
3546 (pthread_rwlockattr_setkind_np): Allow
3547 PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP.
3548 Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
3550 2000-01-12 Ulrich Drepper <drepper@cygnus.com>
3552 * internals.h (pthread_readlock_info): New structure.
3553 (_pthread_descr_struct): Add p_readlock_list, p_readlock_free, and
3554 p_untracked_readlock_count.
3555 * pthread.c (__pthread_initial_thread, pthread_manager_thread):
3556 Add initializers for new fields.
3557 * manager.c (pthread_free): Free read/write lock lists.
3558 * queue.h (queue_is_empty): New function.
3559 * rwlock.c: Implement requirements about when readers should get
3561 * sysdeps/pthread/pthread.h
3562 (PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP): New definition.
3563 * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_rwlock_t):
3564 Define this name as well.
3565 Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
3567 2000-01-05 Ulrich Drepper <drepper@cygnus.com>
3569 * pthread.c (__pthread_initial_thread, pthread_manager_thread):
3570 Adjust initializers for struct _pthread_descr_struct change.
3571 * internals.h (struct _pthread_descr_struct): Move new elements to
3574 2000-01-03 Kaz Kylheku <kaz@ashi.footprints.net>
3576 Redesigned how cancellation unblocks a thread from internal
3577 cancellation points (sem_wait, pthread_join,
3578 pthread_cond_{wait,timedwait}).
3579 Cancellation won't eat a signal in any of these functions
3580 (*required* by POSIX and Single Unix Spec!).
3581 * condvar.c: Spontaneous wakeup on pthread_cond_timedwait won't eat a
3582 simultaneous condition variable signal (not required by POSIX
3583 or Single Unix Spec, but nice).
3584 * spinlock.c: __pthread_lock queues back any received restarts
3585 that don't belong to it instead of assuming ownership of lock
3586 upon any restart; fastlock can no longer be acquired by two threads
3588 * restart.h: Restarts queue even on kernels that don't have
3589 queued real time signals (2.0, early 2.1), thanks to atomic counter,
3590 avoiding a rare race condition in pthread_cond_timedwait.
3592 1999-12-31 Andreas Jaeger <aj@suse.de>
3594 * internals.h: Remove duplicate prototype declarations.
3596 * weaks.c: Remove __THROW from prototypes since the file is not
3597 compiled by a C++ compiler.
3598 * internals.h: Likewise.
3600 1999-12-30 Andreas Jaeger <aj@suse.de>
3602 * sysdeps/pthread/pthread.h: Move internal functions to...
3603 * sysdeps/pthread/bits/libc-lock.h: ...here.
3605 1999-12-29 Andreas Jaeger <aj@suse.de>
3607 * sysdeps/pthread/pthread.h: Fix typos, reformat comments.
3609 1999-12-28 Ulrich Drepper <drepper@cygnus.com>
3611 * sysdeps/alpha/pt-machine.h: Move stack_pointer definition to the
3614 * manager.c (__pthread_start): Add one more cast to prevent
3615 warning on 64bit machines.
3617 1999-12-21 Ulrich Drepper <drepper@cygnus.com>
3619 * manager.c (pthread_handle_create): Set p_pid of new thread
3620 before calling the callback function to report a new thread.
3622 1999-12-20 Andreas Jaeger <aj@suse.de>
3624 * pthread.c (pthread_initialize): Move getrlimit call after
3627 1999-12-18 Ulrich Drepper <drepper@cygnus.com>
3629 * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
3630 pwrite64, lseek64, open64, and __open64.
3631 * wrapsyscall.c: Define pread, __pread64, pread64, pwrite, __pwrite64,
3632 pwrite64, lseek64, open64, and __open64.
3634 * manager.c (pthread_allocate_stack): Correct computation of
3635 new_thread_bottom. Correct handling of stack size and when the
3636 rlimit method to guard for stack growth is used.
3637 * pthread.c (pthread_initialize): Stack limit must be STACK_SIZE
3638 minus one pagesize (not two).
3640 1999-12-03 Andreas Jaeger <aj@suse.de>
3642 * Versions: Add __res_state with version GLIBC_2.2.
3644 * errno.c (__res_state): New function to return thread specific
3647 * pthread.c (pthread_initialize): Initialize p_resp.
3648 (__pthread_reset_main_thread): Also set p_resp.
3650 * manager.c (pthread_handle_create): Initialize p_resp.
3652 * internals.h: Add thread specific resolver state.
3653 Based on patches by Adam D. Bradley <artdodge@cs.bu.edu>.
3655 1999-12-01 Ulrich Drepper <drepper@cygnus.com>
3657 * sysdeps/i386/pt-machine.h: Move stack_pointer definition to the
3659 * sysdeps/i386/i686/pt-machine.h: Likewise.
3660 Patches by Alan Modra <alan@SPRI.Levels.UniSA.Edu.Au>.
3662 1999-11-23 Ulrich Drepper <drepper@cygnus.com>
3664 * manager.c (pthread_start_thread_event): Initialize p_pid already
3667 1999-11-22 Ulrich Drepper <drepper@cygnus.com>
3669 * internals.h: Add prototype for __pthread_manager_event.
3670 * manager.c (__pthread_manager_event): New function.
3671 (pthread_start_thread_event): Correct computation of self.
3672 Use INIT_THREAD_SELF.
3673 * pthread.c (__pthread_manager_thread): Initialize p_lock.
3674 (__pthread_initialize_manager): Respect event flags also for creation
3675 of the manager thread.
3677 1999-11-08 Ulrich Drepper <drepper@cygnus.com>
3679 * pthread.c (__pthread_initialize_manager): Initialize
3680 __pthread_manager_thread.p_tid.
3682 1999-11-02 Ulrich Drepper <drepper@cygnus.com>
3684 * internals.h: Declare __pthread_last_event.
3685 * manager.c: Define __pthread_last_event.
3686 (pthread_handle_create): Set __pthread_last_event.
3687 (pthread_exited): Likewise.
3688 * join.c (pthread_exit): Likewise.
3690 * Makefile (libpthread-routines): Add events.
3691 * events.c: New file.
3692 * internals.h: Protect against multiple inclusion.
3693 Include thread_dbP.h header.
3694 (struct _pthread_descr_struct): Add new fields p_report_events and
3696 Declare event reporting functions.
3697 * join.c (pthread_exit): Signal event if this is wanted.
3698 * manager.c (__pthread_threads_events): New variable.
3699 (pthread_handle_create): Take new parameters with event information.
3700 Signal TD_CREATE event if wanted.
3701 (__pthread_manager): Adjust pthread_handle_create call.
3702 (pthread_start_thread_event): New function. Block until manager is
3703 finished and then call pthread_start_thread.
3704 (pthread_exited): Signal TD_REAP event if wanted.
3706 1999-10-26 Ulrich Drepper <drepper@cygnus.com>
3708 * restart.h (suspend_with_cancellation): Rewrite as a macro.
3710 * condvar.c (pthread_cond_timedwait_relative): Don't mark as inline.
3712 1999-10-25 Andreas Jaeger <aj@suse.de>
3714 * internals.h: Remove K&R compatibility.
3715 * no-tsd.c: Likewise.
3716 * semaphore.h: Likewise.
3717 * signals.c: Likewise.
3718 * sysdeps/pthread/bits/libc-tsd.h: Likewise.
3719 * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
3720 * weaks.c: Likewise.
3722 1999-10-21 Xavier Leroy <Xavier.Leroy@inria.fr>
3724 * pthread.c: For i386, wrap pthread_handle_sigrestart and
3725 pthread_handle_sigcancel with functions that restore %gs from the
3726 signal context. For each signal handling function, two wrappers
3727 are required, one for a non-RT signal and one for a RT signal.
3728 * signal.c: For i386, add code to restore %gs from the signal
3729 context in pthread_sighandler and pthread_sighandler_rt.
3731 1999-10-17 Ulrich Drepper <drepper@cygnus.com>
3733 * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add cast.
3735 1999-10-14 Ulrich Drepper <drepper@cygnus.com>
3737 * pthread.c (__pthread_initial_thread): Pass argument to
3738 PTHREAD_START_ARGS_INITIALIZER.
3739 (__pthread_manager_thread): Likewise.
3741 * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add parameter to
3742 initialize function.
3744 * manager.c (pthread_handle_create): Remove p_startfct initialization.
3746 * internals.h (_pthread_descr_struct): We don't need p_startfct field.
3748 1999-10-12 Ulrich Drepper <drepper@cygnus.com>
3750 * internals.h: Correct return types for __libc_read and __libc_write.
3752 1999-10-09 Andreas Jaeger <aj@suse.de>
3754 * internals.h: Add __new_sem_post to get prototype in
3755 manager.c; include semaphore.h for needed types.
3757 1999-10-08 Ulrich Drepper <drepper@cygnus.com>
3759 * manager.c (__pthread_manager) [REQ_POST]: Use __new_sem_post
3760 directly instead of calling sem_post which should not be necessary
3761 but is faster and might help in some case to work around problems.
3762 Patch by khendricks@ivey.uwo.ca [libc/1382].
3764 1999-10-08 Andreas Schwab <schwab@suse.de>
3766 * sysdeps/pthread/Subdirs: New file.
3769 1999-10-07 Ulrich Drepper <drepper@cygnus.com>
3771 * Implies: New file.
3772 * internals.h (struct _pthread_descr_struct): Add p_startfct.
3773 * manager.c (pthread_handle_create): Initialize p_startfct.
3774 * pthread.c: Define __linuxthread_pthread_sizeof_descr variable.
3776 1999-09-25 Ulrich Drepper <drepper@cygnus.com>
3778 * manager.c (__linuxthreads_pthread_threads_max): New variable.
3779 * specific.c (__linuxthreads_pthread_keys_max): New variable.
3780 (__linuxthreads_pthread_key_2ndlevel_size): New variable.
3782 * condvar.c (pthread_cond_timedwait_relative): Never return with
3783 EINTR. Patch by Andreas Schwab.
3785 1999-09-19 Ulrich Drepper <drepper@cygnus.com>
3787 * signals.c (sigaction): Correct last patch. Don't select
3788 pthread_sighandler_rt based on the signal number but instead of
3789 the SA_SIGINFO flag.
3791 1999-09-23 Ulrich Drepper <drepper@cygnus.com>
3793 * specific.c: Move definitions of struct pthread_key_struct and
3794 destr_function to ...
3795 * internals.h: ...here.
3797 1999-09-18 Ulrich Drepper <drepper@cygnus.com>
3799 * pthread.c (pthread_handle_sigrestart_rt): New function. Use
3800 this instead of pthread_handle_sigrestart if the signal is an RT
3803 * signals.c: Handle passing through of sighandler arguments also
3804 for real-time signals.
3806 1999-09-03 Andreas Schwab <schwab@suse.de>
3808 * ptfork.c (__fork): Renamed from fork and use __libc_fork. Add
3810 (__vfork): New function, alias vfork.
3811 * Versions: Export __fork, vfork, and __vfork in libpthread.
3813 1999-08-23 Andreas Schwab <schwab@suse.de>
3815 * signals.c (pthread_sighandler): Add SIGCONTEXT_EXTRA_ARGS to
3816 call to signal handler.
3818 1999-08-20 Ulrich Drepper <drepper@cygnus.com>
3820 * pthread.c (__pthread_reset_main_thread): Undo last change.
3821 (__pthread_kill_other_threads_np): Reset signal handlers for the
3822 signals we used in the thread implementation here.
3824 1999-08-19 Ulrich Drepper <drepper@cygnus.com>
3826 * pthread.c (__pthread_reset_main_thread): Reset signal handlers
3827 for the signals we used in the thread implementation [PR libc/1234].
3829 * Versions: Export __pthread_kill_other_threads_np from libpthread
3832 * signals.c: Pass sigcontext through wrapper to the user function.
3834 1999-08-01 Ulrich Drepper <drepper@cygnus.com>
3836 * Versions [ld.so] (GLIBC_2.0): Export __libc_internal_tsd_get and
3837 __libc_internal_tsd_set.
3839 1999-07-29 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3841 * manager.c: Remove inclusion of <linux/tasks.h> since it's not
3844 1999-07-16 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3846 * internals.h: Align _pthread_descr_struct to 32 bytes.
3847 Reported by Tim Hockin <thockin@cobaltnet.com>, close PR
3850 1999-07-09 Ulrich Drepper <drepper@cygnus.com>
3852 * oldsemaphore.c (sem_compare_and_swap): Fix use of compare and
3855 1999-07-09 Cristian Gafton <gafton@redhat.com>
3857 * Makefile (libpthread-routines): Add oldsemaphore routine.
3858 * Versions: Add sem_destroy, sem_getvalue, sem_init, sem_post,
3859 sem_trywait, and sem_wait to GLIBC_2.1.
3860 * oldsemaphore.c: New file.
3861 * semaphore.c: Add default_symbol_versions for the changed functions.
3862 (__new_sem_init): Rename from sem_init.
3863 (__new_sem_post): Rename from sem_post.
3864 (__new_sem_wait): Rename from sem_wait.
3865 (__new_sem_trywait): Rename from sem_trywait.
3866 (__new_sem_getvalue): Rename from sem_getvalue.
3867 (__new_sem_destroy): Rename from sem_destroy.
3869 1999-06-23 Robey Pointer <robey@netscape.com>
3871 * internals.h: Added p_nextlock entry to separate queueing for a
3872 lock from queueing for a CV (sometimes a thread queues on a lock
3873 to serialize removing itself from a CV queue).
3874 * pthread.c: Added p_nextlock to initializers.
3875 * spinlock.c: Changed to use p_nextlock instead of p_nextwaiting.
3877 1999-07-09 Ulrich Drepper <drepper@cygnus.com>
3879 * manager.c (pthread_handle_create): Free mmap region after stack
3880 if clone failed. Patch by Kaz Kylheku <kaz@ashi.FootPrints.net>.
3882 1999-05-23 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3884 * man/pthread_cond_init.man: Correct example.
3885 Reported by Tomas Berndtsson <tomas@nocrew.org>.
3887 * linuxthreads.texi (Condition Variables): Likewise.
3889 1999-05-18 Jakub Jelinek <jj@ultra.linux.cz>
3891 * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): Use
3892 casx not cas, also successful casx returns the old value in rd
3893 and not the new value.
3895 1999-05-16 Xavier Leroy <Xavier.Leroy@inria.fr>
3897 * manager.c: If pthread_create() is given a NULL attribute
3898 and the thread manager runs with a realtime policy, set the
3899 scheduling policy of the newly created thread back to SCHED_OTHER.
3900 * manager.c: If the PTHREAD_INHERIT_SCHED attribute is given,
3901 initialize the schedpolicy field of new_thread->p_start_args
3902 to that of the calling thread.
3904 1999-04-29 Ulrich Drepper <drepper@cygnus.com>
3906 * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): cas
3907 instruction does not allow memory element to use offset.
3909 1999-04-28 Ulrich Drepper <drepper@cygnus.com>
3911 * manager.c (pthread_allocate_stack): Optimize initialization of new
3914 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_define_initialized):
3915 Don't use initializer since it is all zeroes.
3916 (__libc_once_define): Likewise.
3918 1999-04-16 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3920 * sysdeps/arm/Implies: Removed since cmpxchg/no-cmpxchg
3921 doesn't exist anymore.
3922 * sysdeps/i386/Implies: Likewise.
3923 * sysdeps/m68k/Implies: Likewise.
3924 * sysdeps/mips/Implies: Likewise.
3925 * sysdeps/powerpc/Implies: Likewise.
3926 * sysdeps/sparc/sparc32/Implies: Likewise.
3927 * sysdeps/sparc/sparc64/Implies: Likewise.
3929 1999-04-15 Ulrich Drepper <drepper@cygnus.com>
3931 * sysdeps/alpha/bits/semaphore.h: Removed.
3932 * sysdeps/powerpc/bits/semaphore.h: Removed.
3933 * sysdeps/pthread/cmpxchg/bits/semaphore.h: Removed.
3934 * sysdeps/pthread/no-cmpxchg/bits/semaphore.h: Removed.
3935 * Makefile (headers): Remove bits/semaphore.h.
3937 * semaphore.h: Define _pthread_descr if necessary.
3938 Don't include limits.h. Define SEM_VALUE_MAX directly.
3940 (sem_t): Protect element names with leading __.
3941 Add declarations for sem_close, sem_open, and sem_unlink.
3942 * semaphore.c: Adjust all functions for new element names.
3943 Define sem_close, sem_open, and sem_unlink.
3944 * Versions (libthread): Add sem_close, sem_open, and sem_unlink for
3946 * sysdeps/pthread/bits/pthreadtypes.h: Define _pthread_descr only if
3949 1999-03-16 H.J. Lu <hjl@gnu.org>
3951 * specific.c (pthread_key_delete): Check th->p_terminated to see
3952 if the thread is running.
3954 * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set):
3955 Added to GLIBC_2.0 for libc.so.
3957 1999-02-12 H.J. Lu <hjl@gnu.org>
3959 * Versions (__libc_current_sigrtmin, __libc_current_sigrtmax,
3960 __libc_allocate_rtsig): Added to GLIBC_2.1.
3962 * internals.h (DEFAULT_SIG_RESTART): Removed.
3963 (DEFAULT_SIG_CANCEL): Removed.
3965 * pthread.c (init_rtsigs, __libc_current_sigrtmin,
3966 __libc_current_sigrtmax, __libc_allocate_rtsig): New functions.
3967 (__pthread_sig_restart, __pthread_sig_cancel,
3968 __pthread_sig_debug): Initialized.
3969 (pthread_initialize): Call init_rtsigs () to initialize
3972 1999-02-03 H.J. Lu <hjl@gnu.org>
3974 * manager.c (__pthread_manager): Do block __pthread_sig_debug.
3975 Don't restart the thread which sent REQ_DEBUG.
3976 (pthread_start_thread): Check if __pthread_sig_debug > 0
3979 * pthread.c (__pthread_initialize_manager): Suspend ourself
3980 after sending __pthread_sig_debug to gdb instead of
3981 __pthread_sig_cancel.
3983 1999-01-24 H.J. Lu <hjl@gnu.org>
3985 * manager.c (__pthread_manager): Delete __pthread_sig_debug
3986 from mask if __pthread_sig_debug > 0.
3987 (pthread_handle_create): Increment __pthread_handles_num.
3989 * manager.c (pthread_handle_create): Don't pass CLONE_PTRACE to clone.
3990 * pthread.c (__pthread_initialize_manager): Likewise.
3992 * pthread.c (pthread_initialize): Use __libc_allocate_rtsig (1)
3993 instead of __libc_allocate_rtsig (2).
3994 (__pthread_initialize_manager): Send __pthread_sig_debug to gdb
3995 instead of __pthread_sig_cancel.
3996 (pthread_handle_sigdebug): Fix comments.
3998 1999-01-21 Ulrich Drepper <drepper@cygnus.com>
4000 * manager.c (pthread_allocate_stack): Set
4001 __pthread_nonstandard_stacks if user-specified stack is used.
4003 1999-01-16 Ulrich Drepper <drepper@cygnus.com>
4005 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _LFS_ASYNCHRONOUS_IO,
4006 _LFS_LARGEFILE, _LFS64_LARGEFILE, and _LFS64_STDIO from Unix98.
4008 1999-01-07 Xavier Leroy <Xavier.Leroy@inria.fr>
4010 * pthread.c: Use a third signal __pthread_sig_debug distinct
4011 from __pthread_sig_cancel to notify gdb when a thread is
4013 * manager.c: Likewise.
4014 * internals.h: Likewise.
4015 * signals.c: The implementation of sigwait(s) assumed that
4016 all signals in s have signal handlers already attached.
4017 This is not required by the standard, so make it work
4018 also if some of the signals have no handlers.
4020 1999-01-05 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
4022 * linuxthreads.texi: Remove pointers from first @node. Move old
4023 @node spec inside comment.
4025 1998-12-31 Ulrich Drepper <drepper@cygnus.com>
4027 * sysdeps/pthread/bits/stdio-lock.h: Define _IO_lock_lock and
4030 1998-12-29 Ulrich Drepper <drepper@cygnus.com>
4032 * semaphore.c (sem_trywait): Don't forget to unlock the semaphore
4033 lock. Patch by Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>.
4035 1998-12-21 Ulrich Drepper <drepper@cygnus.com>
4037 * manager.c: Threads now send __pthread_sig_cancel on termination.
4038 Change clone call and signal masks.
4039 * thread.c (pthread_handle_sigrestart): Remove special code for
4041 (pthread_handle_sigcancel): In manager thread call
4042 __pthread_manager_sighandler.
4043 * sysdeps/i386/pt-machine.h (__compare_and_swap): Add memory clobber.
4044 * sysdeps/i386/i686/pt-machine.h: Likewise.
4045 Patches by Xavier Leroy.
4047 1998-12-14 Ulrich Drepper <drepper@cygnus.com>
4049 * spinlock.c (__pthread_unlock): Don't crash if called for an
4050 untaken mutex. Reported by Ruslan V. Brushkoff <rus@Snif.Te.Net.UA>.
4052 * Examples/ex6.c: Unbuffer stdout and reduce sleep time to reduce
4055 1998-12-13 Ulrich Drepper <drepper@cygnus.com>
4057 * Examples/ex3.c: Wait until all threads are started before
4058 searching for the number to avoid race condition on very fast
4061 1998-12-08 Andreas Jaeger <aj@arthur.rhein-neckar.de>
4063 * sysdeps/pthread/pthread.h: Remove __pthread_setcanceltype
4064 declaration since it's not needed.
4066 * sysdeps/pthread/pthread.h: Move internal functions to ...
4067 * internals.h: ...here.
4069 1998-12-02 H.J. Lu <hjl@gnu.org>
4071 * pthread.c (__pthread_sig_restart): Initiliaze to 0 if
4072 SIGRTMIN is defined.
4073 (__pthread_sig_cancel): Likewise.
4075 1998-12-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
4077 * wrapsyscall.c: Include <sys/mman.h> for msync,
4078 <stdlib.h> for system and <termios.h> for tcdrain prototype.
4079 Correct msync declaration.
4081 1998-11-29 Roland McGrath <roland@baalperazim.frob.com>
4083 * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_define, __libc_tsd_get,
4084 __libc_tsd_set): New macros for new interface.
4085 * no-tsd.c: New file, provide uninitialized defns of
4086 __libc_internal_tsd_get and __libc_internal_tsd_set.
4087 * Makefile (routines): Add no-tsd.
4089 1998-10-12 Roland McGrath <roland@baalperazim.frob.com>
4091 * internals.h: Include <bits/libc-tsd.h>, not <bits/libc-lock.h>.
4092 * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
4093 __libc_internal_tsd_set): Move decls to ...
4094 * sysdeps/pthread/bits/libc-tsd.h: New file for __libc_internal_tsd_*
4097 * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
4098 __libc_internal_tsd_set): Make these pointers to functions, not
4099 functions; remove #pragma weak decls for them.
4100 * specific.c (__libc_internal_tsd_get, __libc_internal_tsd_set):
4101 Define static functions and initialized pointers to them.
4103 1998-11-18 Ulrich Drepper <drepper@cygnus.com>
4105 * Makefile (CFLAGS-mutex.c): Define as -D__NO_WEAK_PTHREAD_ALIASES.
4106 (CFLAGS-specific.c): Likewise.
4107 (CFLAGS-pthread.c): Likewise.
4108 (CFLAGS-ptfork.c): Likewise.
4109 (CFLAGS-cancel.c): Likewise.
4110 * sysdeps/pthread/bits/libc-lock.h: Don't mark __pthread_* functions
4111 as weak references if __NO_WEAK_PTHREAD_ALIASES is defined.
4113 * mutex.c (pthread_mutex_init): Define as strong symbol.
4114 (pthread_mutex_destroy): Likewise.
4115 (pthread_mutex_trylock): Likewise.
4116 (pthread_mutex_lock): Likewise.
4117 (pthread_mutex_unlock): Likewise.
4118 (pthread_mutexattr_init): Likewise.
4119 (pthread_mutexattr_destroy): Likewise.
4120 (pthread_once): Likewise.
4121 * ptfork.c (pthread_atfork): Likewise.
4122 * specific.c (pthread_key_create): Likewise.
4123 (pthread_setspecific): Likewise.
4124 (pthread_getspecific): Likewise.
4126 1998-11-15 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
4128 * linuxthreads.texi: Fix punctuation after xref.
4130 1998-11-10 H.J. Lu <hjl@gnu.org>
4132 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine NR_OPEN
4133 if it is defined in <linux/limits.h>.
4135 1998-10-29 14:28 Ulrich Drepper <drepper@cygnus.com>
4137 * spinlock.h (__pthread_trylock): Define inline.
4138 (__pthread_lock): Add extra parameter to declaration. Declare
4139 using internal_function.
4140 (__pthread_unlock): Declare using internal_function.
4141 * spinlock.c (__pthread_lock): Add new parameter. Use it instead
4142 of local variable self. Avoid recomputing self. Define using
4144 (__pthread_trylock): Remove.
4145 (__pthread_unlock): Define using internal_function.
4146 * cancel.c: Adjust for __pthread_lock interface change. Use already
4147 computed self value is possible.
4148 * condvar.c: Likewise.
4150 * manager.c: Likewise.
4151 * mutex.c: Likewise.
4152 * pthread.c: Likewise.
4153 * rwlock.c: Likewise.
4154 * semaphore.c: Likewise.
4155 * signals.c: Likewise.
4157 1998-10-27 13:46 Ulrich Drepper <drepper@cygnus.com>
4159 * sysdeps/pthread/pthread.h (struct _pthread_cleanup_buffer): Prepend
4160 __ to field names of the struct.
4161 * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_fastlock):
4163 (pthread_attr_t): Likewise.
4164 (pthread_cond_t): Likewise.
4165 (pthread_condattr_t): Likewise.
4166 (pthread_mutex_t): Likewise.
4167 (pthread_mutexattr_t): Likewise.
4168 (pthread_rwlock_t): Likewise.
4169 (pthread_rwlockattr_t): Likewise.
4170 * attr.c: Adjust for pthread.h and pthreadtypes.h change.
4171 * cancel.c: Likewise.
4172 * condvar.c: Likewise.
4173 * manager.c: Likewise.
4174 * mutex.c: Likewise.
4175 * pthread.c: Likewise.
4176 * ptlongjmp.c: Likewise.
4177 * rwlock.c: Likewise.
4178 * spinlock.c: Likewise.
4180 1998-10-09 Ulrich Drepper <drepper@cygnus.com>
4182 * sysdeps/i386/pt-machine.h (get_eflags, set_eflags): Mark these
4185 * sysdeps/i386/i686/pt-machine.h: Remove unused inline
4188 * Makefile (libpthread-routines): Add pt-machine.
4189 * pt-machine.c: New file.
4190 * sysdeps/alpha/pt-machine.h: Define PT_EI as extern inline is not
4191 yet defined. Use PT_EI in extern inline definitions.
4192 * sysdeps/arm/pt-machine.h: Likewise.
4193 * sysdeps/i386/pt-machine.h: Likewise.
4194 * sysdeps/i386/i686/pt-machine.h: Likewise.
4195 * sysdeps/m68k/pt-machine.h: Likewise.
4196 * sysdeps/mips/pt-machine.h: Likewise.
4197 * sysdeps/powerpc/pt-machine.h: Likewise.
4198 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
4199 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
4201 1998-10-02 Andreas Jaeger <aj@arthur.rhein-neckar.de>
4203 * semaphore.h: Include <sys/types.h> so that _pthread_descr
4206 1998-09-15 David S. Miller <davem@pierdol.cobaltmicro.com>
4208 * sysdeps/sparc/sparc32/pt-machine.h (INIT_THREAD_SELF): Add nr
4210 * sysdeps/sparc/sparc64/pt-machine.h (INIT_THREAD_SELF): Likewise.
4212 1998-09-12 14:24 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
4214 * sysdeps/unix/sysv/linux/bits/sigthread.h: Add multiple inclusion
4217 1998-09-02 11:08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
4219 * signals.c (sigaction): Check that sig is less than NSIG to avoid
4220 array index overflow.
4222 1998-09-06 10:56 Ulrich Drepper <drepper@cygnus.com>
4224 * sysdeps/pthread/semaphore.h: New file.
4226 1998-09-06 09:08 Ulrich Drepper <drepper@cygnus.com>
4228 * sysdeps/pthread/bits/libc-lock.h (enum __libc_tsd_key_t): Add
4229 _LIBC_TSD_KEY_DL_ERROR.
4231 1998-08-31 Ulrich Drepper <drepper@cygnus.com>
4233 * sysdeps/i386/i686/pt-machine.h (testandset): Add memory clobber.
4234 * sysdeps/i386/pt-machine.h: Likewise.
4235 Suggested by Roland McGrath.
4237 1998-08-28 13:58 Ulrich Drepper <drepper@cygnus.com>
4239 * internals.h: Also define THREAD_GETMEM_NC and THREAD_SETMEM_NC to
4240 access thread data with non-constant offsets.
4241 * specific.c: Use THREAD_GETMEM_NC and THREAD_SETMEM_NC where
4244 * sysdeps/i386/useldt.h: Fix typo. Add THREAD_GETMEM_NC and
4245 THREAD_SETMEM_NC definitions.
4247 * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM_NC and
4249 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
4251 1998-08-26 15:46 Ulrich Drepper <drepper@cygnus.com>
4253 * internals.h: Define THREAD_GETMEM and THREAD_SETMEM to default if
4254 not already defined.
4255 (struct _pthread_descr_struct): Add p_self and p_nr field.
4256 * manager.c (__pthread_handles): Define second element to point
4258 (__pthread_handles_num): Initialize to 2.
4259 (__pthread_manager): Use INIT_THREAD_SELF with two arguments.
4260 (pthread_start_thread): Likewise.
4261 (pthread_handle_create): Start search for free slot at entry 2.
4262 Initialize new fields p_self and p_nr.
4263 Call __clone with CLONE_PTRACE if available.
4264 (pthread_free): Call FREE_THREAD_SELF if available.
4265 * pthread.c (__pthread_initial_thread): Initialize new fields.
4266 (__pthread_manager_thread): Likewise.
4267 (__pthread_initialize_manager): Call __clone with CLONE_PTRACE.
4269 * cancel.c: Use THREAD_GETMEM and THREAD_SETMEM to access the
4270 elements of the thread descriptor.
4271 * condvar.c: Likewise.
4272 * errno.c: Likewise.
4274 * manager.c: Likewise.
4275 * pthread.c: Likewise.
4276 * ptlongjmp.c: Likewise.
4277 * semaphore.c: Likewise.
4278 * signals.c: Likewise.
4279 * specific.c: Likewise.
4280 * spinlock.c: Likewise.
4282 * sysdeps/alpha/pt-machine.h (INIT_THREAD_SELF): Add extra parameter.
4284 * sysdeps/i386/useldt.h: New file.
4285 * sysdeps/i386/i686/pt-machine.h: Show how to use this file.
4287 * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM and
4288 THREAD_SETMEM using __thread_self.
4289 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
4291 1998-08-24 Geoff Keating <geoffk@ozemail.com.au>
4293 * spinlock.c (__pthread_lock): Reset p_nextwaiting to NULL if it
4294 turned out that we didn't need to queue after all.
4296 1998-08-22 Geoff Keating <geoffk@ozemail.com.au>
4298 * sysdeps/powerpc/pt-machine.h: Remove testandset, it's not used
4299 and wastes space; correct types.
4301 1998-08-08 11:18 H.J. Lu <hjl@gnu.org>
4303 * signals.c (sigaction): Handle NULL argument.
4305 1998-08-04 Ulrich Drepper <drepper@cygnus.com>
4307 * sysdeps/unix/sysv/linux/bits/sigthread.h: Use __sigset_t instead
4310 1998-08-02 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
4312 * Makefile (linuxthreads-version): Extract correct number from
4315 1998-07-29 Xavier Leroy <Xavier.Leroy@inria.fr>
4317 * Banner: Bump version number to 0.8
4318 * FAQ.html: Many updates, in particular w.r.t. debugging.
4319 * manager.c: Support for non-default stacksize for
4320 LinuxThreads-allocated stacks;
4321 don't use guard pages for stacks with default size, rely on
4322 rlimit(RLIMIT_STACK) instead (it's cheaper).
4324 * cancel.c: Use __pthread_sig_cancel and __pthread_sig_restart
4325 everywhere instead of PTHREAD_SIG_CANCEL and PTHREAD_SIG_RESTART.
4326 * condvar.c: Likewise.
4327 * internals.h: Likewise.
4328 * restart.h: Likewise.
4329 * signals.c: Likewise.
4330 * pthread.c: Likewise; set rlimit(RLIMIT_STACK) as we need it.
4332 1998-07-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
4334 * weaks.c: Define pthread_mutexattr_[sg]ettype instead of
4335 __pthread_mutexattr_[sg]ettype. Add more weak aliases.
4336 * Versions: Put __pthread_mutexattr_settype under version
4337 GLIBC_2.0. Don't export __pthread_mutexattr_setkind_np and
4338 __pthread_mutexattr_gettype.
4340 1998-07-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
4342 * sysdeps/pthread/bits/libc-lock.h: Make
4343 __pthread_mutexattr_settype weak. Don't make
4344 __pthread_mutexattr_setkind_np weak.
4346 1998-07-16 10:52 Ulrich Drepper <drepper@cygnus.com>
4348 * manager.c (pthread_handle_create): Check whether sched_setscheduler
4349 call can succeed here.
4351 * mutex.c: Define __pthread_mutexattr_settype and make
4352 __pthread_mutexattr_setkind_np an alias.
4353 Likewise for __pthread_mutexattr_gettype.
4355 1998-07-15 11:00 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
4357 * attr.c (pthread_attr_setschedpolicy): Don't check whether caller
4360 1998-07-14 19:38 Ulrich Drepper <drepper@cygnus.com>
4362 * sysdeps/pthread/bits/libc-lock.h: Define __libc_cleanup_end.
4364 1998-07-11 Andreas Jaeger <aj@arthur.rhein-neckar.de>
4366 * Examples/ex6.c: Include <unistd.h> for usleep.
4368 1998-06-13 11:04 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
4370 * Examples/ex4.c (main): Use exit, not pthread_exit.
4372 1998-07-09 13:39 Ulrich Drepper <drepper@cygnus.com>
4374 * Versions: Add __pthread_mutexattr_gettype and
4375 __pthread_mutexattr_settype.
4376 * lockfile.c: Use __pthread_mutexattr_settype instead of
4377 __pthread_mutexattr_setkind_np.
4378 * mutex.c: Define __pthread_mutexattr_gettype and
4379 __pthread_mutexattr_settype.
4381 * sysdeps/pthread/pthread.h: Declare __pthread_mutexattr_gettype and
4382 __pthread_mutexattr_settype.
4383 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_init_recursive):
4384 Use __pthread_mutexattr_settype.
4386 1998-07-08 22:26 Ulrich Drepper <drepper@cygnus.com>
4388 * Versions: Add pthread_mutexattr_gettype, pthread_mutexattr_settype.
4389 * mutex.c: Define weak alias pthread_mutexattr_gettype and
4390 pthread_mutexattr_settype.
4391 * sysdeps/pthread/pthread.h: Declare these functions.
4392 Move pthread_sigmask and pthread_kill declaration in separate header.
4393 * sysdeps/unix/sysv/linux/bits/sigthread.h: New file.
4395 1998-07-07 15:20 Ulrich Drepper <drepper@cygnus.com>
4397 * Makefile: Add rules to compile and run tests.
4398 * Examples/ex1.c: Little changes to fix warnings.
4399 * Examples/ex2.c: Likewise.
4400 * Examples/ex3.c: Likewise.
4401 * Examples/ex4.c: Likewise.
4402 * Examples/ex5.c: Likewise.
4403 * Examples/ex6.c: New file.
4405 1998-07-05 11:54 Ulrich Drepper <drepper@cygnus.com>
4407 * Versions: Add pthread_attr_init to GLIBC_2.1 version in libc.
4409 1998-07-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
4411 * attr.c: Include <string.h>.
4413 1998-06-30 11:47 Ulrich Drepper <drepper@cygnus.com>
4415 * attr.c: Include errno.h. Use memcpy to copy sched_param.
4416 * internals.h: Include limits.h.
4417 * manager.c: Use memcpy to copy sched_param.
4418 * ptfork.c: Include errno.h.
4419 * pthread.c: Likewise.
4420 * semaphore.c: Likewise.
4421 * specific.c: Likewise.
4422 * spinlock.h: Likewise.
4423 * sysdeps/pthread/pthread.h: Include only allowed headers. Move
4424 type definition to ...
4425 * sysdeps/pthread/bits/pthreadtypes.h: ...here. New file.
4427 1998-06-29 12:34 Ulrich Drepper <drepper@cygnus.com>
4429 * sysdeps/pthread/pthread.h: Use __PMT not __P for function pointers.
4431 * sysdeps/pthread/pthread.h: Define various PTHREAD_* symbols also
4432 as macros as demanded in POSIX.1, Annex C.
4434 1998-06-29 12:29 Ulrich Drepper <drepper@cygnus.com>
4436 * internals.h (struct pthread_request): For free use pthread_t
4437 instead of pthread_descr.
4438 * join.c (pthread_join): Pass thread_id, not th to manager.
4439 (pthread_detach): Likewise.
4440 * manager.c (__pthread_manager): Except thread ID in FREE_REQ case.
4441 (pthread_exited): Remove detached queue code.
4442 (pthread_handle_free): Expect thread ID parameter and use it to
4443 validate the thread decsriptor. Don't use detached queue.
4444 Patches by Xavier Leroy.
4446 1998-06-27 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
4448 * libpthread.map: Export accept, longjmp, sigaction, siglongjmp,
4449 _IO_flockfile, _IO_ftrylockfile, _IO_funlockfile,
4450 __pthread_atfork, __pthread_key_create, __pthread_once.
4451 * internals.h: Doc fix.
4452 * pthread.c (__pthread_initialize): Define again.
4454 1998-06-26 Ulrich Drepper <drepper@cygnus.com>
4456 * manager.c (pthread_exited): If thread is not detached put it on
4458 (pthread_handle_free): If thread is not on list with living threads
4459 search on list with detached threads.
4461 * sysdeps/pthread/pthread.h (PTHREAD_RWLOCK_INITIALIZER): Correct
4462 for new definition of pthread_rwlock_t.
4464 * spinlock.c: Correct test whether to compile
4465 __pthread_compare_and_swap or not.
4467 1998-06-25 19:27 Ulrich Drepper <drepper@cygnus.com>
4469 * attr.c: Finish user stack support. Change locking code to be safe
4470 in situations with different priorities.
4471 * cancel.c: Likewise.
4472 * condvar.c: Likewise.
4473 * internals.h: Likewise.
4475 * manager.c: Likewise.
4476 * mutex.c: Likewise.
4477 * pthread.c: Likewise.
4478 * ptlongjmp.c: Likewise.
4479 * queue.h: Likewise.
4480 * rwlock.c: Likewise.
4481 * semaphore.c: Likewise.
4482 * semaphore.h: Likewise.
4483 * signals.c: Likewise.
4484 * spinlock.c: Likewise.
4485 * spinlock.h: Likewise.
4486 * sysdeps/pthread/pthread.h: Likewise.
4487 Patches by Xavier Leroy.
4489 * sysdeps/i386/i686/pt-machine.h: New file.
4491 1998-06-25 Ulrich Drepper <drepper@cygnus.com>
4493 * sysdeps/pthread/pthread.h: Make [sg]et_stacksize and
4494 [sg]et_stackaddr prototypes always available.
4496 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
4497 _POSIX_THREAD_ATTR_STACKSIZE and _POSIX_THREAD_ATTR_STACKADDR.
4499 1998-06-24 Ulrich Drepper <drepper@cygnus.com>
4501 * manager.c (pthread_free): Undo patch from 980430.
4502 Reported by David Wragg <dpw@doc.ic.ac.uk>.
4504 1998-06-09 15:07 Ulrich Drepper <drepper@cygnus.com>
4506 * manager.c: Define __pthread_manager_adjust_prio and use it to
4507 increase priority when needed.
4508 * internals.h: Add prototype for __pthread_manager_adjust_prio.
4509 * mutex.c: Optimize mutexes to wake up only one thread.
4510 * pthread.c: Move PID of manager for global variable in structure
4512 Patches by Xavier Leroy.
4514 1998-06-07 13:47 Ulrich Drepper <drepper@cygnus.com>
4516 * sysdeps/pthread/bits/libc-lock.h: Optimize cleanup handlers a bit.
4518 1998-06-03 Andreas Jaeger <aj@arthur.rhein-neckar.de>
4520 * attr.c: Correct typo.
4522 1998-05-01 Ulrich Drepper <drepper@cygnus.com>
4524 * manager.c (pthread_free): Unmap guard before the stack.
4525 Patch by Matthias Urlichs.
4527 1998-04-30 Ulrich Drepper <drepper@cygnus.com>
4529 * manager.c (pthread_free): Detect already free child.
4530 Patch by Xavier Leroy, reported by Matthias Urlichs.
4532 1998-04-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
4534 * Makefile (linuxthreads-version): Renamed back from
4537 1998-04-21 Ulrich Drepper <drepper@cygnus.com>
4539 * ptlongjmp.c: Add prototypes for __libc_siglongjmp and
4542 1998-04-20 14:55 Ulrich Drepper <drepper@cygnus.com>
4544 * Makefile (libpthread-routines): Add ptlongjmp and spinlock.
4545 * internals.h: Add definitions for new spinlock implementation.
4546 * ptlongjmp.c: New file.
4547 * spinlock.c: New file.
4548 * spinlock.h (acquire): Don't reschedule using __sched_yield, use
4549 new function __pthread_acquire to prevent deadlocks with thread
4550 with different priorities.
4551 Patches by Xavier Leroy <Xavier.Leroy@inria.fr>.
4553 1998-03-16 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
4555 * manager.c (__pthread_manager): Reduce first argument to select
4556 to include just the needed file descriptor.
4558 1998-03-17 00:06 Ulrich Drepper <drepper@cygnus.com>
4560 * manager.c: Fix last patch which caused core dumps.
4562 * pthread.c: Correctly handle missing SIGRTMIN.
4564 1998-03-15 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
4566 * libpthread.map: Add __libc_internal_tsd_get and
4567 __libc_internal_tsd_set. Add missing cancelable functions. Export
4568 libc internal versions of the cancelable functions.
4570 1998-03-13 16:51 Ulrich Drepper <drepper@cygnus.com>
4572 * weaks.c: Define pthread_attr_init as GLIBC_2.0 and GLIBC_2.1.
4574 1998-03-13 00:46 Ulrich Drepper <drepper@cygnus.com>
4576 * attr.c: Implement pthread_attr_[gs]etguardsize,
4577 pthread_attr_[gs]setstackaddr, pthread_attr_[gs]etstacksize.
4578 Change pthread_attr_init to have two interfaces.
4579 * internals.h (struct _pthread_descr_struct): Add new fields for
4581 * libpthread.map: Add names in GLIBC_2.1 section.
4582 * manager.c (pthread_handle_create): Implement guardsize and
4584 (pthread_free): Likewise.
4585 * pthread.c (pthread_create): Add new interface for changed
4587 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
4588 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add definition of
4591 1998-03-11 00:42 Wolfram Gloger <wmglo@dent.med.uni-muenchen.de>
4593 * manager.c: Enable resetting of the thread scheduling policy
4594 to SCHED_OTHER when the parent thread has a different one.
4596 1998-02-01 13:51 Ulrich Drepper <drepper@cygnus.com>
4598 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
4599 _POSIX_ASYNCHRONOUS_IO.
4601 * sysdeps/pthread/pthread.h: Define bits for Unix98 variants of
4603 * mutex.c: Implement new mutex types.
4605 * internals.h: Include <signal.h>.
4607 * libpthread.map: Add __erno_location and __h_errno_location.
4609 * errno.c: Return pointer to variable actually in use. This might
4610 not be the one in the thread structure.
4611 * internals.h (struct _pthread_descr_struct): Add new fields p_errnop
4613 * manager.c (__pthread_manager): Set p_errnop and p_h_errnop member
4614 of manager thread structure.
4615 (pthread_handle_create): Set p_errnop and p_h_errnop members for new
4617 * pthread.c: Adapt initializer for thread structures.
4618 (__pthread_initial_thread): Set p_errnop and p_h_errnop member.
4619 (__pthread_reset_main_thread): Reset p_errnop and p_h_errnop of
4620 current thread to global variables.
4622 1998-01-31 17:27 Ulrich Drepper <drepper@cygnus.com>
4624 * rwlock.c: New file.
4625 * Makefile (libpthread-routines): Add rwlock.
4626 * sysdeps/pthread/pthread.h: Define data structures and declare
4628 * libpthread.map: Add new functions.
4630 1997-12-18 13:50 Philip Blundell <pb@nexus.co.uk>
4632 * sysdeps/arm/pt-machine.h: New file; add ARM support.
4633 * sysdeps/arm/Implies: likewise.
4634 * README: Document it.
4636 1997-12-13 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
4638 * signals.c: Remove unneeded initializer for sigwaited, saving a
4641 1997-04-11 01:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
4643 * semaphore.c (sem_init): Set sem_spinlock only if available.
4645 1997-12-04 01:48 Ulrich Drepper <drepper@cygnus.com>
4647 * mutex.c: Implement PTHREAD_MUTEX_CHECKERROR.
4648 * sysdeps/pthread/pthread.h: Define PTHREAD_MUTEX_CHECKERROR.
4650 * Makefile: Update from LinuxThreads 0.7.
4651 * internals.h. Likewise.
4652 * manager.c: Likewise.
4653 * mutex.c: Likewise.
4654 * pthread.c: Likewise.
4655 * signals.c: Likewise.
4656 * specific.c: Likewise.
4657 * Examples/ex3.c: Likewise.
4659 1997-11-20 18:13 Ulrich Drepper <drepper@cygnus.com>
4661 * pthread.c (__pthread_reset_main_thread): Close pipe only if still
4664 1997-10-29 05:38 Ulrich Drepper <drepper@cygnus.com>
4666 * wrapsyscall.c: Add socket functions which are also cancelation
4669 1997-10-19 21:40 Wolfram Gloger <wg@wolfram.dent.med.uni-muenchen.de>
4671 * specific.c (__libc_internal_tsd_set, __libc_internal_tsd_get):
4672 New functions for fast thread specific data within libc.
4674 * internals.h: Add new array p_libc_specific to struct
4675 _pthread_descr_struct.
4677 * sysdeps/pthread/bits/libc-lock.h: Declare new functions.
4679 1997-10-13 05:39 Ulrich Drepper <drepper@cygnus.com>
4681 * semaphore.h: Add __BEGIN_DECLS/__END_DECLS.
4682 Reported by Ralf Corsepius <corsepiu@faw.uni-ulm.de>.
4684 1997-08-29 03:05 Ulrich Drepper <drepper@cygnus.com>
4686 * internals.h (struct _pthread_descr_struct): Add definitions for
4687 two-level specific key handling.
4688 * manager.c (pthread_handle_create): Initialize specific memory array.
4689 * specific.c: Implement two-level key handling.
4690 * weaks.c: Don't provide dummy key handling.
4691 * sysdeps/pthread/bits/libc-lock.h: Typedef __libc_lock_t (no #define).
4692 Add definition of __libc_key_t.
4693 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define PTHREAD_KEYS_MAX
4695 Add definition of _POSIX_THREAD_DESTRUCTOR_ITERATIONS and
4696 PTHREAD_DESTRUCTOR_ITERATIONS.
4698 * manager.c (pthread_handle_create): Compare mmap result with
4701 * ptfork.c: Rename to __pthread_atfork and make old name a weak alias.
4702 * sysdeps/pthread/bits/pthread.h: Add prototype for __pthread_atfork.
4704 1997-08-22 19:04 Richard Henderson <rth@cygnus.com>
4706 sysdeps/sparc -> sysdeps/sparc/sparc32
4707 sysdeps/sparc64 -> sysdeps/sparc/sparc64
4709 * internals.h: Change definition of THREAD_SELF to be an expression,
4710 not a statement that did a return.
4711 * sysdeps/alpha/pt-machine.h (THREAD_SELF): Update accordingly.
4712 * sysdeps/sparc/sparc32/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
4713 Follow Solaris and use a "system reserved" register (%g6) to hold
4714 the thread descriptor.
4715 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
4717 1997-08-03 00:09 Ulrich Drepper <drepper@cygnus.com>
4719 * mutex.c: Correct pthread_once. Patch by Xavier Leroy.
4720 * sysdeps/pthread/pthread.h: Add prototype for __pthread_once.
4721 * sysdeps/pthread/bits/pthread.h: Add macros for __libc_once.
4723 * semaphore.c: Include spinlock.h only when needed.
4725 * specific.c (__pthread_setsepcific, __pthread_getspecific): Reject
4726 keys for entries not in use.
4728 * weaks.c: Implement key handling functions for real.
4730 1997-06-29 01:04 Richard Henderson <richard@gnu.ai.mit.edu>
4732 Initial sparc64-linux support:
4733 * sysdeps/sparc64/Implies: New file.
4734 * sysdeps/sparc64/pt-machine.h: Likewise.
4736 1997-06-29 00:48 Ulrich Drepper <drepper@cygnus.com>
4738 * semaphore.c: Include spinlock.h at correct place.
4741 1997-06-13 10:06 Richard Henderson <rth@tamu.edu>
4743 The Great Bit File Move:
4744 * sysdeps/alpha/semaphorebits.h: -> .../bits/semaphore.h.
4745 * sysdeps/powerpc/semaphorebits.h: Likewise.
4746 * sysdeps/pthread/cmpxchg/semaphorebits.h: Likewise.
4747 * sysdeps/pthread/no-cmpxchg/semaphorebits.h: Likewise.
4748 * sysdeps/pthread/libc-lock.h: -> bits/
4749 * sysdeps/pthread/stdio-lock.h: Likewise.
4750 * sysdeps/unix/sysv/linux/local_lim.h: Likewise.
4751 * sysdeps/unix/sysv/linux/posix_opt.h: Likewise.
4752 * semaphore.h: Likewise.
4753 * sysdeps/pthread/pthread.h: Likewise.
4755 * lockfile.c: <foo.h> -> <bits/foo.h>.
4756 * semaphore.h: Likewise.
4758 * Makefile: (headers): foo.h -> bits/foo.h.
4759 * sysdeps/pthread/Makefile: Likewise.
4761 1997-04-11 01:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
4763 * semaphore.c (sem_init): Set sem_spinlock only if available.
4765 * sysdeps/m68k/pt-machine.h (testandset, __compare_and_swap): Fix
4768 1997-04-09 03:00 Ulrich Drepper <drepper@cygnus.com>
4770 Update from LinuxThreads 0.6.
4772 * attr.c (pthread_attr_getdetachstate): Use __sched_get_priority_max
4773 and __sched_get_priority_min instead of names without `__'.
4775 * manager.c: Rewrite large parts to implement opaque pthread_t.
4777 * cancel.c: Adapt for opaque pthread_t type.
4778 * condvar.c: Likewise.
4779 * errno.c: Likewise.
4781 * mutex.c: Likewise.
4782 * pthread.c: Likewise.
4783 * signals.c: Likewise.
4784 * specific.c: Likewise.
4785 * restart.h: Likewise.
4786 * queue.h: Likewise.
4787 * Examples/ex3.c: Likewise.
4788 * Examples/ex4.c: Likewise.
4789 * sysdeps/pthread/pthread.h: Likewise.
4791 * pthread.c: Accumulate time for all threads in thread manager.
4793 * semaphore.c: Implement fallback implementation for architectures
4794 sometimes missing compare-exchange operations.
4796 * cancel.c (pthread_cancel): Validate handle argument.
4797 * join.c (pthread_join): Likewise.
4798 (pthread_detach): Likewise.
4799 * signals.c (pthread_kill): Likewise.
4801 * spinlock.h (acquire): Use __sched_yield not sched_yield.
4803 * queue.h (enqueue): Enqueue thread according to priority.
4805 * internals.c (struct pthread_start_args): New struct for passing
4806 args to cloning function.
4807 (struct _pthread): Rename to _pthread_descr_struct and adapt for
4810 * Examples/Makefile (clean): Pass -f option to rm.
4812 * sysdeps/i386/pt-machine.h: Add check for compare-exchange instruction
4813 and define TEST_FOR_COMPARE_AND_SWAP.
4814 * sysdeps/i386/i486/pt-machine.h: Removed.
4816 * sysdeps/unix/sysv/linux/local_lim.h (PTHREAD_THREADS_MAX): Increase
4819 1997-04-04 16:38 Ulrich Drepper <drepper@cygnus.com>
4821 * restart.h (suspend): Clear p_signal before suspending.
4822 (suspend_with_cancellation): Likewise.
4823 Patch by Xavier Leroy <Xavier.Leroy@inria.fr>.
4825 * weaks.c: Make __pthread_key_create return 1.
4826 * sysdeps/pthread/libc-lock.h: Define __libc_key_create,
4827 __libc_getspecific, __libc_setspecific, and __libc_key_t.
4828 * sysdeps/pthread/stdio-lock.h: Don't care for implementation not
4831 1997-03-19 15:13 Miguel de Icaza <miguel@nuclecu.unam.mx>
4833 * sysdeps/sparc/pt-machine (RELEASE): Fix.
4835 1997-03-01 07:55 Geoff Keating <geoffk@ozemail.com.au>
4837 * sysdeps/powerpc/Implies: Added.
4838 * sysdeps/powerpc/pt-machine.h: Added.
4839 * sysdeps/powerpc/semaphorebits.h: Added.
4841 1997-01-22 01:22 Ulrich Drepper <drepper@cygnus.com>
4843 * pthread.c (__pthread_initial_thread): Correct
4845 (__pthread_manager_thread): Likewise.
4846 Reported by Andreas Jaeger.
4848 1997-01-18 22:15 Richard Henderson <rth@tamu.edu>
4850 Since sigset_t no longer fits in a register, we can't pass in the
4851 thread's initial mask so easily. Take this opportunity to simplify
4852 the clone implementation by only accepting a single void* argument.
4854 * manager.c (__pthread_manager): Put thread vitals in the thread
4855 struct instead of as arguments through clone.
4856 (pthread_start_thread): Look for them there.
4857 * internals.h (struct _pthread): Add p_initial_fn,
4858 p_initial_fn_arg, p_initial_mask. Fix __pthread_manager proto.
4859 * pthread.c (pthread_initialize_manager): Revise clone invocation.