1 2003-01-04 Jakub Jelinek <jakub@redhat.com>
3 * internals.h (LIBC_THREAD_GETMEM, LIBC_THREAD_SETMEM): Define
4 even if NOT_IN_libc is defined.
6 2003-01-05 Jakub Jelinek <jakub@redhat.com>
8 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
9 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
10 * sysdeps/s390/Makefile: New file.
11 * sysdeps/s390/tcb-offsets.sym: New file.
12 * sysdeps/s390/tls.h: New file.
14 2003-01-03 Richard Henderson <rth@redhat.com>
16 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
18 2003-01-03 Andreas Jaeger <aj@suse.de>
20 * sysdeps/pthread/bits/libc-tsd.h: Declare weak_extern functions.
22 2003-01-03 Jakub Jelinek <jakub@redhat.com>
24 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
26 2003-01-02 Ulrich Drepper <drepper@redhat.com>
28 * tst-cancel-wrappers.sh: Exclude sigwait.c as well, it does not have
31 2003-01-02 Jakub Jelinek <jakub@redhat.com>
33 * internals.h (struct pthread_functions): Rename
34 ptr_pthread_cond_* fields to ptr___pthread_cond_*.
35 * pthread.c (pthread_functions): Adjust.
36 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
37 pthread_cond_*@GLIBC_2.0 compatibility symbols.
38 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
39 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
40 and pthread_cond_wait.
42 * sysdeps/pthread/bits/pthreadtypes.h (__pthread_cond_align_t): New
44 (pthread_cond_t): Add __align member, shorten __padding.
45 * sysdeps/pthread/pthread.h (PHTREAD_COND_INITIALIZER): Initialize
46 __padding and __align too.
48 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call2): Add
50 * sysdeps/pthread/sigaction.c: New file.
51 * sysdeps/unix/sysv/linux/raise.c: New file.
52 * sysdeps/unix/sysv/linux/sigwait.c: New file.
53 * sysdeps/unix/sysv/linux/fork.c (__pthread_fork): Protect
54 weak_extern with #ifndef SHARED.
55 * sysdeps/unix/sysv/linux/jmp-unwind.c (__pthread_cleanup_upto):
57 * signals.c (__sigaction): Renamed to...
58 (__pthread_sigaction): ... this.
59 (__sigaction): New strong alias, #ifdef SHARED only.
60 (sigaction): Protect with #ifdef SHARED.
61 (sigwait): Renamed to...
62 (__pthread_sigwait): ... this.
63 (sigwait): New strong alias, #ifdef SHARED only.
64 (raise): Renamed to...
65 (__pthread_raise): ... this.
66 (raise): New strong alias, #ifdef SHARED only.
67 * internals.h (__pthread_sigaction, __pthread_sigwait,
68 __pthread_raise): New prototypes.
69 (struct pthread_functions): Add ptr_pthread_sigaction,
70 ptr_pthread_sigwait, ptr_pthread_raise.
71 * pthread.c (pthread_functions): Renamed to...
72 (__pthread_functions): ... this. No longer static, no longer
73 SHARED only. Initialize ptr_pthread_sigaction, ptr_pthread_sigwait
74 and ptr_pthread_raise.
75 [SHARED] (ptr_pthread_functions): Change to &__pthread_functions.
76 * libc-cancellation.c (__pthread_thread_self): Remove weak_extern.
77 * ptfork.c (__fork, __vfork): Protect with #ifdef SHARED.
78 * ptlongjmp.c (siglongjmp, longjmp): Protect with #ifdef SHARED.
80 * Makefile (tests, tests-static): Add tst-cancel-static.
81 * tst-cancel-static.c: New test.
83 2003-01-02 Jakub Jelinek <jakub@redhat.com>
85 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
87 2003-01-02 Ulrich Drepper <drepper@redhat.com>
89 * sysdeps/pthread/bits/pthreadtypes.h (pthread_cond_t): Add padding.
90 * condvar.c: Add symbol versioning. The compatibility versions
91 are the same as the change in the interface does not effect this
93 * Versions [libpthread]: Add definitions for new pthread_cond_*
94 interfaces for version GLIBC_2.3.2.
96 2002-12-31 Ulrich Drepper <drepper@redhat.com>
98 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
100 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
101 for __register_atfork.
103 2002-12-31 Jakub Jelinek <jakub@redhat.com>
105 * sysdeps/i386/i686/pt-machine.h: Use __ASSEMBLER__ instead of
106 ASSEMBLER test macro.
107 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Likewise.
108 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
109 * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h: Likewise.
110 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
111 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
112 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
114 * sysdeps/pthread/errno-loc.c (__errno_location): Add
116 * sysdeps/pthread/herrno-loc.c (__h_errno_location): Likewise.
117 * sysdeps/pthread/res-state.c (__res_state): Likewise.
118 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
119 __libc_current_sigrtmax): Likewise.
120 * Versions [libc] (GLIBC_PRIVATE): Remove __libc_internal_tsd_get,
121 __libc_internal_tsd_set, __libc_internal_tsd_address,
122 __libc_alloca_cutoff.
123 [libpthread] (GLIBC_PRIVATE): Remove __libc_internal_tsd_get,
124 __libc_internal_tsd_set, __libc_internal_tsd_address.
126 * sysdeps/pthread/list.h: Remove assert.h include.
127 * sysdeps/unix/sysv/linux/fork.c: Include <fork.h>, not "fork.h".
129 * sysdeps/pthread/list.h: New file.
130 * sysdeps/unix/sysv/linux/jmp-unwind.c: New file.
131 * sysdeps/unix/sysv/linux/fork.c: New file.
132 * sysdeps/unix/sysv/linux/fork.h: New file.
133 * sysdeps/unix/sysv/linux/ia64/fork.h: New file.
134 * sysdeps/unix/sysv/linux/sparc/fork.h: New file.
135 * sysdeps/unix/sysv/linux/register-atfork.c: New file.
136 * sysdeps/unix/sysv/linux/unregister-atfork.c: New file.
137 * sysdeps/unix/sysv/linux/Makefile: New file.
138 * sysdeps/unix/sysv/linux/Versions: New file.
139 * ptlongjmp.c (pthread_cleanup_upto): Rename to...
140 (__pthread_cleanup_upto): ...this. Add targetframe argument,
141 use it instead of currentframe. No longer static.
142 (siglongjmp, longjmp): Remove pthread_cleanup_upto calls.
143 * internals.h (__pthread_cleanup_upto, __pthread_fork): New prototypes.
144 (struct pthread_functions): Add ptr_pthread_fork,
145 ptr_pthread_cleanup_upto.
146 * pthread.c (pthread_functions): Initialize ptr_pthread_fork and
147 ptr_pthread_cleanup_upto.
148 * ptfork.c: Include fork.h.
149 (struct handler_list, struct handler_list_block): Remove.
150 (pthread_atfork_lock, pthread_atfork_prepare, pthread_atfork_parent,
151 pthread_atfork_child): Remove.
152 (pthread_insert_list, __pthread_atfork, pthread_call_handlers): Remove.
153 (__pthread_fork): New function.
154 (__fork, __vfork): Call __libc_fork.
155 * Makefile (libpthread-routines): Add old_pthread_atfork.
156 (libpthread-nonshared): Add pthread_atfork.
157 (others): Depend on $(objpfx)libpthread_nonshared.a.
158 ($(objpfx)libpthread_nonshared.a): New rule.
159 (install): Depend on $(inst_libdir)/libpthread.so.
160 ($(inst_libdir)/libpthread.so, $(inst_libdir)/libpthread_nonshared.a):
162 (tests): Depend on libpthread_nonshared.a too.
163 * old_pthread_atfork.c: New file.
164 * pthread_atfork.c: New file.
165 * Makeconfig (shared-thread-library): Include libpthread_nonshared.a
168 2002-12-30 Jakub Jelinek <jakub@redhat.com>
170 * forward.c: Make all functions available by default again. It
171 caused too much trouble.
172 * internals.h (struct pthread_functions): Rename ptr_pthread_exit
173 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
174 ptr___pthread_attr_init_2_*.
175 * pthread.c (pthread_functions): Adjust.
177 2002-12-28 Jakub Jelinek <jakub@redhat.com>
179 * libc_pthread_init.c (__libc_pthread_init): Remove
180 MULTIPLE_THREADS_OFFSET check.
181 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
182 (SYSINFO_OFFSET): Remove.
183 * sysdeps/i386/Makefile [csu] (gen-as-const-headers): Add
185 * sysdeps/i386/tcb-offsets.sym: New file.
186 * sysdeps/pthread/tcb-offsets.h: New file.
187 * sysdeps/sparc/sparc32/tls.h: Removed.
188 * sysdeps/sparc/sparc64/tls.h: Move...
189 * sysdeps/sparc/tls.h: ...here. Include tcb-offsets.h in assembler.
190 * sysdeps/sparc/Makefile: New file.
191 * sysdeps/sparc/tcb-offsets.sym: New file.
192 * sysdeps/ia64/tls.h: Include tcb-offsets.h in assembler.
193 * sysdeps/ia64/Makefile: New file.
194 * sysdeps/ia64/tcb-offsets.sym: New file.
195 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
196 (MULTIPLE_THREADS_OFFSET): Remove.
197 Replace defined MULTIPLE_THREADS_OFFSET
198 with defined FLOATING_STACKS && USE___THREAD.
199 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
200 (MULTIPLE_THREADS_OFFSET): Remove.
201 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
202 (MULTIPLE_THREADS_OFFSET): Remove.
203 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
204 (MULTIPLE_THREADS_OFFSET): Remove.
205 * pthread.c (__pthread_initialize_manager): Remove
206 MULTIPLE_THREADS_OFFSET cbeck.
208 * tst-cancel-wrappers.sh: Add line continuations.
210 2002-12-27 Jakub Jelinek <jakub@redhat.com>
212 * sysdeps/pthread/bits/libc-tsd.h: Include linuxthreads/descr.h
213 and bits/libc-lock.h.
214 (__libc_internal_tsd_get, __libc_internal_tsd_set,
215 __libc_internal_tsd_address): Remove.
216 (__pthread_internal_tsd_address, __pthread_internal_tsd_get,
217 __pthread_internal_tsd_set): New weak_externs.
218 (__libc_tsd_address, __libc_tsd_get, __libc_tsd_set): Define
219 using __libc_maybe_call2.
220 (__libc_tsd_key_t): Move to ...
221 * descr.h (__libc_tsd_key_t): ...here.
222 Remove bits/libc-tsd.h include.
223 * sysdeps/pthread/errno-loc.c: New file.
224 * sysdeps/pthread/herrno-loc.c: New file.
225 * sysdeps/pthread/res-state.c: New file.
226 * libc-cancellation.c (THREAD_GETMEM, THREAD_SETMEM): Remove.
227 (__libc_enable_asynccancel, __libc_disable_asynccancel): Use
228 thread_self unconditionally. Use LIBC_THREAD_[SG]ETMEM instead
230 * specific.c (libc_internal_tsd_set): Renamed to...
231 __pthread_internal_tsd_set. Remove static.
232 (libc_internal_tsd_get): Renamed to...
233 __pthread_internal_tsd_get. Remove static.
234 (libc_internal_tsd_address): Renamed to...
235 __pthread_internal_tsd_address. Remove static.
236 (__libc_internal_tsd_set, __libc_internal_tsd_get,
237 __libc_internal_tsd_address, __libc_alloca_cutoff): Remove.
238 * internals.h [!NOT_IN_libc] (LIBC_THREAD_GETMEM, LIBC_THREAD_SETMEM):
240 (__pthread_internal_tsd_set, __pthread_internal_tsd_get,
241 __pthread_internal_tsd_address): New prototypes.
242 (struct pthread_functions): Add
243 ptr_pthread_internal_tsd_([sg]et|address) fields.
244 [!NOT_IN_libc && !FLOATING_STACKS] (thread_self): Define.
245 * pthread.c (pthread_functions) [!USE_TLS && !HAVE___THREAD]:
246 Initialize ptr_pthread_internal_tsd_([sg]et|address) fields.
247 * Versions (libpthread): Remove __libc_alloca_cutoff@GLIBC_PRIVATE.
248 * alloca_cutoff.c: New file.
250 * Makefile (routines): Remove no-tsd. Add alloca_cutoff.
251 * pt-system.c (system): Remove cancellation handling.
252 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
253 cancellation routines.
255 * sysdeps/i386/tls.h: Include dl-sysdep.h and stdint.h.
256 (tcbhead_t): Add sysinfo field.
257 (SYSINFO_OFFSET, INIT_SYSINFO): Define.
258 (TLS_INIT_TP): Use INIT_SYSINFO.
259 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
260 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
261 (MULTIPLE_THREADS_OFFSET): Adjust.
262 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
263 (MULTIPLE_THREADS_OFFSET): Likewise.
264 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
265 (MULTIPLE_THREADS_OFFSET): Likewise.
266 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
267 (MULTIPLE_THREADS_OFFSET): Likewise.
268 * descr.h: Include stdint.h.
269 (struct _pthread_descr_struct): Add p_header.data.sysinfo field.
271 2002-12-22 Jakub Jelinek <jakub@redhat.com>
273 * libc_pthread_init.c: Include stdlib.h.
274 * sysdeps/i386/tls.h (tcbhead_t): Add multiple_threads member.
275 (TLS_INIT_TP_EXPENSIVE): Define.
276 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call,
277 __libc_maybe_call2): In _LIBC check SHARED define.
278 * sysdeps/ia64/tls.h: New file.
279 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
280 * sysdeps/unix/sysv/linux/ia64/Makefile: New file.
281 * sysdeps/x86_64/tls.h (TLS_INIT_TP_EXPENSIVE): Define.
282 * sysdeps/sparc/sparc32/tls.h: New file.
283 * sysdeps/sparc/sparc64/tls.h: New file.
284 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
285 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
286 * Makefile (tests): Add tst-cancel[1-6].
287 (tests-reverse): Add tst-cancel5.
288 Link libc.so before libpthread.so for tests-reverse.
289 * tst-cancel1.c: New file.
290 * tst-cancel2.c: New file.
291 * tst-cancel3.c: New file.
292 * tst-cancel4.c: New file.
293 * tst-cancel5.c: New file.
294 * tst-cancel6.c: New file.
296 2002-12-27 Andreas Schwab <schwab@suse.de>
298 * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h: New file.
300 2002-12-22 Roland McGrath <roland@redhat.com>
302 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
304 2002-12-21 Ulrich Drepper <drepper@redhat.com>
306 * pthread.c (init_rtsigs): Remove incomplete __builtin_expect.
307 Reported by Art Hass <ahaas@airmail.net>.
309 2002-12-19 Jakub Jelinek <jakub@redhat.com>
311 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
312 Use return 0 as 6th argument to FORWARD4.
314 2002-12-18 Jakub Jelinek <jakub@redhat.com>
316 * sysdeps/i386/useldt.h (FLOATING_STACKS, ARCH_STACK_MAX_SIZE): Only
317 define if __ASSUME_LDT_WORKS > 0.
318 * libc-cancellation.c (THREAD_GETMEM, THREAD_SETMEM): Redefine to
319 struct member access if !FLOATING_STACKS.
320 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
322 2002-12-18 Jakub Jelinek <jakub@redhat.com>
324 * internals.h (__pthread_thread_self): New prototype.
325 (struct pthread_functions): Add ptr_pthread_thread_self field.
326 * pthread.c (pthread_functions): Initialize ptr_pthread_thread_self.
327 (__pthread_thread_self): New function.
328 * libc-cancellation.c (__pthread_thread_self): Add weak_extern.
329 (__libc_enable_asynccancel, __libc_disable_asynccancel): Don't
330 use thread_self() directly if not FLOATING_STACKS.
332 2002-12-18 Jakub Jelinek <jakub@redhat.com>
334 * sysdeps/x86_64/pt-machine.h: Guard most of the header
335 with #ifndef __ASSEMBLER__.
336 * pthread.c (pthread_functions): Use SHLIB_COMPAT around
337 pthread_attr_init_2_0 use.
339 2002-12-17 Jakub Jelinek <jakub@redhat.com>
341 * wrapsyscall.c: Removed.
343 * Makefile (distribute): Add tst-cancel-wrappers.sh.
344 (routines): Remove weaks. Add forward,
345 libc_pthread_init, libc-cancellation.
346 (shared-only-routines): Remove weaks. Add forward.
347 (libpthread-routines): Remove wrapsyscall.
348 Add ptw-write, ptw-read, ptw-close, ptw-fcntl, ptw-accept,
349 ptw-connect, ptw-recv, ptw-recvfrom, ptw-recvmsg, ptw-send,
350 ptw-sendmsg, ptw-sendto, ptw-fsync, ptw-lseek, ptw-lseek64,
351 ptw-llseek, ptw-msync, ptw-nanosleep, ptw-open, ptw-open64,
352 ptw-pause, ptw-pread, ptw-pread64, ptw-pwrite, ptw-pwrite64,
353 ptw-tcdrain, ptw-wait, ptw-waitpid, pt-system, pt-allocrtsig.
354 (libpthread-shared-only-routines): Add pt-allocrtsig.
355 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
356 ($(objpfx)tst-cancel-wrappers.out): New rule.
357 * sysdeps/pthread/bits/libc-lock.h: Include linuxthreads/internals.h
359 (__libc_maybe_call): In libpthread.* don't check for existance
361 (__libc_maybe_call2): Define.
362 (__libc_lock_init, __libc_lock_fini, __libc_lock_lock,
363 __libc_lock_trylock, __libc_lock_unlock): Use it.
364 * sysdeps/pthread/flockfile.c: New file.
365 * sysdeps/pthread/ftrylockfile.c: New file.
366 * sysdeps/pthread/funlockfile.c: New file.
367 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
368 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
369 * sysdeps/unix/sysv/linux/allocrtsig.c: New file.
370 * libc-cancellation.c: New file.
371 * forward.c: New file.
372 * libc_pthread_init.c: New file.
373 * pt-system.c: New file.
374 * pthread.c: Remove locale.h.
375 (__pthread_manager_thread): Initialize multiple_threads.
376 (__pthread_multiple_threads): Declare.
377 (pthread_functions): New variable.
378 (__pthread_initialize_minimal): Remove __uselocale call.
379 Call __libc_pthread_init.
380 (__pthread_initialize_manager): Initialize __pthread_multiple_threads,
381 initial thread's multiple_threads and __libc_multiple_threads.
382 Check MULTIPLE_THREADS_OFFSET value. Initialize manager thread's
384 (pthread_setschedparam, pthread_getschedparam): Rename to __
385 prefixed variants. Add strong_alias.
386 (current_rtmin, current_rtmax, __libc_current_sigrtmin,
387 __libc_current_sigrtmax, __libc_allocate_rtsig): Remove.
388 (init_rtsigs): Use __libc_current_sigrtmin_private.
389 (pthread_initialize): Only call init_rtsigs if
390 !__ASSUME_REALTIME_SIGNALS.
391 (__pthread_require_wrappers, __pthread_require_lockfile): Remove.
392 * internals.h (__pthread_attr_destroy, __pthread_attr_setdetachstate,
393 __pthread_attr_getdetachstate, __pthread_attr_setschedparam,
394 __pthread_attr_getschedparam, __pthread_attr_setschedpolicy,
395 __pthread_attr_getschedpolicy, __pthread_attr_setinheritsched,
396 __pthread_attr_getinheritsched, __pthread_attr_setscope,
397 __pthread_attr_getscope, __pthread_cond_init,
398 __pthread_cond_destroy, __pthread_cond_wait,
399 __pthread_cond_signal, __pthread_cond_broadcast,
400 __pthread_condattr_init, __pthread_condattr_destroy,
401 __pthread_equal, __pthread_getschedparam,
402 __pthread_setschedparam, __pthread_setcancelstate,
403 __pthread_setcanceltype, __pthread_enable_asynccancel,
404 __libc_enable_asynccancel, __libc_pthread_init): New prototype.
405 (__pthread_mutex_init, __pthread_mutex_destroy,
406 __pthread_mutex_lock, __pthread_mutex_unlock,
407 __pthread_mutex_trylock): Likewise.
409 (struct pthread_functions): New type.
410 (__libc_pthread_functions): New variable.
411 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define.
412 * descr.h (struct _pthread_descr_struct): Add
413 p_header.data.multiple_threads field.
414 * manager.c (pthread_handle_create): Initialize multiple_threads.
415 * cancel.c (__pthread_enable_asynccancel,
416 __pthread_disable_asynccancel): New functions.
417 (__pthread_provide_wrappers): Remove.
418 (pthread_setcancelstate, pthread_setcanceltype): Rename to __
419 prefixed variants. Add strong_alias.
420 * condvar.c (pthread_cond_init, pthread_cond_destroy,
421 pthread_cond_wait, pthread_cond_signal, pthread_cond_broadcast,
422 pthread_condattr_init, pthread_condattr_destroy): Likewise.
423 * join.c (pthread_exit): Likewise.
424 * attr.c (pthread_attr_destroy, pthread_attr_setdetachstate,
425 pthread_attr_getdetachstate, pthread_attr_setschedparam,
426 pthread_attr_getschedparam, pthread_attr_setschedpolicy,
427 pthread_attr_getschedpolicy, pthread_attr_setinheritsched,
428 pthread_attr_getinheritsched, pthread_attr_setscope,
429 pthread_attr_getscope): Likewise.
430 * mutex.c (__pthread_mutex_init, __pthread_mutex_destroy,
431 __pthread_mutex_lock, __pthread_mutex_unlock,
432 __pthread_mutex_trylock): Add hidden_def.
433 * Versions (libc): Add __libc_pthread_init,
434 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
435 __libc_allocate_rtsig_private @@GLIBC_PRIVATE.
436 * lockfile.c: Remove some USE_IN_LIBIO guards.
437 (__pthread_provide_lockfile): Remove.
438 * pt-allocrtsig.c: New file.
439 * tst-cancel-wrappers.sh: New test.
441 2002-12-15 Ulrich Drepper <drepper@redhat.com>
443 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
444 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
445 * wrapsyscall.c: Remove creat, poll, pselect, readv, select,
446 sigpause, sigsuspend, sigwaitinfo, waitid, and writev wrappers.
448 2002-12-10 Ulrich Drepper <drepper@redhat.com>
450 * wrapsyscall.c (CANCELABLE_SYSCALL): Don't define function as
451 weak. There is no reason for that.
452 (CANCELABLE_SYSCALL_VA): Likewise.
454 2002-12-09 Ulrich Drepper <drepper@redhat.com>
456 * wrapsyscall.c: Add wrappers for creat, poll, pselect, readv, select,
457 sigpause, __xpg_sigpause, sigsuspend, sigwaitinfo, waitid, and writev.
458 * Versions: Export creat, poll, pselect, readv, select, sigpause,
459 __xpg_sigpause, sigsuspend, sigwaitinfo, waitid, and writev from
460 libpthread in version GLIBC_2.3.2.
462 2002-12-06 Ulrich Drepper <drepper@redhat.com>
464 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
466 2002-12-05 Roland McGrath <roland@redhat.com>
468 * pthread.c (__pthread_initialize_minimal)
469 [USE_TLS && SHARED && !USE___THREAD]: Initialize TLS and set up the
470 TCB if the dynamic linker didn't do it at startup.
472 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
474 (TLS_DO_SET_THREAD_AREA, TLS_DO_MODIFY_LDT, TLS_SETUP_GS_SEGMENT):
476 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
477 * sysdeps/alpha/tls.h (TLS_INIT_TP): Likewise (always zero).
479 2002-12-03 Roland McGrath <roland@redhat.com>
481 * pthread.c (pthread_initialize) [SHARED]: Copy dl_error_tsd value
482 from dynamic linker internal cell to new libc cell.
484 2002-11-28 Roland McGrath <roland@redhat.com>
486 * tst-context.c: #define IS_IN_libpthread around #include <tls.h>
487 before other headers, so FLOATING_STACKS is not defined wrongly.
489 * sysdeps/i386/tls.h [!IS_IN_libpthread]: Enable TLS support
490 even if [! FLOATING_STACKS].
491 (TLS_DO_MODIFY_LDT_KERNEL_CHECK): New macro.
492 If not under [__ASSUME_LDT_WORKS > 0], then do a runtime check of
493 dl_osversion >= 2.3.99 and fatal if not.
494 (TLS_DO_MODIFY_LDT): Use it.
496 2002-11-28 Ulrich Drepper <drepper@redhat.com>
498 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
499 require it to 200112L. Remove _POSIX_POLL and _POSIX_SELECT.
500 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
502 2002-11-19 Ulrich Drepper <drepper@redhat.com>
504 * Versions (libc: GLIBC_2.0): Remove names of functions which are
506 * Makefile (shared-only-routines): Add weaks.
507 * weaks.c: Remove functions which are not exported from libc.so.
509 2002-11-14 Roland McGrath <roland@redhat.com>
511 * libc-tsd.c: New file.
512 * Makefile (distribute): Add it.
513 (libc-link.so): New variable.
514 ($(objpfx)libpthread.so): Depend on that instead of libc.so file name.
515 (libc-ok-for-link): New variable.
516 [$(versioning) = yes]: Include $(common-objpfx)tls.make and define
517 libc-ok-for-link to $(use-thread).
518 [$(libc-ok-for-link) = no]
519 (libc-link.so): Set to $(objpfx)libc.so, not $(common-objpfx)libc.so.
520 ($(objpfx)libc_pic_lite.a,$(objpfx)libc_pic_lite.os, $(objpfx)libc.so):
522 (generated): Append them.
523 (extra-objs): Append libc-tsd.os.
525 * libc-tls-loc.c: New file.
526 * Makefile (libpthread-routines): Add it.
528 2002-11-14 Andreas Schwab <schwab@suse.de>
530 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Fix unterminated
533 2002-11-13 Roland McGrath <roland@redhat.com>
535 * Examples/ex6.c (main): Improve error reporting.
537 2002-11-04 Ulrich Drepper <drepper@redhat.com>
539 * sysdeps/i386/Makefile: Compile pthread.c and sighandler.c with
540 -fno-omit-frame-pointer. Patch by Andreas Steinmetz <ast@domdv.de>.
542 * sysdeps/i386/useldt.h [PIC] (USETLS_LOAD_EBX): Use correct input
544 (DO_SET_THREAD_AREA): Mark asm output specifiers correctly.
546 2002-10-22 Jakub Jelinek <jakub@redhat.com>
548 * manager.c (pthread_start_thread): Call __uselocale even
549 if [! SHARED]. Patch by Leon Kanter <leon@geon.donetsk.ua>.
551 2002-10-17 Roland McGrath <roland@redhat.com>
553 * Makefile (unload): Don't link in libpthread.so.
554 ($(objpfx)unload.out): Do depend on it.
555 * unload.c (main): Improve error reporting.
557 2002-10-09 Roland McGrath <roland@redhat.com>
559 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
560 Under [__PIC__], call the function via the pointer fetched for
561 comparison rather than a call by name that uses the PLT.
562 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
563 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
564 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
565 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
566 (__libc_key_create, __libc_getspecific, __libc_setspecific)
567 (__libc_atfork): Use it.
569 * pthread.c [SHARED] (__libc_dl_error_tsd): New function.
570 (pthread_initialize) [SHARED]: Set _dl_error_catch_tsd to that.
571 * Versions (libc: GLIBC_PRIVATE): Add __libc_dl_error_tsd.
572 (ld: GLIBC_PRIVATE): Set removed.
574 2002-10-11 Ulrich Drepper <drepper@redhat.com>
576 * sysdeps/unix/sysv/linux/execve.c: New file.
578 2002-10-09 Jakub Jelinek <jakub@redhat.com>
580 * no-tsd.c: Include stdlib.h.
582 2002-10-07 Jakub Jelinek <jakub@redhat.com>
584 * sysdeps/unix/sysv/linux/allocalim.h: New file.
585 * descr.h (struct _pthread_descr_struct): Add p_alloca_cutoff
587 * manager.c (__pthread_allocate_stack): Add out_stacksize argument.
588 Pass stack size to caller.
589 (pthread_handle_create): Set p_alloca_cutoff.
590 * pthread.c (__pthread_initial_thread): Use C99 designated
591 initializers. Set p_alloca_cutoff.
592 (__pthread_manager_thread): Likewise.
593 (__pthread_initialize_minimal) [USE_TLS]: Set p_alloca_cutoff
595 (__pthread_init_max_stacksize): Possibly decrease p_alloca_cutoff
597 (__pthread_initialize_manager) [USE_TLS]: Set p_alloca_cutoff
599 * specific.c (__libc_alloca_cutoff): New function.
600 * no-tsd.c (__libc_alloca_cutoff): New function.
601 * Versions: Export __libc_alloca_cutoff@@GLIBC_PRIVATE from libc
604 2002-10-02 Kaz Kojima <kkojima@rr.iij4u.or.jp>
606 * sysdeps/sh/pt-machine.h: Make C code ifndef'ed with __ASSEMBLER__.
607 * sysdeps/sh/tls.h: Likewise.
608 * sysdeps/unix/sysv/linux/sh/smp.h: New file.
610 2002-09-29 Jakub Jelinek <jakub@redhat.com>
612 * sysdeps/pthread/tst-timer.c (main): Clear
613 SIGEV2.sigev_notify_attributes.
615 2002-09-29 Ulrich Drepper <drepper@redhat.com>
617 * sysdeps/i386/useldt.h (DO_SET_THREAD_AREA): Don't use
618 INLINE_SYSCALL for set_thread_area syscall.
620 2002-09-28 Roland McGrath <roland@redhat.com>
622 * pthread.c (__pthread_reset_main_thread) [FLOATING_STACKS]:
623 Don't call setrlimit, since we did no prior bogon we need to undo.
625 2002-09-27 Roland McGrath <roland@redhat.com>
627 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Don't include <pt-machine.h>.
629 2002-09-24 Roland McGrath <roland@redhat.com>
631 * sysdeps/x86_64/tls.h: New file.
633 2002-09-23 Roland McGrath <roland@redhat.com>
635 * Examples/ex13.c (dump_mut): int -> size_t for counter.
637 2002-09-18 Bruno Haible <bruno@clisp.org>
639 * Examples/ex10.c (thread): Fail if pthread_mutex_timedlock() returns
640 an unexpected error code.
642 * internals.h (__pthread_message): Add const to first parameter type.
643 * pthread.c (__pthread_message): Likewise.
645 * sysdeps/unix/sysv/linux/configure: Moved to ../sysdeps/pthread.
647 2002-09-17 Roland McGrath <roland@redhat.com>
649 * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT, TLS_DO_SET_THREAD_AREA):
650 Set the descriptor limit to the full 4GB, so %gs:OFFSET works for any
651 offset (positive or negative) relative to the thread struct.
652 * sysdeps/i386/useldt.h (DO_MODIFY_LDT, DO_SET_THREAD_AREA): Likewise.
654 2002-09-12 Jakub Jelinek <jakub@redhat.com>
656 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Move...
657 * sysdeps/unix/sysv/linux/sparc/Makefile: ...here.
658 Replace /usr/lib/crt[in].o with crt[in].o too.
660 2002-09-11 Steven Munroe <sjmunroe@us.ibm.com>
662 * sysdeps/powerpc/powerpc64/pt-machine.h: New file.
664 2002-09-04 Bruno Haible <bruno@clisp.org>
666 * pthread.c: Include <sys/time.h>.
667 (is_smp_system): Move to sysdeps/unix/sysv/linux/smp.h.
668 * sysdeps/unix/sysv/linux/smp.h: New file, extracted from pthread.c.
669 * Makefile (distribute): Add smp.h to the list.
671 2002-09-04 Bruno Haible <bruno@clisp.org>
673 * sysdeps/alpha/pt-machine.h: Choose different include file location
674 on non-Linux platforms.
676 * wrapsyscall.c (PROMOTE_INTEGRAL_TYPE): New macro.
677 (open, open64): Change va_arg argument type to the integral type to
678 which mode_t promotes.
680 * sysdeps/pthread/tst-timer.c (main): Don't assume anything about
681 the structure of 'struct sigevent'.
683 * errno.c (__errno_location, __h_errno_location, __res_state):
684 Use prototype function definitions.
686 2002-07-29 Steven Munroe <sjmunroe@us.ibm.com>
688 * shlib-versions: Set libpthread version to 2.3 for powerpc64.
689 * sysdeps/powerpc/pt-machine.h: moved to...
690 * sysdeps/powerpc/powerpc32/pt-machine.h: ...here
691 * sysdeps/powerpc/powerpc64/pt-machine.h: New file.
693 2002-09-02 Roland McGrath <roland@redhat.com>
695 * sysdeps/powerpc/Makefile (CFLAGS-pt-initfini.s): New variable.
697 2002-09-01 Roland McGrath <roland@redhat.com>
699 * sysdeps/pthread/bits/libc-tsd.h (enum __libc_tsd_key_t): Add new keys
700 CTYPE_B, CTYPE_TOLOWER, CTYPE_TOUPPER.
702 * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_address): New macro.
703 (__libc_internal_tsd_address): Declare it.
704 * Versions (libc, ld, libpthread: GLIBC_PRIVATE): Add
705 __libc_internal_tsd_address.
706 * specific.c (libc_internal_tsd_address): New function.
707 (__libc_internal_tsd_address): New variable.
708 * no-tsd.c (__libc_internal_tsd_address): New variable.
710 2002-08-31 Ulrich Drepper <drepper@redhat.com>
712 * Makefile: Don't use rule for crt%.o, spell it out as rules for
715 2002-08-30 Roland McGrath <roland@redhat.com>
717 * Makefile (extra-objs, omit-deps): Add crtn.
718 ($(objpfx)libpthread.so): Depend on $(objpfx)crtn.o.
719 ($(objpfx)libpthread.so: +postinit): Append $(objpfx)crtn.o.
720 ($(objpfx)crtn.S): New target.
721 ($(objpfx)crt%.o): Pattern rule replaces crti.o target.
722 (generated): Add crtn.S.
724 * sysdeps/unix/sysv/linux/x86_64/Makefile ($(objpfx)specs): Massage
727 2002-08-30 Jakub Jelinek <jakub@redhat.com>
729 * pthread.c (__pthread_initialize_minimal): Call __uselocale even
732 2002-08-30 Roland McGrath <roland@redhat.com>
734 * tst-static-locale.c: New file.
735 * Makefile (tests, tests-static): Add it.
737 2002-04-24 Steven Munroe <sjmunroe@us.ibm.com>
739 * spinlock.c (__pthread_lock): Fix spurious wakeup
740 handling. Don't clear lowest bit of list pointer as sign the thread
741 is still on the wait list. Don't restart after spurious wakeup
742 with spinning to get the lock.
743 (__pthread_unlock): Take set lowest bit into account when handling
744 pointer to list elements.
745 Patch by Steve Munroe <sjmunroe@us.ibm.com>.
747 2002-08-28 Roland McGrath <roland@redhat.com>
749 * sysdeps/pthread/timer_routines.c (thread_func): Fix type in cast.
751 2002-08-28 Jakub Jelinek <jakub@redhat.com>
753 * sysdeps/unix/sysv/linux/hppa/aio_cancel.c: New file.
754 * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
755 * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
757 2002-08-28 Ulrich Drepper <drepper@redhat.com>
759 * sysdeps/pthread/timer_routines.c (thread_func): Change return
760 type to void and add casts in use to avoid warnings with all gcc
763 2002-08-08 Jakub Jelinek <jakub@redhat.com>
765 * sysdeps/unix/sysv/linux/bits/local_lim.h (PTHREAD_THREADS_MAX):
767 * manager.c (__pthread_handles): Remove.
768 * pthandles.c: New file.
769 * pthread.c (__pthread_initialize_minimal): Initialize
770 __pthread_handles[0] and __pthread_handles[1].
771 * Makefile (libpthread-routines): Add pthandles (must be last).
773 2002-08-26 Brian Youmans <3diff@gnu.org>
775 * Examples/ex10.c: Corrected version number in Lesser GPL copying
776 permission notice from 2 to 2.1.
777 * Examples/ex11.c: Likewise.
778 * Examples/ex13.c: Likewise.
779 * Examples/ex8.c: Likewise.
780 * Examples/ex9.c: Likewise.
781 * barrier.c: Likewise.
782 * events.c: Likewise.
783 * lockfile.c: Likewise.
784 * no-tsd.c: Likewise.
785 * pt-machine.c: Likewise.
786 * ptclock_gettime.c: Likewise.
787 * ptclock_settime.c: Likewise.
788 * rwlock.c: Likewise.
789 * sysdeps/alpha/pspinlock.c: Likewise.
790 * sysdeps/alpha/pt-machine.h: Likewise.
791 * sysdeps/arm/pspinlock.c: Likewise.
792 * sysdeps/arm/pt-machine.h: Likewise.
793 * sysdeps/cris/pspinlock.c: Likewise.
794 * sysdeps/cris/pt-machine.h: Likewise.
795 * sysdeps/hppa/pspinlock.c: Likewise.
796 * sysdeps/hppa/pt-machine.h: Likewise.
797 * sysdeps/i386/i686/pt-machine.h: Likewise.
798 * sysdeps/i386/pspinlock.c: Likewise.
799 * sysdeps/i386/pt-machine.h: Likewise.
800 * sysdeps/i386/useldt.h: Likewise.
801 * sysdeps/ia64/pspinlock.c: Likewise.
802 * sysdeps/ia64/pt-machine.h: Likewise.
803 * sysdeps/m68k/pspinlock.c: Likewise.
804 * sysdeps/m68k/pt-machine.h: Likewise.
805 * sysdeps/mips/pspinlock.c: Likewise.
806 * sysdeps/mips/pt-machine.h: Likewise.
807 * sysdeps/powerpc/pspinlock.c: Likewise.
808 * sysdeps/powerpc/pt-machine.h: Likewise.
809 * sysdeps/pthread/bits/initspin.h: Likewise.
810 * sysdeps/pthread/bits/libc-lock.h: Likewise.
811 * sysdeps/pthread/bits/libc-tsd.h: Likewise.
812 * sysdeps/pthread/getcpuclockid.c: Likewise.
813 * sysdeps/pthread/posix-timer.h: Likewise.
814 * sysdeps/pthread/timer_create.c: Likewise.
815 * sysdeps/pthread/timer_delete.c: Likewise.
816 * sysdeps/pthread/timer_getoverr.c: Likewise.
817 * sysdeps/pthread/timer_gettime.c: Likewise.
818 * sysdeps/pthread/timer_routines.c: Likewise.
819 * sysdeps/pthread/timer_settime.c: Likewise.
820 * sysdeps/pthread/tst-timer.c: Likewise.
821 * sysdeps/s390/pspinlock.c: Likewise.
822 * sysdeps/s390/s390-32/pt-machine.h: Likewise.
823 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
824 * sysdeps/sh/pspinlock.c: Likewise.
825 * sysdeps/sh/pt-machine.h: Likewise.
826 * sysdeps/sparc/sparc32/pspinlock.c: Likewise.
827 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
828 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: Likewise.
829 * sysdeps/sparc/sparc64/pspinlock.c: Likewise.
830 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
831 * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
832 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
833 * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
834 * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
835 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
836 * tststack.c: Likewise.
837 * unload.c: Likewise.
839 * wrapsyscall.c: Likewise.
841 * sysdeps/pthread/pt-initfini.c: Changed copying
842 permission notice to Lesser GPL from Library GPL, including the
843 references in the special exception.
844 * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: Likewise.
845 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Likewise.
846 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c:
848 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c:
850 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Likewise.
852 2002-08-26 Ulrich Drepper <drepper@redhat.com>
854 * Examples/ex10.c (thread): tv_nsec == 1000000000 is already
855 overflow [PR libc/4244].
857 2002-08-25 Ulrich Drepper <drepper@redhat.com>
859 * sysdeps/pthread/timer_routines.c (thread_func): Make the
860 compiler happy by adding a return statement which will never be
863 * tst-context.c (main): Cast to long before casting to pointer.
865 * Examples/ex17.c (main): Use correct format string.
867 * Examples/ex9.c (thread): Remove incorrect return statement.
869 2002-08-23 Ulrich Drepper <drepper@redhat.com>
871 * pthread.c (__linuxthreads_version): New global constant.
873 2002-08-23 Andreas Jaeger <aj@suse.de>
875 * sysdeps/x86_64/pt-machine.h: Use %fs instead of %gs
876 as thread specific register.
877 (testandset): Fix inline asm.
878 (THREAD_GETMEM): Fix inline asm.
880 2002-08-22 Roland McGrath <roland@redhat.com>
882 * sysdeps/i386/useldt.h (INIT_THREAD_SELF): Remove [HAVE_TLS_SUPPORT]
884 (INIT_THREAD_SELF): Pass second arg to DO_SET_THREAD_AREA.
885 (DO_SET_THREAD_AREA): Take second arg, pass to DO_SET_THREAD_AREA_REUSE
886 macro. That chooses whether to reuse %gs value or let kernel set it.
887 [USE_TLS] (DO_SET_THREAD_AREA_REUSE): New macro, always 1.
888 [!USE_TLS] (DO_SET_THREAD_AREA_REUSE): New macro, true if arg is
891 2002-08-21 Ulrich Drepper <drepper@redhat.com>
893 * sysdeps/i386/tls.h (TLS_SETUP_GS_SEGMENT): Add new parameter
894 also to the third definition of this macro.
896 2002-06-17 Andreas Jaeger <aj@suse.de>
898 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
901 2002-08-20 Ulrich Drepper <drepper@redhat.com>
903 * sysdeps/i386/useldt.h: Go back to using 16-bit instructions when
904 loading/reading segment registers. Some old hardware doesn't
905 handle the 32-bit instructions as expected.
906 * sysdeps/i386/tls.h: Likewise.
908 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Second parameter is
909 renamed to secondcall and use is negated.
910 (TLS_SETUP_GS_SEGMENT): Likewise.
911 (TLS_INIT_TP): Likewise.
912 * sysdeps/sh/tls.h (TLS_INIT_TP): Second parameter is renamed to
915 * sysdeps/i386/tls.h: Use 32-bit operations when handling segment
916 registers. No need to mask upper 16 bits in this case.
917 * sysdeps/i386/useldt.h: Likewise.
918 (DO_SET_THREAD_AREA): We have to load %gs again even if the value
919 is the same since the GDT content changed.
921 * sysdeps/i386/tls.h (TLS_INIT_TP): Add new parameter and pass it on
922 to TLS_SETUP_GS_SEGMENT.
923 (TLS_SETUP_GS_SEGMENT): Add new parameter and pass it on to
924 TLS_DO_SET_THREAD_AREA.
925 (TLS_DO_SET_THREAD_AREA): If new parameter is zero determine
926 entry number from %gs value.
927 * sysdeps/sh/tls.h (TLS_INIT_TP): Add new parameter and simply
930 * manager.c (pthread_handle_create): Pass NULL to _dl_allocate_tls.
931 Pass true to _dl_deallocate_tls.
932 (pthread_free): Likewise.
933 * pthread.c (__pthread_initialize_manager): Likewise.
935 2002-08-19 Ulrich Drepper <drepper@redhat.com>
937 * sysdeps/i386/useldt.h (DO_SET_THREAD_AREA): Use correct shift when
938 computing index from %gs value.
940 2002-08-16 Roland McGrath <roland@redhat.com>
942 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Calculate segment
943 register value from entry number properly.
945 * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): Rewrite asm to use %ebx
946 optimally conditional on [__PIC__].
947 (TLS_DO_SET_THREAD_AREA): New macro, implement inline syscall
948 without touching errno, and use latest modify_ldt-like interface.
949 (TLS_SETUP_GS_SEGMENT): Use that instead of INLINE_SYSCALL.
950 * sysdeps/i386/useldt.h (DO_MODIFY_LDT): Set %gs in this macro.
951 (DO_SET_THREAD_AREA): New macro, uses current syscall interface with
952 existing %gs value as the segment to set.
953 (INIT_THREAD_SELF): Rewritten using those. Use set_thread_area only
954 under [HAVE_TLS_SUPPORT] so we can rely on the initialization done
955 by the first thread's early TLS setup.
957 2002-08-15 Roland McGrath <roland@redhat.com>
959 * sysdeps/i386/tls.h (TLS_INIT_TP): Use statement expression and
960 return a value as callers now expect.
962 2002-08-11 Roland McGrath <roland@redhat.com>
964 * pthread.c (__pthread_initialize_manager): Initialize
965 p_header.data.tcb field of manager thread's descriptor.
966 (__pthread_initialize_minimal): Don't initialize p_header.data.self
967 field, already done by TLS_INIT_TP.
969 * manager.c (pthread_handle_create): Move p_header field initializers
972 2002-08-08 Ulrich Drepper <drepper@redhat.com>
974 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Removed.
976 2002-08-07 Ulrich Drepper <drepper@redhat.com>
978 * pthread.c (__linuxthreads_initial_report_events): New variable.
979 (__pthread_initialize_manager): Use it to initialize p_report_events
981 [TLS]: Store pointer to descriptor of manager in __pthread_handles.
983 2002-08-07 Roland McGrath <roland@redhat.com>
985 * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): Add an extra argument with
986 an "m" constraint to the asm so the compiler knows LDT_ENTRY was used.
988 2002-08-02 Roland McGrath <roland@redhat.com>
990 * sysdeps/pthread/bits/libc-tsd.h (enum __libc_tsd_key_t):
991 Add _LIBC_TSD_KEY_LOCALE.
992 * manager.c (pthread_start_thread) [!(USE_TLS && HAVE___THREAD)]:
993 Call __uselocale to initialize our per-thread locale pointer to
995 * pthread.c (__pthread_initialize_minimal): Likewise.
997 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Add missing \s.
999 2002-08-02 Ulrich Drepper <drepper@redhat.com>
1001 * pthread.c: Declare _errno, _h_errno, and _res unless we use TLS
1004 * cancel.c (__pthread_perform_cleanup) [USE_TLS && HAVE___THREAD]:
1005 Don't use p_libc_specific element in thread descriptor.
1007 2002-07-30 Roland McGrath <roland@redhat.com>
1009 * sysdeps/pthread/bits/libc-tsd.h: Include <tls.h>.
1010 [USE_TLS && HAVE___THREAD]: Just include the sysdeps/generic file,
1011 which does the right thing when __thread support is available.
1012 * descr.h (struct _pthread_descr_struct) [USE_TLS && HAVE___THREAD]:
1013 Omit `p_libc_specific', `p_errnop', `p_errno', `p_h_errnop',
1014 `p_h_errno', `p_resp', and `p_res' members.
1015 * pthread.c (__pthread_initialize_minimal) [USE_TLS && HAVE___THREAD]:
1016 Don't initialize `p_errnop' and `p_h_errnop' members.
1017 (__pthread_reset_main_thread): Likewise.
1018 (__pthread_initialize_manager): Likewise.
1019 * manager.c (__pthread_manager, pthread_handle_create): Likewise.
1020 * pthread.c (pthread_initialize) [USE_TLS && HAVE___THREAD]:
1021 Don't initialize `p_resp' member.
1022 (__pthread_reset_main_thread): Likewise.
1023 * manager.c (pthread_handle_create): Likewise.
1024 * specific.c (libc_internal_tsd_set, libc_internal_tsd_get):
1025 Conditionalize these on [!(USE_TLS && HAVE___THREAD)].
1026 * no-tsd.c: Conditionalize contents on [!(USE_TLS && HAVE___THREAD)].
1027 * errno.c [USE_TLS && HAVE___THREAD]
1028 (__h_errno_location, __res_state): Don't define these at all.
1030 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens around arguments!
1031 (INSTALL_NEW_DTV, GET_DTV): Likewise.
1032 * sysdeps/sh/tls.h (INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV): Likewise.
1034 * weaks.c: Don't include <errno.h> here.
1036 2002-08-01 Roland McGrath <roland@redhat.com>
1038 * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): New macro, broken out of
1040 (TLS_DO_SET_THREAD_AREA): New macro, uses thread_set_area syscall.
1041 (TLS_SETUP_GS_SEGMENT): New macro, try one or the other or both.
1042 (TLS_INIT_TP): Use that.
1044 2002-08-02 Jakub Jelinek <jakub@redhat.com>
1046 * sysdeps/i386/useldt.h (DO_MODIFY_LDT): Move from INIT_THREAD_SELF.
1047 (INIT_THREAD_SELF): Use sys_thread_area syscall instead if available.
1048 (FREE_THREAD): Avoid modify_ldt if using GDT.
1049 * sysdeps/i386/pspinlock.c (__have_no_set_thread_area): New variable.
1051 2002-07-25 Jakub Jelinek <jakub@redhat.com>
1053 * sysdeps/i386/tls.h: Use __ASSEMBLER__ test macro not ASSEMBLER.
1054 * sysdeps/i386/pt-machine.h: Likewise.
1055 * sysdeps/i386/useldt.h: Likewise.
1057 2002-07-22 Ulrich Drepper <drepper@redhat.com>
1059 * pthread.c (__pthread_initialize_minimal): If !SHARED and TLS
1060 call __libc_setup_tls first.
1061 * Makefile: Actually create tst-signal.out file when running the test.
1062 (tests): Add tststatic.
1063 * Examples/tststatic.c: New file.
1065 2002-07-19 Ulrich Drepper <drepper@redhat.com>
1067 * errno.c (__errno_location): Don't define unless !USE_TLS
1069 * sysdeps/i386/pt-machine.c: Protect C code with #ifndef ASSEMBLER.
1070 * sysdeps/i386/tls.h: Likewise.
1071 * sysdeps/i386/useldt.h: Likewise.
1072 * sysdeps/i386/i686/pt-machine.h: Likewise.
1074 2002-07-02 H.J. Lu <hjl@gnu.org>
1076 * sysdeps/mips/pspinlock.c: Don't include <sgidefs.h>. Always
1078 * sysdeps/mips/pt-machine.h: Likewise.
1080 2002-07-14 Ulrich Drepper <drepper@redhat.com>
1082 * manager.c (pthread_handle_create): Initialize self-reference in
1085 2002-07-01 Jakub Jelinek <jakub@redhat.com>
1087 * Examples/ex9.c (main): Remove unused th variable.
1089 2002-07-10 Ulrich Drepper <drepper@redhat.com>
1091 * wrapsyscall.c: Add __nanosleep alias.
1092 * Versions (GLIBC_2.2.6): Add __nanosleep.
1093 * bug-sleep.c: New file.
1094 * Makefile (tests): Add bug-sleep.
1096 2002-06-19 Steven Munroe <sjmunroe@vnet.ibm.com>
1098 * Examples/ex9.c (main): Use list of children and join them.
1099 (thread): Do not call exit.
1101 2002-06-20 Ulrich Drepper <drepper@redhat.com>
1103 * spinlock.c (wait_node_alloc): We cannot use compare-and-exchange.
1104 Unconditionally use the code using spinlock. Use __pthread_release
1106 (wait_node_free): Likewise.
1107 (__pthread_acquire, __pthread_release): Unconditionally define.
1109 2002-06-07 Jakub Jelinek <jakub@redhat.com>
1111 * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Fix typo.
1113 2002-05-24 Ulrich Drepper <drepper@redhat.com>
1115 * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Use __sync_synchronize.
1117 2002-05-21 Ulrich Drepper <drepper@redhat.com>
1119 * sysdeps/pthread/pthread.h (pthread_create): Rename first
1121 (pthread_cancel): Likewise.
1122 * internals.h (__pthread_create_2_1): Likewise.
1123 * sysdeps/unix/sysv/linux/bits/sigthread.h (pthread_kill): Likewise.
1125 2002-05-20 Ulrich Drepper <drepper@redhat.com>
1127 * sysdeps/alpha/pt-machine.c (THREAD_SELF): Remove clobber.
1128 Patch by Glen Nakamura <gen@flex.com>.
1130 2002-05-03 Ulrich Drepper <drepper@redhat.com>
1132 * signals.c: Move sighandler functions to...
1133 * sighandler.c: ...here. New file.
1134 * signals.c: Move signal handler related type definitions to...
1135 * internals.h: ...here. Add prototypes for signal handlers.
1136 * Makefile (libpthread-routines): Add sighandler.
1137 (CFLAGS-sighandler.c): Add $(exceptions).
1139 2002-04-30 Jakub Jelinek <jakub@redhat.com>
1141 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
1143 2002-04-08 Ulrich Drepper <drepper@redhat.com>
1145 * sysdeps/pthread/timer_getoverr.c: Return real overrun.
1146 * sysdeps/pthread/posix-timer.h (struct timer_node): Add overrun_count.
1147 * sysdeps/pthread/timer_routines.c (thread_func): Schedule next timeout
1148 based on previous one and not on current time. Count overruns.
1149 Patch by Eric F. Sorton <eric@cctcorp.com>.
1151 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add DELAYTIMER_MAX.
1153 2002-04-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
1155 * sysdeps/sh/pt-machine.h: Define _PT_MACHINE_H
1156 if it isn't defined yet.
1157 (FLOATING_STACKS, ARCH_STACK_MAX_SIZE): Defined.
1158 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
1160 * sysdeps/sh/tls.h: New file.
1162 2002-04-08 Jakub Jelinek <jakub@redhat.com>
1164 * manager.c (__pthread_manager_event): Use self instead of arg
1165 for INIT_THREAD_SELF.
1166 * sysdeps/i386/useldt.h (INIT_THREAD_SELF): Use sizeof (struct
1167 _pthread_descr_struct) instead of sizeof (*descr).
1169 2002-04-05 Ulrich Drepper <drepper@redhat.com>
1171 * sysdeps/ia64/pt-machine.h: Protect against multiple inclusion.
1172 * sysdeps/alpha/pt-machine.h: Likewise.
1173 * sysdeps/arm/pt-machine.h: Likewise.
1174 * sysdeps/cris/pt-machine.h: Likewise.
1175 * sysdeps/hppa/pt-machine.h: Likewise.
1176 * sysdeps/m68k/pt-machine.h: Likewise.
1177 * sysdeps/mips/pt-machine.h: Likewise.
1178 * sysdeps/powerpc/pt-machine.h: Likewise.
1179 * sysdeps/s390/s390-32/pt-machine.h: Likewise.
1180 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
1181 * sysdeps/sh/pt-machine.h: Likewise.
1182 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
1183 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1184 * sysdeps/x86_64/pt-machine.h: Likewise.
1186 2002-04-05 Jakub Jelinek <jakub@redhat.com>
1188 * man/pthread_mutexattr_init.man (pthread_mutexattr_settype): Document
1189 instead of pthread_mutexattr_setkind_np.
1190 (pthread_mutexattr_gettype): Similarly.
1191 * man/pthread_mutexattr_setkind_np.man: New.
1192 * man/Makefile (SOURCES): Add pthread_mutexattr_setkind_np.man.
1194 2002-04-02 Ulrich Drepper <drepper@redhat.com>
1196 * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Define.
1198 2002-03-22 Jakub Jelinek <jakub@redhat.com>
1200 * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Remove.
1202 2002-03-22 Ulrich Drepper <drepper@redhat.com>
1204 * internals.h (MEMORY_BARRIER): Define as asm with memory as clobber.
1206 2002-03-17 Andreas Jaeger <aj@suse.de>
1208 * sysdeps/i386/pt-machine.h: Add testandset and __compare_and_swap
1210 * sysdeps/alpha/pt-machine.h: Likewise.
1211 * sysdeps/arm/pt-machine.h: Likewise.
1212 * sysdeps/cris/pt-machine.h: Likewise.
1213 * sysdeps/hppa/pt-machine.h: Likewise.
1214 * sysdeps/i386/i686/pt-machine.h: Likewise.
1215 * sysdeps/ia64/pt-machine.h: Likewise.
1216 * sysdeps/m68k/pt-machine.h: Likewise.
1217 * sysdeps/mips/pt-machine.h: Likewise.
1218 * sysdeps/powerpc/pt-machine.h: Likewise.
1219 * sysdeps/s390/s390-32/pt-machine.h: Likewise.
1220 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
1221 * sysdeps/sh/pt-machine.h: Likewise.
1222 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
1223 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1224 * sysdeps/x86_64/pt-machine.h: Likewise.
1226 * internals.h: Move testandset and __compare_and_swap prototypes
1229 2002-03-03 Andreas Jaeger <aj@suse.de>
1231 * errno.c: Include resolv.h to avoid warning.
1233 2002-02-27 Ulrich Drepper <drepper@redhat.com>
1235 * pthread.c [USE_TLS] (thread_self_stack): Correct check for upper
1238 2002-02-23 Ulrich Drepper <drepper@redhat.com>
1240 * attr.c (pthread_getattr_np): Don't take thread descriptor size
1241 into account if USE_TLS.
1242 * manager.c (pthread_handle_create): Free TLS data structures if call
1243 failed. Pass correct stack to clone if USE_TLS.
1244 * sysdeps/i386/pt-machine.h: Handle multiple inclusion.
1245 * sysdeps/i386/i686/pt-machine.h: Likewise.
1246 * sysdeps/i386/tls.h: Unconditionally include <pt-machine.h>.
1248 * descr.h (struct _pthread_descr_struct): Update p_header for TLS.
1249 Add p_stackaddr element #if USE_TLS.
1250 * internals.c: Include <tls.h>.
1251 * manager.c: Integrate creating and handling of thread descriptor
1253 * pthread.c: Likewise.
1254 * sysdeps/i386/tls.h (tcbhead_t): Add self pointer.
1255 Include <linuxthreads/descr.h> only if TLS is really used.
1256 (GET_DTV): New macro.
1257 (TLS_INIT_TP): Initialize self pointer.
1259 2002-02-17 Andreas Schwab <schwab@suse.de>
1261 * signals.c (sigwait): Check for old sighandler being SIG_ERR,
1264 2002-02-12 Ulrich Drepper <drepper@redhat.com>
1266 * sysdeps/i386/tls.c (INSTALL_NEW_DTV): Define.
1267 (INSTALL_DTV): Adjust for being passed pointer to element with length.
1269 2002-02-08 Ulrich Drepper <drepper@redhat.com>
1271 * sysdeps/i386/tls.h (TLS_INIT_TP): Also initialize %gs.
1273 2002-02-08 Richard Henderson <rth@redhat.com>
1275 * sysdeps/alpha/elf/pt-initfini.c: Use \n\ for multiline string.
1277 2002-02-08 Ulrich Drepper <drepper@redhat.com>
1279 * sysdeps/i386/tls.h: TLS cannot be supported with FLOATING_STACKS
1282 2002-02-07 H.J. Lu <hjl@gnu.org>
1284 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Silence the
1286 (__pthread_spin_lock): Remove ".set noreorder".
1287 * sysdeps/mips/pt-machine.h (__compare_and_swap): Liekwise.
1289 2002-02-05 H.J. Lu <hjl@gnu.org>
1291 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Not use
1293 * sysdeps/mips/pt-machine.h (testandset): Likewise.
1294 (__compare_and_swap): Likewise.
1296 2002-02-07 Ulrich Drepper <drepper@redhat.com>
1298 * internals.h: Move declarations/definitions of
1299 __pthread_initial_thread_bos, __pthread_initial_thread,
1300 __pthread_manager_thread_bos, __pthread_manager_thread_tos,
1301 __pthread_manager_thread, __pthread_nonstandard_stacks, STACK_SIZE,
1302 CURRENT_STACK_FRAME, __pthread_find_self, and thread_self...
1304 * sysdeps/i386/tls.h: Add TLS definitions also for !FLOATING_STACKS.
1305 Define THREAD_GETMEM accordingly.
1307 2002-02-06 Ulrich Drepper <drepper@redhat.com>
1309 * sysdeps/i386/tls.h: Include <stddef.h> for size_t.
1311 * sysdeps/i386/tls.h: Define THREAD_DTV.
1313 2002-02-04 Ulrich Drepper <drepper@redhat.com>
1315 * internals.h: Move thread descriptor definition...
1316 * descr.h.: ...here. New file.
1317 * sysdeps/i386/tls.h: New file.
1319 2002-02-01 H.J. Lu <hjl@gnu.org>
1321 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Use a
1322 different register in the delayed slot. Use branch likely.
1324 * sysdeps/mips/pt-machine.h (testandset): Call _test_and_set.
1325 (__compare_and_swap): Return 0 only when failed to compare. Use
1328 2002-02-01 Jakub Jelinek <jakub@redhat.com>
1330 * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set,
1331 __pthread_kill_other_threads_np): Move to GLIBC_PRIVATE.
1332 * sysdeps/i386/i586/Versions: Move all symbols to GLIBC_PRIVATE.
1333 * sysdeps/i386/i686/Versions: Move all symbols to GLIBC_PRIVATE.
1334 * sysdeps/sparc/sparc32/sparcv9/Versions: New file.
1335 * sysdeps/sparc/sparc64/Versions: New file.
1336 * sysdeps/ia64/Versions: Move all symbols to GLIBC_PRIVATE.
1338 2002-01-31 Ulrich Drepper <drepper@redhat.com>
1340 * pthread.c: _dl_cpuclock_offset is not any longer a global variable
1341 in SHARED code, use GL(dl_cpuclock_offset).
1343 2002-01-28 Andreas Jaeger <aj@suse.de>
1345 * sysdeps/mips/pspinlock.c (__pthread_spin_init): Clear *LOCK to
1346 0. Patch by Machida Hiroyuki <machida@sm.sony.co.jp>.
1348 2002-01-16 Martin Schwidefsky <schwidefsky@de.ibm.com>
1350 * sysdeps/s390/s390-32/pt-machine.h (MEMORY_BARRIER): Define.
1351 (CURRENT_STACK_FRAME): Remove duplicate definition.
1352 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
1354 2002-01-14 Martin Schwidefsky <schwidefsky@de.ibm.com>
1356 * Makefile (CFLAGS-tst-cancel.c): Add -fno-inline-functions to prevent
1359 2002-01-12 Andreas Schwab <schwab@suse.de>
1361 * Makefile (test-srcs): Add tst-signal.
1362 (tests): Run tst-signal.
1363 (distribute): Add tst-signal.sh.
1364 * tst-signal.c, tst-signal.sh: New files.
1366 2002-01-14 Andreas Jaeger <aj@suse.de>
1368 * sysdeps/x86_64/pt-machine.h (INIT_THREAD_SELF): Avoid warning.
1370 2002-01-11 Andreas Schwab <schwab@suse.de>
1372 * signals.c (sighandler): Initialize all elements to SIG_ERR.
1373 (__sigaction): Don't use value from sighandler if it is SIG_ERR.
1375 2002-01-06 Richard Henderson <rth@redhat.com>
1377 * sysdeps/alpha/elf/pt-initfini.c: New file.
1379 2001-12-29 Andreas Jaeger <aj@suse.de>
1381 * Examples/ex9.c: Add noreturn attribute for thread.
1382 * Examples/ex10.c: Likewise.
1383 * Examples/ex13.c (thread_start): Likewise.
1384 * Examples/ex15.c (worker): Likewise.
1386 * Examples/ex18.c: Include unistd.h for prototype of sleep.
1388 2001-12-14 Ulrich Drepper <drepper@redhat.com>
1390 * man/pthread_atfork.man: Adjust description of mutex handling
1391 after fork for current implementation.
1392 * linuxthreads.texi: Likewise [PR libc/2519].
1394 2001-12-13 Andreas Schwab <schwab@suse.de>
1396 * specific.c (pthread_key_delete): Don't contact the thread
1397 manager if no threads have been created yet.
1399 2001-12-12 NIIBE Yutaka <gniibe@m17n.org>
1401 * sysdeps/sh/pt-machine.h (INIT_THREAD_SELF): Added __volatile__
1402 qualifier to be safe.
1404 2001-11-30 Andreas Schwab <schwab@suse.de>
1406 * pthread.c (pthread_handle_sigcancel) [THREAD_SELF]: Double check
1407 that self is the manager thread, and initialize the thread
1409 (thread_self_stack) [THREAD_SELF]: New function to find self via
1411 * manager.c (pthread_handle_create): Don't block cancel signal any
1414 2001-11-29 Andreas Jaeger <aj@suse.de>
1416 * sysdeps/x86_64/pt-machine.h: Use %gs as thread specific register.
1418 (INIT_THREAD_SELF): New.
1419 (THREAD_GETMEM): New.
1421 (THREAD_SETMEM): New.
1422 (THREAD_SETMEM_NC): New.
1423 (FLOATING_STACKS): Define.
1424 (ARCH_STACK_MAX_SIZE): Define.
1426 2001-11-28 Kaz Kylheku <kaz@ashi.footprints.net>
1428 Bugfix to pthread_key_delete. It was iterating over the thread
1429 manager's linked list of threads, behind the thread manager's
1430 back causing a race. The fix is to have the manager iterate over
1431 the threads instead, using a new request type for doing so.
1432 * internals.h (struct pthread_request): New manager request type
1433 REQ_FOR_EACH_THREAD.
1434 * manager.c (pthread_for_each_thread): New function.
1435 (__pthread_manager): Handle new REQ_FOR_EACH_THREAD request.
1436 * specific.c (struct pthread_key_delete_helper_args): New type.
1437 (pthread_key_delete_helper): New static function.
1438 (pthread_key_delete): Use the new thread manager
1439 REQ_FOR_EACH_THREAD function to iterate over the threads and set
1440 the delete key slot to a null value in each thread.
1441 * Examples/ex18.c: New test.
1442 * Makefile (tests): Add ex18.
1444 2001-11-22 Wolfram Gloger <wg@malloc.de>
1446 * pthread.c (pthread_onexit_process): Don't call free
1447 after threads have been asynchronously terminated.
1449 * manager.c (pthread_handle_exit): Surround cancellation
1450 of threads with __flockfilelist()/__funlockfilelist().
1452 2001-11-26 Andreas Schwab <schwab@suse.de>
1454 * manager.c (pthread_handle_create): Start the child thread with
1455 the cancel signal blocked, so that it does not handle it before
1456 the thread register is set up. Save errno from failed clone call.
1458 2001-11-15 Ulrich Drepper <drepper@redhat.com>
1460 * sysdeps/i386/i686/Implies: Removed.
1461 * sysdeps/i386/i686/Versions: New file.
1463 2001-10-31 Andreas Jaeger <aj@suse.de>
1465 * sysdeps/x86_64/Makefile: Remove, we do not need it anymore.
1467 2001-10-05 Kevin Buettner <kevinb@cygnus.com>
1469 * pthread.c (__linuxthread_pthread_sizeof_descr): Change name
1470 to __linuxthreads_pthread_sizeof_descr to match name used by
1471 symbol_list_arr[LINUXTHREADS_PTHREAD_SIZEOF_DESCR] in
1472 linuxthreads_db/td_symbol_list.c.
1474 2001-09-22 Andreas Jaeger <aj@suse.de>
1476 * linuxthreads/tst-context.c: Avoid compile warning.
1478 2001-09-20 Andreas Jaeger <aj@suse.de>
1480 * shlib-versions: Add x86-64.
1482 2001-09-19 Andreas Jaeger <aj@suse.de>
1484 * sysdeps/x86_64/Makefile: New file.
1485 * sysdeps/x86_64/pspinlock.c: New file.
1486 * sysdeps/x86_64/pt-machine.h: New file.
1488 2001-09-12 Jakub Jelinek <jakub@redhat.com>
1490 * sysdeps/pthread/timer_delete.c (timer_delete): Thread may be NULL
1492 * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
1494 2001-09-11 Ulrich Drepper <drepper@redhat.com>
1495 Wolfram Gloger <wg@malloc.de>
1497 * join.c: Protect all communications from and to manager with
1499 * manager.c: Likewise.
1500 * pthread.c: Likewise.
1501 * smeaphore.c: Likewise.
1503 2001-08-29 Ulrich Drepper <drepper@redhat.com>
1505 * spinlock.c (__pthread_lock): Top max_count value with
1506 MAX_ADAPTIVE_SPIN_COUNT.
1507 * internals.h (MAX_ADAPTIVE_SPIN_COUNT): Define if not already done.
1509 * sysdeps/i386/i686/pt-machine.h (BUSY_WAIT_NOP): New macro to
1512 2001-08-27 Jakub Jelinek <jakub@redhat.com>
1514 * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_t): Only define to
1515 non-opaque type if __USE_UNIX98.
1517 2001-08-26 Jakub Jelinek <jakub@redhat.com>
1519 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_t): Define
1520 non-opaque lock types also if _IO_MTSAFE_IO is defined.
1522 2001-08-23 Roland McGrath <roland@frob.com>
1524 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start): Take
1525 new first argument, skip the cleanup handler if it's zero.
1526 (_LIBC_LOCK_RECURSIVE_INITIALIZER): New macro.
1527 (__libc_lock_define_initialized_recursive): Use it.
1528 * sysdeps/pthread/bits/stdio-lock.h: File removed.
1529 The sysdeps/generic file from the main tree now suffices.
1531 2001-08-22 Roland McGrath <roland@frob.com>
1533 * sysdeps/pthread/bits/stdio-lock.h: Include <bits/libc-lock.h>
1534 instead of <pthread.h>.
1535 (_IO_lock_t): Define this typedef using __libc_lock_define_recursive.
1536 (_IO_lock_initializer): Add braces.
1537 (_IO_lock_lock): Use __libc_lock_lock_recursive.
1538 (_IO_lock_unlock): Use __libc_lock_unlock_recursive.
1540 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_recursive_t): New type.
1541 (__libc_lock_define_initialized_recursive): Use it.
1542 (__libc_lock_init_recursive): Likewise.
1543 (__libc_lock_fini_recursive): Likewise.
1544 (__libc_lock_lock_recursive): Likewise.
1545 (__libc_lock_trylock_recursive): Likewise.
1546 (__libc_lock_unlock_recursive): Likewise.
1547 (__libc_lock_define_recursive): New macro.
1549 2001-08-14 Jakub Jelinek <jakub@redhat.com>
1551 * lockfile.c (__pthread_provide_lockfile): New variable.
1552 * pthread.c (__pthread_require_lockfile): New variable.
1553 * cancel.c (__pthread_require_lockfile): New variable.
1555 2001-07-31 Ulrich Drepper <drepper@redhat.com>
1557 * tst-context.c (threadfct): Initialize context before calling
1560 * Examples/ex17.c: Make sure test thread is around long enough.
1562 2001-07-26 kaz Kojima <kkojima@rr.iij4u.or.jp>
1564 * sysdeps/sh/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF): Defined.
1566 2001-07-24 Ulrich Drepper <drepper@redhat.com>
1568 * tst-context.c (main): Print explanation before bailing out
1569 because context handling is not supported.
1571 2001-07-23 Ulrich Drepper <drepper@redhat.com>
1573 * Makefile (tests): Add tst-context.
1574 * tst-context.c: New file.
1576 * sysdeps/pthread/bits/stdio-lock.h: Define
1577 _IO_cleanup_region_start_noarg.
1579 2001-07-23 Jakub Jelinek <jakub@redhat.com>
1581 * sysdeps/alpha/pt-machine.h (FLOATING_STACKS): Define.
1582 (ARCH_STACK_MAX_SIZE): Define.
1583 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
1584 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1586 2001-07-19 Jakub Jelinek <jakub@redhat.com>
1588 * sysdeps/i386/useldt.h: Fix typo in ARCH_STACK_MAX_SIZE comment.
1590 * sysdeps/ia64/pt-machine.h (FLOATING_STACKS): Define.
1591 (ARCH_STACK_MAX_SIZE): Define.
1592 * manager.c (pthread_allocate_stack): Handle FLOATING_STACKS with
1593 NEED_SEPARATE_REGISTER_STACK.
1595 2001-07-16 Andreas Schwab <schwab@suse.de>
1597 * Makefile (before-compile): Don't add $(objpfx)crti.o.
1598 (omit-deps): Add crti.
1599 ($(objpfx)libpthread.so): Depend on $(objpfx)crti.o, but make sure
1600 it is filtered out of the link command.
1602 2001-07-16 Ulrich Drepper <drepper@redhat.com>
1604 * pthread.c (pthread_initialize): For FLOATING_STACKS don't bother
1605 to find the right value for __pthread_initial_thread_bos, it's not
1606 used. If not FLOATING_STACKS first run
1607 __pthread_init_max_stacksize.
1609 2001-06-16 H.J. Lu <hjl@gnu.org>
1611 * internals.h: Include <stackinfo.h>.
1613 * attr.c: Don't include <stackinfo.h> here.
1614 * cancel.c: Likewise.
1615 * manager.c: Likewise.
1616 * pthread.c: Likewise.
1617 * ptlongjmp.c: Likewise.
1619 2001-03-23 Matthew Wilcox <willy@ldl.fc.hp.com>
1621 * attr.c: Make _STACK_GROWS_UP work.
1622 * internals.h: Likewise.
1623 * manager.c: Likewise.
1624 * pthread.c: Likewise.
1626 2001-06-15 H.J. Lu <hjl@gnu.org>
1628 * pthread.c (__pthread_reset_main_thread): Fix a typo.
1630 2001-02-02 John S. Marvin <jsm@udlkern.fc.hp.com>
1632 * semaphore.h: Use struct _pthread_fastlock as an element of
1633 sem_t instead of an identical struct.
1634 * rwlock.c: Remove casts.
1635 * semaphore.c: Likewise.
1637 2001-04-30 Alan Modra <amodra@one.net.au>
1639 * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: New.
1641 2001-05-25 Bruce Mitchener <bruce@cubik.org>
1643 * linuxthreads.texi: Spelling corrections.
1645 2001-05-25 Ulrich Drepper <drepper@redhat.com>
1647 * oldsemaphore.c (__old_sem_wait): Clear p_nextwaiting before
1648 returning successfully.
1649 Patch by Gene Cooperman <gene@ccs.neu.edu>.
1651 2001-05-24 Ulrich Drepper <drepper@redhat.com>
1653 * spinlock.c (__pthread_lock) [HAS_COMPARE_AND_SWAP]: Before doing any
1654 serious work try once whether the lock is uncontested.
1655 Remove duplicate reading of __status before loop.
1656 Change suggested by Hans Boehm <hans_boehm@hp.com>.
1658 * spinlock.h (__pthread_trylock): Remove need for oldstatus variable.
1659 (__pthread_alt_trylock): Likewise.
1661 2001-05-01 Kaz Kylheku <kaz@ashi.footprints.net>
1663 Memory barrier overhaul following line by line inspection.
1664 * mutex.c (pthread_once): Missing memory barriers added.
1665 * pthread.c (__pthread_wait_for_restart_signal,
1666 __pthread_timedsuspend_new, __pthread_restart_new): Added
1667 memory barriers ``just in case'' and for documentary value.
1668 * spinlock.c (__pthread_release): New inline function for releasing
1669 spinlock, to complement __pthread_acquire. Includes memory
1670 barrier prior to assignment to spinlock, and __asm __volatile
1671 dance to prevent reordering or optimization of the spinlock access.
1672 * spinlock.c (__pthread_unlock, __pthread_alt_lock,
1673 __pthread_alt_timedlock, __pthread_alt_unlock,
1674 __pthread_compare_and_swap): Updated to use new __pthread_release
1675 instead of updating spinlock directly.
1676 * spinlock.c (__pthread_lock, __pthread_unlock, wait_node_alloc,
1677 wait_node_free, wait_node_dequeue, __pthread_alt_lock,
1678 __pthread_alt_timedlock, __pthread_alt_unlock, __pthread_acquire):
1679 Memory barrier overhaul. Lots of missing memory barriers added,
1680 a couple needless ones removed.
1681 * spinlock.c (__pthread_compare_and_swap): testandset optimization
1682 removed, just calls __pthread_acquire, which has the new read
1683 barrier in it before its testandset.
1685 2001-05-20 Roland McGrath <roland@frob.com>
1687 * Makeconfig: New file, variables used to be in main libc Makeconfig.
1689 2001-05-09 Geoff Keating <geoffk@redhat.com>
1691 * sysdeps/powerpc/pt-machine.h
1692 (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): Define.
1693 (__compare_and_swap): Remove memory barriers.
1694 (__compare_and_swap_with_release_semantics): New function.
1696 2001-04-24 Andreas Jaeger <aj@suse.de>
1698 * wrapsyscall.c: send* and recv* return ssize_t.
1700 * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Unlock the
1701 mutex instead of double locking it.
1702 Reported by Pierre Artaud <partaud@sodatec.com>.
1704 2001-04-23 Ulrich Drepper <drepper@redhat.com>
1706 * sysdeps/pthread/getcpuclockid.c: Make function generic, test
1707 using #ifdef whether the clock is available.
1708 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: Removed.
1710 * sysdeps/ia64/Versions: New file.
1712 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init): We don't
1713 have to call __gmon_start__ in the libpthread DSO.
1714 * sysdeps/pthread/pt-initfini.c (_init): Likewise.
1716 * Makefile (libpthread-routines): Add ptclock_gettime and
1718 * internals.h: Don't use cpuclock-init.h definitions, use
1719 hp-timing.h definitions.
1720 * pthread.c: Likewise.
1721 * manager.c: Likewise.
1722 * ptclock_gettime.c: New file.
1723 * ptclock_settime.c: New file.
1724 * internals.h: Fix parameter type for __pthread_clock_gettime and
1725 __pthread_clock_settime.
1727 * sysdeps/i386/i586/ptclock_gettime.c: Removed.
1728 * sysdeps/i386/i586/ptclock_settime.c: Removed.
1729 * sysdeps/i386/i586/Makefile: Removed.
1731 2001-04-22 Ulrich Drepper <drepper@redhat.com>
1733 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_ASYNCH_IO.
1734 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1736 2001-04-21 Andreas Jaeger <aj@suse.de>
1738 * sysdeps/pthread/timer_routines.c (thread_func): Add noreturn
1739 attribute, remove statements that will never be executed.
1740 (thread_func): Remove mutex_unlock call since it's never executed.
1741 (thread_func): Fix comment as suggested by Jakub Jelinek.
1743 * manager.c (__pthread_manager): Add noreturn
1745 (pthread_start_thread): Likewise, remove return statement.
1746 (pthread_start_thread_event): Likewise.
1747 Add noreturn attribute for pthread_handle_exit.
1748 * weaks.c: Add noreturn attribute for pthread_exit.
1750 * internals.h: Add __pthread_clock_gettime and
1751 __pthread_clock_settime prototypes.
1753 2001-04-21 Ulrich Drepper <drepper@redhat.com>
1755 * internals.h: Include <cpuclock-init.h>.
1756 (struct _pthread_descr_struct): Add p_cpuclock_offset field if
1757 CPUCLOCK_VARDEF is defined.
1758 * pthread.c (__pthread_initialize_minimal): Initialize
1759 p_cpuclock_offset field for main thread if CPUCLOCK_INIT is defined.
1760 * manager.c (pthread_start_thread): Set p_cpuclock_offset field
1761 for new thread to current CPU clock value.
1763 * sysdeps/i386/useldt.h: Extend all the macros to handle 8-byte values.
1765 * sysdeps/i386/i586/Makefile: New file.
1766 * sysdeps/i386/i586/Versions: New file.
1767 * sysdeps/i386/i586/ptclock_gettime.c: New file.
1768 * sysdeps/i386/i586/ptclock_settime.c: New file.
1769 * sysdeps/i386/i686/Implies: New file.
1771 2001-04-18 Jakub Jelinek <jakub@redhat.com>
1773 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Put specs into
1774 $generated, not $postclean-generated.
1776 2001-04-18 Andreas Jaeger <aj@suse.de>
1778 * Makefile (otherlibs): Added.
1780 2001-04-18 Jakub Jelinek <jakub@redhat.com>
1782 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
1784 2001-04-16 Ulrich Drepper <drepper@redhat.com>
1786 * signals.c (sigwait): NSIG is no signal number. Block all
1787 signals while in signal handler for signals in SET.
1788 Patch by Manfred Spraul <manfred@colorfullife.com>.
1790 2001-04-12 Ulrich Drepper <drepper@redhat.com>
1792 * tst-cancel.c: Disable most tests. Add new test where all
1793 cleanup handlers must run.
1794 * Makefile (tests): Add tst-cancel again.
1796 * cancel.c (__pthread_perform_cleanup): Correct condition for
1797 leaving cleanup loop early.
1799 * sysdeps/i386/Makefile: Make sure gcc uses a frame pointer for
1800 all the files which use CURRENT_STACK_FRAME.
1801 * sysdeps/i386/pt-machine.h (CURRENT_STACK_FRAME): Define using
1802 __builtin_frame_address.
1803 * sysdeps/i386/i686/pt-machine.h: Likewise.
1805 2001-04-11 Ulrich Drepper <drepper@redhat.com>
1807 * Makefile (tests): Comment out tst-cancel for now.
1809 * tst-cancel.c (main): Cleanup 4 is supposed to run. Create
1810 temporary file in object directory.
1811 * Makefile: Don't allow inlining when compiling tst-cancel.c.
1812 Pass $(objpfx) to tst-cancel.
1814 2001-04-11 David S. Miller <davem@redhat.com>
1816 * sysdeps/sparc/sparc32/pt-machine.h (stack_pointer): Advance
1817 up closer to user local variables so that new cleanup heuristics work.
1818 * sysdeps/sparc/sparc64/pt-machine.h (stack_pointer): Likewise.
1820 2001-04-11 Ulrich Drepper <drepper@redhat.com>
1822 * cancel.c (_pthread_cleanup_push): Catch invalid __prev buffer
1824 (_pthread_cleanup_push_defer): Likewise.
1826 * tst-cancel.c (main): Fix loop printing cleanup output.
1828 2001-04-10 kaz Kojima <kkojima@rr.iij4u.or.jp>
1830 * sysdeps/sh/pspinlock.c (__pthread_spin_lock): Fix a reverse
1832 (__pthread_spin_trylock): Likewise.
1833 * sysdeps/sh/pt-machine.h (testandset): Likewise.
1835 2001-04-10 Ulrich Drepper <drepper@redhat.com>
1837 * join.c (pthread_exit): Move code to new function __pthread_do_exit
1838 which takes an extra parameter with the current frame pointer.
1839 Call new function with CURRENT_STACK_FRAME.
1840 (__pthread_do_exit): New function. Call __pthread_perform_cleanup
1841 with the new parameter.
1842 (pthread_join): Call __pthread_do_exit instead of pthread_exit.
1843 * cancel.c (__pthread_perform_cleanup): Takes extra parameter. Use
1844 this parameter as the initial value the cleanup handler records are
1845 compared against. No active cleanup handler record must have an
1846 address lower than the previous one and the initial record must be
1847 above (below on PA) the frame address passed in.
1848 (pthread_setcancelstate): Call __pthread_do_exit instead of
1850 (pthread_setcanceltype): Likewise.
1851 (pthread_testcancel): Likewise.
1852 (_pthread_cleanup_pop_restore): Likewise.
1853 * condvar.c (pthread_cond_wait): Likewise.
1854 (pthread_cond_timedwait_relative): Likewise.
1855 * manager.c (pthread_start_thread): Likewise.
1856 * oldsemaphore.c (__old_sem_wait): Likewise.
1857 * pthread.c (pthread_handle_sigcancel): Likewise.
1858 * semaphore.c (__new_sem_wait): Likewise.
1859 (sem_timedwait): Likewise.
1860 * ptlongjmp.c (pthread_cleanup_upto): Also use current stack frame
1861 to limit the cleanup handlers which get run.
1862 * internals.h: Add prototype for __pthread_do_exit. Adjust prototype
1863 for __pthread_perform_cleanup.
1865 * Makefile (tests): Add tst-cancel.
1866 * tst-cancel.c: New file.
1868 2001-04-08 Hans-Peter Nilsson <hp@axis.com>
1870 * sysdeps/cris/pt-machine.h: New file.
1871 * sysdeps/cris/pspinlock.c: New file.
1873 2001-04-09 Hans-Peter Nilsson <hp@axis.com>
1875 * shlib-versions: Add case for Linux on CRIS.
1877 2001-03-26 Ulrich Drepper <drepper@redhat.com>
1879 * attr.c (pthread_getattr_np): Correct computation of stack size
1880 for machiens with register stack.
1882 * Examples/ex17.c (main): Correct detection of failed mmap call.
1884 2001-03-21 Jakub Jelinek <jakub@redhat.com>
1886 * pthread.c (__pthread_initialize_manager): Fix a typo.
1888 2001-03-21 Jakub Jelinek <jakub@redhat.com>
1890 * attr.c (__pthread_attr_setstack): Fix alignment check.
1891 (pthread_getattr_np): __stackaddr is top of stack, not bottom.
1892 * Makefile (tests): Add ex17 test.
1893 * Examples/ex17.c: New test.
1895 2001-03-20 Ulrich Drepper <drepper@redhat.com>
1897 * Makefile: Define -D_RPC_THREAD_SAFE_ for cancel.c.
1898 * cancel.c (__pthread_perform_cleanup): Call __rpc_thread_destroy.
1899 * sysdeps/pthread/bits/libc-tsd.h: Define _LIBC_TSD_KEY_VARS.
1901 2001-03-18 Ulrich Drepper <drepper@redhat.com>
1903 * Makefile: When generating DSO link with libc_nonshared.a.
1905 2001-02-26 Jakub Jelinek <jakub@redhat.com>
1907 * signals.c (pthread_sighandler): Use CALL_SIGHANDLER.
1909 2001-02-23 Jakub Jelinek <jakub@redhat.com>
1911 * internals.h (__pthread_init_max_stacksize): New prototype.
1912 * attr.c (__pthread_attr_setstacksize): Call
1913 __pthread_init_max_stacksize if not yet initialized.
1914 * pthread.c (__pthread_init_max_stacksize): New function.
1915 (__pthread_initialize_manager): Call it.
1916 Patch by <dtc@cmucl.cons.org>.
1918 2001-03-16 Ulrich Drepper <drepper@redhat.com>
1920 * attr.c (pthread_getattr_np): Fix __stacksize computation for IA-64.
1922 2001-03-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
1924 * shlib-versions: Add rule for Linux on 64 bit S/390.
1925 * sysdeps/s390/s390-64/pt-machine.h: New file.
1926 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
1928 2001-03-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
1930 * sysdeps/s390/pt-machine.h: Move to...
1931 * sysdeps/s390/s390-32/pt-machine.h: ...here.
1932 Add defines for FLOATING_STACK and ARCH_STACK_MAX_SIZE.
1934 2001-03-15 Ulrich Drepper <drepper@redhat.com>
1936 * Versions [libpthread] (GLIBC_2.2.3): Add pthread_getattr_np.
1937 * attr.c: Implement pthread_getattr_np.
1938 * sysdeps/pthread/pthread.h: Add prototype for pthread_getattr_np.
1939 * internals.h (struct _pthread_descr_struct): Add p_inheritsched.
1940 * manager.c (pthread_handle_create): Initialize p_inheritsched.
1942 2001-03-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
1944 * sysdeps/unix/sysv/linux/s390/pt-initfini.c: Use 0x07 padding for
1947 2001-02-20 Hans Boehm <hans_boehm@hp.com>
1949 * manager.c (manager_mask): Removed static vesion. Now always local
1950 to __pthread_manager().
1951 (manager_mask_all): Removed completely.
1952 (__pthread_manager): Remove manager_mask_all initialization.
1953 (pthread_handle_create): Remove code to set and reset signal mask
1954 around __clone2() calls.
1956 2001-02-17 Jakub Jelinek <jakub@redhat.com>
1958 * spinlock.c (__pthread_lock): Force lock->__status to be read from
1959 memory on every spin.
1961 2001-02-10 Andreas Jaeger <aj@suse.de>
1963 * Makefile (extra-objs): New.
1965 2001-02-09 Jakub Jelinek <jakub@redhat.com>
1967 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Add
1968 __pthread_initialize_minimal prototype.
1970 2001-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
1972 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
1974 2001-02-06 Martin Schwidefsky <schwidefsky@de.ibm.com>
1976 * sysdeps/unix/sysv/linux/s390/pt-initfini.c: New file.
1978 2001-02-06 Ulrich Drepper <drepper@redhat.com>
1980 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: First attempt to fix the
1981 broken code. Patch by Jes Sorensen.
1983 2001-02-06 Andreas Jaeger <aj@suse.de>
1985 * sysdeps/pthread/pthread.h: Move __pthread_initialize from here
1987 * internals.h: ...here.
1989 2001-02-05 Jes Sorensen <jes@linuxcare.com>
1991 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
1993 2001-02-02 Ulrich Drepper <drepper@redhat.com>
1995 * Versions: Remove __pthread_initialize_minimal.
1997 2001-02-01 Ulrich Drepper <drepper@redhat.com>
1999 * Makefile: Add rules to build crti.o and make it being used in
2000 building libpthread.so.
2001 * sysdeps/i386/Makefile: New file.
2002 * sysdeps/pthread/pt-initfini.c: New file.
2004 * pthread.c: Cleanups.
2006 2001-01-28 Andreas Jaeger <aj@suse.de>
2008 * oldsemaphore.c (__old_sem_init): Adjust for last change.
2009 * sysdeps/pthread/bits/libc-lock.h: Likewise.
2010 * spinlock.c: Likewise.
2012 2001-01-28 Ulrich Drepper <drepper@redhat.com>
2014 * sysdeps/pthread/bits/initspin.h: Make all names namespace clean.
2015 * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
2016 * manager.c: Adjust for namespace cleanup in bits/initspin.h.
2017 * pthread.c: Likewise.
2018 * spinlock.h: Likewise.
2019 * sysdeps/pthread/pthread.h: Likewise.
2021 2001-01-26 Ulrich Drepper <drepper@redhat.com>
2023 * sysdeps/pthread/bits/pthreadtypes.h: Define pthread_attr_t also
2024 as struct __pthread_attr_s.
2026 * semaphore.h (sem_t): Cleanup namespace, rename status and
2029 2001-01-13 Jakub Jelinek <jakub@redhat.com>
2031 * pthread.c (pthread_onexit_process): Clear
2032 __pthread_manager_thread_bos after freeing it.
2033 * Makefile (tests): Add ex16.
2034 * Examples/ex16.c: New file.
2036 2001-01-11 Jakub Jelinek <jakub@redhat.com>
2038 * Makefile (CFLAGS-pthread.c): Pass -DHAVE_Z_NODELETE if ld supports
2040 * pthread.c (pthread_exit_process): Rename to...
2041 (pthread_onexit_process): ...this.
2042 (pthread_atexit_process, pthread_atexit_retcode): New.
2043 (pthread_initialize): Call __cxa_atexit instead of __cxa_on_exit
2044 and only if HAVE_Z_NODELETE is not defined.
2045 (__pthread_initialize_manager): Register pthread_atexit_retcode
2048 2001-01-11 Ulrich Drepper <drepper@redhat.com>
2050 * pthread.c (pthread_initialize): Use __cxs_on_exit not __cxa_atexit.
2052 2001-01-11 Jakub Jelinek <jakub@redhat.com>
2054 * Makefile (tests): Add ex15.
2055 * Examples/ex15.c: New test.
2057 2001-01-08 Ulrich Drepper <drepper@redhat.com>
2059 * pthread.c (pthread_exit_process): Free memory allocated for
2062 2000-12-31 Ulrich Drepper <drepper@redhat.com>
2064 * manager.c (pthread_alloca_stack): Remove MAP_FIXED from mmap calls.
2065 (pthread_free): Always unmap the stack. It's safe now that we don't
2066 use MAP_FIXED to allocate stacks.
2068 2000-12-31 Ulrich Drepper <drepper@redhat.com>
2070 * sysdeps/powerpc/pspinlock.c: Don't include pt-machine.h here.
2072 * manager.c (pthread_allocate_stack): Prepare for removal of MAP_FIXED.
2074 2000-11-15 Wolfram Gloger <wg@malloc.de>
2076 * manager.c (pthread_free): [!FLOATING_STACKS]: Only remap the
2077 stack to PROT_NONE, don't unmap it, avoiding collisions with malloc.
2079 2000-12-27 Andreas Jaeger <aj@suse.de>
2081 * Examples/ex13.c: Make local functions static.
2082 * ecmutex.c: Likewise.
2083 * joinrace.c: Likewise.
2084 * Examples/ex14.c: Likewise.
2086 * Examples/ex2.c: Make local functions static; reformat.
2087 * Examples/ex1.c: Likewise.
2088 * Examples/ex4.c: Likewise.
2089 * Examples/ex5.c: Likewise.
2090 * Examples/ex7.c: Likewise.
2092 * oldsemaphore.c: Add prototypes to shut up GCC.
2093 * pt-machine.c: Likewise.
2095 * weaks.c: Add prototype for pthread_exit.
2097 * internals.h: Add some prototypes, format prototypes and add
2099 Move __libc_waitpid prototype to include/sys/wait.h.
2101 * rwlock.c: Include <bits/libc-lock.h> for prototypes.
2102 * mutex.c: Likewise.
2103 * specific.c: Likewise.
2104 * ptfork.c: Likewise.
2106 * lockfile.c: Include internals.h to get prototypes.
2107 * events.c: Likewise.
2108 * sysdeps/alpha/pspinlock.c: Likewise.
2109 * sysdeps/arm/pspinlock.c: Likewise.
2110 * sysdeps/hppa/pspinlock.c: Likewise.
2111 * sysdeps/i386/pspinlock.c: Likewise.
2112 * sysdeps/ia64/pspinlock.c: Likewise.
2113 * sysdeps/m68k/pspinlock.c: Likewise.
2114 * sysdeps/mips/pspinlock.c: Likewise.
2115 * sysdeps/powerpc/pspinlock.c: Likewise.
2116 * sysdeps/s390/pspinlock.c: Likewise.
2117 * sysdeps/sh/pspinlock.c: Likewise.
2118 * sysdeps/sparc/sparc32/pspinlock.c: Likewise.
2119 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: Likewise.
2120 * sysdeps/sparc/sparc64/pspinlock.c: Likewise.
2122 2000-12-27 Ulrich Drepper <drepper@redhat.com>
2124 * attr.c (__pthread_attr_setstack): Fix setting of __stackaddr element.
2125 (__pthread_attr_getstack): Return correct address.
2126 Add warnings for using pthread_attr_getstackaddr and
2127 pthread_attr_setstackaddr.
2129 2000-12-26 Ulrich Drepper <drepper@redhat.com>
2131 * Examples/ex6.c (test_thread): Make static.
2132 * Examples/ex12.c (test_thread): Make static and add noreturn
2135 2000-12-18 Jes Sorensen <jes@linuxcare.com>
2137 * linuxthreads/sysdeps/ia64/pt-machine.h: __compare_and_swap
2138 and compare_and_swap_with_release_semantics returns int not long.
2140 2000-12-17 Andreas Jaeger <aj@suse.de>
2142 * sysdeps/s390/pt-machine.h (testandset): Use long int as return
2144 * sysdeps/arm/pt-machine.h (testandset): Likewise.
2145 * sysdeps/hppa/pt-machine.h (testandset): Likewise.
2146 * sysdeps/m68k/pt-machine.h (testandset): Likewise.
2147 * sysdeps/sh/pt-machine.h (testandset): Likewise.
2148 * sysdeps/sparc/sparc32/pt-machine.h (testandset): Likewise.
2149 * sysdeps/sparc/sparc64/pt-machine.h (testandset): Likewise.
2151 2000-12-17 Ulrich Drepper <drepper@redhat.com>
2153 * sysdeps/i386/pt-machine.h (testandset): Adjust for prototype change.
2154 * sysdeps/i386/i686/pt-machine.h (testandset): Likewise.
2156 2000-12-17 Andreas Jaeger <aj@suse.de>
2158 * internals.h: Add prototypes for testandset and
2159 __compare_and_swap to shut up gcc warnings.
2161 2000-12-06 Wolfram Gloger <wg@malloc.de>
2163 * join.c (pthread_detach): Allow case where the thread has already
2166 2000-12-05 Andreas Jaeger <aj@suse.de>
2168 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Don't set mips2.
2169 * sysdeps/mips/pt-machine.h (testandset): Likewise.
2170 (__compare_and_swap): Likewise.
2171 Patches by Maciej W. Rozycki <macro@ds2.pg.gda.pl>.
2173 2000-11-20 Jakub Jelinek <jakub@redhat.com>
2175 * Examples/ex3.c (main): Cast int to long before casting to void *.
2176 (search): Cast void * to long, not int.
2177 * Examples/ex8.c (main, thread): Similarly.
2178 * Examples/ex11.c (main): Similarly.
2179 * Examples/ex14.c (worker, do_test): Similarly.
2180 * ecmutex.c (worker, do_test): Similarly.
2181 (nlocks): Cast to int.
2183 2000-11-08 Bruce Mitchener <bruce@cubik.org>
2185 * linuxthreads.texi: Add documentation for pthreads attributes
2186 guardsize, stackaddr, stacksize, and stack. Fix typo in previous
2187 patch. Document pthread_[sg]etconcurrency(). Mark
2188 pthread_mutexattr_[sg]ettype() as POSIX rather than GNU.
2190 2000-11-07 Ulrich Drepper <drepper@redhat.com>
2192 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
2194 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2195 Reported by Christopher Yeoh <cyeoh@linuxcare.com.au>.
2197 2000-11-06 Ulrich Drepper <drepper@redhat.com>
2199 * cancel.c (pthread_cancel): Always set p_canceled, even if we are
2200 not doing it right now.
2201 Reported by Kaz Kylheku <kaz@ashi.footprints.net>.
2203 2000-10-30 Ulrich Drepper <drepper@redhat.com>
2205 * Examples/ex4.c (main): Don't use exit() to avoid warning with
2208 2000-10-29 Ulrich Drepper <drepper@redhat.com>
2210 * attr.c (__pthread_attr_setguardsize): Don't round guardsize
2211 here. Reported by Bruce Mitchener <bruce@cubik.org>.
2213 * linuxthreads.texi: Changes terminology to 'type' from 'kind' when
2214 discussing mutexes. (As per the Unix98 name for the API.)
2215 Changes documentation for pthread_mutexattr_setkind_np() and
2216 pthread_mutexattr_getkind_np() over to the Unix98 APIs for the
2217 same: pthread_mutexattr_settype() and pthread_mutexattr_gettype().
2218 Changes references to PTHREAD_MUTEXATTR_FAST_NP to
2219 PTHREAD_MUTEXATTR_ADAPTIVE_NP.
2220 Begins to introduce discussion of the ``timed'' mutex type. This
2221 discussion is currently incomplete.
2222 Patch by Bruce Mitchener <bruce@cubik.org>.
2224 2000-10-26 Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
2225 Yutaka Niibe <gniibe@chroot.org>
2227 * sysdeps/sh/pt-machine.h (testandset): Since the operand of TAS.B
2228 has restrictions, use register.
2230 2000-10-23 Andreas Schwab <schwab@suse.de>
2232 * Examples/ex14.c (TIMEOUT): Override default timeout.
2234 2000-10-16 Ulrich Drepper <drepper@redhat.com>
2236 * specific.c: Protect tsd array modification in thread data
2237 structures by getting the thread lock in pthread_key_delete and
2238 __pthread_destroy_specifics.
2239 Patch by Wolfram Gloger <Wolfram.Gloger@dent.med.uni-muenchen.de>.
2241 2000-10-12 Alan Modra <alan@linuxcare.com.au>
2243 * sysdeps/pthread/bits/initspin.h: New file.
2244 * spinlock.h: Move LOCK_INITIALIZER definition to <bits/initspin.h>.
2245 (__pthread_init_lock): Initialize lock with LT_SPINLOCK_INIT.
2246 (__pthread_alt_init_lock): Likewise.
2247 (__pthread_alt_trylock): Release lock with LT_SPINLOCK_INIT.
2249 2000-10-12 David Huggins-Daines <dhd@linuxcare.com>
2251 * oldsemaphore.c (__old_sem_init): Release lock with
2252 LT_SPINLOCK_INIT, not zero.
2253 * spinlock.c (__pthread_unlock): Likewise.
2254 (__pthread_alt_lock): Likewise.
2255 (__pthread_alt_timedlock): Likewise.
2256 (__pthread_alt_unlock): Likewise.
2257 * sysdeps/pthread/bits/libc-lock.h: Initialize locks with
2258 LT_SPINLOCK_INIT if it is non-zero. Likewise for init-once flags.
2259 * sysdeps/pthread/pthread.h: Include bits/initspin.h. Use
2260 LT_SPINLOCK_INIT do initialize spinlocks not 0.
2262 2000-10-12 David Huggins-Daines <dhd@linuxcare.com>
2264 * shlib-versions: Add version definitions for hppa-linux.
2266 2000-10-12 Alan Modra <alan@linuxcare.com.au>
2268 * sysdeps/hppa/pspinlock.c: New file.
2269 * sysdeps/hppa/pt-machine.h: New file.
2270 * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: New file.
2272 2000-10-05 Jakub Jelinek <jakub@redhat.com>
2274 * mutex.c (__pthread_mutex_destroy): Correct test of
2275 busy mutex for mutexes using alternate fastlocks.
2276 Patch by dtc@cmucl.cons.org.
2278 2000-09-28 Martin Schwidefsksy <schwidefsky@de.ibm.com>
2280 * sysdeps/s390/pt-machine.h: Make %a0 the thread register.
2282 2000-09-28 Ulrich Drepper <drepper@redhat.com>
2284 * mutex.c (__pthread_mutex_unlock): For PTHREAD_MUTEX_RECURSIVE_NP
2285 test for owner first.
2286 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2288 * cancel.c (pthread_cancel): Don't do anything if cancelation is
2291 2000-09-26 Ulrich Drepper <drepper@redhat.com>
2293 * spinlock.h (__pthread_set_own_extricate_if): Optimize a bit.
2294 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2296 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
2297 _POSIX_MONOTONIC_CLOCK.
2299 * spinlock.h (__pthread_set_own_extricate_if): Add back locking
2302 2000-09-20 Andreas Jaeger <aj@suse.de>
2304 * pthread.c [!__ASSUME_REALTIME_SIGNALS]: Make inclusion of
2305 "testrtsig.h" conditional.
2307 2000-09-11 Ulrich Drepper <drepper@redhat.com>
2309 * sysdeps/pthread/pthread.h: Declare pthread_attr_getstack and
2310 pthread_attr_setstack.
2311 * Versions [libpthread] (GLIBC_2.2): Export pthread_attr_getstack and
2312 pthread_attr_setstack.
2313 * attr.c (pthread_attr_getstack, pthread_attr_setstack): New functions.
2315 2000-09-05 Ulrich Drepper <drepper@redhat.com>
2317 * Examples/ex14.c: New file.
2318 * Makefile (tests): Add ex14.
2320 * mutex.c (__pthread_mutex_unlock): Correct test for already unlocked
2321 mutex. Patch by dtc@cmucl.cons.org.
2323 * ecmutex.c: New file.
2324 * Makefile (tests): Add ecmutex.
2326 2000-09-04 H.J. Lu <hjl@gnu.org>
2328 * attr.c (__pthread_attr_setguardsize): Use page_roundup
2329 instead of roundup to round up to the page size.
2331 2000-09-03 Mark Kettenis <kettenis@gnu.org>
2333 * manager.c (pthread_exited): Correctly report event as TD_REAP
2334 instead of TD_DEATH. Fix comments.
2336 2000-09-03 Ulrich Drepper <drepper@redhat.com>
2338 * spinlock.h (testandset): Add cast to avoid warning.
2339 Patch by Franz Sirl <Franz.Sirl-kernel@lauterbach.com>.
2341 2000-09-02 Andreas Jaeger <aj@suse.de>
2343 * sysdeps/pthread/timer_routines.c: Include stdlib.h for abort
2346 2000-09-01 Ulrich Drepper <drepper@redhat.com>
2348 * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
2349 Fix typo in last patch (_mode -> _flags).
2351 * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
2352 Provide definition which respects _IO_USER_LOCK flag.
2354 2000-08-30 Ulrich Drepper <drepper@redhat.com>
2356 * manager.c (pthread_allocate_stack): Clear descriptor only if not
2359 2000-08-25 Ulrich Drepper <drepper@redhat.com>
2361 * Makefile: Add rules to build and run unload.
2362 * unload.c: New file.
2364 * pthread.c (pthread_exit_process): Move thread_self use inside `if'.
2366 * sysdeps/pthread/pthread.h
2367 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Defined.
2368 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: Defined.
2370 2000-08-24 Andreas Jaeger <aj@suse.de>
2372 * Examples/ex13.c: Include <string.h> for strerror prototype and
2373 <stdlib.h> for abort prototype.
2374 (pthr_cond_signal_mutex): Rewrite to silence GCC.
2375 (thread_start): Remove unused variable err.
2376 (main): Silence GCC warnings.
2378 2000-08-22 Andreas Jaeger <aj@suse.de>
2380 * Examples/ex13.c: New test by Kurt Garloff <garloff@suse.de>.
2382 * Makefile (tests): Add ex13.
2384 2000-08-20 Ulrich Drepper <drepper@redhat.com>
2386 * semaphore.h: Add restrict where required by AGd4.
2387 * sysdeps/pthread/pthread.h: Likewise.
2388 * sysdeps/pthread/unix/sysv/linux/bits/sigthread.h: Likewise.
2390 2000-08-15 Ulrich Drepper <drepper@redhat.com>
2392 * Makefile (tests): Add ex12. Add rule to build it.
2393 * Examples/ex12.c: New file.
2395 2000-08-13 Ulrich Drepper <drepper@redhat.com>
2397 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_SEMAPHORES
2398 even though the implementation is not quite complete (but it reports
2399 it). Define _POSIX_MESSAGE_PASSING to -1.
2400 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2402 2000-08-12 Andreas Jaeger <aj@suse.de>
2404 * sysdeps/mips/pt-machine.h (testandset): Add .set mips2 for
2406 (__compare_and_swap): Likewise.
2407 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Likewise.
2409 2000-08-10 Ulrich Drepper <drepper@redhat.com>
2411 * pthread.c (__pthread_initial_thread): Initialize p_errnop and
2412 p_h_errnop correctly and not to NULL.
2414 2000-08-05 Ulrich Drepper <drepper@redhat.com>
2416 * Banner: Bump version number to 0.9.
2418 2000-08-04 Ulrich Drepper <drepper@redhat.com>
2420 * Makefile (tests): Add tststack. Add rule to build the program.
2421 * tststack.c: New file.
2423 * internals.h: Declare __pthread_max_stacksize.
2424 * pthread.c (__pthread_max_stacksize): New variable.
2425 (__pthread_initialize_manager): Determine __pthread_initialize_manager
2427 * manager.c (thread_segment): Return always NULL if FLOATING_STACKS.
2428 (pthread_allocate_stack): Allow kernel to choose stack address if
2429 FLOATING_STACKS. This also handles variable-sized stacks.
2430 Always allocate stack and guardpage together. Use mprotect to
2431 change guardpage access.
2432 * sysdeps/i386/useldt.h: Define FLOATING_STACKS and
2433 ARCH_STACK_MAX_SIZE.
2435 * attr.c (__pthread_attr_setstacksize): Also test value against
2438 * manager.c (__pthread_nonstandard_stacks): Define only if
2439 THREAD_SELF is not defined.
2440 (pthread_allocate_stack): Always initialize gardaddr to a correct
2442 (pthread_handle_create): Unmap thread with one call.
2443 (pthread_free): Remove test for initial thread before removing stack.
2444 Unmap stack with one call.
2446 * pthread.c (__pthread_initial_thread): Initialize p_userstack to
2447 1 to avoid removing the stack.
2449 2000-07-27 Jes Sorensen <jes@linuxcare.com>
2451 * sysdeps/ia64/pspinlock.c (__pthread_spin_lock): Add
2452 load of spin lock to prime the cache before the atomic compare and
2453 exchange operation (cmpxchg4). This avoids the spinning on the
2454 cmpxchg4 instruction and reduces movement of the cache line back
2455 and forth between the processors (explanation by Asis K. Mallick
2456 from Intel). This basically makes the implementation operate the
2457 same as the Linux kernel implementation.
2459 * shlib-versions: Use GLIBC_2_2 for Linux/ia64.
2460 * sysdeps/ia64/pspinlock.c: New file.
2462 2000-08-03 Ulrich Drepper <drepper@redhat.com>
2464 * pthread.c: Move definition of __pthread_set_own_extricate_if...
2465 * spinlock.h: ...here. Remove locking.
2466 * internals.h: Remove __pthread_set_own_extricate_if prototype.
2468 * rwlock.c: Use THREAD_GETMEM And THREAD_SETMEM.
2469 (rwlock_rd_extricate_func): Don't determine self, let
2470 __pthread_lock do it.
2471 (rwlock_wr_extricate_func): Likewise.
2472 (rwlock_have_already): Optimize *pself handling a bit.
2474 * mutex.c: Use __builtin_expect.
2475 * pthread.c: Likewise.
2477 2000-08-02 Andreas Jaeger <aj@suse.de>
2479 * sysdeps/s390/pspinlock.c: New file.
2480 * sysdeps/s390/pt-machine.h: New file.
2481 Patches by Martin Schwidefsky <schwidefsky@de.ibm.com>.
2483 2000-07-12 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
2485 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Implement for
2487 * sysdeps/mips/pt-machine.h (testandset): Likewise.
2489 2000-07-26 Andreas Jaeger <aj@suse.de>
2491 * pthread.c: Initialize p_sem_avail.
2493 2000-07-25 Ulrich Drepper <drepper@redhat.com>
2495 * internals.h (struct __pthread_descr_struct): Add p_sem_avail.
2496 * semaphore.c: Handle spurious wakeups.
2498 * sysdeps/pthread/pthread.h: Add back PTHREAD_MUTX_FAST_NP as an alias
2499 for PTHREAD_MUTEX_ADAPTIVE_NP for source code compatibility.
2501 * pthread.c (__pthread_set_own_extricate): Use THREAD_GETMEM.
2502 (__pthread_wait_for_restart): Likewise.
2504 * condvar.c (pthread_cond_wait): Also check whether thread is
2505 cancelable before aborting loop.
2506 (pthread_cond_timedwait): Likewise.
2508 * signals.c (pthread_sighandler): Remove special code to restrore
2510 (pthread_sighandler_t): Likewise.
2512 2000-07-25 Mark Kettenis <kettenis@gnu.org>
2514 * internals.h (__RES_PTHREAD_INTERNAL): Remove define.
2515 * pthread.c: Include <resolv.h>.
2516 (_res): Undefine. Add extern declaration.
2518 2000-07-24 Ulrich Drepper <drepper@redhat.com>
2520 * pthread.c (__pthread_initial_thread): Update initializer.
2521 (__pthread_manager_thread): Likewise.
2522 (pthread_initialize): Move setrlimit call to...
2523 (__pthread_initialize_manager): ...here.
2524 (__pthread_reset_main_thread): Reset also soft limit on stack size.
2526 * condvar.c: Handle spurious wakeups. [PR libc/1749].
2527 * internals.h (struct _pthread_descr_struct): Add p_condvar_avail.
2529 2000-07-21 Ulrich Drepper <drepper@redhat.com>
2531 * spinlock.h: If IMPLEMENT_TAS_WITH_CAS is defined use
2532 __compare_and_swap to define testandset.
2533 * sysdeps/powerpc/pt-machine.h: Add volatile to asms.
2534 Define IMPLEMENT_TAS_WITH_CAS.
2536 2000-07-20 Ulrich Drepper <drepper@redhat.com>
2538 * Makefile: Pass -z nodelete to linker for libpthread.so
2539 generation if it understand this option.
2541 2000-07-18 Mark Kettenis <kettenis@gnu.org>
2543 * manager.c (pthread_handle_create): Remove initialization of
2544 new_thread->p_res._sock.
2546 2000-07-19 Kaz Kylheku <kaz@ashi.footprints.net>
2548 Bugfixes to the variant of the code for machines with no compare
2551 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Wait
2552 node was not being properly enqueued, due to failing to update
2553 the lock->__status field.
2555 * spinlock.c (__pthread_alt_timedlock): The oldstatus variable was
2556 being set inappropriately, causing the suspend function to be called
2557 with a null self pointer and crash.
2559 2000-07-18 Ulrich Drepper <drepper@redhat.com>
2561 * spinlock.h (__pthread_alt_trylock): Fix code used if no
2562 compare&swap is available.
2564 * spinlock.h (__pthread_trylock): Use __compare_and_swap, not
2567 * pthread.c (pthread_initialize): Don't use sysconf to determine
2568 whether the machine has more than one processor.
2570 * spinlock.c (__pthread_alt_timedlock): Add back one of the
2571 removed thread_self calls.
2573 2000-07-18 Kaz Kylheku <kaz@ashi.footprints.net>
2575 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Changed
2576 __compare_and_swap to compare_and_swap in code which assumes
2577 compare swap is available.
2579 2000-07-18 Kaz Kylheku <kaz@ashi.footprints.net>
2581 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Fixed
2582 bug whereby thr field of waitnode structure would not be correctly
2583 set unless a null self pointer is passed to the functions.
2584 Eliminated redundant calls to thread_self().
2586 2000-07-18 Jakub Jelinek <jakub@redhat.com>
2588 * pthread.c (__pthread_initialize_manager): Lock
2589 __pthread_manager_thread.p_lock before calling clone.
2591 2000-05-05 H.J. Lu <hjl@gnu.org>
2593 * sysdeps/ia64/pt-machine.h (__compare_and_swap): Change it to
2594 have acquire semantics.
2595 (__compare_and_swap_with_release_semantics): New inline
2597 (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): New macro.
2599 2000-01-28 Hans Boehm <hboehm@exch.hpl.hp.com>
2601 * manager.c: Fix the problem with signals at startup.
2602 Change the way that thread stacks are allocated on IA64.
2603 Clean up some of the guard page allocation stuff.
2605 1999-12-19 H.J. Lu <hjl@gnu.org>
2607 * internals.h (page_roundup): New.
2608 * attr.c (__pthread_attr_setguardsize); Use page_roundup
2610 * manager.c (pthread_allocate_stack): Make sure guardaddr is
2611 page aligned with page_roundup if NEED_SEPARATE_REGISTER_STACK
2614 1999-12-17 Hans Boehm <hboehm@exch.hpl.hp.com>
2616 * manager.c (pthread_allocate_stack): Unmap the stack top
2617 if failed to map the stack bottom.
2619 (pthread_free): Fix the guard page.
2621 * pthread.c (pthread_initialize): Set rlimit correctly for
2622 NEED_SEPARATE_REGISTER_STACK.
2624 1999-12-16 H.J. Lu <hjl@gnu.org>
2626 * pthread.c (__pthread_initialize_manager): Pass
2627 __pthread_manager_thread_bos instead of
2628 __pthread_manager_thread_tos to __clone2.
2630 1999-12-16 H.J. Lu <hjl@gnu.org>
2632 * manager.c (pthread_allocate_stack): Correct the calculation
2633 of "new_thread_bottom". Remove MAP_GROWSDOWN from mmap for
2636 1999-12-13 H.J. Lu <hjl@gnu.org>
2638 * sysdeps/ia64/pt-machine.h (__compare_and_swap): Added a stop
2639 bit after setting ar.ccv.
2641 1999-12-12 H.J. Lu <hjl@gnu.org>
2643 * manager.c (pthread_allocate_stack): Make the starting
2644 address of the stack bottom page aligned. FIXME: it may
2645 need changes in other places.
2646 (pthread_handle_create): Likewise.
2648 1999-12-11 Hans Boehm <hboehm@exch.hpl.hp.com>
2650 * manager.c (pthread_allocate_stack): Handle
2651 NEED_SEPARATE_REGISTER_STACK.
2652 (pthread_handle_create): Likewise.
2653 * pthread.c (__pthread_initialize_manager): Likewise.
2655 * sysdeps/ia64/pt-machine.h: Use r13 for thread pointer.
2657 1999-12-02 H.J. Lu <hjl@gnu.org>
2659 * sysdeps/ia64/pt-machine.h: New.
2661 2000-07-13 Ulrich Drepper <drepper@redhat.com>
2663 * wrapsyscall.c: Mark non-__ protected names as weak.
2666 2000-07-12 Bruno Haible <haible@clisp.cons.org>
2668 * Examples/ex8.c: Include <sys/wait.h>, not <wait.h>.
2670 2000-07-12 Ulrich Drepper <drepper@redhat.com>
2672 * spinlock.c: Fix code for TEST_FOR_COMPARE_AND_SWAP being defined.
2673 Add tests also to new alternative spinlock implementation.
2674 * spinlock.h: Likewise.
2675 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2677 2000-07-06 Ulrich Drepper <drepper@redhat.com>
2679 * Version: Export __sigaction.
2680 * signals.c: Define __sigaction alias. Use __libc_sigaction instead
2682 * pthread.c: Use __libc_sigaction instead of __sigaction.
2684 * condvar.c: Implement pthread_condattr_getpshared and
2685 pthread_condattr_setpshared.
2686 * mutex.c: Implement pthread_mutexattr_getpshared and
2687 pthread_mutexattr_setpshared.
2688 * Versions: Export new functions.
2689 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
2691 * rwlock.c (pthread_rwlockattr_init): Use PTHREAD_PROCESS_PRIVATE.
2692 (pthread_rwlockattr_setpshared): Fail if PTHREAD_PROCESS_PRIVATE
2695 2000-07-04 Greg McGary <greg@mcgary.org>
2697 * sysdeps/pthread/bits/libc-lock.h: Remove BP_SYM from
2698 pragmas. Include bp-sym.h only if _LIBC.
2700 2000-07-04 Ulrich Drepper <drepper@redhat.com>
2702 * spinlock.c (__pthread_unlock): Properly place write barrier.
2703 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2705 2000-07-03 Ulrich Drepper <drepper@redhat.com>
2707 * spinlock.c: Replace fast spinlocks by adaptive spinlocks which are
2708 faster on SMP systems. No more emulation of compare&swap for adaptive
2710 * spinlock.h: Likewise.
2711 * sysdeps/pthread/pthread.h: Shuffle PTHREAD_MUTEX_* values around.
2712 Replace fast with adaptive mutex.
2713 * mutex.c: Rewrite for replacement of fast by adaptive mutex.
2714 * condvar.c: Likewise.
2715 * pthread.c: Define and initialize __pthread_smp_kernel variable.
2716 * internals.h: Declare __pthread_smp_kernel.
2717 * sysdeps/pthread/bits/pthreadtypes.h: Update comment of
2718 _pthread_fastlock structure.
2719 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2721 * pthread.c: Remove initialization to zero from global variables.
2723 2000-06-29 Jakub Jelinek <jakub@redhat.com>
2725 * shlib-versions: Make sparc64 GLIBC_2.2+ only.
2727 2000-06-28 Greg McGary <greg@mcgary.org>
2729 * weaks.c: Wrap BP_SYM () around weak extern declarations of
2730 pthread functions that have pointers in their return+arg signatures.
2732 2000-06-27 Greg McGary <greg@mcgary.org>
2734 * sysdeps/pthread/bits/libc-lock.h: Wrap BP_SYM () around weak
2735 extern declarations of pthread functions that have pointers in
2736 their return+arg signatures.
2738 2000-06-26 Ulrich Drepper <drepper@redhat.com>
2740 * Makefile (tests): Add ex11. Add rules to build it.
2741 * Examples/ex11.c: New file.
2742 * rwlock.c: Fix complete braindamaged previous try to implement
2745 * spinlock.c: Pretty print.
2747 2000-06-25 Ulrich Drepper <drepper@redhat.com>
2749 * Makefile (tests): Add ex10. Add rules to build it.
2750 * Versions [GLIBC_2.2] (libpthread): Add pthread_mutex_timedlock,
2751 pthread_rwlock_timedrdlock, and pthread_rwlock_timedwrlock.
2752 * condvar.c (pthread_cond_wait): Allow mutex of kind
2753 PTHREAD_MUTEX_TIMED_NP.
2754 (pthread_cond_timedwait_relative): Likewise.
2755 * mutex.c (__pthread_mutex_init): Default is PTHREAD_MUTEX_TIMED_NP.
2756 (__pthread_mutex_trylock): Use __pthread_alt_trylock for
2757 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
2758 (__pthread_mutex_lock): Use __pthread_alt_lock for
2759 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
2760 (__pthread_mutex_timedlock): New function.
2761 (__pthread_mutex_unlock): Use __pthread_alt_unlock for
2762 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
2763 (__pthread_mutexattr_init): Use PTHREAD_MUTEX_TIMED_NP.
2764 (__pthread_mutexattr_settype): Allow PTHREAD_MUTEX_TIMED_NP.
2765 * spinlock.c: Implement alternate fastlocks.
2766 * spinlock.h: Add prototypes.
2767 * Examples/ex10.c: New file.
2768 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
2769 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2771 * rwlock.c (__pthread_rwlock_rdlock): Optimize loop a bit.
2772 (__pthread_rwlock_timedrdlock): New function.
2773 (__pthread_rwlock_timedwrlock): New function.
2774 Use laternate fastlock function everywhere.
2776 2000-06-21 Andreas Jaeger <aj@suse.de>
2778 * sysdeps/pthread/timer_routines.c: Include <string.h> for memset
2781 * join.c: Include <stdlib.h> for exit prototype.
2783 2000-06-20 Ulrich Drepper <drepper@redhat.com>
2785 * sysdeps/i386/useldt.h: Include <stdlib.h>.
2787 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_BARRIERS.
2788 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2790 * Makefile (libpthread-routines): Add barrier.
2791 (tests): Add ex9. Add rule to build ex9.
2792 * Versions: Export barrier functions.
2793 * barrier.c: New file.
2794 * Examples/ex9.c: New file.
2795 * sysdeps/pthread/pthread.h: Add barrier data types and declarations.
2796 * sysdeps/pthread/bits/pthreadtypes.h: Likewise.
2797 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2799 2000-06-19 H.J. Lu <hjl@gnu.org>
2801 * spinlock.h (HAS_COMPARE_AND_SWAP): Defined if
2802 HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS is defined.
2803 (compare_and_swap_with_release_semantics): New. Default to
2804 compare_and_swap if HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS
2807 * spinlock.c (__pthread_unlock): Call
2808 compare_and_swap_with_release_semantics () instead of
2809 compare_and_swap ().
2811 2000-06-19 Ulrich Drepper <drepper@redhat.com>
2813 * sysdeps/pthread/timer_create.c: Use _set_errno instead of assigning
2815 * sysdeps/pthread/timer_delete.c: Likewise.
2816 * sysdeps/pthread/timer_getoverr.c: Likewise.
2817 * sysdeps/pthread/timer_gettime.c: Likewise.
2818 * sysdeps/pthread/timer_settime.c: Likewise.
2820 2000-06-13 Kaz Kylheku <kaz@ashi.footprints.net>
2822 Timer nodes are now reference counted, and can be marked
2823 as deleted. This allows for the safe release of the global mutex
2824 in the middle without losing the timer being operated on.
2826 * sysdeps/pthread/posix-timer.h (struct timer_node): The inuse
2827 member is now an enum with three values, so that an intermediate
2828 state can be represented (deleted but not free for reuse yet).
2829 New refcount member added.
2830 * sysdeps/pthread/timer_routines.c: Likewise.
2832 * sysdeps/pthread/posix-timer.h (timer_addref, timer_delref,
2833 timer_valid): New inline functions added.
2835 * sysdeps/pthread/timer_gettime.c (timer_gettime): Function
2836 restructured, recursive deadlock bug fixed.
2838 * sysdeps/pthread/timer_gettime.c (timer_gettime): Uses new
2839 timer_addref to ensure that timer won't be deleted while mutex is not
2840 held. Also uses timer_invalid to perform validation of timer handle.
2841 * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
2842 * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Likewise.
2844 2000-06-14 Ulrich Drepper <drepper@redhat.com>
2846 * shlib-versions: Add entry for SH.
2847 Patch by Kaz Kojima <kkojima@rr.iij4u.or.jp>.
2849 2000-06-13 Kaz Kylheku <kaz@ashi.footprints.net>
2851 A few optimizations. Got rid of unnecessary wakeups of timer threads,
2852 tightened up some critical regions and micro-optimized some list
2855 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
2856 Returns int value now to indicate whether timer was queued at head.
2857 * sysdeps/pthread/posix-timer.h: Likewise.
2858 * sysdeps/pthread/timer_settime.c (timer_settime): Takes advantage of
2859 new return value from __timer_thread_queue_timer to avoid waking
2860 up timer thread unnecessarily.
2862 * sysdeps/pthread/posix-timer.h (timer_id2ptr): No longer checks
2863 inuse flag, because this requires mutex to be held. Callers updated
2864 to do the check when they have the mutex.
2865 * sysdeps/pthread/timer_getoverr.c: Add check for inuse here.
2867 * sysdeps/pthread/timer_settime.c (timer_settime): Tighter critical
2868 regions: avoids making system calls while holding timer mutex, and
2869 a few computations were moved outside of the mutex as well.
2870 * sysdeps/pthread/timer_gettime.c (timer_gettime): Likewise.
2872 * sysdeps/pthread/posix-timer.h (list_unlink_ip): Function name changed
2873 to list_unlink_ip, meaning idempotent. Pointer manipulation
2874 changed to get better better code out of gcc.
2875 * sysdeps/pthread/timer_routines.c (list_unlink): Non-idempotent
2876 version of list_unlink added here.
2877 * sysdeps/pthread/timer_delete.c: Use appropriate list unlink
2878 function in all places: idempotent one for timers, non-idempotent
2879 one for thread nodes.
2880 * sysdeps/pthread/timer_settime: Likewise.
2881 * sysdeps/pthread/timer_routines.c: Likewise.
2883 2000-06-13 Ulrich Drepper <drepper@redhat.com>
2885 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_TIMERS): Define.
2886 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2888 * sysdeps/pthread/Makefile: Remove tests definition.
2890 2000-06-12 Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
2891 Yutaka Niibe <gniibe@chroot.org>
2893 * sysdeps/sh/pspinlock.c: New file.
2894 * sysdeps/sh/pt-machine.h: New file.
2896 2000-06-12 Ulrich Drepper <drepper@redhat.com>
2898 * Makefile (tests): Add joinrace.
2900 * Examples/ex6.c: Test return value of pthread_join.
2902 2000-06-11 Geoff Keating <geoffk@cygnus.com>
2904 * sysdeps/powerpc/pspinlock.c (__pthread_spin_lock): Implement.
2905 (__pthread_spin_trylock): Implement.
2906 (__pthread_spin_unlock): Implement.
2907 (__pthread_spin_init): Implement.
2908 (__pthread_spin_destroy): Implement.
2910 2000-06-10 Ulrich Drepper <drepper@redhat.com>
2912 * sysdeps/pthread/timer_routines.c (list_append): Little fix to
2913 really append the entry.
2915 2000-06-10 Andreas Jaeger <aj@suse.de>
2917 * lockfile.c (__fresetlockfiles): Remove unused variable fp.
2919 2000-06-10 Kaz Kylheku <kaz@ashi.footprints.net>
2921 * sysdeps/pthread/timer_create.c: Thread matching now done on
2922 clock type as well as thread attributes.
2923 There are individual global signal-delivering threads for
2924 different clock types.
2925 * sysdeps/pthread/posix-timer.h: Likewise.
2926 * sysdeps/pthread/timer_routines.c: Likewise.
2928 * sysdeps/pthread/timer_routines.c: Thread allocation and
2929 deallocation function now remembers to put thread on active
2930 list and remove from active list.
2931 Thus now the feature of binding multiple timers
2932 to a single thread actually works.
2934 2000-06-10 Ulrich Drepper <drepper@redhat.com>
2936 * pthread.c (__pthread_create_2_1): Optimize a bit.
2938 * internals.h (invalid_handle): Also test for p_terminated != 0.
2939 (nonexisting_handle): New function. Same as old invalid_handle.
2940 * join.c (pthread_join): Use nonexisting_handle instead of
2941 invalid_handle to test for acceptable thread handle.
2942 * manager.c (pthread_handle_free): Likewise.
2943 * joinrace.c: New file.
2944 Reported by Permaine Cheung <pcheung@cygnus.com>.
2946 2000-06-08 Ulrich Drepper <drepper@redhat.com>
2948 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
2949 Correct handling of matching variable.
2951 * sysdeps/pthread/tst-timer.c (main): Rewrite initializers to
2954 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
2955 Be prepared for empty timer list.
2957 * sysdeps/pthread/timer_create.c (timer_create): Correct names of
2958 CPUTIME clock ID. Add support for thread clocks.
2960 * sysdeps/pthread/posix-timer.h (timer_ptr2id): Operands in
2961 subtraction were switched.
2963 * sysdeps/pthread/timer_routines.c (init_module): Use
2964 THREAD_MAXNODES threads.
2966 * sysdeps/pthread/posix-timer.h (struct timer_node): Add creator_pid.
2967 * sysdeps/pthread/timer_create.c: Fill in creator_pid.
2968 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Send signal
2969 with sigqueueinfo is this system call is available.
2971 * sysdeps/pthread/timer_create.c (timer_create): Allow
2972 CLOCK_CPUTIME if _POSIX_CPUTIME is defined.
2974 * sysdeps/pthread/Makefile: New file. Add rules to build timer
2976 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add TIMER_MAX.
2978 2000-06-04 Kaz Kylheku <kaz@ashi.footprints.net>
2980 * sysdeps/pthread/posix-timer.h: New file.
2981 * sysdeps/pthread/timer_create.c: New file.
2982 * sysdeps/pthread/timer_delete.c: New file.
2983 * sysdeps/pthread/timer_getoverr.c: New file.
2984 * sysdeps/pthread/timer_gettime.c: New file.
2985 * sysdeps/pthread/timer_routines.c: New file.
2986 * sysdeps/pthread/timer_settime.c: New file.
2987 * sysdeps/pthread/tst-timer.c: New file.
2989 2000-06-08 Ulrich Drepper <drepper@redhat.com>
2991 * sysdeps/unix/sysv/linux/bits/local_lim.h: Remove OPEN_MAX and
2992 LINK_MAX definitions if necessary.
2994 2000-06-04 Kaz Kylheku <kaz@ashi.footprints.net>
2996 Added missing fork time handling of global libio lock.
2998 * lockfile.c (__fresetlockfiles): Now also resets the list lock,
2999 not just the individual stream locks. Rewritten to use new
3000 iterator interface provided by libio rather than accessing
3003 * lockfile.c (__flockfilelist, _funlockfilelist): New functions
3004 which lock and unlock the stream list using the new interface
3006 * internals.h: Likewise.
3008 * ptfork.c (__fork): Now calls __flockfilelist before fork,
3009 and __funlockfilelist in the parent after the fork.
3010 Child still calls __fresetlockfiles as before.
3012 * linuxthreads.texi: Now explains what happens to streams at
3013 fork time. Also whole new section on forking and thread added.
3014 Definition of pthread_atfork moved out of Miscellaneous Functions
3015 to this new section.
3017 2000-06-04 Jakub Jelinek <jakub@redhat.com>
3019 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c (__pthread_spin_lock):
3020 Add missing register.
3021 * sysdeps/sparc/sparc64/pspinlock.c (__pthread_spin_lock): Likewise.
3023 2000-06-02 Jakub Jelinek <jakub@redhat.com>
3025 * sysdeps/sparc/sparc32/pspinlock.c: Implement spinlocks.
3026 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: New.
3027 * sysdeps/sparc/sparc64/pspinlock.c: Implement spinlocks.
3029 2000-05-31 Andreas Jaeger <aj@suse.de>
3031 * sysdeps/mips/pspinlock.c: Implement spinlocks.
3033 2000-05-28 Ulrich Drepper <drepper@redhat.com>
3035 * spinlock.c (__pthread_lock): Remove ASSERT.
3037 * Makefile (tests): Add ex8.
3038 * Examples/ex8.c: New file.
3040 2000-05-12 Kaz Kylheku <kaz@ashi.footprints.net>
3042 Bugfix: The pthread_atfork mechanism now takes care of its
3043 own internal mutex at fork time.
3045 * ptfork.c (__fork): Revised so that the mutex is held across
3046 the fork operation and while the handlers are called, and so that
3047 the child resets the mutex.
3049 * linuxthreads.texi: Updated pthread_atfork documentation to make
3050 it clear that fork and pthread_atfork can't be reentered from
3051 atfork handlers, that pthread_atfork and fork are mutually atomic,
3052 and that the handlers are inherited by the child process.
3054 2000-05-24 Ulrich Drepper <drepper@redhat.com>
3056 * Makefile (libpthread-routines): Add pspinlock.
3057 * cancel.c: Rename __pthread_spin_unlock back to __pthread_unlock.
3058 Use struct _pthread_fastlock instead of pthread_spinlock_t.
3059 * condvar.c: Likewise.
3060 * internals.h: Likewise.
3062 * manager.c: Likewise.
3063 * mutex.c: Likewise.
3064 * pthread.c: Likewise.
3065 * rwlock.c: Likewise.
3066 * semaphore.c: Likewise.
3067 * signals.c: Likewise.
3068 * spinlock.h: Likewise.
3069 * spinlock.c: Likewise. Remove pthread_spin_lock functions.
3070 * sysdeps/alpha/pspinlock.c: New file.
3071 * sysdeps/arm/pspinlock.c: New file.
3072 * sysdeps/i386/pspinlock.c: New file.
3073 * sysdeps/m68k/pspinlock.c: New file.
3074 * sysdeps/mips/pspinlock.c: New file.
3075 * sysdeps/powerpc/pspinlock.c: New file.
3076 * sysdeps/sparc/sparc32/pspinlock.c: New file.
3077 * sysdeps/sparc/sparc64/pspinlock.c: New file.
3078 * sysdeps/pthread/bits/pthreadtypes.h: Remove pthread_spinlock_t
3079 back to _pthread_fastlock. Define new pthread_spinlock_t.
3081 2000-05-24 Andreas Jaeger <aj@suse.de>
3083 * sysdeps/i386/i686/pt-machine.h: Only use LDT on newer kernels.
3085 2000-05-21 Jakub Jelinek <jakub@redhat.com>
3087 * manager.c (pthread_handle_create): Initialize p_res._sock to -1.
3089 2000-05-13 Jakub Jelinek <jakub@redhat.com>
3091 * internals.h (__RES_PTHREAD_INTERNAL): Define.
3093 2000-05-06 Kaz Kylheku <kaz@ashi.footprints.net>
3095 * mutex.c (pthread_once): IN_PROGRESS state of pthread_once_t
3096 object state is represented with additional bits which distinguish
3097 whether that state was set up in the current process, or
3098 in an ancestor process. If that state was set in an ancestor,
3099 it means that a fork happened while thread was executing the init
3100 function. In that case, the state is reset to NEVER.
3101 * mutex.c (__pthread_once_fork_prepare): New function.
3102 (__pthread_once_fork_child): Likewise
3103 (__pthread_once_fork_parent): Likewise
3104 (__pthread_reset_pthread_once): Removed.
3105 * ptfork.c (__fork): Call new handlers in mutex.c.
3106 * internals.h: Declarations of new mutex.c functions added.
3107 Declaration of removed function deleted.
3108 * linuxthreads.texi: Updated documentation about pthread_once
3109 to clarify what happens under cancellation and forking.
3111 2000-05-06 Kaz Kylheku <kaz@ashi.footprints.net>
3113 * internals.h: New thread manager request type, REQ_KICK.
3114 * join.c (pthread_exit): main thread now calls exit() instead
3115 of _exit() in order to proper process cleanup.
3116 * manager.c (__pthread_manager): Do not terminate manager
3117 after unblocking main thread; wait for main thread's
3118 REQ_PROCESS_EXIT request instead.
3119 Also, added REQ_KICK case to handle new request; this just does
3121 * manager.c (pthread_exited): Do not terminate manager after
3122 unblocking main thread.
3123 * manager.c (__pthread_manager_sighandler): If the main thread
3124 is waiting for all other threads to die, send a REQ_KICK into
3125 the thread manager request pipe to get it to clean out the threads
3126 and unblock the main thread as soon as possible. This fixes
3127 the 2000 millisecond hang on shutdown bug.
3128 * Examples/ex7.c: New file, tests shutdown behavior when all threads
3129 including the main one call pthread_exit(), or implicitly do so.
3130 * Makefile (tests): Add ex7.
3132 2000-05-05 Andreas Jaeger <aj@suse.de>
3134 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
3135 (pthread_getcpuclockid): Correct test for ourselves.
3137 2000-05-05 Ulrich Drepper <drepper@redhat.com>
3139 * internals.h (struct _pthread_descr_struct): Reorganization.
3140 Allocate room for 16 pointers at head of the structure for future
3141 thread-local data handling. Move p_self member in this area.
3142 * manager.c (pthread_handle_create): Adjust use of p_self.
3143 * sysdeps/i386/useldt.h (THREAD_SELF): Likewise.
3144 * pthread.c (__pthread_initial_thread): Adjust initialization.
3145 (__pthread_manager_thread): Likewise.
3147 2000-04-29 Bruno Haible <haible@clisp.cons.org>
3149 * join.c (pthread_exit): Use THREAD_GETMEM_NC instead of THREAD_GETMEM
3150 for eventmask larger than 1 word.
3152 2000-04-27 Ulrich Drepper <drepper@redhat.com>
3154 * Versions [libpthread] (GLIBC_2.2): Add __pthread_initialize_minimal.
3155 * pthread.c (__pthread_initialize_minimal): New function. Perform
3156 minimal initialization.
3157 (pthread_initialize): Remove this code here.
3158 * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h" again. We
3159 are working around the problem in glibc.
3161 2000-04-25 Ulrich Drepper <drepper@redhat.com>
3163 * sysdeps/i386/i686/pt-machine.h: Do not use "../useldt.h" for
3164 now. First gcc must be fixed (more concrete: libgcc).
3166 2000-04-24 Ulrich Drepper <drepper@redhat.com>
3168 * pthread.c: Remove special treatement for interrupt handlers on x86.
3169 * manager.c (pthread_free): Use FREE_THREAD not FREE_THREAD_SELF.
3170 * sysdeps/i386/useldt.h: Use "q" constraint instead of "r" where
3172 * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h".
3174 2000-04-24 Mark Kettenis <kettenis@gnu.org>
3176 * join.c (pthread_exit): Set p_terminated after reporting the
3177 termination event instead of before.
3179 2000-04-20 Jakub Jelinek <jakub@redhat.com>
3181 * sysdeps/pthread/bits/libc-lock.h: Only declare __pthread_rwlock_*
3184 2000-04-18 Andreas Jaeger <aj@suse.de>
3186 * Versions: Use ld instead of ld.so.
3188 2000-04-18 Jakub Jelinek <jakub@redhat.com>
3190 * sysdeps/unix/sysv/linux/sparc/bits/sigcontext.h (struct sigcontext):
3191 Remove the typedef keyword.
3193 2000-04-18 Jakub Jelinek <jakub@redhat.com>
3195 * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Use membar,
3197 (READ_MEMORY_BARRIER): Define.
3198 * spinlock.c (__pthread_spin_unlock): Use READ_MEMORY_BARRIER, not
3200 * internals.h (READ_MEMORY_BARRIER): Define if not defined in sysdep
3203 2000-04-17 Ulrich Drepper <drepper@redhat.com>
3205 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
3206 (pthread_getcpuclockid): Don't compare thread_id with thread_self,
3207 use thread_handle().
3209 2000-04-16 Ulrich Drepper <drepper@redhat.com>
3211 * condvar.c (pthread_cond_timedwait_relative): Don't test for owner
3212 if fast mutex is used. Don't initialize `already_canceled' twice.
3213 Correctly test for return value of timedsuspend.
3215 * pthread.c: Correct long-time braino. We never set SA_SIGINFO and
3216 therefore don't need the _rt versions of the signal handlers.
3218 2000-04-15 Ulrich Drepper <drepper@redhat.com>
3220 * pthread.c (pthread_yield): New function.
3221 * sysdeps/pthread/pthread.h (pthread_yield): Add prototype.
3222 * Versions [libpthread] (GLIBC_2.2): Add pthread_yield.
3223 * internals.h: Declare __pthread_yield.
3225 * pthread.c (pthread_initialize): Avoid a bit more code if
3226 realtime signals are known to exist.
3228 * pthread.c: Is __ASSUME_REALTIME_SIGNALS then avoid generating code
3229 to dynamically detect RT signals and avoid generating compatibility
3230 functions with old kernel.
3231 * restart.h (restart) [__ASSUME_REALTIME_SIGNALS]: Use
3232 __pthread_restart_new directly.
3233 (suspend) [__ASSUME_REALTIME_SIGNALS]: Use
3234 __pthread_wait_for_restart_signal directly.
3235 (timedsuspend) [__ASSUME_REALTIME_SIGNALS]: Use
3236 __pthread_timedsuspend_new directly.
3238 2000-04-15 Ulrich Drepper <drepper@redhat.com>
3240 * condvar.c: Remove all the special code to handle cond_timedwait.
3241 Use timedsuspend instead.
3242 * internals.h: Declare __pthread_timedsuspend_old,
3243 __pthread_timedsuspend_new, and __pthread_timedsuspend.
3244 Remove declaration of __pthread_init_condvar.
3245 * pthread.c: Define __pthread_timedsuspend variable.
3246 (__pthread_timedsuspend_old): New function. Timed suspension
3247 implementation for old Linux kernels.
3248 (__pthread_timedsuspend_new): New function. Timed suspension
3249 implementation for new Linux kernels.
3250 * restart.h (timedsuspend): New function. Call appropriate
3251 suspension function through __pthread_timedsuspend.
3252 * semaphore.c (sem_timedwait): Use timedsuspend, don't duplicate
3254 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
3256 * internals.h (WRITE_MEMORY_BARRIER): Define as MEMORY_BARRIER if
3258 * spinlock.c: Use WRITE_MEMORY_BARRIER instead of MEMORY_BARRIER
3260 * sysdeps/alpha/pt-machine.h: Define WRITE_MEMORY_BARRIER.
3261 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
3263 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _POSIX_SPAWN.
3264 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3266 2000-04-14 Andreas Jaeger <aj@suse.de>
3268 * weaks.c: Fix typo.
3270 * shlib-versions (mips.*-.*-linux.*): Support only GLIBC 2.0 and
3271 2.2 for linuxthreads.
3273 2000-04-13 Ulrich Drepper <drepper@redhat.com>
3275 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
3276 (pthread_getcpuclockid): Fix typo.
3278 2000-04-12 Ulrich Drepper <drepper@redhat.com>
3280 * Makefile (libpthread-routines): Add getcpuclockid.
3281 * Versions [libpthread] (GLIBC_2.2): Add pthread_getcpuclockid.
3282 * sysdeps/pthread/getcpuclockid.c: New file.
3283 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: New file.
3284 * sysdeps/pthread/pthread.h: Add prototype for pthread_getcpuclockid.
3286 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_SPIN_LOCKS):
3288 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3290 * sysdeps/pthread/pthread.h: Add prototypes for pthread_spin_init,
3291 pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
3292 and pthread_spin_unlock.
3293 * sysdeps/pthread/bits/pthreadtypes.h: Change struct _pthread_fastlock
3294 into pthread_spinlock_t. Change all uses.
3295 * spinlock.c: Implement pthread_spin_lock.
3296 Rename __pthread_unlock to __pthread_spin_unlock and define weak
3297 alias for real name.
3298 Define pthread_spin_trylock, pthread_spin_init, and
3299 pthread_spin_destroy.
3300 Change all uses of _pthread_fastlock to pthread_spinlock_t.
3301 * spinlock.h: Rename __pthread_unlock to __pthread_spin_unlock.
3302 Change all uses of _pthread_fastlock to pthread_spinlock_t.
3303 * Versions [libpthread] (GLIBC_2.2): Add pthread_spin_init,
3304 pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
3305 and pthread_spin_unlock.
3306 * cancel.c: Use __pthread_spin_unlock instead of __pthread_unlock.
3307 Change all uses of _pthread_fastlock to pthread_spinlock_t.
3308 * condvar.c: Likewise.
3309 * internals.h: Likewise.
3311 * manager.c: Likewise.
3312 * mutex.c: Likewise.
3313 * pthread.c: Likewise.
3314 * rwlock.c: Likewise.
3315 * semaphore.c: Likewise.
3316 * signals.c: Likewise.
3318 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add various new POSIX
3320 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
3322 2000-04-11 Ulrich Drepper <drepper@redhat.com>
3324 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add
3325 _POSIX_SHARED_MEMORY_OBJECTS.
3327 2000-04-11 Andreas Jaeger <aj@suse.de>
3329 * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Define.
3330 (__compare_and_swap): Mark as modifying memory.
3332 2000-04-11 Geoff Keating <geoffk@cygnus.com>
3334 * sysdeps/powerpc/pt-machine.h (MEMORY_BARRIER): Don't be
3336 (__compare_and_swap): Replace other 'sync' with MEMORY_BARRIER.
3337 Don't have the 'asm' __volatile__.
3339 2000-04-11 Ulrich Drepper <drepper@redhat.com>
3341 * internals.h: Define MEMORY_BARRIER as empty if not defined already.
3342 * spinlock.c (__pthread_lock): Add memory barriers.
3343 (__pthread_unlock): Likewise.
3344 * sysdeps/alpha/pt-machine.h (MEMORY_BARRIER): Define using mb
3346 (RELEASE): Not needed anymore.
3347 (__compare_and_swap): Mark asm as modifying memory.
3348 * sysdeps/powerpc/pt-machine.h (sync): Remove. Replace with definition
3350 (__compare_and_swap): Use MEMORY_BARRIER instead of sync.
3351 * sysdeps/sparc/sparc32/pt-machine.h (RELEASE): Not needed anymore.
3352 (MEMORY_BARRIER): Define using stbar.
3353 * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Define using
3355 (__compare_and_swap): Use MEMORY_BARRIER to ensure ordering.
3356 Patch by Xavier Leroy <Xavier.Leroy@inria.fr> based on comments by
3357 Mike Burrows <m3b@pa.dec.com>.
3359 2000-04-09 Ulrich Drepper <drepper@redhat.com>
3361 * signals.c (sigaction): Fix return value for the case SIG is one
3362 of the signals the implementation uses.
3363 Patch by Xavier.Leroy@inria.fr.
3365 2000-04-01 Andreas Jaeger <aj@suse.de>
3367 * attr.c: Use shlib-compat macros.
3368 * oldsemaphore.c: Likewise.
3369 * pthread.c: Likewise.
3370 * weaks.c: Likewise.
3372 2000-03-26 Ulrich Drepper <drepper@redhat.com>
3374 * semaphore.c (sem_timedwait): New function.
3375 Patch by Carl Mailloux <carlm@oricom.ca>.
3376 * semaphore.h: Declare sem_timedwait.
3377 * Versions [libpthread] (GLIBC_2.2): Add sem_timedwait.
3379 2000-03-26 Roland McGrath <roland@baalperazim.frob.com>
3381 * sysdeps/pthread/Makefile: File removed.
3383 2000-03-23 Ulrich Drepper <drepper@redhat.com>
3385 * mutex.c (__pthread_reset_pthread_once): Reset once_masterlock.
3386 * internals.h (__pthread_reset_pthread_once): Add prototype.
3387 * ptfork.c (__fork): Call __pthread_reset_pthread_once.
3389 * manager.c (pthread_handle_create): Store ID of new thread before
3392 2000-03-21 Ulrich Drepper <drepper@redhat.com>
3394 * attr.c: Use new macros from shlib-compat.h to define versions.
3395 * oldsemaphore.c: Likewise.
3396 * semaphore.c: Likewise.
3397 * weaks.c: Likewise.
3399 * pthread.c: Update for new SHLIB_COMPAT definition.
3401 * manager.c (__pthread_manager): Unmask debug signal.
3403 * pthread.c (pthread_initialize): Test for address of __dso_handle
3404 being NULL, not value. Use __on_exit, not on_exit.
3405 Patch by Andreas Jaeger <aj@suse.de>.
3407 * pthread.c: Use new macros from shlib-compat.h to define versions.
3409 2000-03-19 Ulrich Drepper <drepper@redhat.com>
3411 * pthread.c (pthread_initialize): Instead of on_exit use
3412 __cxa_atexit if __dso_label is available to allow unloading the
3413 libpthread shared library.
3415 2000-03-16 Ulrich Drepper <drepper@redhat.com>
3417 * condvar.c: Make tests for ownership of mutex less strict.
3419 2000-03-14 Ulrich Drepper <drepper@redhat.com>
3421 * condvar.c (pthread_cond_wait): Check whether mutex is owned by
3422 current thread and return error if not.
3423 (pthread_cond_timedwait_relative_old): Likewise.
3424 (pthread_cond_timedwait_relative_new): Likewise.
3426 * mutex.c (__pthread_once): Handle cancelled init function correctly.
3427 (pthread_once_cancelhandler): New function.
3428 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
3430 2000-03-14 Andreas Jaeger <aj@suse.de>
3432 * pthread.c (pthread_handle_sigcancel_rt): GS has been renamed to
3434 (pthread_handle_sigrestart_rt): Likewise.
3435 * signals.c (pthread_sighandler_rt): Likewise.
3437 2000-03-02 Andreas Jaeger <aj@suse.de>
3439 * sysdeps/pthread/bits/libc-lock.h: Fix typo.
3440 Reported by Sean Chen <sean.chen@turbolinux.com>.
3442 2000-02-28 Andreas Jaeger <aj@suse.de>
3444 * rwlock.c: Fix typo.
3446 2000-02-27 Ulrich Drepper <drepper@redhat.com>
3448 * rwlock.c: Define __* variants of the functions and make old names
3450 * Versions [GLIBC_2.2]: Export the __pthread_rwlock_* functions.
3451 * sysdeps/pthread/bits/libc-lock.h: Define __libc_rwlock_* macros.
3453 2000-02-25 Andreas Jaeger <aj@suse.de>
3455 * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
3456 pwrite64, lseek64, open64, and __open64 with version 2.2.
3458 2000-02-22 Ulrich Drepper <drepper@redhat.com>
3460 * semaphore.h (SEM_FAILED): Use 0 not NULL.
3462 2000-02-14 Ulrich Drepper <drepper@redhat.com>
3464 * condvar.c (pthread_cond_timedwait_relative_old): Tight loop with
3465 nanosleep does not work either. Get absolute time inside the
3467 (pthread_cond_timedwait_relative_new): Likewise.
3468 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
3470 2000-02-13 Andreas Jaeger <aj@suse.de>
3472 * condvar.c (pthread_cond_timedwait_relative_new): Fix last patch.
3473 (pthread_cond_timedwait_relative_old): Likewise.
3475 2000-02-13 Ulrich Drepper <drepper@redhat.com>
3477 * condvar.c (pthread_cond_timedwait_relative_old): Undo last patch
3478 but keep the code around. A bug in the kernel prevent us from
3480 (pthread_cond_timedwait_relative_new): Likewise.
3481 (PR libc/1597 and libc/1598).
3483 2000-02-01 Kaz Kylheku <kaz@ashi.footprints.net>
3485 * condvar.c (pthread_cond_timedwait_relative_old): Do tight
3486 loop around nanosleep calls instead of around most of the function
3487 (pthread_cond_timedwait_relative_new): Likewise.
3488 body. Got rid of backwards goto and one local.
3490 2000-01-31 Ulrich Drepper <drepper@redhat.com>
3492 * condvar.c (pthread_cond_timedwait_relative_old): Recompute time
3493 before every nanosleep call to account for time spent in the rest
3495 (pthread_cond_timedwait_relative_new): Likewise.
3496 Patch by khendricks@ivey.uwo.ca (PR libc/1564).
3498 2000-01-29 Ulrich Drepper <drepper@redhat.com>
3500 * condvar.c (pthread_cond_timedwait_relative_old): Get remaining time
3501 from nanosleep call so that in case we restart we only wait for the
3503 (pthread_cond_timedwait_relative_new): Likewise.
3504 Patch by khendricks@ivey.uwo.ca (PR libc/1561).
3506 2000-01-18 Ulrich Drepper <drepper@cygnus.com>
3508 * manager.c (pthread_allocate_stack): Compute guard page address
3509 correctly. Patch by HJ Lu.
3511 * sysdeps/pthread/pthread.h: Define
3512 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP.
3514 2000-01-16 Ulrich Drepper <drepper@cygnus.com>
3516 * rwlock.c (pthread_rwlock_unlock): Correct one more problem with
3517 preference handling.
3518 (pthread_rwlockattr_setkind_np): Allow
3519 PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP.
3520 Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
3522 2000-01-12 Ulrich Drepper <drepper@cygnus.com>
3524 * internals.h (pthread_readlock_info): New structure.
3525 (_pthread_descr_struct): Add p_readlock_list, p_readlock_free, and
3526 p_untracked_readlock_count.
3527 * pthread.c (__pthread_initial_thread, pthread_manager_thread):
3528 Add initializers for new fields.
3529 * manager.c (pthread_free): Free read/write lock lists.
3530 * queue.h (queue_is_empty): New function.
3531 * rwlock.c: Implement requirements about when readers should get
3533 * sysdeps/pthread/pthread.h
3534 (PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP): New definition.
3535 * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_rwlock_t):
3536 Define this name as well.
3537 Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
3539 2000-01-05 Ulrich Drepper <drepper@cygnus.com>
3541 * pthread.c (__pthread_initial_thread, pthread_manager_thread):
3542 Adjust initializers for struct _pthread_descr_struct change.
3543 * internals.h (struct _pthread_descr_struct): Move new elements to
3546 2000-01-03 Kaz Kylheku <kaz@ashi.footprints.net>
3548 Redesigned how cancellation unblocks a thread from internal
3549 cancellation points (sem_wait, pthread_join,
3550 pthread_cond_{wait,timedwait}).
3551 Cancellation won't eat a signal in any of these functions
3552 (*required* by POSIX and Single Unix Spec!).
3553 * condvar.c: Spontaneous wakeup on pthread_cond_timedwait won't eat a
3554 simultaneous condition variable signal (not required by POSIX
3555 or Single Unix Spec, but nice).
3556 * spinlock.c: __pthread_lock queues back any received restarts
3557 that don't belong to it instead of assuming ownership of lock
3558 upon any restart; fastlock can no longer be acquired by two threads
3560 * restart.h: Restarts queue even on kernels that don't have
3561 queued real time signals (2.0, early 2.1), thanks to atomic counter,
3562 avoiding a rare race condition in pthread_cond_timedwait.
3564 1999-12-31 Andreas Jaeger <aj@suse.de>
3566 * internals.h: Remove duplicate prototype declarations.
3568 * weaks.c: Remove __THROW from prototypes since the file is not
3569 compiled by a C++ compiler.
3570 * internals.h: Likewise.
3572 1999-12-30 Andreas Jaeger <aj@suse.de>
3574 * sysdeps/pthread/pthread.h: Move internal functions to...
3575 * sysdeps/pthread/bits/libc-lock.h: ...here.
3577 1999-12-29 Andreas Jaeger <aj@suse.de>
3579 * sysdeps/pthread/pthread.h: Fix typos, reformat comments.
3581 1999-12-28 Ulrich Drepper <drepper@cygnus.com>
3583 * sysdeps/alpha/pt-machine.h: Move stack_pointer definition to the
3586 * manager.c (__pthread_start): Add one more cast to prevent
3587 warning on 64bit machines.
3589 1999-12-21 Ulrich Drepper <drepper@cygnus.com>
3591 * manager.c (pthread_handle_create): Set p_pid of new thread
3592 before calling the callback function to report a new thread.
3594 1999-12-20 Andreas Jaeger <aj@suse.de>
3596 * pthread.c (pthread_initialize): Move getrlimit call after
3599 1999-12-18 Ulrich Drepper <drepper@cygnus.com>
3601 * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
3602 pwrite64, lseek64, open64, and __open64.
3603 * wrapsyscall.c: Define pread, __pread64, pread64, pwrite, __pwrite64,
3604 pwrite64, lseek64, open64, and __open64.
3606 * manager.c (pthread_allocate_stack): Correct computation of
3607 new_thread_bottom. Correct handling of stack size and when the
3608 rlimit method to guard for stack growth is used.
3609 * pthread.c (pthread_initialize): Stack limit must be STACK_SIZE
3610 minus one pagesize (not two).
3612 1999-12-03 Andreas Jaeger <aj@suse.de>
3614 * Versions: Add __res_state with version GLIBC_2.2.
3616 * errno.c (__res_state): New function to return thread specific
3619 * pthread.c (pthread_initialize): Initialize p_resp.
3620 (__pthread_reset_main_thread): Also set p_resp.
3622 * manager.c (pthread_handle_create): Initialize p_resp.
3624 * internals.h: Add thread specific resolver state.
3625 Based on patches by Adam D. Bradley <artdodge@cs.bu.edu>.
3627 1999-12-01 Ulrich Drepper <drepper@cygnus.com>
3629 * sysdeps/i386/pt-machine.h: Move stack_pointer definition to the
3631 * sysdeps/i386/i686/pt-machine.h: Likewise.
3632 Patches by Alan Modra <alan@SPRI.Levels.UniSA.Edu.Au>.
3634 1999-11-23 Ulrich Drepper <drepper@cygnus.com>
3636 * manager.c (pthread_start_thread_event): Initialize p_pid already
3639 1999-11-22 Ulrich Drepper <drepper@cygnus.com>
3641 * internals.h: Add prototype for __pthread_manager_event.
3642 * manager.c (__pthread_manager_event): New function.
3643 (pthread_start_thread_event): Correct computation of self.
3644 Use INIT_THREAD_SELF.
3645 * pthread.c (__pthread_manager_thread): Initialize p_lock.
3646 (__pthread_initialize_manager): Respect event flags also for creation
3647 of the manager thread.
3649 1999-11-08 Ulrich Drepper <drepper@cygnus.com>
3651 * pthread.c (__pthread_initialize_manager): Initialize
3652 __pthread_manager_thread.p_tid.
3654 1999-11-02 Ulrich Drepper <drepper@cygnus.com>
3656 * internals.h: Declare __pthread_last_event.
3657 * manager.c: Define __pthread_last_event.
3658 (pthread_handle_create): Set __pthread_last_event.
3659 (pthread_exited): Likewise.
3660 * join.c (pthread_exit): Likewise.
3662 * Makefile (libpthread-routines): Add events.
3663 * events.c: New file.
3664 * internals.h: Protect against multiple inclusion.
3665 Include thread_dbP.h header.
3666 (struct _pthread_descr_struct): Add new fields p_report_events and
3668 Declare event reporting functions.
3669 * join.c (pthread_exit): Signal event if this is wanted.
3670 * manager.c (__pthread_threads_events): New variable.
3671 (pthread_handle_create): Take new parameters with event information.
3672 Signal TD_CREATE event if wanted.
3673 (__pthread_manager): Adjust pthread_handle_create call.
3674 (pthread_start_thread_event): New function. Block until manager is
3675 finished and then call pthread_start_thread.
3676 (pthread_exited): Signal TD_REAP event if wanted.
3678 1999-10-26 Ulrich Drepper <drepper@cygnus.com>
3680 * restart.h (suspend_with_cancellation): Rewrite as a macro.
3682 * condvar.c (pthread_cond_timedwait_relative): Don't mark as inline.
3684 1999-10-25 Andreas Jaeger <aj@suse.de>
3686 * internals.h: Remove K&R compatibility.
3687 * no-tsd.c: Likewise.
3688 * semaphore.h: Likewise.
3689 * signals.c: Likewise.
3690 * sysdeps/pthread/bits/libc-tsd.h: Likewise.
3691 * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
3692 * weaks.c: Likewise.
3694 1999-10-21 Xavier Leroy <Xavier.Leroy@inria.fr>
3696 * pthread.c: For i386, wrap pthread_handle_sigrestart and
3697 pthread_handle_sigcancel with functions that restore %gs from the
3698 signal context. For each signal handling function, two wrappers
3699 are required, one for a non-RT signal and one for a RT signal.
3700 * signal.c: For i386, add code to restore %gs from the signal
3701 context in pthread_sighandler and pthread_sighandler_rt.
3703 1999-10-17 Ulrich Drepper <drepper@cygnus.com>
3705 * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add cast.
3707 1999-10-14 Ulrich Drepper <drepper@cygnus.com>
3709 * pthread.c (__pthread_initial_thread): Pass argument to
3710 PTHREAD_START_ARGS_INITIALIZER.
3711 (__pthread_manager_thread): Likewise.
3713 * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add parameter to
3714 initialize function.
3716 * manager.c (pthread_handle_create): Remove p_startfct initialization.
3718 * internals.h (_pthread_descr_struct): We don't need p_startfct field.
3720 1999-10-12 Ulrich Drepper <drepper@cygnus.com>
3722 * internals.h: Correct return types for __libc_read and __libc_write.
3724 1999-10-09 Andreas Jaeger <aj@suse.de>
3726 * internals.h: Add __new_sem_post to get prototype in
3727 manager.c; include semaphore.h for needed types.
3729 1999-10-08 Ulrich Drepper <drepper@cygnus.com>
3731 * manager.c (__pthread_manager) [REQ_POST]: Use __new_sem_post
3732 directly instead of calling sem_post which should not be necessary
3733 but is faster and might help in some case to work around problems.
3734 Patch by khendricks@ivey.uwo.ca [libc/1382].
3736 1999-10-08 Andreas Schwab <schwab@suse.de>
3738 * sysdeps/pthread/Subdirs: New file.
3741 1999-10-07 Ulrich Drepper <drepper@cygnus.com>
3743 * Implies: New file.
3744 * internals.h (struct _pthread_descr_struct): Add p_startfct.
3745 * manager.c (pthread_handle_create): Initialize p_startfct.
3746 * pthread.c: Define __linuxthread_pthread_sizeof_descr variable.
3748 1999-09-25 Ulrich Drepper <drepper@cygnus.com>
3750 * manager.c (__linuxthreads_pthread_threads_max): New variable.
3751 * specific.c (__linuxthreads_pthread_keys_max): New variable.
3752 (__linuxthreads_pthread_key_2ndlevel_size): New variable.
3754 * condvar.c (pthread_cond_timedwait_relative): Never return with
3755 EINTR. Patch by Andreas Schwab.
3757 1999-09-19 Ulrich Drepper <drepper@cygnus.com>
3759 * signals.c (sigaction): Correct last patch. Don't select
3760 pthread_sighandler_rt based on the signal number but instead of
3761 the SA_SIGINFO flag.
3763 1999-09-23 Ulrich Drepper <drepper@cygnus.com>
3765 * specific.c: Move definitions of struct pthread_key_struct and
3766 destr_function to ...
3767 * internals.h: ...here.
3769 1999-09-18 Ulrich Drepper <drepper@cygnus.com>
3771 * pthread.c (pthread_handle_sigrestart_rt): New function. Use
3772 this instead of pthread_handle_sigrestart if the signal is an RT
3775 * signals.c: Handle passing through of sighandler arguments also
3776 for real-time signals.
3778 1999-09-03 Andreas Schwab <schwab@suse.de>
3780 * ptfork.c (__fork): Renamed from fork and use __libc_fork. Add
3782 (__vfork): New function, alias vfork.
3783 * Versions: Export __fork, vfork, and __vfork in libpthread.
3785 1999-08-23 Andreas Schwab <schwab@suse.de>
3787 * signals.c (pthread_sighandler): Add SIGCONTEXT_EXTRA_ARGS to
3788 call to signal handler.
3790 1999-08-20 Ulrich Drepper <drepper@cygnus.com>
3792 * pthread.c (__pthread_reset_main_thread): Undo last change.
3793 (__pthread_kill_other_threads_np): Reset signal handlers for the
3794 signals we used in the thread implementation here.
3796 1999-08-19 Ulrich Drepper <drepper@cygnus.com>
3798 * pthread.c (__pthread_reset_main_thread): Reset signal handlers
3799 for the signals we used in the thread implementation [PR libc/1234].
3801 * Versions: Export __pthread_kill_other_threads_np from libpthread
3804 * signals.c: Pass sigcontext through wrapper to the user function.
3806 1999-08-01 Ulrich Drepper <drepper@cygnus.com>
3808 * Versions [ld.so] (GLIBC_2.0): Export __libc_internal_tsd_get and
3809 __libc_internal_tsd_set.
3811 1999-07-29 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3813 * manager.c: Remove inclusion of <linux/tasks.h> since it's not
3816 1999-07-16 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3818 * internals.h: Align _pthread_descr_struct to 32 bytes.
3819 Reported by Tim Hockin <thockin@cobaltnet.com>, close PR
3822 1999-07-09 Ulrich Drepper <drepper@cygnus.com>
3824 * oldsemaphore.c (sem_compare_and_swap): Fix use of compare and
3827 1999-07-09 Cristian Gafton <gafton@redhat.com>
3829 * Makefile (libpthread-routines): Add oldsemaphore routine.
3830 * Versions: Add sem_destroy, sem_getvalue, sem_init, sem_post,
3831 sem_trywait, and sem_wait to GLIBC_2.1.
3832 * oldsemaphore.c: New file.
3833 * semaphore.c: Add default_symbol_versions for the changed functions.
3834 (__new_sem_init): Rename from sem_init.
3835 (__new_sem_post): Rename from sem_post.
3836 (__new_sem_wait): Rename from sem_wait.
3837 (__new_sem_trywait): Rename from sem_trywait.
3838 (__new_sem_getvalue): Rename from sem_getvalue.
3839 (__new_sem_destroy): Rename from sem_destroy.
3841 1999-06-23 Robey Pointer <robey@netscape.com>
3843 * internals.h: Added p_nextlock entry to separate queueing for a
3844 lock from queueing for a CV (sometimes a thread queues on a lock
3845 to serialize removing itself from a CV queue).
3846 * pthread.c: Added p_nextlock to initializers.
3847 * spinlock.c: Changed to use p_nextlock instead of p_nextwaiting.
3849 1999-07-09 Ulrich Drepper <drepper@cygnus.com>
3851 * manager.c (pthread_handle_create): Free mmap region after stack
3852 if clone failed. Patch by Kaz Kylheku <kaz@ashi.FootPrints.net>.
3854 1999-05-23 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3856 * man/pthread_cond_init.man: Correct example.
3857 Reported by Tomas Berndtsson <tomas@nocrew.org>.
3859 * linuxthreads.texi (Condition Variables): Likewise.
3861 1999-05-18 Jakub Jelinek <jj@ultra.linux.cz>
3863 * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): Use
3864 casx not cas, also successful casx returns the old value in rd
3865 and not the new value.
3867 1999-05-16 Xavier Leroy <Xavier.Leroy@inria.fr>
3869 * manager.c: If pthread_create() is given a NULL attribute
3870 and the thread manager runs with a realtime policy, set the
3871 scheduling policy of the newly created thread back to SCHED_OTHER.
3872 * manager.c: If the PTHREAD_INHERIT_SCHED attribute is given,
3873 initialize the schedpolicy field of new_thread->p_start_args
3874 to that of the calling thread.
3876 1999-04-29 Ulrich Drepper <drepper@cygnus.com>
3878 * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): cas
3879 instruction does not allow memory element to use offset.
3881 1999-04-28 Ulrich Drepper <drepper@cygnus.com>
3883 * manager.c (pthread_allocate_stack): Optimize initialization of new
3886 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_define_initialized):
3887 Don't use initializer since it is all zeroes.
3888 (__libc_once_define): Likewise.
3890 1999-04-16 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3892 * sysdeps/arm/Implies: Removed since cmpxchg/no-cmpxchg
3893 doesn't exist anymore.
3894 * sysdeps/i386/Implies: Likewise.
3895 * sysdeps/m68k/Implies: Likewise.
3896 * sysdeps/mips/Implies: Likewise.
3897 * sysdeps/powerpc/Implies: Likewise.
3898 * sysdeps/sparc/sparc32/Implies: Likewise.
3899 * sysdeps/sparc/sparc64/Implies: Likewise.
3901 1999-04-15 Ulrich Drepper <drepper@cygnus.com>
3903 * sysdeps/alpha/bits/semaphore.h: Removed.
3904 * sysdeps/powerpc/bits/semaphore.h: Removed.
3905 * sysdeps/pthread/cmpxchg/bits/semaphore.h: Removed.
3906 * sysdeps/pthread/no-cmpxchg/bits/semaphore.h: Removed.
3907 * Makefile (headers): Remove bits/semaphore.h.
3909 * semaphore.h: Define _pthread_descr if necessary.
3910 Don't include limits.h. Define SEM_VALUE_MAX directly.
3912 (sem_t): Protect element names with leading __.
3913 Add declarations for sem_close, sem_open, and sem_unlink.
3914 * semaphore.c: Adjust all functions for new element names.
3915 Define sem_close, sem_open, and sem_unlink.
3916 * Versions (libthread): Add sem_close, sem_open, and sem_unlink for
3918 * sysdeps/pthread/bits/pthreadtypes.h: Define _pthread_descr only if
3921 1999-03-16 H.J. Lu <hjl@gnu.org>
3923 * specific.c (pthread_key_delete): Check th->p_terminated to see
3924 if the thread is running.
3926 * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set):
3927 Added to GLIBC_2.0 for libc.so.
3929 1999-02-12 H.J. Lu <hjl@gnu.org>
3931 * Versions (__libc_current_sigrtmin, __libc_current_sigrtmax,
3932 __libc_allocate_rtsig): Added to GLIBC_2.1.
3934 * internals.h (DEFAULT_SIG_RESTART): Removed.
3935 (DEFAULT_SIG_CANCEL): Removed.
3937 * pthread.c (init_rtsigs, __libc_current_sigrtmin,
3938 __libc_current_sigrtmax, __libc_allocate_rtsig): New functions.
3939 (__pthread_sig_restart, __pthread_sig_cancel,
3940 __pthread_sig_debug): Initialized.
3941 (pthread_initialize): Call init_rtsigs () to initialize
3944 1999-02-03 H.J. Lu <hjl@gnu.org>
3946 * manager.c (__pthread_manager): Do block __pthread_sig_debug.
3947 Don't restart the thread which sent REQ_DEBUG.
3948 (pthread_start_thread): Check if __pthread_sig_debug > 0
3951 * pthread.c (__pthread_initialize_manager): Suspend ourself
3952 after sending __pthread_sig_debug to gdb instead of
3953 __pthread_sig_cancel.
3955 1999-01-24 H.J. Lu <hjl@gnu.org>
3957 * manager.c (__pthread_manager): Delete __pthread_sig_debug
3958 from mask if __pthread_sig_debug > 0.
3959 (pthread_handle_create): Increment __pthread_handles_num.
3961 * manager.c (pthread_handle_create): Don't pass CLONE_PTRACE to clone.
3962 * pthread.c (__pthread_initialize_manager): Likewise.
3964 * pthread.c (pthread_initialize): Use __libc_allocate_rtsig (1)
3965 instead of __libc_allocate_rtsig (2).
3966 (__pthread_initialize_manager): Send __pthread_sig_debug to gdb
3967 instead of __pthread_sig_cancel.
3968 (pthread_handle_sigdebug): Fix comments.
3970 1999-01-21 Ulrich Drepper <drepper@cygnus.com>
3972 * manager.c (pthread_allocate_stack): Set
3973 __pthread_nonstandard_stacks if user-specified stack is used.
3975 1999-01-16 Ulrich Drepper <drepper@cygnus.com>
3977 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _LFS_ASYNCHRONOUS_IO,
3978 _LFS_LARGEFILE, _LFS64_LARGEFILE, and _LFS64_STDIO from Unix98.
3980 1999-01-07 Xavier Leroy <Xavier.Leroy@inria.fr>
3982 * pthread.c: Use a third signal __pthread_sig_debug distinct
3983 from __pthread_sig_cancel to notify gdb when a thread is
3985 * manager.c: Likewise.
3986 * internals.h: Likewise.
3987 * signals.c: The implementation of sigwait(s) assumed that
3988 all signals in s have signal handlers already attached.
3989 This is not required by the standard, so make it work
3990 also if some of the signals have no handlers.
3992 1999-01-05 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
3994 * linuxthreads.texi: Remove pointers from first @node. Move old
3995 @node spec inside comment.
3997 1998-12-31 Ulrich Drepper <drepper@cygnus.com>
3999 * sysdeps/pthread/bits/stdio-lock.h: Define _IO_lock_lock and
4002 1998-12-29 Ulrich Drepper <drepper@cygnus.com>
4004 * semaphore.c (sem_trywait): Don't forget to unlock the semaphore
4005 lock. Patch by Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>.
4007 1998-12-21 Ulrich Drepper <drepper@cygnus.com>
4009 * manager.c: Threads now send __pthread_sig_cancel on termination.
4010 Change clone call and signal masks.
4011 * thread.c (pthread_handle_sigrestart): Remove special code for
4013 (pthread_handle_sigcancel): In manager thread call
4014 __pthread_manager_sighandler.
4015 * sysdeps/i386/pt-machine.h (__compare_and_swap): Add memory clobber.
4016 * sysdeps/i386/i686/pt-machine.h: Likewise.
4017 Patches by Xavier Leroy.
4019 1998-12-14 Ulrich Drepper <drepper@cygnus.com>
4021 * spinlock.c (__pthread_unlock): Don't crash if called for an
4022 untaken mutex. Reported by Ruslan V. Brushkoff <rus@Snif.Te.Net.UA>.
4024 * Examples/ex6.c: Unbuffer stdout and reduce sleep time to reduce
4027 1998-12-13 Ulrich Drepper <drepper@cygnus.com>
4029 * Examples/ex3.c: Wait until all threads are started before
4030 searching for the number to avoid race condition on very fast
4033 1998-12-08 Andreas Jaeger <aj@arthur.rhein-neckar.de>
4035 * sysdeps/pthread/pthread.h: Remove __pthread_setcanceltype
4036 declaration since it's not needed.
4038 * sysdeps/pthread/pthread.h: Move internal functions to ...
4039 * internals.h: ...here.
4041 1998-12-02 H.J. Lu <hjl@gnu.org>
4043 * pthread.c (__pthread_sig_restart): Initiliaze to 0 if
4044 SIGRTMIN is defined.
4045 (__pthread_sig_cancel): Likewise.
4047 1998-12-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
4049 * wrapsyscall.c: Include <sys/mman.h> for msync,
4050 <stdlib.h> for system and <termios.h> for tcdrain prototype.
4051 Correct msync declaration.
4053 1998-11-29 Roland McGrath <roland@baalperazim.frob.com>
4055 * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_define, __libc_tsd_get,
4056 __libc_tsd_set): New macros for new interface.
4057 * no-tsd.c: New file, provide uninitialized defns of
4058 __libc_internal_tsd_get and __libc_internal_tsd_set.
4059 * Makefile (routines): Add no-tsd.
4061 1998-10-12 Roland McGrath <roland@baalperazim.frob.com>
4063 * internals.h: Include <bits/libc-tsd.h>, not <bits/libc-lock.h>.
4064 * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
4065 __libc_internal_tsd_set): Move decls to ...
4066 * sysdeps/pthread/bits/libc-tsd.h: New file for __libc_internal_tsd_*
4069 * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
4070 __libc_internal_tsd_set): Make these pointers to functions, not
4071 functions; remove #pragma weak decls for them.
4072 * specific.c (__libc_internal_tsd_get, __libc_internal_tsd_set):
4073 Define static functions and initialized pointers to them.
4075 1998-11-18 Ulrich Drepper <drepper@cygnus.com>
4077 * Makefile (CFLAGS-mutex.c): Define as -D__NO_WEAK_PTHREAD_ALIASES.
4078 (CFLAGS-specific.c): Likewise.
4079 (CFLAGS-pthread.c): Likewise.
4080 (CFLAGS-ptfork.c): Likewise.
4081 (CFLAGS-cancel.c): Likewise.
4082 * sysdeps/pthread/bits/libc-lock.h: Don't mark __pthread_* functions
4083 as weak references if __NO_WEAK_PTHREAD_ALIASES is defined.
4085 * mutex.c (pthread_mutex_init): Define as strong symbol.
4086 (pthread_mutex_destroy): Likewise.
4087 (pthread_mutex_trylock): Likewise.
4088 (pthread_mutex_lock): Likewise.
4089 (pthread_mutex_unlock): Likewise.
4090 (pthread_mutexattr_init): Likewise.
4091 (pthread_mutexattr_destroy): Likewise.
4092 (pthread_once): Likewise.
4093 * ptfork.c (pthread_atfork): Likewise.
4094 * specific.c (pthread_key_create): Likewise.
4095 (pthread_setspecific): Likewise.
4096 (pthread_getspecific): Likewise.
4098 1998-11-15 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
4100 * linuxthreads.texi: Fix punctuation after xref.
4102 1998-11-10 H.J. Lu <hjl@gnu.org>
4104 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine NR_OPEN
4105 if it is defined in <linux/limits.h>.
4107 1998-10-29 14:28 Ulrich Drepper <drepper@cygnus.com>
4109 * spinlock.h (__pthread_trylock): Define inline.
4110 (__pthread_lock): Add extra parameter to declaration. Declare
4111 using internal_function.
4112 (__pthread_unlock): Declare using internal_function.
4113 * spinlock.c (__pthread_lock): Add new parameter. Use it instead
4114 of local variable self. Avoid recomputing self. Define using
4116 (__pthread_trylock): Remove.
4117 (__pthread_unlock): Define using internal_function.
4118 * cancel.c: Adjust for __pthread_lock interface change. Use already
4119 computed self value is possible.
4120 * condvar.c: Likewise.
4122 * manager.c: Likewise.
4123 * mutex.c: Likewise.
4124 * pthread.c: Likewise.
4125 * rwlock.c: Likewise.
4126 * semaphore.c: Likewise.
4127 * signals.c: Likewise.
4129 1998-10-27 13:46 Ulrich Drepper <drepper@cygnus.com>
4131 * sysdeps/pthread/pthread.h (struct _pthread_cleanup_buffer): Prepend
4132 __ to field names of the struct.
4133 * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_fastlock):
4135 (pthread_attr_t): Likewise.
4136 (pthread_cond_t): Likewise.
4137 (pthread_condattr_t): Likewise.
4138 (pthread_mutex_t): Likewise.
4139 (pthread_mutexattr_t): Likewise.
4140 (pthread_rwlock_t): Likewise.
4141 (pthread_rwlockattr_t): Likewise.
4142 * attr.c: Adjust for pthread.h and pthreadtypes.h change.
4143 * cancel.c: Likewise.
4144 * condvar.c: Likewise.
4145 * manager.c: Likewise.
4146 * mutex.c: Likewise.
4147 * pthread.c: Likewise.
4148 * ptlongjmp.c: Likewise.
4149 * rwlock.c: Likewise.
4150 * spinlock.c: Likewise.
4152 1998-10-09 Ulrich Drepper <drepper@cygnus.com>
4154 * sysdeps/i386/pt-machine.h (get_eflags, set_eflags): Mark these
4157 * sysdeps/i386/i686/pt-machine.h: Remove unused inline
4160 * Makefile (libpthread-routines): Add pt-machine.
4161 * pt-machine.c: New file.
4162 * sysdeps/alpha/pt-machine.h: Define PT_EI as extern inline is not
4163 yet defined. Use PT_EI in extern inline definitions.
4164 * sysdeps/arm/pt-machine.h: Likewise.
4165 * sysdeps/i386/pt-machine.h: Likewise.
4166 * sysdeps/i386/i686/pt-machine.h: Likewise.
4167 * sysdeps/m68k/pt-machine.h: Likewise.
4168 * sysdeps/mips/pt-machine.h: Likewise.
4169 * sysdeps/powerpc/pt-machine.h: Likewise.
4170 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
4171 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
4173 1998-10-02 Andreas Jaeger <aj@arthur.rhein-neckar.de>
4175 * semaphore.h: Include <sys/types.h> so that _pthread_descr
4178 1998-09-15 David S. Miller <davem@pierdol.cobaltmicro.com>
4180 * sysdeps/sparc/sparc32/pt-machine.h (INIT_THREAD_SELF): Add nr
4182 * sysdeps/sparc/sparc64/pt-machine.h (INIT_THREAD_SELF): Likewise.
4184 1998-09-12 14:24 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
4186 * sysdeps/unix/sysv/linux/bits/sigthread.h: Add multiple inclusion
4189 1998-09-02 11:08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
4191 * signals.c (sigaction): Check that sig is less than NSIG to avoid
4192 array index overflow.
4194 1998-09-06 10:56 Ulrich Drepper <drepper@cygnus.com>
4196 * sysdeps/pthread/semaphore.h: New file.
4198 1998-09-06 09:08 Ulrich Drepper <drepper@cygnus.com>
4200 * sysdeps/pthread/bits/libc-lock.h (enum __libc_tsd_key_t): Add
4201 _LIBC_TSD_KEY_DL_ERROR.
4203 1998-08-31 Ulrich Drepper <drepper@cygnus.com>
4205 * sysdeps/i386/i686/pt-machine.h (testandset): Add memory clobber.
4206 * sysdeps/i386/pt-machine.h: Likewise.
4207 Suggested by Roland McGrath.
4209 1998-08-28 13:58 Ulrich Drepper <drepper@cygnus.com>
4211 * internals.h: Also define THREAD_GETMEM_NC and THREAD_SETMEM_NC to
4212 access thread data with non-constant offsets.
4213 * specific.c: Use THREAD_GETMEM_NC and THREAD_SETMEM_NC where
4216 * sysdeps/i386/useldt.h: Fix typo. Add THREAD_GETMEM_NC and
4217 THREAD_SETMEM_NC definitions.
4219 * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM_NC and
4221 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
4223 1998-08-26 15:46 Ulrich Drepper <drepper@cygnus.com>
4225 * internals.h: Define THREAD_GETMEM and THREAD_SETMEM to default if
4226 not already defined.
4227 (struct _pthread_descr_struct): Add p_self and p_nr field.
4228 * manager.c (__pthread_handles): Define second element to point
4230 (__pthread_handles_num): Initialize to 2.
4231 (__pthread_manager): Use INIT_THREAD_SELF with two arguments.
4232 (pthread_start_thread): Likewise.
4233 (pthread_handle_create): Start search for free slot at entry 2.
4234 Initialize new fields p_self and p_nr.
4235 Call __clone with CLONE_PTRACE if available.
4236 (pthread_free): Call FREE_THREAD_SELF if available.
4237 * pthread.c (__pthread_initial_thread): Initialize new fields.
4238 (__pthread_manager_thread): Likewise.
4239 (__pthread_initialize_manager): Call __clone with CLONE_PTRACE.
4241 * cancel.c: Use THREAD_GETMEM and THREAD_SETMEM to access the
4242 elements of the thread descriptor.
4243 * condvar.c: Likewise.
4244 * errno.c: Likewise.
4246 * manager.c: Likewise.
4247 * pthread.c: Likewise.
4248 * ptlongjmp.c: Likewise.
4249 * semaphore.c: Likewise.
4250 * signals.c: Likewise.
4251 * specific.c: Likewise.
4252 * spinlock.c: Likewise.
4254 * sysdeps/alpha/pt-machine.h (INIT_THREAD_SELF): Add extra parameter.
4256 * sysdeps/i386/useldt.h: New file.
4257 * sysdeps/i386/i686/pt-machine.h: Show how to use this file.
4259 * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM and
4260 THREAD_SETMEM using __thread_self.
4261 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
4263 1998-08-24 Geoff Keating <geoffk@ozemail.com.au>
4265 * spinlock.c (__pthread_lock): Reset p_nextwaiting to NULL if it
4266 turned out that we didn't need to queue after all.
4268 1998-08-22 Geoff Keating <geoffk@ozemail.com.au>
4270 * sysdeps/powerpc/pt-machine.h: Remove testandset, it's not used
4271 and wastes space; correct types.
4273 1998-08-08 11:18 H.J. Lu <hjl@gnu.org>
4275 * signals.c (sigaction): Handle NULL argument.
4277 1998-08-04 Ulrich Drepper <drepper@cygnus.com>
4279 * sysdeps/unix/sysv/linux/bits/sigthread.h: Use __sigset_t instead
4282 1998-08-02 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
4284 * Makefile (linuxthreads-version): Extract correct number from
4287 1998-07-29 Xavier Leroy <Xavier.Leroy@inria.fr>
4289 * Banner: Bump version number to 0.8
4290 * FAQ.html: Many updates, in particular w.r.t. debugging.
4291 * manager.c: Support for non-default stacksize for
4292 LinuxThreads-allocated stacks;
4293 don't use guard pages for stacks with default size, rely on
4294 rlimit(RLIMIT_STACK) instead (it's cheaper).
4296 * cancel.c: Use __pthread_sig_cancel and __pthread_sig_restart
4297 everywhere instead of PTHREAD_SIG_CANCEL and PTHREAD_SIG_RESTART.
4298 * condvar.c: Likewise.
4299 * internals.h: Likewise.
4300 * restart.h: Likewise.
4301 * signals.c: Likewise.
4302 * pthread.c: Likewise; set rlimit(RLIMIT_STACK) as we need it.
4304 1998-07-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
4306 * weaks.c: Define pthread_mutexattr_[sg]ettype instead of
4307 __pthread_mutexattr_[sg]ettype. Add more weak aliases.
4308 * Versions: Put __pthread_mutexattr_settype under version
4309 GLIBC_2.0. Don't export __pthread_mutexattr_setkind_np and
4310 __pthread_mutexattr_gettype.
4312 1998-07-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
4314 * sysdeps/pthread/bits/libc-lock.h: Make
4315 __pthread_mutexattr_settype weak. Don't make
4316 __pthread_mutexattr_setkind_np weak.
4318 1998-07-16 10:52 Ulrich Drepper <drepper@cygnus.com>
4320 * manager.c (pthread_handle_create): Check whether sched_setscheduler
4321 call can succeed here.
4323 * mutex.c: Define __pthread_mutexattr_settype and make
4324 __pthread_mutexattr_setkind_np an alias.
4325 Likewise for __pthread_mutexattr_gettype.
4327 1998-07-15 11:00 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
4329 * attr.c (pthread_attr_setschedpolicy): Don't check whether caller
4332 1998-07-14 19:38 Ulrich Drepper <drepper@cygnus.com>
4334 * sysdeps/pthread/bits/libc-lock.h: Define __libc_cleanup_end.
4336 1998-07-11 Andreas Jaeger <aj@arthur.rhein-neckar.de>
4338 * Examples/ex6.c: Include <unistd.h> for usleep.
4340 1998-06-13 11:04 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
4342 * Examples/ex4.c (main): Use exit, not pthread_exit.
4344 1998-07-09 13:39 Ulrich Drepper <drepper@cygnus.com>
4346 * Versions: Add __pthread_mutexattr_gettype and
4347 __pthread_mutexattr_settype.
4348 * lockfile.c: Use __pthread_mutexattr_settype instead of
4349 __pthread_mutexattr_setkind_np.
4350 * mutex.c: Define __pthread_mutexattr_gettype and
4351 __pthread_mutexattr_settype.
4353 * sysdeps/pthread/pthread.h: Declare __pthread_mutexattr_gettype and
4354 __pthread_mutexattr_settype.
4355 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_init_recursive):
4356 Use __pthread_mutexattr_settype.
4358 1998-07-08 22:26 Ulrich Drepper <drepper@cygnus.com>
4360 * Versions: Add pthread_mutexattr_gettype, pthread_mutexattr_settype.
4361 * mutex.c: Define weak alias pthread_mutexattr_gettype and
4362 pthread_mutexattr_settype.
4363 * sysdeps/pthread/pthread.h: Declare these functions.
4364 Move pthread_sigmask and pthread_kill declaration in separate header.
4365 * sysdeps/unix/sysv/linux/bits/sigthread.h: New file.
4367 1998-07-07 15:20 Ulrich Drepper <drepper@cygnus.com>
4369 * Makefile: Add rules to compile and run tests.
4370 * Examples/ex1.c: Little changes to fix warnings.
4371 * Examples/ex2.c: Likewise.
4372 * Examples/ex3.c: Likewise.
4373 * Examples/ex4.c: Likewise.
4374 * Examples/ex5.c: Likewise.
4375 * Examples/ex6.c: New file.
4377 1998-07-05 11:54 Ulrich Drepper <drepper@cygnus.com>
4379 * Versions: Add pthread_attr_init to GLIBC_2.1 version in libc.
4381 1998-07-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
4383 * attr.c: Include <string.h>.
4385 1998-06-30 11:47 Ulrich Drepper <drepper@cygnus.com>
4387 * attr.c: Include errno.h. Use memcpy to copy sched_param.
4388 * internals.h: Include limits.h.
4389 * manager.c: Use memcpy to copy sched_param.
4390 * ptfork.c: Include errno.h.
4391 * pthread.c: Likewise.
4392 * semaphore.c: Likewise.
4393 * specific.c: Likewise.
4394 * spinlock.h: Likewise.
4395 * sysdeps/pthread/pthread.h: Include only allowed headers. Move
4396 type definition to ...
4397 * sysdeps/pthread/bits/pthreadtypes.h: ...here. New file.
4399 1998-06-29 12:34 Ulrich Drepper <drepper@cygnus.com>
4401 * sysdeps/pthread/pthread.h: Use __PMT not __P for function pointers.
4403 * sysdeps/pthread/pthread.h: Define various PTHREAD_* symbols also
4404 as macros as demanded in POSIX.1, Annex C.
4406 1998-06-29 12:29 Ulrich Drepper <drepper@cygnus.com>
4408 * internals.h (struct pthread_request): For free use pthread_t
4409 instead of pthread_descr.
4410 * join.c (pthread_join): Pass thread_id, not th to manager.
4411 (pthread_detach): Likewise.
4412 * manager.c (__pthread_manager): Except thread ID in FREE_REQ case.
4413 (pthread_exited): Remove detached queue code.
4414 (pthread_handle_free): Expect thread ID parameter and use it to
4415 validate the thread decsriptor. Don't use detached queue.
4416 Patches by Xavier Leroy.
4418 1998-06-27 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
4420 * libpthread.map: Export accept, longjmp, sigaction, siglongjmp,
4421 _IO_flockfile, _IO_ftrylockfile, _IO_funlockfile,
4422 __pthread_atfork, __pthread_key_create, __pthread_once.
4423 * internals.h: Doc fix.
4424 * pthread.c (__pthread_initialize): Define again.
4426 1998-06-26 Ulrich Drepper <drepper@cygnus.com>
4428 * manager.c (pthread_exited): If thread is not detached put it on
4430 (pthread_handle_free): If thread is not on list with living threads
4431 search on list with detached threads.
4433 * sysdeps/pthread/pthread.h (PTHREAD_RWLOCK_INITIALIZER): Correct
4434 for new definition of pthread_rwlock_t.
4436 * spinlock.c: Correct test whether to compile
4437 __pthread_compare_and_swap or not.
4439 1998-06-25 19:27 Ulrich Drepper <drepper@cygnus.com>
4441 * attr.c: Finish user stack support. Change locking code to be safe
4442 in situations with different priorities.
4443 * cancel.c: Likewise.
4444 * condvar.c: Likewise.
4445 * internals.h: Likewise.
4447 * manager.c: Likewise.
4448 * mutex.c: Likewise.
4449 * pthread.c: Likewise.
4450 * ptlongjmp.c: Likewise.
4451 * queue.h: Likewise.
4452 * rwlock.c: Likewise.
4453 * semaphore.c: Likewise.
4454 * semaphore.h: Likewise.
4455 * signals.c: Likewise.
4456 * spinlock.c: Likewise.
4457 * spinlock.h: Likewise.
4458 * sysdeps/pthread/pthread.h: Likewise.
4459 Patches by Xavier Leroy.
4461 * sysdeps/i386/i686/pt-machine.h: New file.
4463 1998-06-25 Ulrich Drepper <drepper@cygnus.com>
4465 * sysdeps/pthread/pthread.h: Make [sg]et_stacksize and
4466 [sg]et_stackaddr prototypes always available.
4468 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
4469 _POSIX_THREAD_ATTR_STACKSIZE and _POSIX_THREAD_ATTR_STACKADDR.
4471 1998-06-24 Ulrich Drepper <drepper@cygnus.com>
4473 * manager.c (pthread_free): Undo patch from 980430.
4474 Reported by David Wragg <dpw@doc.ic.ac.uk>.
4476 1998-06-09 15:07 Ulrich Drepper <drepper@cygnus.com>
4478 * manager.c: Define __pthread_manager_adjust_prio and use it to
4479 increase priority when needed.
4480 * internals.h: Add prototype for __pthread_manager_adjust_prio.
4481 * mutex.c: Optimize mutexes to wake up only one thread.
4482 * pthread.c: Move PID of manager for global variable in structure
4484 Patches by Xavier Leroy.
4486 1998-06-07 13:47 Ulrich Drepper <drepper@cygnus.com>
4488 * sysdeps/pthread/bits/libc-lock.h: Optimize cleanup handlers a bit.
4490 1998-06-03 Andreas Jaeger <aj@arthur.rhein-neckar.de>
4492 * attr.c: Correct typo.
4494 1998-05-01 Ulrich Drepper <drepper@cygnus.com>
4496 * manager.c (pthread_free): Unmap guard before the stack.
4497 Patch by Matthias Urlichs.
4499 1998-04-30 Ulrich Drepper <drepper@cygnus.com>
4501 * manager.c (pthread_free): Detect already free child.
4502 Patch by Xavier Leroy, reported by Matthias Urlichs.
4504 1998-04-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
4506 * Makefile (linuxthreads-version): Renamed back from
4509 1998-04-21 Ulrich Drepper <drepper@cygnus.com>
4511 * ptlongjmp.c: Add prototypes for __libc_siglongjmp and
4514 1998-04-20 14:55 Ulrich Drepper <drepper@cygnus.com>
4516 * Makefile (libpthread-routines): Add ptlongjmp and spinlock.
4517 * internals.h: Add definitions for new spinlock implementation.
4518 * ptlongjmp.c: New file.
4519 * spinlock.c: New file.
4520 * spinlock.h (acquire): Don't reschedule using __sched_yield, use
4521 new function __pthread_acquire to prevent deadlocks with thread
4522 with different priorities.
4523 Patches by Xavier Leroy <Xavier.Leroy@inria.fr>.
4525 1998-03-16 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
4527 * manager.c (__pthread_manager): Reduce first argument to select
4528 to include just the needed file descriptor.
4530 1998-03-17 00:06 Ulrich Drepper <drepper@cygnus.com>
4532 * manager.c: Fix last patch which caused core dumps.
4534 * pthread.c: Correctly handle missing SIGRTMIN.
4536 1998-03-15 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
4538 * libpthread.map: Add __libc_internal_tsd_get and
4539 __libc_internal_tsd_set. Add missing cancelable functions. Export
4540 libc internal versions of the cancelable functions.
4542 1998-03-13 16:51 Ulrich Drepper <drepper@cygnus.com>
4544 * weaks.c: Define pthread_attr_init as GLIBC_2.0 and GLIBC_2.1.
4546 1998-03-13 00:46 Ulrich Drepper <drepper@cygnus.com>
4548 * attr.c: Implement pthread_attr_[gs]etguardsize,
4549 pthread_attr_[gs]setstackaddr, pthread_attr_[gs]etstacksize.
4550 Change pthread_attr_init to have two interfaces.
4551 * internals.h (struct _pthread_descr_struct): Add new fields for
4553 * libpthread.map: Add names in GLIBC_2.1 section.
4554 * manager.c (pthread_handle_create): Implement guardsize and
4556 (pthread_free): Likewise.
4557 * pthread.c (pthread_create): Add new interface for changed
4559 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
4560 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add definition of
4563 1998-03-11 00:42 Wolfram Gloger <wmglo@dent.med.uni-muenchen.de>
4565 * manager.c: Enable resetting of the thread scheduling policy
4566 to SCHED_OTHER when the parent thread has a different one.
4568 1998-02-01 13:51 Ulrich Drepper <drepper@cygnus.com>
4570 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
4571 _POSIX_ASYNCHRONOUS_IO.
4573 * sysdeps/pthread/pthread.h: Define bits for Unix98 variants of
4575 * mutex.c: Implement new mutex types.
4577 * internals.h: Include <signal.h>.
4579 * libpthread.map: Add __erno_location and __h_errno_location.
4581 * errno.c: Return pointer to variable actually in use. This might
4582 not be the one in the thread structure.
4583 * internals.h (struct _pthread_descr_struct): Add new fields p_errnop
4585 * manager.c (__pthread_manager): Set p_errnop and p_h_errnop member
4586 of manager thread structure.
4587 (pthread_handle_create): Set p_errnop and p_h_errnop members for new
4589 * pthread.c: Adapt initializer for thread structures.
4590 (__pthread_initial_thread): Set p_errnop and p_h_errnop member.
4591 (__pthread_reset_main_thread): Reset p_errnop and p_h_errnop of
4592 current thread to global variables.
4594 1998-01-31 17:27 Ulrich Drepper <drepper@cygnus.com>
4596 * rwlock.c: New file.
4597 * Makefile (libpthread-routines): Add rwlock.
4598 * sysdeps/pthread/pthread.h: Define data structures and declare
4600 * libpthread.map: Add new functions.
4602 1997-12-18 13:50 Philip Blundell <pb@nexus.co.uk>
4604 * sysdeps/arm/pt-machine.h: New file; add ARM support.
4605 * sysdeps/arm/Implies: likewise.
4606 * README: Document it.
4608 1997-12-13 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
4610 * signals.c: Remove unneeded initializer for sigwaited, saving a
4613 1997-04-11 01:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
4615 * semaphore.c (sem_init): Set sem_spinlock only if available.
4617 1997-12-04 01:48 Ulrich Drepper <drepper@cygnus.com>
4619 * mutex.c: Implement PTHREAD_MUTEX_CHECKERROR.
4620 * sysdeps/pthread/pthread.h: Define PTHREAD_MUTEX_CHECKERROR.
4622 * Makefile: Update from LinuxThreads 0.7.
4623 * internals.h. Likewise.
4624 * manager.c: Likewise.
4625 * mutex.c: Likewise.
4626 * pthread.c: Likewise.
4627 * signals.c: Likewise.
4628 * specific.c: Likewise.
4629 * Examples/ex3.c: Likewise.
4631 1997-11-20 18:13 Ulrich Drepper <drepper@cygnus.com>
4633 * pthread.c (__pthread_reset_main_thread): Close pipe only if still
4636 1997-10-29 05:38 Ulrich Drepper <drepper@cygnus.com>
4638 * wrapsyscall.c: Add socket functions which are also cancelation
4641 1997-10-19 21:40 Wolfram Gloger <wg@wolfram.dent.med.uni-muenchen.de>
4643 * specific.c (__libc_internal_tsd_set, __libc_internal_tsd_get):
4644 New functions for fast thread specific data within libc.
4646 * internals.h: Add new array p_libc_specific to struct
4647 _pthread_descr_struct.
4649 * sysdeps/pthread/bits/libc-lock.h: Declare new functions.
4651 1997-10-13 05:39 Ulrich Drepper <drepper@cygnus.com>
4653 * semaphore.h: Add __BEGIN_DECLS/__END_DECLS.
4654 Reported by Ralf Corsepius <corsepiu@faw.uni-ulm.de>.
4656 1997-08-29 03:05 Ulrich Drepper <drepper@cygnus.com>
4658 * internals.h (struct _pthread_descr_struct): Add definitions for
4659 two-level specific key handling.
4660 * manager.c (pthread_handle_create): Initialize specific memory array.
4661 * specific.c: Implement two-level key handling.
4662 * weaks.c: Don't provide dummy key handling.
4663 * sysdeps/pthread/bits/libc-lock.h: Typedef __libc_lock_t (no #define).
4664 Add definition of __libc_key_t.
4665 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define PTHREAD_KEYS_MAX
4667 Add definition of _POSIX_THREAD_DESTRUCTOR_ITERATIONS and
4668 PTHREAD_DESTRUCTOR_ITERATIONS.
4670 * manager.c (pthread_handle_create): Compare mmap result with
4673 * ptfork.c: Rename to __pthread_atfork and make old name a weak alias.
4674 * sysdeps/pthread/bits/pthread.h: Add prototype for __pthread_atfork.
4676 1997-08-22 19:04 Richard Henderson <rth@cygnus.com>
4678 sysdeps/sparc -> sysdeps/sparc/sparc32
4679 sysdeps/sparc64 -> sysdeps/sparc/sparc64
4681 * internals.h: Change definition of THREAD_SELF to be an expression,
4682 not a statement that did a return.
4683 * sysdeps/alpha/pt-machine.h (THREAD_SELF): Update accordingly.
4684 * sysdeps/sparc/sparc32/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
4685 Follow Solaris and use a "system reserved" register (%g6) to hold
4686 the thread descriptor.
4687 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
4689 1997-08-03 00:09 Ulrich Drepper <drepper@cygnus.com>
4691 * mutex.c: Correct pthread_once. Patch by Xavier Leroy.
4692 * sysdeps/pthread/pthread.h: Add prototype for __pthread_once.
4693 * sysdeps/pthread/bits/pthread.h: Add macros for __libc_once.
4695 * semaphore.c: Include spinlock.h only when needed.
4697 * specific.c (__pthread_setsepcific, __pthread_getspecific): Reject
4698 keys for entries not in use.
4700 * weaks.c: Implement key handling functions for real.
4702 1997-06-29 01:04 Richard Henderson <richard@gnu.ai.mit.edu>
4704 Initial sparc64-linux support:
4705 * sysdeps/sparc64/Implies: New file.
4706 * sysdeps/sparc64/pt-machine.h: Likewise.
4708 1997-06-29 00:48 Ulrich Drepper <drepper@cygnus.com>
4710 * semaphore.c: Include spinlock.h at correct place.
4713 1997-06-13 10:06 Richard Henderson <rth@tamu.edu>
4715 The Great Bit File Move:
4716 * sysdeps/alpha/semaphorebits.h: -> .../bits/semaphore.h.
4717 * sysdeps/powerpc/semaphorebits.h: Likewise.
4718 * sysdeps/pthread/cmpxchg/semaphorebits.h: Likewise.
4719 * sysdeps/pthread/no-cmpxchg/semaphorebits.h: Likewise.
4720 * sysdeps/pthread/libc-lock.h: -> bits/
4721 * sysdeps/pthread/stdio-lock.h: Likewise.
4722 * sysdeps/unix/sysv/linux/local_lim.h: Likewise.
4723 * sysdeps/unix/sysv/linux/posix_opt.h: Likewise.
4724 * semaphore.h: Likewise.
4725 * sysdeps/pthread/pthread.h: Likewise.
4727 * lockfile.c: <foo.h> -> <bits/foo.h>.
4728 * semaphore.h: Likewise.
4730 * Makefile: (headers): foo.h -> bits/foo.h.
4731 * sysdeps/pthread/Makefile: Likewise.
4733 1997-04-11 01:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
4735 * semaphore.c (sem_init): Set sem_spinlock only if available.
4737 * sysdeps/m68k/pt-machine.h (testandset, __compare_and_swap): Fix
4740 1997-04-09 03:00 Ulrich Drepper <drepper@cygnus.com>
4742 Update from LinuxThreads 0.6.
4744 * attr.c (pthread_attr_getdetachstate): Use __sched_get_priority_max
4745 and __sched_get_priority_min instead of names without `__'.
4747 * manager.c: Rewrite large parts to implement opaque pthread_t.
4749 * cancel.c: Adapt for opaque pthread_t type.
4750 * condvar.c: Likewise.
4751 * errno.c: Likewise.
4753 * mutex.c: Likewise.
4754 * pthread.c: Likewise.
4755 * signals.c: Likewise.
4756 * specific.c: Likewise.
4757 * restart.h: Likewise.
4758 * queue.h: Likewise.
4759 * Examples/ex3.c: Likewise.
4760 * Examples/ex4.c: Likewise.
4761 * sysdeps/pthread/pthread.h: Likewise.
4763 * pthread.c: Accumulate time for all threads in thread manager.
4765 * semaphore.c: Implement fallback implementation for architectures
4766 sometimes missing compare-exchange operations.
4768 * cancel.c (pthread_cancel): Validate handle argument.
4769 * join.c (pthread_join): Likewise.
4770 (pthread_detach): Likewise.
4771 * signals.c (pthread_kill): Likewise.
4773 * spinlock.h (acquire): Use __sched_yield not sched_yield.
4775 * queue.h (enqueue): Enqueue thread according to priority.
4777 * internals.c (struct pthread_start_args): New struct for passing
4778 args to cloning function.
4779 (struct _pthread): Rename to _pthread_descr_struct and adapt for
4782 * Examples/Makefile (clean): Pass -f option to rm.
4784 * sysdeps/i386/pt-machine.h: Add check for compare-exchange instruction
4785 and define TEST_FOR_COMPARE_AND_SWAP.
4786 * sysdeps/i386/i486/pt-machine.h: Removed.
4788 * sysdeps/unix/sysv/linux/local_lim.h (PTHREAD_THREADS_MAX): Increase
4791 1997-04-04 16:38 Ulrich Drepper <drepper@cygnus.com>
4793 * restart.h (suspend): Clear p_signal before suspending.
4794 (suspend_with_cancellation): Likewise.
4795 Patch by Xavier Leroy <Xavier.Leroy@inria.fr>.
4797 * weaks.c: Make __pthread_key_create return 1.
4798 * sysdeps/pthread/libc-lock.h: Define __libc_key_create,
4799 __libc_getspecific, __libc_setspecific, and __libc_key_t.
4800 * sysdeps/pthread/stdio-lock.h: Don't care for implementation not
4803 1997-03-19 15:13 Miguel de Icaza <miguel@nuclecu.unam.mx>
4805 * sysdeps/sparc/pt-machine (RELEASE): Fix.
4807 1997-03-01 07:55 Geoff Keating <geoffk@ozemail.com.au>
4809 * sysdeps/powerpc/Implies: Added.
4810 * sysdeps/powerpc/pt-machine.h: Added.
4811 * sysdeps/powerpc/semaphorebits.h: Added.
4813 1997-01-22 01:22 Ulrich Drepper <drepper@cygnus.com>
4815 * pthread.c (__pthread_initial_thread): Correct
4817 (__pthread_manager_thread): Likewise.
4818 Reported by Andreas Jaeger.
4820 1997-01-18 22:15 Richard Henderson <rth@tamu.edu>
4822 Since sigset_t no longer fits in a register, we can't pass in the
4823 thread's initial mask so easily. Take this opportunity to simplify
4824 the clone implementation by only accepting a single void* argument.
4826 * manager.c (__pthread_manager): Put thread vitals in the thread
4827 struct instead of as arguments through clone.
4828 (pthread_start_thread): Look for them there.
4829 * internals.h (struct _pthread): Add p_initial_fn,
4830 p_initial_fn_arg, p_initial_mask. Fix __pthread_manager proto.
4831 * pthread.c (pthread_initialize_manager): Revise clone invocation.