1 2002-11-04 Ulrich Drepper <drepper@redhat.com>
3 * sysdeps/i386/Makefile: Compile pthread.c and sighandler.c with
4 -fno-omit-frame-pointer. Patch by Andreas Steinmetz <ast@domdv.de>.
6 * sysdeps/i386/useldt.h [PIC] (USETLS_LOAD_EBX): Use correct input
8 (DO_SET_THREAD_AREA): Mark asm output specifiers correctly.
10 2002-10-22 Jakub Jelinek <jakub@redhat.com>
12 * manager.c (pthread_start_thread): Call __uselocale even
13 if [! SHARED]. Patch by Leon Kanter <leon@geon.donetsk.ua>.
15 2002-10-17 Roland McGrath <roland@redhat.com>
17 * Makefile (unload): Don't link in libpthread.so.
18 ($(objpfx)unload.out): Do depend on it.
19 * unload.c (main): Improve error reporting.
21 2002-10-09 Roland McGrath <roland@redhat.com>
23 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
24 Under [__PIC__], call the function via the pointer fetched for
25 comparison rather than a call by name that uses the PLT.
26 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
27 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
28 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
29 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
30 (__libc_key_create, __libc_getspecific, __libc_setspecific)
31 (__libc_atfork): Use it.
33 * pthread.c [SHARED] (__libc_dl_error_tsd): New function.
34 (pthread_initialize) [SHARED]: Set _dl_error_catch_tsd to that.
35 * Versions (libc: GLIBC_PRIVATE): Add __libc_dl_error_tsd.
36 (ld: GLIBC_PRIVATE): Set removed.
38 2002-10-11 Ulrich Drepper <drepper@redhat.com>
40 * sysdeps/unix/sysv/linux/execve.c: New file.
42 2002-10-09 Jakub Jelinek <jakub@redhat.com>
44 * no-tsd.c: Include stdlib.h.
46 2002-10-07 Jakub Jelinek <jakub@redhat.com>
48 * sysdeps/unix/sysv/linux/allocalim.h: New file.
49 * descr.h (struct _pthread_descr_struct): Add p_alloca_cutoff
51 * manager.c (__pthread_allocate_stack): Add out_stacksize argument.
52 Pass stack size to caller.
53 (pthread_handle_create): Set p_alloca_cutoff.
54 * pthread.c (__pthread_initial_thread): Use C99 designated
55 initializers. Set p_alloca_cutoff.
56 (__pthread_manager_thread): Likewise.
57 (__pthread_initialize_minimal) [USE_TLS]: Set p_alloca_cutoff
59 (__pthread_init_max_stacksize): Possibly decrease p_alloca_cutoff
61 (__pthread_initialize_manager) [USE_TLS]: Set p_alloca_cutoff
63 * specific.c (__libc_alloca_cutoff): New function.
64 * no-tsd.c (__libc_alloca_cutoff): New function.
65 * Versions: Export __libc_alloca_cutoff@@GLIBC_PRIVATE from libc
68 2002-10-02 Kaz Kojima <kkojima@rr.iij4u.or.jp>
70 * sysdeps/sh/pt-machine.h: Make C code ifndef'ed with __ASSEMBLER__.
71 * sysdeps/sh/tls.h: Likewise.
72 * sysdeps/unix/sysv/linux/sh/smp.h: New file.
74 2002-09-29 Jakub Jelinek <jakub@redhat.com>
76 * sysdeps/pthread/tst-timer.c (main): Clear
77 SIGEV2.sigev_notify_attributes.
79 2002-09-29 Ulrich Drepper <drepper@redhat.com>
81 * sysdeps/i386/useldt.h (DO_SET_THREAD_AREA): Don't use
82 INLINE_SYSCALL for set_thread_area syscall.
84 2002-09-28 Roland McGrath <roland@redhat.com>
86 * pthread.c (__pthread_reset_main_thread) [FLOATING_STACKS]:
87 Don't call setrlimit, since we did no prior bogon we need to undo.
89 2002-09-27 Roland McGrath <roland@redhat.com>
91 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Don't include <pt-machine.h>.
93 2002-09-24 Roland McGrath <roland@redhat.com>
95 * sysdeps/x86_64/tls.h: New file.
97 2002-09-23 Roland McGrath <roland@redhat.com>
99 * Examples/ex13.c (dump_mut): int -> size_t for counter.
101 2002-09-18 Bruno Haible <bruno@clisp.org>
103 * Examples/ex10.c (thread): Fail if pthread_mutex_timedlock() returns
104 an unexpected error code.
106 * internals.h (__pthread_message): Add const to first parameter type.
107 * pthread.c (__pthread_message): Likewise.
109 * sysdeps/unix/sysv/linux/configure: Moved to ../sysdeps/pthread.
111 2002-09-17 Roland McGrath <roland@redhat.com>
113 * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT, TLS_DO_SET_THREAD_AREA):
114 Set the descriptor limit to the full 4GB, so %gs:OFFSET works for any
115 offset (positive or negative) relative to the thread struct.
116 * sysdeps/i386/useldt.h (DO_MODIFY_LDT, DO_SET_THREAD_AREA): Likewise.
118 2002-09-12 Jakub Jelinek <jakub@redhat.com>
120 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Move...
121 * sysdeps/unix/sysv/linux/sparc/Makefile: ...here.
122 Replace /usr/lib/crt[in].o with crt[in].o too.
124 2002-09-11 Steven Munroe <sjmunroe@us.ibm.com>
126 * sysdeps/powerpc/powerpc64/pt-machine.h: New file.
128 2002-09-04 Bruno Haible <bruno@clisp.org>
130 * pthread.c: Include <sys/time.h>.
131 (is_smp_system): Move to sysdeps/unix/sysv/linux/smp.h.
132 * sysdeps/unix/sysv/linux/smp.h: New file, extracted from pthread.c.
133 * Makefile (distribute): Add smp.h to the list.
135 2002-09-04 Bruno Haible <bruno@clisp.org>
137 * sysdeps/alpha/pt-machine.h: Choose different include file location
138 on non-Linux platforms.
140 * wrapsyscall.c (PROMOTE_INTEGRAL_TYPE): New macro.
141 (open, open64): Change va_arg argument type to the integral type to
142 which mode_t promotes.
144 * sysdeps/pthread/tst-timer.c (main): Don't assume anything about
145 the structure of 'struct sigevent'.
147 * errno.c (__errno_location, __h_errno_location, __res_state):
148 Use prototype function definitions.
150 2002-07-29 Steven Munroe <sjmunroe@us.ibm.com>
152 * shlib-versions: Set libpthread version to 2.3 for powerpc64.
153 * sysdeps/powerpc/pt-machine.h: moved to...
154 * sysdeps/powerpc/powerpc32/pt-machine.h: ...here
155 * sysdeps/powerpc/powerpc64/pt-machine.h: New file.
157 2002-09-02 Roland McGrath <roland@redhat.com>
159 * sysdeps/powerpc/Makefile (CFLAGS-pt-initfini.s): New variable.
161 2002-09-01 Roland McGrath <roland@redhat.com>
163 * sysdeps/pthread/bits/libc-tsd.h (enum __libc_tsd_key_t): Add new keys
164 CTYPE_B, CTYPE_TOLOWER, CTYPE_TOUPPER.
166 * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_address): New macro.
167 (__libc_internal_tsd_address): Declare it.
168 * Versions (libc, ld, libpthread: GLIBC_PRIVATE): Add
169 __libc_internal_tsd_address.
170 * specific.c (libc_internal_tsd_address): New function.
171 (__libc_internal_tsd_address): New variable.
172 * no-tsd.c (__libc_internal_tsd_address): New variable.
174 2002-08-31 Ulrich Drepper <drepper@redhat.com>
176 * Makefile: Don't use rule for crt%.o, spell it out as rules for
179 2002-08-30 Roland McGrath <roland@redhat.com>
181 * Makefile (extra-objs, omit-deps): Add crtn.
182 ($(objpfx)libpthread.so): Depend on $(objpfx)crtn.o.
183 ($(objpfx)libpthread.so: +postinit): Append $(objpfx)crtn.o.
184 ($(objpfx)crtn.S): New target.
185 ($(objpfx)crt%.o): Pattern rule replaces crti.o target.
186 (generated): Add crtn.S.
188 * sysdeps/unix/sysv/linux/x86_64/Makefile ($(objpfx)specs): Massage
191 2002-08-30 Jakub Jelinek <jakub@redhat.com>
193 * pthread.c (__pthread_initialize_minimal): Call __uselocale even
196 2002-08-30 Roland McGrath <roland@redhat.com>
198 * tst-static-locale.c: New file.
199 * Makefile (tests, tests-static): Add it.
201 2002-04-24 Steven Munroe <sjmunroe@us.ibm.com>
203 * spinlock.c (__pthread_lock): Fix spurious wakeup
204 handling. Don't clear lowest bit of list pointer as sign the thread
205 is still on the wait list. Don't restart after spurious wakeup
206 with spinning to get the lock.
207 (__pthread_unlock): Take set lowest bit into account when handling
208 pointer to list elements.
209 Patch by Steve Munroe <sjmunroe@us.ibm.com>.
211 2002-08-28 Roland McGrath <roland@redhat.com>
213 * sysdeps/pthread/timer_routines.c (thread_func): Fix type in cast.
215 2002-08-28 Jakub Jelinek <jakub@redhat.com>
217 * sysdeps/unix/sysv/linux/hppa/aio_cancel.c: New file.
218 * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
219 * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
221 2002-08-28 Ulrich Drepper <drepper@redhat.com>
223 * sysdeps/pthread/timer_routines.c (thread_func): Change return
224 type to void and add casts in use to avoid warnings with all gcc
227 2002-08-08 Jakub Jelinek <jakub@redhat.com>
229 * sysdeps/unix/sysv/linux/bits/local_lim.h (PTHREAD_THREADS_MAX):
231 * manager.c (__pthread_handles): Remove.
232 * pthandles.c: New file.
233 * pthread.c (__pthread_initialize_minimal): Initialize
234 __pthread_handles[0] and __pthread_handles[1].
235 * Makefile (libpthread-routines): Add pthandles (must be last).
237 2002-08-26 Brian Youmans <3diff@gnu.org>
239 * Examples/ex10.c: Corrected version number in Lesser GPL copying
240 permission notice from 2 to 2.1.
241 * Examples/ex11.c: Likewise.
242 * Examples/ex13.c: Likewise.
243 * Examples/ex8.c: Likewise.
244 * Examples/ex9.c: Likewise.
245 * barrier.c: Likewise.
246 * events.c: Likewise.
247 * lockfile.c: Likewise.
248 * no-tsd.c: Likewise.
249 * pt-machine.c: Likewise.
250 * ptclock_gettime.c: Likewise.
251 * ptclock_settime.c: Likewise.
252 * rwlock.c: Likewise.
253 * sysdeps/alpha/pspinlock.c: Likewise.
254 * sysdeps/alpha/pt-machine.h: Likewise.
255 * sysdeps/arm/pspinlock.c: Likewise.
256 * sysdeps/arm/pt-machine.h: Likewise.
257 * sysdeps/cris/pspinlock.c: Likewise.
258 * sysdeps/cris/pt-machine.h: Likewise.
259 * sysdeps/hppa/pspinlock.c: Likewise.
260 * sysdeps/hppa/pt-machine.h: Likewise.
261 * sysdeps/i386/i686/pt-machine.h: Likewise.
262 * sysdeps/i386/pspinlock.c: Likewise.
263 * sysdeps/i386/pt-machine.h: Likewise.
264 * sysdeps/i386/useldt.h: Likewise.
265 * sysdeps/ia64/pspinlock.c: Likewise.
266 * sysdeps/ia64/pt-machine.h: Likewise.
267 * sysdeps/m68k/pspinlock.c: Likewise.
268 * sysdeps/m68k/pt-machine.h: Likewise.
269 * sysdeps/mips/pspinlock.c: Likewise.
270 * sysdeps/mips/pt-machine.h: Likewise.
271 * sysdeps/powerpc/pspinlock.c: Likewise.
272 * sysdeps/powerpc/pt-machine.h: Likewise.
273 * sysdeps/pthread/bits/initspin.h: Likewise.
274 * sysdeps/pthread/bits/libc-lock.h: Likewise.
275 * sysdeps/pthread/bits/libc-tsd.h: Likewise.
276 * sysdeps/pthread/getcpuclockid.c: Likewise.
277 * sysdeps/pthread/posix-timer.h: Likewise.
278 * sysdeps/pthread/timer_create.c: Likewise.
279 * sysdeps/pthread/timer_delete.c: Likewise.
280 * sysdeps/pthread/timer_getoverr.c: Likewise.
281 * sysdeps/pthread/timer_gettime.c: Likewise.
282 * sysdeps/pthread/timer_routines.c: Likewise.
283 * sysdeps/pthread/timer_settime.c: Likewise.
284 * sysdeps/pthread/tst-timer.c: Likewise.
285 * sysdeps/s390/pspinlock.c: Likewise.
286 * sysdeps/s390/s390-32/pt-machine.h: Likewise.
287 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
288 * sysdeps/sh/pspinlock.c: Likewise.
289 * sysdeps/sh/pt-machine.h: Likewise.
290 * sysdeps/sparc/sparc32/pspinlock.c: Likewise.
291 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
292 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: Likewise.
293 * sysdeps/sparc/sparc64/pspinlock.c: Likewise.
294 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
295 * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
296 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
297 * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
298 * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
299 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
300 * tststack.c: Likewise.
301 * unload.c: Likewise.
303 * wrapsyscall.c: Likewise.
305 * sysdeps/pthread/pt-initfini.c: Changed copying
306 permission notice to Lesser GPL from Library GPL, including the
307 references in the special exception.
308 * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: Likewise.
309 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Likewise.
310 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c:
312 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c:
314 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Likewise.
316 2002-08-26 Ulrich Drepper <drepper@redhat.com>
318 * Examples/ex10.c (thread): tv_nsec == 1000000000 is already
319 overflow [PR libc/4244].
321 2002-08-25 Ulrich Drepper <drepper@redhat.com>
323 * sysdeps/pthread/timer_routines.c (thread_func): Make the
324 compiler happy by adding a return statement which will never be
327 * tst-context.c (main): Cast to long before casting to pointer.
329 * Examples/ex17.c (main): Use correct format string.
331 * Examples/ex9.c (thread): Remove incorrect return statement.
333 2002-08-23 Ulrich Drepper <drepper@redhat.com>
335 * pthread.c (__linuxthreads_version): New global constant.
337 2002-08-23 Andreas Jaeger <aj@suse.de>
339 * sysdeps/x86_64/pt-machine.h: Use %fs instead of %gs
340 as thread specific register.
341 (testandset): Fix inline asm.
342 (THREAD_GETMEM): Fix inline asm.
344 2002-08-22 Roland McGrath <roland@redhat.com>
346 * sysdeps/i386/useldt.h (INIT_THREAD_SELF): Remove [HAVE_TLS_SUPPORT]
348 (INIT_THREAD_SELF): Pass second arg to DO_SET_THREAD_AREA.
349 (DO_SET_THREAD_AREA): Take second arg, pass to DO_SET_THREAD_AREA_REUSE
350 macro. That chooses whether to reuse %gs value or let kernel set it.
351 [USE_TLS] (DO_SET_THREAD_AREA_REUSE): New macro, always 1.
352 [!USE_TLS] (DO_SET_THREAD_AREA_REUSE): New macro, true if arg is
355 2002-08-21 Ulrich Drepper <drepper@redhat.com>
357 * sysdeps/i386/tls.h (TLS_SETUP_GS_SEGMENT): Add new parameter
358 also to the third definition of this macro.
360 2002-06-17 Andreas Jaeger <aj@suse.de>
362 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
365 2002-08-20 Ulrich Drepper <drepper@redhat.com>
367 * sysdeps/i386/useldt.h: Go back to using 16-bit instructions when
368 loading/reading segment registers. Some old hardware doesn't
369 handle the 32-bit instructions as expected.
370 * sysdeps/i386/tls.h: Likewise.
372 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Second parameter is
373 renamed to secondcall and use is negated.
374 (TLS_SETUP_GS_SEGMENT): Likewise.
375 (TLS_INIT_TP): Likewise.
376 * sysdeps/sh/tls.h (TLS_INIT_TP): Second parameter is renamed to
379 * sysdeps/i386/tls.h: Use 32-bit operations when handling segment
380 registers. No need to mask upper 16 bits in this case.
381 * sysdeps/i386/useldt.h: Likewise.
382 (DO_SET_THREAD_AREA): We have to load %gs again even if the value
383 is the same since the GDT content changed.
385 * sysdeps/i386/tls.h (TLS_INIT_TP): Add new parameter and pass it on
386 to TLS_SETUP_GS_SEGMENT.
387 (TLS_SETUP_GS_SEGMENT): Add new parameter and pass it on to
388 TLS_DO_SET_THREAD_AREA.
389 (TLS_DO_SET_THREAD_AREA): If new parameter is zero determine
390 entry number from %gs value.
391 * sysdeps/sh/tls.h (TLS_INIT_TP): Add new parameter and simply
394 * manager.c (pthread_handle_create): Pass NULL to _dl_allocate_tls.
395 Pass true to _dl_deallocate_tls.
396 (pthread_free): Likewise.
397 * pthread.c (__pthread_initialize_manager): Likewise.
399 2002-08-19 Ulrich Drepper <drepper@redhat.com>
401 * sysdeps/i386/useldt.h (DO_SET_THREAD_AREA): Use correct shift when
402 computing index from %gs value.
404 2002-08-16 Roland McGrath <roland@redhat.com>
406 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Calculate segment
407 register value from entry number properly.
409 * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): Rewrite asm to use %ebx
410 optimally conditional on [__PIC__].
411 (TLS_DO_SET_THREAD_AREA): New macro, implement inline syscall
412 without touching errno, and use latest modify_ldt-like interface.
413 (TLS_SETUP_GS_SEGMENT): Use that instead of INLINE_SYSCALL.
414 * sysdeps/i386/useldt.h (DO_MODIFY_LDT): Set %gs in this macro.
415 (DO_SET_THREAD_AREA): New macro, uses current syscall interface with
416 existing %gs value as the segment to set.
417 (INIT_THREAD_SELF): Rewritten using those. Use set_thread_area only
418 under [HAVE_TLS_SUPPORT] so we can rely on the initialization done
419 by the first thread's early TLS setup.
421 2002-08-15 Roland McGrath <roland@redhat.com>
423 * sysdeps/i386/tls.h (TLS_INIT_TP): Use statement expression and
424 return a value as callers now expect.
426 2002-08-11 Roland McGrath <roland@redhat.com>
428 * pthread.c (__pthread_initialize_manager): Initialize
429 p_header.data.tcb field of manager thread's descriptor.
430 (__pthread_initialize_minimal): Don't initialize p_header.data.self
431 field, already done by TLS_INIT_TP.
433 * manager.c (pthread_handle_create): Move p_header field initializers
436 2002-08-08 Ulrich Drepper <drepper@redhat.com>
438 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Removed.
440 2002-08-07 Ulrich Drepper <drepper@redhat.com>
442 * pthread.c (__linuxthreads_initial_report_events): New variable.
443 (__pthread_initialize_manager): Use it to initialize p_report_events
445 [TLS]: Store pointer to descriptor of manager in __pthread_handles.
447 2002-08-07 Roland McGrath <roland@redhat.com>
449 * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): Add an extra argument with
450 an "m" constraint to the asm so the compiler knows LDT_ENTRY was used.
452 2002-08-02 Roland McGrath <roland@redhat.com>
454 * sysdeps/pthread/bits/libc-tsd.h (enum __libc_tsd_key_t):
455 Add _LIBC_TSD_KEY_LOCALE.
456 * manager.c (pthread_start_thread) [!(USE_TLS && HAVE___THREAD)]:
457 Call __uselocale to initialize our per-thread locale pointer to
459 * pthread.c (__pthread_initialize_minimal): Likewise.
461 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Add missing \s.
463 2002-08-02 Ulrich Drepper <drepper@redhat.com>
465 * pthread.c: Declare _errno, _h_errno, and _res unless we use TLS
468 * cancel.c (__pthread_perform_cleanup) [USE_TLS && HAVE___THREAD]:
469 Don't use p_libc_specific element in thread descriptor.
471 2002-07-30 Roland McGrath <roland@redhat.com>
473 * sysdeps/pthread/bits/libc-tsd.h: Include <tls.h>.
474 [USE_TLS && HAVE___THREAD]: Just include the sysdeps/generic file,
475 which does the right thing when __thread support is available.
476 * descr.h (struct _pthread_descr_struct) [USE_TLS && HAVE___THREAD]:
477 Omit `p_libc_specific', `p_errnop', `p_errno', `p_h_errnop',
478 `p_h_errno', `p_resp', and `p_res' members.
479 * pthread.c (__pthread_initialize_minimal) [USE_TLS && HAVE___THREAD]:
480 Don't initialize `p_errnop' and `p_h_errnop' members.
481 (__pthread_reset_main_thread): Likewise.
482 (__pthread_initialize_manager): Likewise.
483 * manager.c (__pthread_manager, pthread_handle_create): Likewise.
484 * pthread.c (pthread_initialize) [USE_TLS && HAVE___THREAD]:
485 Don't initialize `p_resp' member.
486 (__pthread_reset_main_thread): Likewise.
487 * manager.c (pthread_handle_create): Likewise.
488 * specific.c (libc_internal_tsd_set, libc_internal_tsd_get):
489 Conditionalize these on [!(USE_TLS && HAVE___THREAD)].
490 * no-tsd.c: Conditionalize contents on [!(USE_TLS && HAVE___THREAD)].
491 * errno.c [USE_TLS && HAVE___THREAD]
492 (__h_errno_location, __res_state): Don't define these at all.
494 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens around arguments!
495 (INSTALL_NEW_DTV, GET_DTV): Likewise.
496 * sysdeps/sh/tls.h (INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV): Likewise.
498 * weaks.c: Don't include <errno.h> here.
500 2002-08-01 Roland McGrath <roland@redhat.com>
502 * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): New macro, broken out of
504 (TLS_DO_SET_THREAD_AREA): New macro, uses thread_set_area syscall.
505 (TLS_SETUP_GS_SEGMENT): New macro, try one or the other or both.
506 (TLS_INIT_TP): Use that.
508 2002-08-02 Jakub Jelinek <jakub@redhat.com>
510 * sysdeps/i386/useldt.h (DO_MODIFY_LDT): Move from INIT_THREAD_SELF.
511 (INIT_THREAD_SELF): Use sys_thread_area syscall instead if available.
512 (FREE_THREAD): Avoid modify_ldt if using GDT.
513 * sysdeps/i386/pspinlock.c (__have_no_set_thread_area): New variable.
515 2002-07-25 Jakub Jelinek <jakub@redhat.com>
517 * sysdeps/i386/tls.h: Use __ASSEMBLER__ test macro not ASSEMBLER.
518 * sysdeps/i386/pt-machine.h: Likewise.
519 * sysdeps/i386/useldt.h: Likewise.
521 2002-07-22 Ulrich Drepper <drepper@redhat.com>
523 * pthread.c (__pthread_initialize_minimal): If !SHARED and TLS
524 call __libc_setup_tls first.
525 * Makefile: Actually create tst-signal.out file when running the test.
526 (tests): Add tststatic.
527 * Examples/tststatic.c: New file.
529 2002-07-19 Ulrich Drepper <drepper@redhat.com>
531 * errno.c (__errno_location): Don't define unless !USE_TLS
533 * sysdeps/i386/pt-machine.c: Protect C code with #ifndef ASSEMBLER.
534 * sysdeps/i386/tls.h: Likewise.
535 * sysdeps/i386/useldt.h: Likewise.
536 * sysdeps/i386/i686/pt-machine.h: Likewise.
538 2002-07-02 H.J. Lu <hjl@gnu.org>
540 * sysdeps/mips/pspinlock.c: Don't include <sgidefs.h>. Always
542 * sysdeps/mips/pt-machine.h: Likewise.
544 2002-07-14 Ulrich Drepper <drepper@redhat.com>
546 * manager.c (pthread_handle_create): Initialize self-reference in
549 2002-07-01 Jakub Jelinek <jakub@redhat.com>
551 * Examples/ex9.c (main): Remove unused th variable.
553 2002-07-10 Ulrich Drepper <drepper@redhat.com>
555 * wrapsyscall.c: Add __nanosleep alias.
556 * Versions (GLIBC_2.2.6): Add __nanosleep.
557 * bug-sleep.c: New file.
558 * Makefile (tests): Add bug-sleep.
560 2002-06-19 Steven Munroe <sjmunroe@vnet.ibm.com>
562 * Examples/ex9.c (main): Use list of children and join them.
563 (thread): Do not call exit.
565 2002-06-20 Ulrich Drepper <drepper@redhat.com>
567 * spinlock.c (wait_node_alloc): We cannot use compare-and-exchange.
568 Unconditionally use the code using spinlock. Use __pthread_release
570 (wait_node_free): Likewise.
571 (__pthread_acquire, __pthread_release): Unconditionally define.
573 2002-06-07 Jakub Jelinek <jakub@redhat.com>
575 * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Fix typo.
577 2002-05-24 Ulrich Drepper <drepper@redhat.com>
579 * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Use __sync_synchronize.
581 2002-05-21 Ulrich Drepper <drepper@redhat.com>
583 * sysdeps/pthread/pthread.h (pthread_create): Rename first
585 (pthread_cancel): Likewise.
586 * internals.h (__pthread_create_2_1): Likewise.
587 * sysdeps/unix/sysv/linux/bits/sigthread.h (pthread_kill): Likewise.
589 2002-05-20 Ulrich Drepper <drepper@redhat.com>
591 * sysdeps/alpha/pt-machine.c (THREAD_SELF): Remove clobber.
592 Patch by Glen Nakamura <gen@flex.com>.
594 2002-05-03 Ulrich Drepper <drepper@redhat.com>
596 * signals.c: Move sighandler functions to...
597 * sighandler.c: ...here. New file.
598 * signals.c: Move signal handler related type definitions to...
599 * internals.h: ...here. Add prototypes for signal handlers.
600 * Makefile (libpthread-routines): Add sighandler.
601 (CFLAGS-sighandler.c): Add $(exceptions).
603 2002-04-30 Jakub Jelinek <jakub@redhat.com>
605 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
607 2002-04-08 Ulrich Drepper <drepper@redhat.com>
609 * sysdeps/pthread/timer_getoverr.c: Return real overrun.
610 * sysdeps/pthread/posix-timer.h (struct timer_node): Add overrun_count.
611 * sysdeps/pthread/timer_routines.c (thread_func): Schedule next timeout
612 based on previous one and not on current time. Count overruns.
613 Patch by Eric F. Sorton <eric@cctcorp.com>.
615 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add DELAYTIMER_MAX.
617 2002-04-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
619 * sysdeps/sh/pt-machine.h: Define _PT_MACHINE_H
620 if it isn't defined yet.
621 (FLOATING_STACKS, ARCH_STACK_MAX_SIZE): Defined.
622 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
624 * sysdeps/sh/tls.h: New file.
626 2002-04-08 Jakub Jelinek <jakub@redhat.com>
628 * manager.c (__pthread_manager_event): Use self instead of arg
629 for INIT_THREAD_SELF.
630 * sysdeps/i386/useldt.h (INIT_THREAD_SELF): Use sizeof (struct
631 _pthread_descr_struct) instead of sizeof (*descr).
633 2002-04-05 Ulrich Drepper <drepper@redhat.com>
635 * sysdeps/ia64/pt-machine.h: Protect against multiple inclusion.
636 * sysdeps/alpha/pt-machine.h: Likewise.
637 * sysdeps/arm/pt-machine.h: Likewise.
638 * sysdeps/cris/pt-machine.h: Likewise.
639 * sysdeps/hppa/pt-machine.h: Likewise.
640 * sysdeps/m68k/pt-machine.h: Likewise.
641 * sysdeps/mips/pt-machine.h: Likewise.
642 * sysdeps/powerpc/pt-machine.h: Likewise.
643 * sysdeps/s390/s390-32/pt-machine.h: Likewise.
644 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
645 * sysdeps/sh/pt-machine.h: Likewise.
646 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
647 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
648 * sysdeps/x86_64/pt-machine.h: Likewise.
650 2002-04-05 Jakub Jelinek <jakub@redhat.com>
652 * man/pthread_mutexattr_init.man (pthread_mutexattr_settype): Document
653 instead of pthread_mutexattr_setkind_np.
654 (pthread_mutexattr_gettype): Similarly.
655 * man/pthread_mutexattr_setkind_np.man: New.
656 * man/Makefile (SOURCES): Add pthread_mutexattr_setkind_np.man.
658 2002-04-02 Ulrich Drepper <drepper@redhat.com>
660 * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Define.
662 2002-03-22 Jakub Jelinek <jakub@redhat.com>
664 * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Remove.
666 2002-03-22 Ulrich Drepper <drepper@redhat.com>
668 * internals.h (MEMORY_BARRIER): Define as asm with memory as clobber.
670 2002-03-17 Andreas Jaeger <aj@suse.de>
672 * sysdeps/i386/pt-machine.h: Add testandset and __compare_and_swap
674 * sysdeps/alpha/pt-machine.h: Likewise.
675 * sysdeps/arm/pt-machine.h: Likewise.
676 * sysdeps/cris/pt-machine.h: Likewise.
677 * sysdeps/hppa/pt-machine.h: Likewise.
678 * sysdeps/i386/i686/pt-machine.h: Likewise.
679 * sysdeps/ia64/pt-machine.h: Likewise.
680 * sysdeps/m68k/pt-machine.h: Likewise.
681 * sysdeps/mips/pt-machine.h: Likewise.
682 * sysdeps/powerpc/pt-machine.h: Likewise.
683 * sysdeps/s390/s390-32/pt-machine.h: Likewise.
684 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
685 * sysdeps/sh/pt-machine.h: Likewise.
686 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
687 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
688 * sysdeps/x86_64/pt-machine.h: Likewise.
690 * internals.h: Move testandset and __compare_and_swap prototypes
693 2002-03-03 Andreas Jaeger <aj@suse.de>
695 * errno.c: Include resolv.h to avoid warning.
697 2002-02-27 Ulrich Drepper <drepper@redhat.com>
699 * pthread.c [USE_TLS] (thread_self_stack): Correct check for upper
702 2002-02-23 Ulrich Drepper <drepper@redhat.com>
704 * attr.c (pthread_getattr_np): Don't take thread descriptor size
705 into account if USE_TLS.
706 * manager.c (pthread_handle_create): Free TLS data structures if call
707 failed. Pass correct stack to clone if USE_TLS.
708 * sysdeps/i386/pt-machine.h: Handle multiple inclusion.
709 * sysdeps/i386/i686/pt-machine.h: Likewise.
710 * sysdeps/i386/tls.h: Unconditionally include <pt-machine.h>.
712 * descr.h (struct _pthread_descr_struct): Update p_header for TLS.
713 Add p_stackaddr element #if USE_TLS.
714 * internals.c: Include <tls.h>.
715 * manager.c: Integrate creating and handling of thread descriptor
717 * pthread.c: Likewise.
718 * sysdeps/i386/tls.h (tcbhead_t): Add self pointer.
719 Include <linuxthreads/descr.h> only if TLS is really used.
720 (GET_DTV): New macro.
721 (TLS_INIT_TP): Initialize self pointer.
723 2002-02-17 Andreas Schwab <schwab@suse.de>
725 * signals.c (sigwait): Check for old sighandler being SIG_ERR,
728 2002-02-12 Ulrich Drepper <drepper@redhat.com>
730 * sysdeps/i386/tls.c (INSTALL_NEW_DTV): Define.
731 (INSTALL_DTV): Adjust for being passed pointer to element with length.
733 2002-02-08 Ulrich Drepper <drepper@redhat.com>
735 * sysdeps/i386/tls.h (TLS_INIT_TP): Also initialize %gs.
737 2002-02-08 Richard Henderson <rth@redhat.com>
739 * sysdeps/alpha/elf/pt-initfini.c: Use \n\ for multiline string.
741 2002-02-08 Ulrich Drepper <drepper@redhat.com>
743 * sysdeps/i386/tls.h: TLS cannot be supported with FLOATING_STACKS
746 2002-02-07 H.J. Lu <hjl@gnu.org>
748 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Silence the
750 (__pthread_spin_lock): Remove ".set noreorder".
751 * sysdeps/mips/pt-machine.h (__compare_and_swap): Liekwise.
753 2002-02-05 H.J. Lu <hjl@gnu.org>
755 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Not use
757 * sysdeps/mips/pt-machine.h (testandset): Likewise.
758 (__compare_and_swap): Likewise.
760 2002-02-07 Ulrich Drepper <drepper@redhat.com>
762 * internals.h: Move declarations/definitions of
763 __pthread_initial_thread_bos, __pthread_initial_thread,
764 __pthread_manager_thread_bos, __pthread_manager_thread_tos,
765 __pthread_manager_thread, __pthread_nonstandard_stacks, STACK_SIZE,
766 CURRENT_STACK_FRAME, __pthread_find_self, and thread_self...
768 * sysdeps/i386/tls.h: Add TLS definitions also for !FLOATING_STACKS.
769 Define THREAD_GETMEM accordingly.
771 2002-02-06 Ulrich Drepper <drepper@redhat.com>
773 * sysdeps/i386/tls.h: Include <stddef.h> for size_t.
775 * sysdeps/i386/tls.h: Define THREAD_DTV.
777 2002-02-04 Ulrich Drepper <drepper@redhat.com>
779 * internals.h: Move thread descriptor definition...
780 * descr.h.: ...here. New file.
781 * sysdeps/i386/tls.h: New file.
783 2002-02-01 H.J. Lu <hjl@gnu.org>
785 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Use a
786 different register in the delayed slot. Use branch likely.
788 * sysdeps/mips/pt-machine.h (testandset): Call _test_and_set.
789 (__compare_and_swap): Return 0 only when failed to compare. Use
792 2002-02-01 Jakub Jelinek <jakub@redhat.com>
794 * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set,
795 __pthread_kill_other_threads_np): Move to GLIBC_PRIVATE.
796 * sysdeps/i386/i586/Versions: Move all symbols to GLIBC_PRIVATE.
797 * sysdeps/i386/i686/Versions: Move all symbols to GLIBC_PRIVATE.
798 * sysdeps/sparc/sparc32/sparcv9/Versions: New file.
799 * sysdeps/sparc/sparc64/Versions: New file.
800 * sysdeps/ia64/Versions: Move all symbols to GLIBC_PRIVATE.
802 2002-01-31 Ulrich Drepper <drepper@redhat.com>
804 * pthread.c: _dl_cpuclock_offset is not any longer a global variable
805 in SHARED code, use GL(dl_cpuclock_offset).
807 2002-01-28 Andreas Jaeger <aj@suse.de>
809 * sysdeps/mips/pspinlock.c (__pthread_spin_init): Clear *LOCK to
810 0. Patch by Machida Hiroyuki <machida@sm.sony.co.jp>.
812 2002-01-16 Martin Schwidefsky <schwidefsky@de.ibm.com>
814 * sysdeps/s390/s390-32/pt-machine.h (MEMORY_BARRIER): Define.
815 (CURRENT_STACK_FRAME): Remove duplicate definition.
816 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
818 2002-01-14 Martin Schwidefsky <schwidefsky@de.ibm.com>
820 * Makefile (CFLAGS-tst-cancel.c): Add -fno-inline-functions to prevent
823 2002-01-12 Andreas Schwab <schwab@suse.de>
825 * Makefile (test-srcs): Add tst-signal.
826 (tests): Run tst-signal.
827 (distribute): Add tst-signal.sh.
828 * tst-signal.c, tst-signal.sh: New files.
830 2002-01-14 Andreas Jaeger <aj@suse.de>
832 * sysdeps/x86_64/pt-machine.h (INIT_THREAD_SELF): Avoid warning.
834 2002-01-11 Andreas Schwab <schwab@suse.de>
836 * signals.c (sighandler): Initialize all elements to SIG_ERR.
837 (__sigaction): Don't use value from sighandler if it is SIG_ERR.
839 2002-01-06 Richard Henderson <rth@redhat.com>
841 * sysdeps/alpha/elf/pt-initfini.c: New file.
843 2001-12-29 Andreas Jaeger <aj@suse.de>
845 * Examples/ex9.c: Add noreturn attribute for thread.
846 * Examples/ex10.c: Likewise.
847 * Examples/ex13.c (thread_start): Likewise.
848 * Examples/ex15.c (worker): Likewise.
850 * Examples/ex18.c: Include unistd.h for prototype of sleep.
852 2001-12-14 Ulrich Drepper <drepper@redhat.com>
854 * man/pthread_atfork.man: Adjust description of mutex handling
855 after fork for current implementation.
856 * linuxthreads.texi: Likewise [PR libc/2519].
858 2001-12-13 Andreas Schwab <schwab@suse.de>
860 * specific.c (pthread_key_delete): Don't contact the thread
861 manager if no threads have been created yet.
863 2001-12-12 NIIBE Yutaka <gniibe@m17n.org>
865 * sysdeps/sh/pt-machine.h (INIT_THREAD_SELF): Added __volatile__
866 qualifier to be safe.
868 2001-11-30 Andreas Schwab <schwab@suse.de>
870 * pthread.c (pthread_handle_sigcancel) [THREAD_SELF]: Double check
871 that self is the manager thread, and initialize the thread
873 (thread_self_stack) [THREAD_SELF]: New function to find self via
875 * manager.c (pthread_handle_create): Don't block cancel signal any
878 2001-11-29 Andreas Jaeger <aj@suse.de>
880 * sysdeps/x86_64/pt-machine.h: Use %gs as thread specific register.
882 (INIT_THREAD_SELF): New.
883 (THREAD_GETMEM): New.
885 (THREAD_SETMEM): New.
886 (THREAD_SETMEM_NC): New.
887 (FLOATING_STACKS): Define.
888 (ARCH_STACK_MAX_SIZE): Define.
890 2001-11-28 Kaz Kylheku <kaz@ashi.footprints.net>
892 Bugfix to pthread_key_delete. It was iterating over the thread
893 manager's linked list of threads, behind the thread manager's
894 back causing a race. The fix is to have the manager iterate over
895 the threads instead, using a new request type for doing so.
896 * internals.h (struct pthread_request): New manager request type
898 * manager.c (pthread_for_each_thread): New function.
899 (__pthread_manager): Handle new REQ_FOR_EACH_THREAD request.
900 * specific.c (struct pthread_key_delete_helper_args): New type.
901 (pthread_key_delete_helper): New static function.
902 (pthread_key_delete): Use the new thread manager
903 REQ_FOR_EACH_THREAD function to iterate over the threads and set
904 the delete key slot to a null value in each thread.
905 * Examples/ex18.c: New test.
906 * Makefile (tests): Add ex18.
908 2001-11-22 Wolfram Gloger <wg@malloc.de>
910 * pthread.c (pthread_onexit_process): Don't call free
911 after threads have been asynchronously terminated.
913 * manager.c (pthread_handle_exit): Surround cancellation
914 of threads with __flockfilelist()/__funlockfilelist().
916 2001-11-26 Andreas Schwab <schwab@suse.de>
918 * manager.c (pthread_handle_create): Start the child thread with
919 the cancel signal blocked, so that it does not handle it before
920 the thread register is set up. Save errno from failed clone call.
922 2001-11-15 Ulrich Drepper <drepper@redhat.com>
924 * sysdeps/i386/i686/Implies: Removed.
925 * sysdeps/i386/i686/Versions: New file.
927 2001-10-31 Andreas Jaeger <aj@suse.de>
929 * sysdeps/x86_64/Makefile: Remove, we do not need it anymore.
931 2001-10-05 Kevin Buettner <kevinb@cygnus.com>
933 * pthread.c (__linuxthread_pthread_sizeof_descr): Change name
934 to __linuxthreads_pthread_sizeof_descr to match name used by
935 symbol_list_arr[LINUXTHREADS_PTHREAD_SIZEOF_DESCR] in
936 linuxthreads_db/td_symbol_list.c.
938 2001-09-22 Andreas Jaeger <aj@suse.de>
940 * linuxthreads/tst-context.c: Avoid compile warning.
942 2001-09-20 Andreas Jaeger <aj@suse.de>
944 * shlib-versions: Add x86-64.
946 2001-09-19 Andreas Jaeger <aj@suse.de>
948 * sysdeps/x86_64/Makefile: New file.
949 * sysdeps/x86_64/pspinlock.c: New file.
950 * sysdeps/x86_64/pt-machine.h: New file.
952 2001-09-12 Jakub Jelinek <jakub@redhat.com>
954 * sysdeps/pthread/timer_delete.c (timer_delete): Thread may be NULL
956 * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
958 2001-09-11 Ulrich Drepper <drepper@redhat.com>
959 Wolfram Gloger <wg@malloc.de>
961 * join.c: Protect all communications from and to manager with
963 * manager.c: Likewise.
964 * pthread.c: Likewise.
965 * smeaphore.c: Likewise.
967 2001-08-29 Ulrich Drepper <drepper@redhat.com>
969 * spinlock.c (__pthread_lock): Top max_count value with
970 MAX_ADAPTIVE_SPIN_COUNT.
971 * internals.h (MAX_ADAPTIVE_SPIN_COUNT): Define if not already done.
973 * sysdeps/i386/i686/pt-machine.h (BUSY_WAIT_NOP): New macro to
976 2001-08-27 Jakub Jelinek <jakub@redhat.com>
978 * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_t): Only define to
979 non-opaque type if __USE_UNIX98.
981 2001-08-26 Jakub Jelinek <jakub@redhat.com>
983 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_t): Define
984 non-opaque lock types also if _IO_MTSAFE_IO is defined.
986 2001-08-23 Roland McGrath <roland@frob.com>
988 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start): Take
989 new first argument, skip the cleanup handler if it's zero.
990 (_LIBC_LOCK_RECURSIVE_INITIALIZER): New macro.
991 (__libc_lock_define_initialized_recursive): Use it.
992 * sysdeps/pthread/bits/stdio-lock.h: File removed.
993 The sysdeps/generic file from the main tree now suffices.
995 2001-08-22 Roland McGrath <roland@frob.com>
997 * sysdeps/pthread/bits/stdio-lock.h: Include <bits/libc-lock.h>
998 instead of <pthread.h>.
999 (_IO_lock_t): Define this typedef using __libc_lock_define_recursive.
1000 (_IO_lock_initializer): Add braces.
1001 (_IO_lock_lock): Use __libc_lock_lock_recursive.
1002 (_IO_lock_unlock): Use __libc_lock_unlock_recursive.
1004 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_recursive_t): New type.
1005 (__libc_lock_define_initialized_recursive): Use it.
1006 (__libc_lock_init_recursive): Likewise.
1007 (__libc_lock_fini_recursive): Likewise.
1008 (__libc_lock_lock_recursive): Likewise.
1009 (__libc_lock_trylock_recursive): Likewise.
1010 (__libc_lock_unlock_recursive): Likewise.
1011 (__libc_lock_define_recursive): New macro.
1013 2001-08-14 Jakub Jelinek <jakub@redhat.com>
1015 * lockfile.c (__pthread_provide_lockfile): New variable.
1016 * pthread.c (__pthread_require_lockfile): New variable.
1017 * cancel.c (__pthread_require_lockfile): New variable.
1019 2001-07-31 Ulrich Drepper <drepper@redhat.com>
1021 * tst-context.c (threadfct): Initialize context before calling
1024 * Examples/ex17.c: Make sure test thread is around long enough.
1026 2001-07-26 kaz Kojima <kkojima@rr.iij4u.or.jp>
1028 * sysdeps/sh/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF): Defined.
1030 2001-07-24 Ulrich Drepper <drepper@redhat.com>
1032 * tst-context.c (main): Print explanation before bailing out
1033 because context handling is not supported.
1035 2001-07-23 Ulrich Drepper <drepper@redhat.com>
1037 * Makefile (tests): Add tst-context.
1038 * tst-context.c: New file.
1040 * sysdeps/pthread/bits/stdio-lock.h: Define
1041 _IO_cleanup_region_start_noarg.
1043 2001-07-23 Jakub Jelinek <jakub@redhat.com>
1045 * sysdeps/alpha/pt-machine.h (FLOATING_STACKS): Define.
1046 (ARCH_STACK_MAX_SIZE): Define.
1047 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
1048 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1050 2001-07-19 Jakub Jelinek <jakub@redhat.com>
1052 * sysdeps/i386/useldt.h: Fix typo in ARCH_STACK_MAX_SIZE comment.
1054 * sysdeps/ia64/pt-machine.h (FLOATING_STACKS): Define.
1055 (ARCH_STACK_MAX_SIZE): Define.
1056 * manager.c (pthread_allocate_stack): Handle FLOATING_STACKS with
1057 NEED_SEPARATE_REGISTER_STACK.
1059 2001-07-16 Andreas Schwab <schwab@suse.de>
1061 * Makefile (before-compile): Don't add $(objpfx)crti.o.
1062 (omit-deps): Add crti.
1063 ($(objpfx)libpthread.so): Depend on $(objpfx)crti.o, but make sure
1064 it is filtered out of the link command.
1066 2001-07-16 Ulrich Drepper <drepper@redhat.com>
1068 * pthread.c (pthread_initialize): For FLOATING_STACKS don't bother
1069 to find the right value for __pthread_initial_thread_bos, it's not
1070 used. If not FLOATING_STACKS first run
1071 __pthread_init_max_stacksize.
1073 2001-06-16 H.J. Lu <hjl@gnu.org>
1075 * internals.h: Include <stackinfo.h>.
1077 * attr.c: Don't include <stackinfo.h> here.
1078 * cancel.c: Likewise.
1079 * manager.c: Likewise.
1080 * pthread.c: Likewise.
1081 * ptlongjmp.c: Likewise.
1083 2001-03-23 Matthew Wilcox <willy@ldl.fc.hp.com>
1085 * attr.c: Make _STACK_GROWS_UP work.
1086 * internals.h: Likewise.
1087 * manager.c: Likewise.
1088 * pthread.c: Likewise.
1090 2001-06-15 H.J. Lu <hjl@gnu.org>
1092 * pthread.c (__pthread_reset_main_thread): Fix a typo.
1094 2001-02-02 John S. Marvin <jsm@udlkern.fc.hp.com>
1096 * semaphore.h: Use struct _pthread_fastlock as an element of
1097 sem_t instead of an identical struct.
1098 * rwlock.c: Remove casts.
1099 * semaphore.c: Likewise.
1101 2001-04-30 Alan Modra <amodra@one.net.au>
1103 * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: New.
1105 2001-05-25 Bruce Mitchener <bruce@cubik.org>
1107 * linuxthreads.texi: Spelling corrections.
1109 2001-05-25 Ulrich Drepper <drepper@redhat.com>
1111 * oldsemaphore.c (__old_sem_wait): Clear p_nextwaiting before
1112 returning successfully.
1113 Patch by Gene Cooperman <gene@ccs.neu.edu>.
1115 2001-05-24 Ulrich Drepper <drepper@redhat.com>
1117 * spinlock.c (__pthread_lock) [HAS_COMPARE_AND_SWAP]: Before doing any
1118 serious work try once whether the lock is uncontested.
1119 Remove duplicate reading of __status before loop.
1120 Change suggested by Hans Boehm <hans_boehm@hp.com>.
1122 * spinlock.h (__pthread_trylock): Remove need for oldstatus variable.
1123 (__pthread_alt_trylock): Likewise.
1125 2001-05-01 Kaz Kylheku <kaz@ashi.footprints.net>
1127 Memory barrier overhaul following line by line inspection.
1128 * mutex.c (pthread_once): Missing memory barriers added.
1129 * pthread.c (__pthread_wait_for_restart_signal,
1130 __pthread_timedsuspend_new, __pthread_restart_new): Added
1131 memory barriers ``just in case'' and for documentary value.
1132 * spinlock.c (__pthread_release): New inline function for releasing
1133 spinlock, to complement __pthread_acquire. Includes memory
1134 barrier prior to assignment to spinlock, and __asm __volatile
1135 dance to prevent reordering or optimization of the spinlock access.
1136 * spinlock.c (__pthread_unlock, __pthread_alt_lock,
1137 __pthread_alt_timedlock, __pthread_alt_unlock,
1138 __pthread_compare_and_swap): Updated to use new __pthread_release
1139 instead of updating spinlock directly.
1140 * spinlock.c (__pthread_lock, __pthread_unlock, wait_node_alloc,
1141 wait_node_free, wait_node_dequeue, __pthread_alt_lock,
1142 __pthread_alt_timedlock, __pthread_alt_unlock, __pthread_acquire):
1143 Memory barrier overhaul. Lots of missing memory barriers added,
1144 a couple needless ones removed.
1145 * spinlock.c (__pthread_compare_and_swap): testandset optimization
1146 removed, just calls __pthread_acquire, which has the new read
1147 barrier in it before its testandset.
1149 2001-05-20 Roland McGrath <roland@frob.com>
1151 * Makeconfig: New file, variables used to be in main libc Makeconfig.
1153 2001-05-09 Geoff Keating <geoffk@redhat.com>
1155 * sysdeps/powerpc/pt-machine.h
1156 (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): Define.
1157 (__compare_and_swap): Remove memory barriers.
1158 (__compare_and_swap_with_release_semantics): New function.
1160 2001-04-24 Andreas Jaeger <aj@suse.de>
1162 * wrapsyscall.c: send* and recv* return ssize_t.
1164 * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Unlock the
1165 mutex instead of double locking it.
1166 Reported by Pierre Artaud <partaud@sodatec.com>.
1168 2001-04-23 Ulrich Drepper <drepper@redhat.com>
1170 * sysdeps/pthread/getcpuclockid.c: Make function generic, test
1171 using #ifdef whether the clock is available.
1172 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: Removed.
1174 * sysdeps/ia64/Versions: New file.
1176 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init): We don't
1177 have to call __gmon_start__ in the libpthread DSO.
1178 * sysdeps/pthread/pt-initfini.c (_init): Likewise.
1180 * Makefile (libpthread-routines): Add ptclock_gettime and
1182 * internals.h: Don't use cpuclock-init.h definitions, use
1183 hp-timing.h definitions.
1184 * pthread.c: Likewise.
1185 * manager.c: Likewise.
1186 * ptclock_gettime.c: New file.
1187 * ptclock_settime.c: New file.
1188 * internals.h: Fix parameter type for __pthread_clock_gettime and
1189 __pthread_clock_settime.
1191 * sysdeps/i386/i586/ptclock_gettime.c: Removed.
1192 * sysdeps/i386/i586/ptclock_settime.c: Removed.
1193 * sysdeps/i386/i586/Makefile: Removed.
1195 2001-04-22 Ulrich Drepper <drepper@redhat.com>
1197 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_ASYNCH_IO.
1198 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1200 2001-04-21 Andreas Jaeger <aj@suse.de>
1202 * sysdeps/pthread/timer_routines.c (thread_func): Add noreturn
1203 attribute, remove statements that will never be executed.
1204 (thread_func): Remove mutex_unlock call since it's never executed.
1205 (thread_func): Fix comment as suggested by Jakub Jelinek.
1207 * manager.c (__pthread_manager): Add noreturn
1209 (pthread_start_thread): Likewise, remove return statement.
1210 (pthread_start_thread_event): Likewise.
1211 Add noreturn attribute for pthread_handle_exit.
1212 * weaks.c: Add noreturn attribute for pthread_exit.
1214 * internals.h: Add __pthread_clock_gettime and
1215 __pthread_clock_settime prototypes.
1217 2001-04-21 Ulrich Drepper <drepper@redhat.com>
1219 * internals.h: Include <cpuclock-init.h>.
1220 (struct _pthread_descr_struct): Add p_cpuclock_offset field if
1221 CPUCLOCK_VARDEF is defined.
1222 * pthread.c (__pthread_initialize_minimal): Initialize
1223 p_cpuclock_offset field for main thread if CPUCLOCK_INIT is defined.
1224 * manager.c (pthread_start_thread): Set p_cpuclock_offset field
1225 for new thread to current CPU clock value.
1227 * sysdeps/i386/useldt.h: Extend all the macros to handle 8-byte values.
1229 * sysdeps/i386/i586/Makefile: New file.
1230 * sysdeps/i386/i586/Versions: New file.
1231 * sysdeps/i386/i586/ptclock_gettime.c: New file.
1232 * sysdeps/i386/i586/ptclock_settime.c: New file.
1233 * sysdeps/i386/i686/Implies: New file.
1235 2001-04-18 Jakub Jelinek <jakub@redhat.com>
1237 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Put specs into
1238 $generated, not $postclean-generated.
1240 2001-04-18 Andreas Jaeger <aj@suse.de>
1242 * Makefile (otherlibs): Added.
1244 2001-04-18 Jakub Jelinek <jakub@redhat.com>
1246 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
1248 2001-04-16 Ulrich Drepper <drepper@redhat.com>
1250 * signals.c (sigwait): NSIG is no signal number. Block all
1251 signals while in signal handler for signals in SET.
1252 Patch by Manfred Spraul <manfred@colorfullife.com>.
1254 2001-04-12 Ulrich Drepper <drepper@redhat.com>
1256 * tst-cancel.c: Disable most tests. Add new test where all
1257 cleanup handlers must run.
1258 * Makefile (tests): Add tst-cancel again.
1260 * cancel.c (__pthread_perform_cleanup): Correct condition for
1261 leaving cleanup loop early.
1263 * sysdeps/i386/Makefile: Make sure gcc uses a frame pointer for
1264 all the files which use CURRENT_STACK_FRAME.
1265 * sysdeps/i386/pt-machine.h (CURRENT_STACK_FRAME): Define using
1266 __builtin_frame_address.
1267 * sysdeps/i386/i686/pt-machine.h: Likewise.
1269 2001-04-11 Ulrich Drepper <drepper@redhat.com>
1271 * Makefile (tests): Comment out tst-cancel for now.
1273 * tst-cancel.c (main): Cleanup 4 is supposed to run. Create
1274 temporary file in object directory.
1275 * Makefile: Don't allow inlining when compiling tst-cancel.c.
1276 Pass $(objpfx) to tst-cancel.
1278 2001-04-11 David S. Miller <davem@redhat.com>
1280 * sysdeps/sparc/sparc32/pt-machine.h (stack_pointer): Advance
1281 up closer to user local variables so that new cleanup heuristics work.
1282 * sysdeps/sparc/sparc64/pt-machine.h (stack_pointer): Likewise.
1284 2001-04-11 Ulrich Drepper <drepper@redhat.com>
1286 * cancel.c (_pthread_cleanup_push): Catch invalid __prev buffer
1288 (_pthread_cleanup_push_defer): Likewise.
1290 * tst-cancel.c (main): Fix loop printing cleanup output.
1292 2001-04-10 kaz Kojima <kkojima@rr.iij4u.or.jp>
1294 * sysdeps/sh/pspinlock.c (__pthread_spin_lock): Fix a reverse
1296 (__pthread_spin_trylock): Likewise.
1297 * sysdeps/sh/pt-machine.h (testandset): Likewise.
1299 2001-04-10 Ulrich Drepper <drepper@redhat.com>
1301 * join.c (pthread_exit): Move code to new function __pthread_do_exit
1302 which takes an extra parameter with the current frame pointer.
1303 Call new function with CURRENT_STACK_FRAME.
1304 (__pthread_do_exit): New function. Call __pthread_perform_cleanup
1305 with the new parameter.
1306 (pthread_join): Call __pthread_do_exit instead of pthread_exit.
1307 * cancel.c (__pthread_perform_cleanup): Takes extra parameter. Use
1308 this parameter as the initial value the cleanup handler records are
1309 compared against. No active cleanup handler record must have an
1310 address lower than the previous one and the initial record must be
1311 above (below on PA) the frame address passed in.
1312 (pthread_setcancelstate): Call __pthread_do_exit instead of
1314 (pthread_setcanceltype): Likewise.
1315 (pthread_testcancel): Likewise.
1316 (_pthread_cleanup_pop_restore): Likewise.
1317 * condvar.c (pthread_cond_wait): Likewise.
1318 (pthread_cond_timedwait_relative): Likewise.
1319 * manager.c (pthread_start_thread): Likewise.
1320 * oldsemaphore.c (__old_sem_wait): Likewise.
1321 * pthread.c (pthread_handle_sigcancel): Likewise.
1322 * semaphore.c (__new_sem_wait): Likewise.
1323 (sem_timedwait): Likewise.
1324 * ptlongjmp.c (pthread_cleanup_upto): Also use current stack frame
1325 to limit the cleanup handlers which get run.
1326 * internals.h: Add prototype for __pthread_do_exit. Adjust prototype
1327 for __pthread_perform_cleanup.
1329 * Makefile (tests): Add tst-cancel.
1330 * tst-cancel.c: New file.
1332 2001-04-08 Hans-Peter Nilsson <hp@axis.com>
1334 * sysdeps/cris/pt-machine.h: New file.
1335 * sysdeps/cris/pspinlock.c: New file.
1337 2001-04-09 Hans-Peter Nilsson <hp@axis.com>
1339 * shlib-versions: Add case for Linux on CRIS.
1341 2001-03-26 Ulrich Drepper <drepper@redhat.com>
1343 * attr.c (pthread_getattr_np): Correct computation of stack size
1344 for machiens with register stack.
1346 * Examples/ex17.c (main): Correct detection of failed mmap call.
1348 2001-03-21 Jakub Jelinek <jakub@redhat.com>
1350 * pthread.c (__pthread_initialize_manager): Fix a typo.
1352 2001-03-21 Jakub Jelinek <jakub@redhat.com>
1354 * attr.c (__pthread_attr_setstack): Fix alignment check.
1355 (pthread_getattr_np): __stackaddr is top of stack, not bottom.
1356 * Makefile (tests): Add ex17 test.
1357 * Examples/ex17.c: New test.
1359 2001-03-20 Ulrich Drepper <drepper@redhat.com>
1361 * Makefile: Define -D_RPC_THREAD_SAFE_ for cancel.c.
1362 * cancel.c (__pthread_perform_cleanup): Call __rpc_thread_destroy.
1363 * sysdeps/pthread/bits/libc-tsd.h: Define _LIBC_TSD_KEY_VARS.
1365 2001-03-18 Ulrich Drepper <drepper@redhat.com>
1367 * Makefile: When generating DSO link with libc_nonshared.a.
1369 2001-02-26 Jakub Jelinek <jakub@redhat.com>
1371 * signals.c (pthread_sighandler): Use CALL_SIGHANDLER.
1373 2001-02-23 Jakub Jelinek <jakub@redhat.com>
1375 * internals.h (__pthread_init_max_stacksize): New prototype.
1376 * attr.c (__pthread_attr_setstacksize): Call
1377 __pthread_init_max_stacksize if not yet initialized.
1378 * pthread.c (__pthread_init_max_stacksize): New function.
1379 (__pthread_initialize_manager): Call it.
1380 Patch by <dtc@cmucl.cons.org>.
1382 2001-03-16 Ulrich Drepper <drepper@redhat.com>
1384 * attr.c (pthread_getattr_np): Fix __stacksize computation for IA-64.
1386 2001-03-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
1388 * shlib-versions: Add rule for Linux on 64 bit S/390.
1389 * sysdeps/s390/s390-64/pt-machine.h: New file.
1390 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
1392 2001-03-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
1394 * sysdeps/s390/pt-machine.h: Move to...
1395 * sysdeps/s390/s390-32/pt-machine.h: ...here.
1396 Add defines for FLOATING_STACK and ARCH_STACK_MAX_SIZE.
1398 2001-03-15 Ulrich Drepper <drepper@redhat.com>
1400 * Versions [libpthread] (GLIBC_2.2.3): Add pthread_getattr_np.
1401 * attr.c: Implement pthread_getattr_np.
1402 * sysdeps/pthread/pthread.h: Add prototype for pthread_getattr_np.
1403 * internals.h (struct _pthread_descr_struct): Add p_inheritsched.
1404 * manager.c (pthread_handle_create): Initialize p_inheritsched.
1406 2001-03-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
1408 * sysdeps/unix/sysv/linux/s390/pt-initfini.c: Use 0x07 padding for
1411 2001-02-20 Hans Boehm <hans_boehm@hp.com>
1413 * manager.c (manager_mask): Removed static vesion. Now always local
1414 to __pthread_manager().
1415 (manager_mask_all): Removed completely.
1416 (__pthread_manager): Remove manager_mask_all initialization.
1417 (pthread_handle_create): Remove code to set and reset signal mask
1418 around __clone2() calls.
1420 2001-02-17 Jakub Jelinek <jakub@redhat.com>
1422 * spinlock.c (__pthread_lock): Force lock->__status to be read from
1423 memory on every spin.
1425 2001-02-10 Andreas Jaeger <aj@suse.de>
1427 * Makefile (extra-objs): New.
1429 2001-02-09 Jakub Jelinek <jakub@redhat.com>
1431 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Add
1432 __pthread_initialize_minimal prototype.
1434 2001-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
1436 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
1438 2001-02-06 Martin Schwidefsky <schwidefsky@de.ibm.com>
1440 * sysdeps/unix/sysv/linux/s390/pt-initfini.c: New file.
1442 2001-02-06 Ulrich Drepper <drepper@redhat.com>
1444 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: First attempt to fix the
1445 broken code. Patch by Jes Sorensen.
1447 2001-02-06 Andreas Jaeger <aj@suse.de>
1449 * sysdeps/pthread/pthread.h: Move __pthread_initialize from here
1451 * internals.h: ...here.
1453 2001-02-05 Jes Sorensen <jes@linuxcare.com>
1455 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
1457 2001-02-02 Ulrich Drepper <drepper@redhat.com>
1459 * Versions: Remove __pthread_initialize_minimal.
1461 2001-02-01 Ulrich Drepper <drepper@redhat.com>
1463 * Makefile: Add rules to build crti.o and make it being used in
1464 building libpthread.so.
1465 * sysdeps/i386/Makefile: New file.
1466 * sysdeps/pthread/pt-initfini.c: New file.
1468 * pthread.c: Cleanups.
1470 2001-01-28 Andreas Jaeger <aj@suse.de>
1472 * oldsemaphore.c (__old_sem_init): Adjust for last change.
1473 * sysdeps/pthread/bits/libc-lock.h: Likewise.
1474 * spinlock.c: Likewise.
1476 2001-01-28 Ulrich Drepper <drepper@redhat.com>
1478 * sysdeps/pthread/bits/initspin.h: Make all names namespace clean.
1479 * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
1480 * manager.c: Adjust for namespace cleanup in bits/initspin.h.
1481 * pthread.c: Likewise.
1482 * spinlock.h: Likewise.
1483 * sysdeps/pthread/pthread.h: Likewise.
1485 2001-01-26 Ulrich Drepper <drepper@redhat.com>
1487 * sysdeps/pthread/bits/pthreadtypes.h: Define pthread_attr_t also
1488 as struct __pthread_attr_s.
1490 * semaphore.h (sem_t): Cleanup namespace, rename status and
1493 2001-01-13 Jakub Jelinek <jakub@redhat.com>
1495 * pthread.c (pthread_onexit_process): Clear
1496 __pthread_manager_thread_bos after freeing it.
1497 * Makefile (tests): Add ex16.
1498 * Examples/ex16.c: New file.
1500 2001-01-11 Jakub Jelinek <jakub@redhat.com>
1502 * Makefile (CFLAGS-pthread.c): Pass -DHAVE_Z_NODELETE if ld supports
1504 * pthread.c (pthread_exit_process): Rename to...
1505 (pthread_onexit_process): ...this.
1506 (pthread_atexit_process, pthread_atexit_retcode): New.
1507 (pthread_initialize): Call __cxa_atexit instead of __cxa_on_exit
1508 and only if HAVE_Z_NODELETE is not defined.
1509 (__pthread_initialize_manager): Register pthread_atexit_retcode
1512 2001-01-11 Ulrich Drepper <drepper@redhat.com>
1514 * pthread.c (pthread_initialize): Use __cxs_on_exit not __cxa_atexit.
1516 2001-01-11 Jakub Jelinek <jakub@redhat.com>
1518 * Makefile (tests): Add ex15.
1519 * Examples/ex15.c: New test.
1521 2001-01-08 Ulrich Drepper <drepper@redhat.com>
1523 * pthread.c (pthread_exit_process): Free memory allocated for
1526 2000-12-31 Ulrich Drepper <drepper@redhat.com>
1528 * manager.c (pthread_alloca_stack): Remove MAP_FIXED from mmap calls.
1529 (pthread_free): Always unmap the stack. It's safe now that we don't
1530 use MAP_FIXED to allocate stacks.
1532 2000-12-31 Ulrich Drepper <drepper@redhat.com>
1534 * sysdeps/powerpc/pspinlock.c: Don't include pt-machine.h here.
1536 * manager.c (pthread_allocate_stack): Prepare for removal of MAP_FIXED.
1538 2000-11-15 Wolfram Gloger <wg@malloc.de>
1540 * manager.c (pthread_free): [!FLOATING_STACKS]: Only remap the
1541 stack to PROT_NONE, don't unmap it, avoiding collisions with malloc.
1543 2000-12-27 Andreas Jaeger <aj@suse.de>
1545 * Examples/ex13.c: Make local functions static.
1546 * ecmutex.c: Likewise.
1547 * joinrace.c: Likewise.
1548 * Examples/ex14.c: Likewise.
1550 * Examples/ex2.c: Make local functions static; reformat.
1551 * Examples/ex1.c: Likewise.
1552 * Examples/ex4.c: Likewise.
1553 * Examples/ex5.c: Likewise.
1554 * Examples/ex7.c: Likewise.
1556 * oldsemaphore.c: Add prototypes to shut up GCC.
1557 * pt-machine.c: Likewise.
1559 * weaks.c: Add prototype for pthread_exit.
1561 * internals.h: Add some prototypes, format prototypes and add
1563 Move __libc_waitpid prototype to include/sys/wait.h.
1565 * rwlock.c: Include <bits/libc-lock.h> for prototypes.
1566 * mutex.c: Likewise.
1567 * specific.c: Likewise.
1568 * ptfork.c: Likewise.
1570 * lockfile.c: Include internals.h to get prototypes.
1571 * events.c: Likewise.
1572 * sysdeps/alpha/pspinlock.c: Likewise.
1573 * sysdeps/arm/pspinlock.c: Likewise.
1574 * sysdeps/hppa/pspinlock.c: Likewise.
1575 * sysdeps/i386/pspinlock.c: Likewise.
1576 * sysdeps/ia64/pspinlock.c: Likewise.
1577 * sysdeps/m68k/pspinlock.c: Likewise.
1578 * sysdeps/mips/pspinlock.c: Likewise.
1579 * sysdeps/powerpc/pspinlock.c: Likewise.
1580 * sysdeps/s390/pspinlock.c: Likewise.
1581 * sysdeps/sh/pspinlock.c: Likewise.
1582 * sysdeps/sparc/sparc32/pspinlock.c: Likewise.
1583 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: Likewise.
1584 * sysdeps/sparc/sparc64/pspinlock.c: Likewise.
1586 2000-12-27 Ulrich Drepper <drepper@redhat.com>
1588 * attr.c (__pthread_attr_setstack): Fix setting of __stackaddr element.
1589 (__pthread_attr_getstack): Return correct address.
1590 Add warnings for using pthread_attr_getstackaddr and
1591 pthread_attr_setstackaddr.
1593 2000-12-26 Ulrich Drepper <drepper@redhat.com>
1595 * Examples/ex6.c (test_thread): Make static.
1596 * Examples/ex12.c (test_thread): Make static and add noreturn
1599 2000-12-18 Jes Sorensen <jes@linuxcare.com>
1601 * linuxthreads/sysdeps/ia64/pt-machine.h: __compare_and_swap
1602 and compare_and_swap_with_release_semantics returns int not long.
1604 2000-12-17 Andreas Jaeger <aj@suse.de>
1606 * sysdeps/s390/pt-machine.h (testandset): Use long int as return
1608 * sysdeps/arm/pt-machine.h (testandset): Likewise.
1609 * sysdeps/hppa/pt-machine.h (testandset): Likewise.
1610 * sysdeps/m68k/pt-machine.h (testandset): Likewise.
1611 * sysdeps/sh/pt-machine.h (testandset): Likewise.
1612 * sysdeps/sparc/sparc32/pt-machine.h (testandset): Likewise.
1613 * sysdeps/sparc/sparc64/pt-machine.h (testandset): Likewise.
1615 2000-12-17 Ulrich Drepper <drepper@redhat.com>
1617 * sysdeps/i386/pt-machine.h (testandset): Adjust for prototype change.
1618 * sysdeps/i386/i686/pt-machine.h (testandset): Likewise.
1620 2000-12-17 Andreas Jaeger <aj@suse.de>
1622 * internals.h: Add prototypes for testandset and
1623 __compare_and_swap to shut up gcc warnings.
1625 2000-12-06 Wolfram Gloger <wg@malloc.de>
1627 * join.c (pthread_detach): Allow case where the thread has already
1630 2000-12-05 Andreas Jaeger <aj@suse.de>
1632 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Don't set mips2.
1633 * sysdeps/mips/pt-machine.h (testandset): Likewise.
1634 (__compare_and_swap): Likewise.
1635 Patches by Maciej W. Rozycki <macro@ds2.pg.gda.pl>.
1637 2000-11-20 Jakub Jelinek <jakub@redhat.com>
1639 * Examples/ex3.c (main): Cast int to long before casting to void *.
1640 (search): Cast void * to long, not int.
1641 * Examples/ex8.c (main, thread): Similarly.
1642 * Examples/ex11.c (main): Similarly.
1643 * Examples/ex14.c (worker, do_test): Similarly.
1644 * ecmutex.c (worker, do_test): Similarly.
1645 (nlocks): Cast to int.
1647 2000-11-08 Bruce Mitchener <bruce@cubik.org>
1649 * linuxthreads.texi: Add documentation for pthreads attributes
1650 guardsize, stackaddr, stacksize, and stack. Fix typo in previous
1651 patch. Document pthread_[sg]etconcurrency(). Mark
1652 pthread_mutexattr_[sg]ettype() as POSIX rather than GNU.
1654 2000-11-07 Ulrich Drepper <drepper@redhat.com>
1656 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
1658 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1659 Reported by Christopher Yeoh <cyeoh@linuxcare.com.au>.
1661 2000-11-06 Ulrich Drepper <drepper@redhat.com>
1663 * cancel.c (pthread_cancel): Always set p_canceled, even if we are
1664 not doing it right now.
1665 Reported by Kaz Kylheku <kaz@ashi.footprints.net>.
1667 2000-10-30 Ulrich Drepper <drepper@redhat.com>
1669 * Examples/ex4.c (main): Don't use exit() to avoid warning with
1672 2000-10-29 Ulrich Drepper <drepper@redhat.com>
1674 * attr.c (__pthread_attr_setguardsize): Don't round guardsize
1675 here. Reported by Bruce Mitchener <bruce@cubik.org>.
1677 * linuxthreads.texi: Changes terminology to 'type' from 'kind' when
1678 discussing mutexes. (As per the Unix98 name for the API.)
1679 Changes documentation for pthread_mutexattr_setkind_np() and
1680 pthread_mutexattr_getkind_np() over to the Unix98 APIs for the
1681 same: pthread_mutexattr_settype() and pthread_mutexattr_gettype().
1682 Changes references to PTHREAD_MUTEXATTR_FAST_NP to
1683 PTHREAD_MUTEXATTR_ADAPTIVE_NP.
1684 Begins to introduce discussion of the ``timed'' mutex type. This
1685 discussion is currently incomplete.
1686 Patch by Bruce Mitchener <bruce@cubik.org>.
1688 2000-10-26 Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
1689 Yutaka Niibe <gniibe@chroot.org>
1691 * sysdeps/sh/pt-machine.h (testandset): Since the operand of TAS.B
1692 has restrictions, use register.
1694 2000-10-23 Andreas Schwab <schwab@suse.de>
1696 * Examples/ex14.c (TIMEOUT): Override default timeout.
1698 2000-10-16 Ulrich Drepper <drepper@redhat.com>
1700 * specific.c: Protect tsd array modification in thread data
1701 structures by getting the thread lock in pthread_key_delete and
1702 __pthread_destroy_specifics.
1703 Patch by Wolfram Gloger <Wolfram.Gloger@dent.med.uni-muenchen.de>.
1705 2000-10-12 Alan Modra <alan@linuxcare.com.au>
1707 * sysdeps/pthread/bits/initspin.h: New file.
1708 * spinlock.h: Move LOCK_INITIALIZER definition to <bits/initspin.h>.
1709 (__pthread_init_lock): Initialize lock with LT_SPINLOCK_INIT.
1710 (__pthread_alt_init_lock): Likewise.
1711 (__pthread_alt_trylock): Release lock with LT_SPINLOCK_INIT.
1713 2000-10-12 David Huggins-Daines <dhd@linuxcare.com>
1715 * oldsemaphore.c (__old_sem_init): Release lock with
1716 LT_SPINLOCK_INIT, not zero.
1717 * spinlock.c (__pthread_unlock): Likewise.
1718 (__pthread_alt_lock): Likewise.
1719 (__pthread_alt_timedlock): Likewise.
1720 (__pthread_alt_unlock): Likewise.
1721 * sysdeps/pthread/bits/libc-lock.h: Initialize locks with
1722 LT_SPINLOCK_INIT if it is non-zero. Likewise for init-once flags.
1723 * sysdeps/pthread/pthread.h: Include bits/initspin.h. Use
1724 LT_SPINLOCK_INIT do initialize spinlocks not 0.
1726 2000-10-12 David Huggins-Daines <dhd@linuxcare.com>
1728 * shlib-versions: Add version definitions for hppa-linux.
1730 2000-10-12 Alan Modra <alan@linuxcare.com.au>
1732 * sysdeps/hppa/pspinlock.c: New file.
1733 * sysdeps/hppa/pt-machine.h: New file.
1734 * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: New file.
1736 2000-10-05 Jakub Jelinek <jakub@redhat.com>
1738 * mutex.c (__pthread_mutex_destroy): Correct test of
1739 busy mutex for mutexes using alternate fastlocks.
1740 Patch by dtc@cmucl.cons.org.
1742 2000-09-28 Martin Schwidefsksy <schwidefsky@de.ibm.com>
1744 * sysdeps/s390/pt-machine.h: Make %a0 the thread register.
1746 2000-09-28 Ulrich Drepper <drepper@redhat.com>
1748 * mutex.c (__pthread_mutex_unlock): For PTHREAD_MUTEX_RECURSIVE_NP
1749 test for owner first.
1750 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1752 * cancel.c (pthread_cancel): Don't do anything if cancelation is
1755 2000-09-26 Ulrich Drepper <drepper@redhat.com>
1757 * spinlock.h (__pthread_set_own_extricate_if): Optimize a bit.
1758 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1760 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
1761 _POSIX_MONOTONIC_CLOCK.
1763 * spinlock.h (__pthread_set_own_extricate_if): Add back locking
1766 2000-09-20 Andreas Jaeger <aj@suse.de>
1768 * pthread.c [!__ASSUME_REALTIME_SIGNALS]: Make inclusion of
1769 "testrtsig.h" conditional.
1771 2000-09-11 Ulrich Drepper <drepper@redhat.com>
1773 * sysdeps/pthread/pthread.h: Declare pthread_attr_getstack and
1774 pthread_attr_setstack.
1775 * Versions [libpthread] (GLIBC_2.2): Export pthread_attr_getstack and
1776 pthread_attr_setstack.
1777 * attr.c (pthread_attr_getstack, pthread_attr_setstack): New functions.
1779 2000-09-05 Ulrich Drepper <drepper@redhat.com>
1781 * Examples/ex14.c: New file.
1782 * Makefile (tests): Add ex14.
1784 * mutex.c (__pthread_mutex_unlock): Correct test for already unlocked
1785 mutex. Patch by dtc@cmucl.cons.org.
1787 * ecmutex.c: New file.
1788 * Makefile (tests): Add ecmutex.
1790 2000-09-04 H.J. Lu <hjl@gnu.org>
1792 * attr.c (__pthread_attr_setguardsize): Use page_roundup
1793 instead of roundup to round up to the page size.
1795 2000-09-03 Mark Kettenis <kettenis@gnu.org>
1797 * manager.c (pthread_exited): Correctly report event as TD_REAP
1798 instead of TD_DEATH. Fix comments.
1800 2000-09-03 Ulrich Drepper <drepper@redhat.com>
1802 * spinlock.h (testandset): Add cast to avoid warning.
1803 Patch by Franz Sirl <Franz.Sirl-kernel@lauterbach.com>.
1805 2000-09-02 Andreas Jaeger <aj@suse.de>
1807 * sysdeps/pthread/timer_routines.c: Include stdlib.h for abort
1810 2000-09-01 Ulrich Drepper <drepper@redhat.com>
1812 * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
1813 Fix typo in last patch (_mode -> _flags).
1815 * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
1816 Provide definition which respects _IO_USER_LOCK flag.
1818 2000-08-30 Ulrich Drepper <drepper@redhat.com>
1820 * manager.c (pthread_allocate_stack): Clear descriptor only if not
1823 2000-08-25 Ulrich Drepper <drepper@redhat.com>
1825 * Makefile: Add rules to build and run unload.
1826 * unload.c: New file.
1828 * pthread.c (pthread_exit_process): Move thread_self use inside `if'.
1830 * sysdeps/pthread/pthread.h
1831 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Defined.
1832 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: Defined.
1834 2000-08-24 Andreas Jaeger <aj@suse.de>
1836 * Examples/ex13.c: Include <string.h> for strerror prototype and
1837 <stdlib.h> for abort prototype.
1838 (pthr_cond_signal_mutex): Rewrite to silence GCC.
1839 (thread_start): Remove unused variable err.
1840 (main): Silence GCC warnings.
1842 2000-08-22 Andreas Jaeger <aj@suse.de>
1844 * Examples/ex13.c: New test by Kurt Garloff <garloff@suse.de>.
1846 * Makefile (tests): Add ex13.
1848 2000-08-20 Ulrich Drepper <drepper@redhat.com>
1850 * semaphore.h: Add restrict where required by AGd4.
1851 * sysdeps/pthread/pthread.h: Likewise.
1852 * sysdeps/pthread/unix/sysv/linux/bits/sigthread.h: Likewise.
1854 2000-08-15 Ulrich Drepper <drepper@redhat.com>
1856 * Makefile (tests): Add ex12. Add rule to build it.
1857 * Examples/ex12.c: New file.
1859 2000-08-13 Ulrich Drepper <drepper@redhat.com>
1861 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_SEMAPHORES
1862 even though the implementation is not quite complete (but it reports
1863 it). Define _POSIX_MESSAGE_PASSING to -1.
1864 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1866 2000-08-12 Andreas Jaeger <aj@suse.de>
1868 * sysdeps/mips/pt-machine.h (testandset): Add .set mips2 for
1870 (__compare_and_swap): Likewise.
1871 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Likewise.
1873 2000-08-10 Ulrich Drepper <drepper@redhat.com>
1875 * pthread.c (__pthread_initial_thread): Initialize p_errnop and
1876 p_h_errnop correctly and not to NULL.
1878 2000-08-05 Ulrich Drepper <drepper@redhat.com>
1880 * Banner: Bump version number to 0.9.
1882 2000-08-04 Ulrich Drepper <drepper@redhat.com>
1884 * Makefile (tests): Add tststack. Add rule to build the program.
1885 * tststack.c: New file.
1887 * internals.h: Declare __pthread_max_stacksize.
1888 * pthread.c (__pthread_max_stacksize): New variable.
1889 (__pthread_initialize_manager): Determine __pthread_initialize_manager
1891 * manager.c (thread_segment): Return always NULL if FLOATING_STACKS.
1892 (pthread_allocate_stack): Allow kernel to choose stack address if
1893 FLOATING_STACKS. This also handles variable-sized stacks.
1894 Always allocate stack and guardpage together. Use mprotect to
1895 change guardpage access.
1896 * sysdeps/i386/useldt.h: Define FLOATING_STACKS and
1897 ARCH_STACK_MAX_SIZE.
1899 * attr.c (__pthread_attr_setstacksize): Also test value against
1902 * manager.c (__pthread_nonstandard_stacks): Define only if
1903 THREAD_SELF is not defined.
1904 (pthread_allocate_stack): Always initialize gardaddr to a correct
1906 (pthread_handle_create): Unmap thread with one call.
1907 (pthread_free): Remove test for initial thread before removing stack.
1908 Unmap stack with one call.
1910 * pthread.c (__pthread_initial_thread): Initialize p_userstack to
1911 1 to avoid removing the stack.
1913 2000-07-27 Jes Sorensen <jes@linuxcare.com>
1915 * sysdeps/ia64/pspinlock.c (__pthread_spin_lock): Add
1916 load of spin lock to prime the cache before the atomic compare and
1917 exchange operation (cmpxchg4). This avoids the spinning on the
1918 cmpxchg4 instruction and reduces movement of the cache line back
1919 and forth between the processors (explanation by Asis K. Mallick
1920 from Intel). This basically makes the implementation operate the
1921 same as the Linux kernel implementation.
1923 * shlib-versions: Use GLIBC_2_2 for Linux/ia64.
1924 * sysdeps/ia64/pspinlock.c: New file.
1926 2000-08-03 Ulrich Drepper <drepper@redhat.com>
1928 * pthread.c: Move definition of __pthread_set_own_extricate_if...
1929 * spinlock.h: ...here. Remove locking.
1930 * internals.h: Remove __pthread_set_own_extricate_if prototype.
1932 * rwlock.c: Use THREAD_GETMEM And THREAD_SETMEM.
1933 (rwlock_rd_extricate_func): Don't determine self, let
1934 __pthread_lock do it.
1935 (rwlock_wr_extricate_func): Likewise.
1936 (rwlock_have_already): Optimize *pself handling a bit.
1938 * mutex.c: Use __builtin_expect.
1939 * pthread.c: Likewise.
1941 2000-08-02 Andreas Jaeger <aj@suse.de>
1943 * sysdeps/s390/pspinlock.c: New file.
1944 * sysdeps/s390/pt-machine.h: New file.
1945 Patches by Martin Schwidefsky <schwidefsky@de.ibm.com>.
1947 2000-07-12 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
1949 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Implement for
1951 * sysdeps/mips/pt-machine.h (testandset): Likewise.
1953 2000-07-26 Andreas Jaeger <aj@suse.de>
1955 * pthread.c: Initialize p_sem_avail.
1957 2000-07-25 Ulrich Drepper <drepper@redhat.com>
1959 * internals.h (struct __pthread_descr_struct): Add p_sem_avail.
1960 * semaphore.c: Handle spurious wakeups.
1962 * sysdeps/pthread/pthread.h: Add back PTHREAD_MUTX_FAST_NP as an alias
1963 for PTHREAD_MUTEX_ADAPTIVE_NP for source code compatibility.
1965 * pthread.c (__pthread_set_own_extricate): Use THREAD_GETMEM.
1966 (__pthread_wait_for_restart): Likewise.
1968 * condvar.c (pthread_cond_wait): Also check whether thread is
1969 cancelable before aborting loop.
1970 (pthread_cond_timedwait): Likewise.
1972 * signals.c (pthread_sighandler): Remove special code to restrore
1974 (pthread_sighandler_t): Likewise.
1976 2000-07-25 Mark Kettenis <kettenis@gnu.org>
1978 * internals.h (__RES_PTHREAD_INTERNAL): Remove define.
1979 * pthread.c: Include <resolv.h>.
1980 (_res): Undefine. Add extern declaration.
1982 2000-07-24 Ulrich Drepper <drepper@redhat.com>
1984 * pthread.c (__pthread_initial_thread): Update initializer.
1985 (__pthread_manager_thread): Likewise.
1986 (pthread_initialize): Move setrlimit call to...
1987 (__pthread_initialize_manager): ...here.
1988 (__pthread_reset_main_thread): Reset also soft limit on stack size.
1990 * condvar.c: Handle spurious wakeups. [PR libc/1749].
1991 * internals.h (struct _pthread_descr_struct): Add p_condvar_avail.
1993 2000-07-21 Ulrich Drepper <drepper@redhat.com>
1995 * spinlock.h: If IMPLEMENT_TAS_WITH_CAS is defined use
1996 __compare_and_swap to define testandset.
1997 * sysdeps/powerpc/pt-machine.h: Add volatile to asms.
1998 Define IMPLEMENT_TAS_WITH_CAS.
2000 2000-07-20 Ulrich Drepper <drepper@redhat.com>
2002 * Makefile: Pass -z nodelete to linker for libpthread.so
2003 generation if it understand this option.
2005 2000-07-18 Mark Kettenis <kettenis@gnu.org>
2007 * manager.c (pthread_handle_create): Remove initialization of
2008 new_thread->p_res._sock.
2010 2000-07-19 Kaz Kylheku <kaz@ashi.footprints.net>
2012 Bugfixes to the variant of the code for machines with no compare
2015 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Wait
2016 node was not being properly enqueued, due to failing to update
2017 the lock->__status field.
2019 * spinlock.c (__pthread_alt_timedlock): The oldstatus variable was
2020 being set inappropriately, causing the suspend function to be called
2021 with a null self pointer and crash.
2023 2000-07-18 Ulrich Drepper <drepper@redhat.com>
2025 * spinlock.h (__pthread_alt_trylock): Fix code used if no
2026 compare&swap is available.
2028 * spinlock.h (__pthread_trylock): Use __compare_and_swap, not
2031 * pthread.c (pthread_initialize): Don't use sysconf to determine
2032 whether the machine has more than one processor.
2034 * spinlock.c (__pthread_alt_timedlock): Add back one of the
2035 removed thread_self calls.
2037 2000-07-18 Kaz Kylheku <kaz@ashi.footprints.net>
2039 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Changed
2040 __compare_and_swap to compare_and_swap in code which assumes
2041 compare swap is available.
2043 2000-07-18 Kaz Kylheku <kaz@ashi.footprints.net>
2045 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Fixed
2046 bug whereby thr field of waitnode structure would not be correctly
2047 set unless a null self pointer is passed to the functions.
2048 Eliminated redundant calls to thread_self().
2050 2000-07-18 Jakub Jelinek <jakub@redhat.com>
2052 * pthread.c (__pthread_initialize_manager): Lock
2053 __pthread_manager_thread.p_lock before calling clone.
2055 2000-05-05 H.J. Lu <hjl@gnu.org>
2057 * sysdeps/ia64/pt-machine.h (__compare_and_swap): Change it to
2058 have acquire semantics.
2059 (__compare_and_swap_with_release_semantics): New inline
2061 (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): New macro.
2063 2000-01-28 Hans Boehm <hboehm@exch.hpl.hp.com>
2065 * manager.c: Fix the problem with signals at startup.
2066 Change the way that thread stacks are allocated on IA64.
2067 Clean up some of the guard page allocation stuff.
2069 1999-12-19 H.J. Lu <hjl@gnu.org>
2071 * internals.h (page_roundup): New.
2072 * attr.c (__pthread_attr_setguardsize); Use page_roundup
2074 * manager.c (pthread_allocate_stack): Make sure guardaddr is
2075 page aligned with page_roundup if NEED_SEPARATE_REGISTER_STACK
2078 1999-12-17 Hans Boehm <hboehm@exch.hpl.hp.com>
2080 * manager.c (pthread_allocate_stack): Unmap the stack top
2081 if failed to map the stack bottom.
2083 (pthread_free): Fix the guard page.
2085 * pthread.c (pthread_initialize): Set rlimit correctly for
2086 NEED_SEPARATE_REGISTER_STACK.
2088 1999-12-16 H.J. Lu <hjl@gnu.org>
2090 * pthread.c (__pthread_initialize_manager): Pass
2091 __pthread_manager_thread_bos instead of
2092 __pthread_manager_thread_tos to __clone2.
2094 1999-12-16 H.J. Lu <hjl@gnu.org>
2096 * manager.c (pthread_allocate_stack): Correct the calculation
2097 of "new_thread_bottom". Remove MAP_GROWSDOWN from mmap for
2100 1999-12-13 H.J. Lu <hjl@gnu.org>
2102 * sysdeps/ia64/pt-machine.h (__compare_and_swap): Added a stop
2103 bit after setting ar.ccv.
2105 1999-12-12 H.J. Lu <hjl@gnu.org>
2107 * manager.c (pthread_allocate_stack): Make the starting
2108 address of the stack bottom page aligned. FIXME: it may
2109 need changes in other places.
2110 (pthread_handle_create): Likewise.
2112 1999-12-11 Hans Boehm <hboehm@exch.hpl.hp.com>
2114 * manager.c (pthread_allocate_stack): Handle
2115 NEED_SEPARATE_REGISTER_STACK.
2116 (pthread_handle_create): Likewise.
2117 * pthread.c (__pthread_initialize_manager): Likewise.
2119 * sysdeps/ia64/pt-machine.h: Use r13 for thread pointer.
2121 1999-12-02 H.J. Lu <hjl@gnu.org>
2123 * sysdeps/ia64/pt-machine.h: New.
2125 2000-07-13 Ulrich Drepper <drepper@redhat.com>
2127 * wrapsyscall.c: Mark non-__ protected names as weak.
2130 2000-07-12 Bruno Haible <haible@clisp.cons.org>
2132 * Examples/ex8.c: Include <sys/wait.h>, not <wait.h>.
2134 2000-07-12 Ulrich Drepper <drepper@redhat.com>
2136 * spinlock.c: Fix code for TEST_FOR_COMPARE_AND_SWAP being defined.
2137 Add tests also to new alternative spinlock implementation.
2138 * spinlock.h: Likewise.
2139 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2141 2000-07-06 Ulrich Drepper <drepper@redhat.com>
2143 * Version: Export __sigaction.
2144 * signals.c: Define __sigaction alias. Use __libc_sigaction instead
2146 * pthread.c: Use __libc_sigaction instead of __sigaction.
2148 * condvar.c: Implement pthread_condattr_getpshared and
2149 pthread_condattr_setpshared.
2150 * mutex.c: Implement pthread_mutexattr_getpshared and
2151 pthread_mutexattr_setpshared.
2152 * Versions: Export new functions.
2153 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
2155 * rwlock.c (pthread_rwlockattr_init): Use PTHREAD_PROCESS_PRIVATE.
2156 (pthread_rwlockattr_setpshared): Fail if PTHREAD_PROCESS_PRIVATE
2159 2000-07-04 Greg McGary <greg@mcgary.org>
2161 * sysdeps/pthread/bits/libc-lock.h: Remove BP_SYM from
2162 pragmas. Include bp-sym.h only if _LIBC.
2164 2000-07-04 Ulrich Drepper <drepper@redhat.com>
2166 * spinlock.c (__pthread_unlock): Properly place write barrier.
2167 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2169 2000-07-03 Ulrich Drepper <drepper@redhat.com>
2171 * spinlock.c: Replace fast spinlocks by adaptive spinlocks which are
2172 faster on SMP systems. No more emulation of compare&swap for adaptive
2174 * spinlock.h: Likewise.
2175 * sysdeps/pthread/pthread.h: Shuffle PTHREAD_MUTEX_* values around.
2176 Replace fast with adaptive mutex.
2177 * mutex.c: Rewrite for replacement of fast by adaptive mutex.
2178 * condvar.c: Likewise.
2179 * pthread.c: Define and initialize __pthread_smp_kernel variable.
2180 * internals.h: Declare __pthread_smp_kernel.
2181 * sysdeps/pthread/bits/pthreadtypes.h: Update comment of
2182 _pthread_fastlock structure.
2183 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2185 * pthread.c: Remove initialization to zero from global variables.
2187 2000-06-29 Jakub Jelinek <jakub@redhat.com>
2189 * shlib-versions: Make sparc64 GLIBC_2.2+ only.
2191 2000-06-28 Greg McGary <greg@mcgary.org>
2193 * weaks.c: Wrap BP_SYM () around weak extern declarations of
2194 pthread functions that have pointers in their return+arg signatures.
2196 2000-06-27 Greg McGary <greg@mcgary.org>
2198 * sysdeps/pthread/bits/libc-lock.h: Wrap BP_SYM () around weak
2199 extern declarations of pthread functions that have pointers in
2200 their return+arg signatures.
2202 2000-06-26 Ulrich Drepper <drepper@redhat.com>
2204 * Makefile (tests): Add ex11. Add rules to build it.
2205 * Examples/ex11.c: New file.
2206 * rwlock.c: Fix complete braindamaged previous try to implement
2209 * spinlock.c: Pretty print.
2211 2000-06-25 Ulrich Drepper <drepper@redhat.com>
2213 * Makefile (tests): Add ex10. Add rules to build it.
2214 * Versions [GLIBC_2.2] (libpthread): Add pthread_mutex_timedlock,
2215 pthread_rwlock_timedrdlock, and pthread_rwlock_timedwrlock.
2216 * condvar.c (pthread_cond_wait): Allow mutex of kind
2217 PTHREAD_MUTEX_TIMED_NP.
2218 (pthread_cond_timedwait_relative): Likewise.
2219 * mutex.c (__pthread_mutex_init): Default is PTHREAD_MUTEX_TIMED_NP.
2220 (__pthread_mutex_trylock): Use __pthread_alt_trylock for
2221 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
2222 (__pthread_mutex_lock): Use __pthread_alt_lock for
2223 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
2224 (__pthread_mutex_timedlock): New function.
2225 (__pthread_mutex_unlock): Use __pthread_alt_unlock for
2226 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
2227 (__pthread_mutexattr_init): Use PTHREAD_MUTEX_TIMED_NP.
2228 (__pthread_mutexattr_settype): Allow PTHREAD_MUTEX_TIMED_NP.
2229 * spinlock.c: Implement alternate fastlocks.
2230 * spinlock.h: Add prototypes.
2231 * Examples/ex10.c: New file.
2232 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
2233 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2235 * rwlock.c (__pthread_rwlock_rdlock): Optimize loop a bit.
2236 (__pthread_rwlock_timedrdlock): New function.
2237 (__pthread_rwlock_timedwrlock): New function.
2238 Use laternate fastlock function everywhere.
2240 2000-06-21 Andreas Jaeger <aj@suse.de>
2242 * sysdeps/pthread/timer_routines.c: Include <string.h> for memset
2245 * join.c: Include <stdlib.h> for exit prototype.
2247 2000-06-20 Ulrich Drepper <drepper@redhat.com>
2249 * sysdeps/i386/useldt.h: Include <stdlib.h>.
2251 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_BARRIERS.
2252 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2254 * Makefile (libpthread-routines): Add barrier.
2255 (tests): Add ex9. Add rule to build ex9.
2256 * Versions: Export barrier functions.
2257 * barrier.c: New file.
2258 * Examples/ex9.c: New file.
2259 * sysdeps/pthread/pthread.h: Add barrier data types and declarations.
2260 * sysdeps/pthread/bits/pthreadtypes.h: Likewise.
2261 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2263 2000-06-19 H.J. Lu <hjl@gnu.org>
2265 * spinlock.h (HAS_COMPARE_AND_SWAP): Defined if
2266 HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS is defined.
2267 (compare_and_swap_with_release_semantics): New. Default to
2268 compare_and_swap if HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS
2271 * spinlock.c (__pthread_unlock): Call
2272 compare_and_swap_with_release_semantics () instead of
2273 compare_and_swap ().
2275 2000-06-19 Ulrich Drepper <drepper@redhat.com>
2277 * sysdeps/pthread/timer_create.c: Use _set_errno instead of assigning
2279 * sysdeps/pthread/timer_delete.c: Likewise.
2280 * sysdeps/pthread/timer_getoverr.c: Likewise.
2281 * sysdeps/pthread/timer_gettime.c: Likewise.
2282 * sysdeps/pthread/timer_settime.c: Likewise.
2284 2000-06-13 Kaz Kylheku <kaz@ashi.footprints.net>
2286 Timer nodes are now reference counted, and can be marked
2287 as deleted. This allows for the safe release of the global mutex
2288 in the middle without losing the timer being operated on.
2290 * sysdeps/pthread/posix-timer.h (struct timer_node): The inuse
2291 member is now an enum with three values, so that an intermediate
2292 state can be represented (deleted but not free for reuse yet).
2293 New refcount member added.
2294 * sysdeps/pthread/timer_routines.c: Likewise.
2296 * sysdeps/pthread/posix-timer.h (timer_addref, timer_delref,
2297 timer_valid): New inline functions added.
2299 * sysdeps/pthread/timer_gettime.c (timer_gettime): Function
2300 restructured, recursive deadlock bug fixed.
2302 * sysdeps/pthread/timer_gettime.c (timer_gettime): Uses new
2303 timer_addref to ensure that timer won't be deleted while mutex is not
2304 held. Also uses timer_invalid to perform validation of timer handle.
2305 * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
2306 * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Likewise.
2308 2000-06-14 Ulrich Drepper <drepper@redhat.com>
2310 * shlib-versions: Add entry for SH.
2311 Patch by Kaz Kojima <kkojima@rr.iij4u.or.jp>.
2313 2000-06-13 Kaz Kylheku <kaz@ashi.footprints.net>
2315 A few optimizations. Got rid of unnecessary wakeups of timer threads,
2316 tightened up some critical regions and micro-optimized some list
2319 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
2320 Returns int value now to indicate whether timer was queued at head.
2321 * sysdeps/pthread/posix-timer.h: Likewise.
2322 * sysdeps/pthread/timer_settime.c (timer_settime): Takes advantage of
2323 new return value from __timer_thread_queue_timer to avoid waking
2324 up timer thread unnecessarily.
2326 * sysdeps/pthread/posix-timer.h (timer_id2ptr): No longer checks
2327 inuse flag, because this requires mutex to be held. Callers updated
2328 to do the check when they have the mutex.
2329 * sysdeps/pthread/timer_getoverr.c: Add check for inuse here.
2331 * sysdeps/pthread/timer_settime.c (timer_settime): Tighter critical
2332 regions: avoids making system calls while holding timer mutex, and
2333 a few computations were moved outside of the mutex as well.
2334 * sysdeps/pthread/timer_gettime.c (timer_gettime): Likewise.
2336 * sysdeps/pthread/posix-timer.h (list_unlink_ip): Function name changed
2337 to list_unlink_ip, meaning idempotent. Pointer manipulation
2338 changed to get better better code out of gcc.
2339 * sysdeps/pthread/timer_routines.c (list_unlink): Non-idempotent
2340 version of list_unlink added here.
2341 * sysdeps/pthread/timer_delete.c: Use appropriate list unlink
2342 function in all places: idempotent one for timers, non-idempotent
2343 one for thread nodes.
2344 * sysdeps/pthread/timer_settime: Likewise.
2345 * sysdeps/pthread/timer_routines.c: Likewise.
2347 2000-06-13 Ulrich Drepper <drepper@redhat.com>
2349 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_TIMERS): Define.
2350 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2352 * sysdeps/pthread/Makefile: Remove tests definition.
2354 2000-06-12 Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
2355 Yutaka Niibe <gniibe@chroot.org>
2357 * sysdeps/sh/pspinlock.c: New file.
2358 * sysdeps/sh/pt-machine.h: New file.
2360 2000-06-12 Ulrich Drepper <drepper@redhat.com>
2362 * Makefile (tests): Add joinrace.
2364 * Examples/ex6.c: Test return value of pthread_join.
2366 2000-06-11 Geoff Keating <geoffk@cygnus.com>
2368 * sysdeps/powerpc/pspinlock.c (__pthread_spin_lock): Implement.
2369 (__pthread_spin_trylock): Implement.
2370 (__pthread_spin_unlock): Implement.
2371 (__pthread_spin_init): Implement.
2372 (__pthread_spin_destroy): Implement.
2374 2000-06-10 Ulrich Drepper <drepper@redhat.com>
2376 * sysdeps/pthread/timer_routines.c (list_append): Little fix to
2377 really append the entry.
2379 2000-06-10 Andreas Jaeger <aj@suse.de>
2381 * lockfile.c (__fresetlockfiles): Remove unused variable fp.
2383 2000-06-10 Kaz Kylheku <kaz@ashi.footprints.net>
2385 * sysdeps/pthread/timer_create.c: Thread matching now done on
2386 clock type as well as thread attributes.
2387 There are individual global signal-delivering threads for
2388 different clock types.
2389 * sysdeps/pthread/posix-timer.h: Likewise.
2390 * sysdeps/pthread/timer_routines.c: Likewise.
2392 * sysdeps/pthread/timer_routines.c: Thread allocation and
2393 deallocation function now remembers to put thread on active
2394 list and remove from active list.
2395 Thus now the feature of binding multiple timers
2396 to a single thread actually works.
2398 2000-06-10 Ulrich Drepper <drepper@redhat.com>
2400 * pthread.c (__pthread_create_2_1): Optimize a bit.
2402 * internals.h (invalid_handle): Also test for p_terminated != 0.
2403 (nonexisting_handle): New function. Same as old invalid_handle.
2404 * join.c (pthread_join): Use nonexisting_handle instead of
2405 invalid_handle to test for acceptable thread handle.
2406 * manager.c (pthread_handle_free): Likewise.
2407 * joinrace.c: New file.
2408 Reported by Permaine Cheung <pcheung@cygnus.com>.
2410 2000-06-08 Ulrich Drepper <drepper@redhat.com>
2412 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
2413 Correct handling of matching variable.
2415 * sysdeps/pthread/tst-timer.c (main): Rewrite initializers to
2418 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
2419 Be prepared for empty timer list.
2421 * sysdeps/pthread/timer_create.c (timer_create): Correct names of
2422 CPUTIME clock ID. Add support for thread clocks.
2424 * sysdeps/pthread/posix-timer.h (timer_ptr2id): Operands in
2425 subtraction were switched.
2427 * sysdeps/pthread/timer_routines.c (init_module): Use
2428 THREAD_MAXNODES threads.
2430 * sysdeps/pthread/posix-timer.h (struct timer_node): Add creator_pid.
2431 * sysdeps/pthread/timer_create.c: Fill in creator_pid.
2432 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Send signal
2433 with sigqueueinfo is this system call is available.
2435 * sysdeps/pthread/timer_create.c (timer_create): Allow
2436 CLOCK_CPUTIME if _POSIX_CPUTIME is defined.
2438 * sysdeps/pthread/Makefile: New file. Add rules to build timer
2440 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add TIMER_MAX.
2442 2000-06-04 Kaz Kylheku <kaz@ashi.footprints.net>
2444 * sysdeps/pthread/posix-timer.h: New file.
2445 * sysdeps/pthread/timer_create.c: New file.
2446 * sysdeps/pthread/timer_delete.c: New file.
2447 * sysdeps/pthread/timer_getoverr.c: New file.
2448 * sysdeps/pthread/timer_gettime.c: New file.
2449 * sysdeps/pthread/timer_routines.c: New file.
2450 * sysdeps/pthread/timer_settime.c: New file.
2451 * sysdeps/pthread/tst-timer.c: New file.
2453 2000-06-08 Ulrich Drepper <drepper@redhat.com>
2455 * sysdeps/unix/sysv/linux/bits/local_lim.h: Remove OPEN_MAX and
2456 LINK_MAX definitions if necessary.
2458 2000-06-04 Kaz Kylheku <kaz@ashi.footprints.net>
2460 Added missing fork time handling of global libio lock.
2462 * lockfile.c (__fresetlockfiles): Now also resets the list lock,
2463 not just the individual stream locks. Rewritten to use new
2464 iterator interface provided by libio rather than accessing
2467 * lockfile.c (__flockfilelist, _funlockfilelist): New functions
2468 which lock and unlock the stream list using the new interface
2470 * internals.h: Likewise.
2472 * ptfork.c (__fork): Now calls __flockfilelist before fork,
2473 and __funlockfilelist in the parent after the fork.
2474 Child still calls __fresetlockfiles as before.
2476 * linuxthreads.texi: Now explains what happens to streams at
2477 fork time. Also whole new section on forking and thread added.
2478 Definition of pthread_atfork moved out of Miscellaneous Functions
2479 to this new section.
2481 2000-06-04 Jakub Jelinek <jakub@redhat.com>
2483 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c (__pthread_spin_lock):
2484 Add missing register.
2485 * sysdeps/sparc/sparc64/pspinlock.c (__pthread_spin_lock): Likewise.
2487 2000-06-02 Jakub Jelinek <jakub@redhat.com>
2489 * sysdeps/sparc/sparc32/pspinlock.c: Implement spinlocks.
2490 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: New.
2491 * sysdeps/sparc/sparc64/pspinlock.c: Implement spinlocks.
2493 2000-05-31 Andreas Jaeger <aj@suse.de>
2495 * sysdeps/mips/pspinlock.c: Implement spinlocks.
2497 2000-05-28 Ulrich Drepper <drepper@redhat.com>
2499 * spinlock.c (__pthread_lock): Remove ASSERT.
2501 * Makefile (tests): Add ex8.
2502 * Examples/ex8.c: New file.
2504 2000-05-12 Kaz Kylheku <kaz@ashi.footprints.net>
2506 Bugfix: The pthread_atfork mechanism now takes care of its
2507 own internal mutex at fork time.
2509 * ptfork.c (__fork): Revised so that the mutex is held across
2510 the fork operation and while the handlers are called, and so that
2511 the child resets the mutex.
2513 * linuxthreads.texi: Updated pthread_atfork documentation to make
2514 it clear that fork and pthread_atfork can't be reentered from
2515 atfork handlers, that pthread_atfork and fork are mutually atomic,
2516 and that the handlers are inherited by the child process.
2518 2000-05-24 Ulrich Drepper <drepper@redhat.com>
2520 * Makefile (libpthread-routines): Add pspinlock.
2521 * cancel.c: Rename __pthread_spin_unlock back to __pthread_unlock.
2522 Use struct _pthread_fastlock instead of pthread_spinlock_t.
2523 * condvar.c: Likewise.
2524 * internals.h: Likewise.
2526 * manager.c: Likewise.
2527 * mutex.c: Likewise.
2528 * pthread.c: Likewise.
2529 * rwlock.c: Likewise.
2530 * semaphore.c: Likewise.
2531 * signals.c: Likewise.
2532 * spinlock.h: Likewise.
2533 * spinlock.c: Likewise. Remove pthread_spin_lock functions.
2534 * sysdeps/alpha/pspinlock.c: New file.
2535 * sysdeps/arm/pspinlock.c: New file.
2536 * sysdeps/i386/pspinlock.c: New file.
2537 * sysdeps/m68k/pspinlock.c: New file.
2538 * sysdeps/mips/pspinlock.c: New file.
2539 * sysdeps/powerpc/pspinlock.c: New file.
2540 * sysdeps/sparc/sparc32/pspinlock.c: New file.
2541 * sysdeps/sparc/sparc64/pspinlock.c: New file.
2542 * sysdeps/pthread/bits/pthreadtypes.h: Remove pthread_spinlock_t
2543 back to _pthread_fastlock. Define new pthread_spinlock_t.
2545 2000-05-24 Andreas Jaeger <aj@suse.de>
2547 * sysdeps/i386/i686/pt-machine.h: Only use LDT on newer kernels.
2549 2000-05-21 Jakub Jelinek <jakub@redhat.com>
2551 * manager.c (pthread_handle_create): Initialize p_res._sock to -1.
2553 2000-05-13 Jakub Jelinek <jakub@redhat.com>
2555 * internals.h (__RES_PTHREAD_INTERNAL): Define.
2557 2000-05-06 Kaz Kylheku <kaz@ashi.footprints.net>
2559 * mutex.c (pthread_once): IN_PROGRESS state of pthread_once_t
2560 object state is represented with additional bits which distinguish
2561 whether that state was set up in the current process, or
2562 in an ancestor process. If that state was set in an ancestor,
2563 it means that a fork happened while thread was executing the init
2564 function. In that case, the state is reset to NEVER.
2565 * mutex.c (__pthread_once_fork_prepare): New function.
2566 (__pthread_once_fork_child): Likewise
2567 (__pthread_once_fork_parent): Likewise
2568 (__pthread_reset_pthread_once): Removed.
2569 * ptfork.c (__fork): Call new handlers in mutex.c.
2570 * internals.h: Declarations of new mutex.c functions added.
2571 Declaration of removed function deleted.
2572 * linuxthreads.texi: Updated documentation about pthread_once
2573 to clarify what happens under cancellation and forking.
2575 2000-05-06 Kaz Kylheku <kaz@ashi.footprints.net>
2577 * internals.h: New thread manager request type, REQ_KICK.
2578 * join.c (pthread_exit): main thread now calls exit() instead
2579 of _exit() in order to proper process cleanup.
2580 * manager.c (__pthread_manager): Do not terminate manager
2581 after unblocking main thread; wait for main thread's
2582 REQ_PROCESS_EXIT request instead.
2583 Also, added REQ_KICK case to handle new request; this just does
2585 * manager.c (pthread_exited): Do not terminate manager after
2586 unblocking main thread.
2587 * manager.c (__pthread_manager_sighandler): If the main thread
2588 is waiting for all other threads to die, send a REQ_KICK into
2589 the thread manager request pipe to get it to clean out the threads
2590 and unblock the main thread as soon as possible. This fixes
2591 the 2000 millisecond hang on shutdown bug.
2592 * Examples/ex7.c: New file, tests shutdown behavior when all threads
2593 including the main one call pthread_exit(), or implicitly do so.
2594 * Makefile (tests): Add ex7.
2596 2000-05-05 Andreas Jaeger <aj@suse.de>
2598 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
2599 (pthread_getcpuclockid): Correct test for ourselves.
2601 2000-05-05 Ulrich Drepper <drepper@redhat.com>
2603 * internals.h (struct _pthread_descr_struct): Reorganization.
2604 Allocate room for 16 pointers at head of the structure for future
2605 thread-local data handling. Move p_self member in this area.
2606 * manager.c (pthread_handle_create): Adjust use of p_self.
2607 * sysdeps/i386/useldt.h (THREAD_SELF): Likewise.
2608 * pthread.c (__pthread_initial_thread): Adjust initialization.
2609 (__pthread_manager_thread): Likewise.
2611 2000-04-29 Bruno Haible <haible@clisp.cons.org>
2613 * join.c (pthread_exit): Use THREAD_GETMEM_NC instead of THREAD_GETMEM
2614 for eventmask larger than 1 word.
2616 2000-04-27 Ulrich Drepper <drepper@redhat.com>
2618 * Versions [libpthread] (GLIBC_2.2): Add __pthread_initialize_minimal.
2619 * pthread.c (__pthread_initialize_minimal): New function. Perform
2620 minimal initialization.
2621 (pthread_initialize): Remove this code here.
2622 * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h" again. We
2623 are working around the problem in glibc.
2625 2000-04-25 Ulrich Drepper <drepper@redhat.com>
2627 * sysdeps/i386/i686/pt-machine.h: Do not use "../useldt.h" for
2628 now. First gcc must be fixed (more concrete: libgcc).
2630 2000-04-24 Ulrich Drepper <drepper@redhat.com>
2632 * pthread.c: Remove special treatement for interrupt handlers on x86.
2633 * manager.c (pthread_free): Use FREE_THREAD not FREE_THREAD_SELF.
2634 * sysdeps/i386/useldt.h: Use "q" constraint instead of "r" where
2636 * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h".
2638 2000-04-24 Mark Kettenis <kettenis@gnu.org>
2640 * join.c (pthread_exit): Set p_terminated after reporting the
2641 termination event instead of before.
2643 2000-04-20 Jakub Jelinek <jakub@redhat.com>
2645 * sysdeps/pthread/bits/libc-lock.h: Only declare __pthread_rwlock_*
2648 2000-04-18 Andreas Jaeger <aj@suse.de>
2650 * Versions: Use ld instead of ld.so.
2652 2000-04-18 Jakub Jelinek <jakub@redhat.com>
2654 * sysdeps/unix/sysv/linux/sparc/bits/sigcontext.h (struct sigcontext):
2655 Remove the typedef keyword.
2657 2000-04-18 Jakub Jelinek <jakub@redhat.com>
2659 * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Use membar,
2661 (READ_MEMORY_BARRIER): Define.
2662 * spinlock.c (__pthread_spin_unlock): Use READ_MEMORY_BARRIER, not
2664 * internals.h (READ_MEMORY_BARRIER): Define if not defined in sysdep
2667 2000-04-17 Ulrich Drepper <drepper@redhat.com>
2669 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
2670 (pthread_getcpuclockid): Don't compare thread_id with thread_self,
2671 use thread_handle().
2673 2000-04-16 Ulrich Drepper <drepper@redhat.com>
2675 * condvar.c (pthread_cond_timedwait_relative): Don't test for owner
2676 if fast mutex is used. Don't initialize `already_canceled' twice.
2677 Correctly test for return value of timedsuspend.
2679 * pthread.c: Correct long-time braino. We never set SA_SIGINFO and
2680 therefore don't need the _rt versions of the signal handlers.
2682 2000-04-15 Ulrich Drepper <drepper@redhat.com>
2684 * pthread.c (pthread_yield): New function.
2685 * sysdeps/pthread/pthread.h (pthread_yield): Add prototype.
2686 * Versions [libpthread] (GLIBC_2.2): Add pthread_yield.
2687 * internals.h: Declare __pthread_yield.
2689 * pthread.c (pthread_initialize): Avoid a bit more code if
2690 realtime signals are known to exist.
2692 * pthread.c: Is __ASSUME_REALTIME_SIGNALS then avoid generating code
2693 to dynamically detect RT signals and avoid generating compatibility
2694 functions with old kernel.
2695 * restart.h (restart) [__ASSUME_REALTIME_SIGNALS]: Use
2696 __pthread_restart_new directly.
2697 (suspend) [__ASSUME_REALTIME_SIGNALS]: Use
2698 __pthread_wait_for_restart_signal directly.
2699 (timedsuspend) [__ASSUME_REALTIME_SIGNALS]: Use
2700 __pthread_timedsuspend_new directly.
2702 2000-04-15 Ulrich Drepper <drepper@redhat.com>
2704 * condvar.c: Remove all the special code to handle cond_timedwait.
2705 Use timedsuspend instead.
2706 * internals.h: Declare __pthread_timedsuspend_old,
2707 __pthread_timedsuspend_new, and __pthread_timedsuspend.
2708 Remove declaration of __pthread_init_condvar.
2709 * pthread.c: Define __pthread_timedsuspend variable.
2710 (__pthread_timedsuspend_old): New function. Timed suspension
2711 implementation for old Linux kernels.
2712 (__pthread_timedsuspend_new): New function. Timed suspension
2713 implementation for new Linux kernels.
2714 * restart.h (timedsuspend): New function. Call appropriate
2715 suspension function through __pthread_timedsuspend.
2716 * semaphore.c (sem_timedwait): Use timedsuspend, don't duplicate
2718 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2720 * internals.h (WRITE_MEMORY_BARRIER): Define as MEMORY_BARRIER if
2722 * spinlock.c: Use WRITE_MEMORY_BARRIER instead of MEMORY_BARRIER
2724 * sysdeps/alpha/pt-machine.h: Define WRITE_MEMORY_BARRIER.
2725 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2727 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _POSIX_SPAWN.
2728 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2730 2000-04-14 Andreas Jaeger <aj@suse.de>
2732 * weaks.c: Fix typo.
2734 * shlib-versions (mips.*-.*-linux.*): Support only GLIBC 2.0 and
2735 2.2 for linuxthreads.
2737 2000-04-13 Ulrich Drepper <drepper@redhat.com>
2739 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
2740 (pthread_getcpuclockid): Fix typo.
2742 2000-04-12 Ulrich Drepper <drepper@redhat.com>
2744 * Makefile (libpthread-routines): Add getcpuclockid.
2745 * Versions [libpthread] (GLIBC_2.2): Add pthread_getcpuclockid.
2746 * sysdeps/pthread/getcpuclockid.c: New file.
2747 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: New file.
2748 * sysdeps/pthread/pthread.h: Add prototype for pthread_getcpuclockid.
2750 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_SPIN_LOCKS):
2752 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2754 * sysdeps/pthread/pthread.h: Add prototypes for pthread_spin_init,
2755 pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
2756 and pthread_spin_unlock.
2757 * sysdeps/pthread/bits/pthreadtypes.h: Change struct _pthread_fastlock
2758 into pthread_spinlock_t. Change all uses.
2759 * spinlock.c: Implement pthread_spin_lock.
2760 Rename __pthread_unlock to __pthread_spin_unlock and define weak
2761 alias for real name.
2762 Define pthread_spin_trylock, pthread_spin_init, and
2763 pthread_spin_destroy.
2764 Change all uses of _pthread_fastlock to pthread_spinlock_t.
2765 * spinlock.h: Rename __pthread_unlock to __pthread_spin_unlock.
2766 Change all uses of _pthread_fastlock to pthread_spinlock_t.
2767 * Versions [libpthread] (GLIBC_2.2): Add pthread_spin_init,
2768 pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
2769 and pthread_spin_unlock.
2770 * cancel.c: Use __pthread_spin_unlock instead of __pthread_unlock.
2771 Change all uses of _pthread_fastlock to pthread_spinlock_t.
2772 * condvar.c: Likewise.
2773 * internals.h: Likewise.
2775 * manager.c: Likewise.
2776 * mutex.c: Likewise.
2777 * pthread.c: Likewise.
2778 * rwlock.c: Likewise.
2779 * semaphore.c: Likewise.
2780 * signals.c: Likewise.
2782 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add various new POSIX
2784 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
2786 2000-04-11 Ulrich Drepper <drepper@redhat.com>
2788 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add
2789 _POSIX_SHARED_MEMORY_OBJECTS.
2791 2000-04-11 Andreas Jaeger <aj@suse.de>
2793 * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Define.
2794 (__compare_and_swap): Mark as modifying memory.
2796 2000-04-11 Geoff Keating <geoffk@cygnus.com>
2798 * sysdeps/powerpc/pt-machine.h (MEMORY_BARRIER): Don't be
2800 (__compare_and_swap): Replace other 'sync' with MEMORY_BARRIER.
2801 Don't have the 'asm' __volatile__.
2803 2000-04-11 Ulrich Drepper <drepper@redhat.com>
2805 * internals.h: Define MEMORY_BARRIER as empty if not defined already.
2806 * spinlock.c (__pthread_lock): Add memory barriers.
2807 (__pthread_unlock): Likewise.
2808 * sysdeps/alpha/pt-machine.h (MEMORY_BARRIER): Define using mb
2810 (RELEASE): Not needed anymore.
2811 (__compare_and_swap): Mark asm as modifying memory.
2812 * sysdeps/powerpc/pt-machine.h (sync): Remove. Replace with definition
2814 (__compare_and_swap): Use MEMORY_BARRIER instead of sync.
2815 * sysdeps/sparc/sparc32/pt-machine.h (RELEASE): Not needed anymore.
2816 (MEMORY_BARRIER): Define using stbar.
2817 * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Define using
2819 (__compare_and_swap): Use MEMORY_BARRIER to ensure ordering.
2820 Patch by Xavier Leroy <Xavier.Leroy@inria.fr> based on comments by
2821 Mike Burrows <m3b@pa.dec.com>.
2823 2000-04-09 Ulrich Drepper <drepper@redhat.com>
2825 * signals.c (sigaction): Fix return value for the case SIG is one
2826 of the signals the implementation uses.
2827 Patch by Xavier.Leroy@inria.fr.
2829 2000-04-01 Andreas Jaeger <aj@suse.de>
2831 * attr.c: Use shlib-compat macros.
2832 * oldsemaphore.c: Likewise.
2833 * pthread.c: Likewise.
2834 * weaks.c: Likewise.
2836 2000-03-26 Ulrich Drepper <drepper@redhat.com>
2838 * semaphore.c (sem_timedwait): New function.
2839 Patch by Carl Mailloux <carlm@oricom.ca>.
2840 * semaphore.h: Declare sem_timedwait.
2841 * Versions [libpthread] (GLIBC_2.2): Add sem_timedwait.
2843 2000-03-26 Roland McGrath <roland@baalperazim.frob.com>
2845 * sysdeps/pthread/Makefile: File removed.
2847 2000-03-23 Ulrich Drepper <drepper@redhat.com>
2849 * mutex.c (__pthread_reset_pthread_once): Reset once_masterlock.
2850 * internals.h (__pthread_reset_pthread_once): Add prototype.
2851 * ptfork.c (__fork): Call __pthread_reset_pthread_once.
2853 * manager.c (pthread_handle_create): Store ID of new thread before
2856 2000-03-21 Ulrich Drepper <drepper@redhat.com>
2858 * attr.c: Use new macros from shlib-compat.h to define versions.
2859 * oldsemaphore.c: Likewise.
2860 * semaphore.c: Likewise.
2861 * weaks.c: Likewise.
2863 * pthread.c: Update for new SHLIB_COMPAT definition.
2865 * manager.c (__pthread_manager): Unmask debug signal.
2867 * pthread.c (pthread_initialize): Test for address of __dso_handle
2868 being NULL, not value. Use __on_exit, not on_exit.
2869 Patch by Andreas Jaeger <aj@suse.de>.
2871 * pthread.c: Use new macros from shlib-compat.h to define versions.
2873 2000-03-19 Ulrich Drepper <drepper@redhat.com>
2875 * pthread.c (pthread_initialize): Instead of on_exit use
2876 __cxa_atexit if __dso_label is available to allow unloading the
2877 libpthread shared library.
2879 2000-03-16 Ulrich Drepper <drepper@redhat.com>
2881 * condvar.c: Make tests for ownership of mutex less strict.
2883 2000-03-14 Ulrich Drepper <drepper@redhat.com>
2885 * condvar.c (pthread_cond_wait): Check whether mutex is owned by
2886 current thread and return error if not.
2887 (pthread_cond_timedwait_relative_old): Likewise.
2888 (pthread_cond_timedwait_relative_new): Likewise.
2890 * mutex.c (__pthread_once): Handle cancelled init function correctly.
2891 (pthread_once_cancelhandler): New function.
2892 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2894 2000-03-14 Andreas Jaeger <aj@suse.de>
2896 * pthread.c (pthread_handle_sigcancel_rt): GS has been renamed to
2898 (pthread_handle_sigrestart_rt): Likewise.
2899 * signals.c (pthread_sighandler_rt): Likewise.
2901 2000-03-02 Andreas Jaeger <aj@suse.de>
2903 * sysdeps/pthread/bits/libc-lock.h: Fix typo.
2904 Reported by Sean Chen <sean.chen@turbolinux.com>.
2906 2000-02-28 Andreas Jaeger <aj@suse.de>
2908 * rwlock.c: Fix typo.
2910 2000-02-27 Ulrich Drepper <drepper@redhat.com>
2912 * rwlock.c: Define __* variants of the functions and make old names
2914 * Versions [GLIBC_2.2]: Export the __pthread_rwlock_* functions.
2915 * sysdeps/pthread/bits/libc-lock.h: Define __libc_rwlock_* macros.
2917 2000-02-25 Andreas Jaeger <aj@suse.de>
2919 * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
2920 pwrite64, lseek64, open64, and __open64 with version 2.2.
2922 2000-02-22 Ulrich Drepper <drepper@redhat.com>
2924 * semaphore.h (SEM_FAILED): Use 0 not NULL.
2926 2000-02-14 Ulrich Drepper <drepper@redhat.com>
2928 * condvar.c (pthread_cond_timedwait_relative_old): Tight loop with
2929 nanosleep does not work either. Get absolute time inside the
2931 (pthread_cond_timedwait_relative_new): Likewise.
2932 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2934 2000-02-13 Andreas Jaeger <aj@suse.de>
2936 * condvar.c (pthread_cond_timedwait_relative_new): Fix last patch.
2937 (pthread_cond_timedwait_relative_old): Likewise.
2939 2000-02-13 Ulrich Drepper <drepper@redhat.com>
2941 * condvar.c (pthread_cond_timedwait_relative_old): Undo last patch
2942 but keep the code around. A bug in the kernel prevent us from
2944 (pthread_cond_timedwait_relative_new): Likewise.
2945 (PR libc/1597 and libc/1598).
2947 2000-02-01 Kaz Kylheku <kaz@ashi.footprints.net>
2949 * condvar.c (pthread_cond_timedwait_relative_old): Do tight
2950 loop around nanosleep calls instead of around most of the function
2951 (pthread_cond_timedwait_relative_new): Likewise.
2952 body. Got rid of backwards goto and one local.
2954 2000-01-31 Ulrich Drepper <drepper@redhat.com>
2956 * condvar.c (pthread_cond_timedwait_relative_old): Recompute time
2957 before every nanosleep call to account for time spent in the rest
2959 (pthread_cond_timedwait_relative_new): Likewise.
2960 Patch by khendricks@ivey.uwo.ca (PR libc/1564).
2962 2000-01-29 Ulrich Drepper <drepper@redhat.com>
2964 * condvar.c (pthread_cond_timedwait_relative_old): Get remaining time
2965 from nanosleep call so that in case we restart we only wait for the
2967 (pthread_cond_timedwait_relative_new): Likewise.
2968 Patch by khendricks@ivey.uwo.ca (PR libc/1561).
2970 2000-01-18 Ulrich Drepper <drepper@cygnus.com>
2972 * manager.c (pthread_allocate_stack): Compute guard page address
2973 correctly. Patch by HJ Lu.
2975 * sysdeps/pthread/pthread.h: Define
2976 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP.
2978 2000-01-16 Ulrich Drepper <drepper@cygnus.com>
2980 * rwlock.c (pthread_rwlock_unlock): Correct one more problem with
2981 preference handling.
2982 (pthread_rwlockattr_setkind_np): Allow
2983 PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP.
2984 Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
2986 2000-01-12 Ulrich Drepper <drepper@cygnus.com>
2988 * internals.h (pthread_readlock_info): New structure.
2989 (_pthread_descr_struct): Add p_readlock_list, p_readlock_free, and
2990 p_untracked_readlock_count.
2991 * pthread.c (__pthread_initial_thread, pthread_manager_thread):
2992 Add initializers for new fields.
2993 * manager.c (pthread_free): Free read/write lock lists.
2994 * queue.h (queue_is_empty): New function.
2995 * rwlock.c: Implement requirements about when readers should get
2997 * sysdeps/pthread/pthread.h
2998 (PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP): New definition.
2999 * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_rwlock_t):
3000 Define this name as well.
3001 Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
3003 2000-01-05 Ulrich Drepper <drepper@cygnus.com>
3005 * pthread.c (__pthread_initial_thread, pthread_manager_thread):
3006 Adjust initializers for struct _pthread_descr_struct change.
3007 * internals.h (struct _pthread_descr_struct): Move new elements to
3010 2000-01-03 Kaz Kylheku <kaz@ashi.footprints.net>
3012 Redesigned how cancellation unblocks a thread from internal
3013 cancellation points (sem_wait, pthread_join,
3014 pthread_cond_{wait,timedwait}).
3015 Cancellation won't eat a signal in any of these functions
3016 (*required* by POSIX and Single Unix Spec!).
3017 * condvar.c: Spontaneous wakeup on pthread_cond_timedwait won't eat a
3018 simultaneous condition variable signal (not required by POSIX
3019 or Single Unix Spec, but nice).
3020 * spinlock.c: __pthread_lock queues back any received restarts
3021 that don't belong to it instead of assuming ownership of lock
3022 upon any restart; fastlock can no longer be acquired by two threads
3024 * restart.h: Restarts queue even on kernels that don't have
3025 queued real time signals (2.0, early 2.1), thanks to atomic counter,
3026 avoiding a rare race condition in pthread_cond_timedwait.
3028 1999-12-31 Andreas Jaeger <aj@suse.de>
3030 * internals.h: Remove duplicate prototype declarations.
3032 * weaks.c: Remove __THROW from prototypes since the file is not
3033 compiled by a C++ compiler.
3034 * internals.h: Likewise.
3036 1999-12-30 Andreas Jaeger <aj@suse.de>
3038 * sysdeps/pthread/pthread.h: Move internal functions to...
3039 * sysdeps/pthread/bits/libc-lock.h: ...here.
3041 1999-12-29 Andreas Jaeger <aj@suse.de>
3043 * sysdeps/pthread/pthread.h: Fix typos, reformat comments.
3045 1999-12-28 Ulrich Drepper <drepper@cygnus.com>
3047 * sysdeps/alpha/pt-machine.h: Move stack_pointer definition to the
3050 * manager.c (__pthread_start): Add one more cast to prevent
3051 warning on 64bit machines.
3053 1999-12-21 Ulrich Drepper <drepper@cygnus.com>
3055 * manager.c (pthread_handle_create): Set p_pid of new thread
3056 before calling the callback function to report a new thread.
3058 1999-12-20 Andreas Jaeger <aj@suse.de>
3060 * pthread.c (pthread_initialize): Move getrlimit call after
3063 1999-12-18 Ulrich Drepper <drepper@cygnus.com>
3065 * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
3066 pwrite64, lseek64, open64, and __open64.
3067 * wrapsyscall.c: Define pread, __pread64, pread64, pwrite, __pwrite64,
3068 pwrite64, lseek64, open64, and __open64.
3070 * manager.c (pthread_allocate_stack): Correct computation of
3071 new_thread_bottom. Correct handling of stack size and when the
3072 rlimit method to guard for stack growth is used.
3073 * pthread.c (pthread_initialize): Stack limit must be STACK_SIZE
3074 minus one pagesize (not two).
3076 1999-12-03 Andreas Jaeger <aj@suse.de>
3078 * Versions: Add __res_state with version GLIBC_2.2.
3080 * errno.c (__res_state): New function to return thread specific
3083 * pthread.c (pthread_initialize): Initialize p_resp.
3084 (__pthread_reset_main_thread): Also set p_resp.
3086 * manager.c (pthread_handle_create): Initialize p_resp.
3088 * internals.h: Add thread specific resolver state.
3089 Based on patches by Adam D. Bradley <artdodge@cs.bu.edu>.
3091 1999-12-01 Ulrich Drepper <drepper@cygnus.com>
3093 * sysdeps/i386/pt-machine.h: Move stack_pointer definition to the
3095 * sysdeps/i386/i686/pt-machine.h: Likewise.
3096 Patches by Alan Modra <alan@SPRI.Levels.UniSA.Edu.Au>.
3098 1999-11-23 Ulrich Drepper <drepper@cygnus.com>
3100 * manager.c (pthread_start_thread_event): Initialize p_pid already
3103 1999-11-22 Ulrich Drepper <drepper@cygnus.com>
3105 * internals.h: Add prototype for __pthread_manager_event.
3106 * manager.c (__pthread_manager_event): New function.
3107 (pthread_start_thread_event): Correct computation of self.
3108 Use INIT_THREAD_SELF.
3109 * pthread.c (__pthread_manager_thread): Initialize p_lock.
3110 (__pthread_initialize_manager): Respect event flags also for creation
3111 of the manager thread.
3113 1999-11-08 Ulrich Drepper <drepper@cygnus.com>
3115 * pthread.c (__pthread_initialize_manager): Initialize
3116 __pthread_manager_thread.p_tid.
3118 1999-11-02 Ulrich Drepper <drepper@cygnus.com>
3120 * internals.h: Declare __pthread_last_event.
3121 * manager.c: Define __pthread_last_event.
3122 (pthread_handle_create): Set __pthread_last_event.
3123 (pthread_exited): Likewise.
3124 * join.c (pthread_exit): Likewise.
3126 * Makefile (libpthread-routines): Add events.
3127 * events.c: New file.
3128 * internals.h: Protect against multiple inclusion.
3129 Include thread_dbP.h header.
3130 (struct _pthread_descr_struct): Add new fields p_report_events and
3132 Declare event reporting functions.
3133 * join.c (pthread_exit): Signal event if this is wanted.
3134 * manager.c (__pthread_threads_events): New variable.
3135 (pthread_handle_create): Take new parameters with event information.
3136 Signal TD_CREATE event if wanted.
3137 (__pthread_manager): Adjust pthread_handle_create call.
3138 (pthread_start_thread_event): New function. Block until manager is
3139 finished and then call pthread_start_thread.
3140 (pthread_exited): Signal TD_REAP event if wanted.
3142 1999-10-26 Ulrich Drepper <drepper@cygnus.com>
3144 * restart.h (suspend_with_cancellation): Rewrite as a macro.
3146 * condvar.c (pthread_cond_timedwait_relative): Don't mark as inline.
3148 1999-10-25 Andreas Jaeger <aj@suse.de>
3150 * internals.h: Remove K&R compatibility.
3151 * no-tsd.c: Likewise.
3152 * semaphore.h: Likewise.
3153 * signals.c: Likewise.
3154 * sysdeps/pthread/bits/libc-tsd.h: Likewise.
3155 * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
3156 * weaks.c: Likewise.
3158 1999-10-21 Xavier Leroy <Xavier.Leroy@inria.fr>
3160 * pthread.c: For i386, wrap pthread_handle_sigrestart and
3161 pthread_handle_sigcancel with functions that restore %gs from the
3162 signal context. For each signal handling function, two wrappers
3163 are required, one for a non-RT signal and one for a RT signal.
3164 * signal.c: For i386, add code to restore %gs from the signal
3165 context in pthread_sighandler and pthread_sighandler_rt.
3167 1999-10-17 Ulrich Drepper <drepper@cygnus.com>
3169 * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add cast.
3171 1999-10-14 Ulrich Drepper <drepper@cygnus.com>
3173 * pthread.c (__pthread_initial_thread): Pass argument to
3174 PTHREAD_START_ARGS_INITIALIZER.
3175 (__pthread_manager_thread): Likewise.
3177 * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add parameter to
3178 initialize function.
3180 * manager.c (pthread_handle_create): Remove p_startfct initialization.
3182 * internals.h (_pthread_descr_struct): We don't need p_startfct field.
3184 1999-10-12 Ulrich Drepper <drepper@cygnus.com>
3186 * internals.h: Correct return types for __libc_read and __libc_write.
3188 1999-10-09 Andreas Jaeger <aj@suse.de>
3190 * internals.h: Add __new_sem_post to get prototype in
3191 manager.c; include semaphore.h for needed types.
3193 1999-10-08 Ulrich Drepper <drepper@cygnus.com>
3195 * manager.c (__pthread_manager) [REQ_POST]: Use __new_sem_post
3196 directly instead of calling sem_post which should not be necessary
3197 but is faster and might help in some case to work around problems.
3198 Patch by khendricks@ivey.uwo.ca [libc/1382].
3200 1999-10-08 Andreas Schwab <schwab@suse.de>
3202 * sysdeps/pthread/Subdirs: New file.
3205 1999-10-07 Ulrich Drepper <drepper@cygnus.com>
3207 * Implies: New file.
3208 * internals.h (struct _pthread_descr_struct): Add p_startfct.
3209 * manager.c (pthread_handle_create): Initialize p_startfct.
3210 * pthread.c: Define __linuxthread_pthread_sizeof_descr variable.
3212 1999-09-25 Ulrich Drepper <drepper@cygnus.com>
3214 * manager.c (__linuxthreads_pthread_threads_max): New variable.
3215 * specific.c (__linuxthreads_pthread_keys_max): New variable.
3216 (__linuxthreads_pthread_key_2ndlevel_size): New variable.
3218 * condvar.c (pthread_cond_timedwait_relative): Never return with
3219 EINTR. Patch by Andreas Schwab.
3221 1999-09-19 Ulrich Drepper <drepper@cygnus.com>
3223 * signals.c (sigaction): Correct last patch. Don't select
3224 pthread_sighandler_rt based on the signal number but instead of
3225 the SA_SIGINFO flag.
3227 1999-09-23 Ulrich Drepper <drepper@cygnus.com>
3229 * specific.c: Move definitions of struct pthread_key_struct and
3230 destr_function to ...
3231 * internals.h: ...here.
3233 1999-09-18 Ulrich Drepper <drepper@cygnus.com>
3235 * pthread.c (pthread_handle_sigrestart_rt): New function. Use
3236 this instead of pthread_handle_sigrestart if the signal is an RT
3239 * signals.c: Handle passing through of sighandler arguments also
3240 for real-time signals.
3242 1999-09-03 Andreas Schwab <schwab@suse.de>
3244 * ptfork.c (__fork): Renamed from fork and use __libc_fork. Add
3246 (__vfork): New function, alias vfork.
3247 * Versions: Export __fork, vfork, and __vfork in libpthread.
3249 1999-08-23 Andreas Schwab <schwab@suse.de>
3251 * signals.c (pthread_sighandler): Add SIGCONTEXT_EXTRA_ARGS to
3252 call to signal handler.
3254 1999-08-20 Ulrich Drepper <drepper@cygnus.com>
3256 * pthread.c (__pthread_reset_main_thread): Undo last change.
3257 (__pthread_kill_other_threads_np): Reset signal handlers for the
3258 signals we used in the thread implementation here.
3260 1999-08-19 Ulrich Drepper <drepper@cygnus.com>
3262 * pthread.c (__pthread_reset_main_thread): Reset signal handlers
3263 for the signals we used in the thread implementation [PR libc/1234].
3265 * Versions: Export __pthread_kill_other_threads_np from libpthread
3268 * signals.c: Pass sigcontext through wrapper to the user function.
3270 1999-08-01 Ulrich Drepper <drepper@cygnus.com>
3272 * Versions [ld.so] (GLIBC_2.0): Export __libc_internal_tsd_get and
3273 __libc_internal_tsd_set.
3275 1999-07-29 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3277 * manager.c: Remove inclusion of <linux/tasks.h> since it's not
3280 1999-07-16 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3282 * internals.h: Align _pthread_descr_struct to 32 bytes.
3283 Reported by Tim Hockin <thockin@cobaltnet.com>, close PR
3286 1999-07-09 Ulrich Drepper <drepper@cygnus.com>
3288 * oldsemaphore.c (sem_compare_and_swap): Fix use of compare and
3291 1999-07-09 Cristian Gafton <gafton@redhat.com>
3293 * Makefile (libpthread-routines): Add oldsemaphore routine.
3294 * Versions: Add sem_destroy, sem_getvalue, sem_init, sem_post,
3295 sem_trywait, and sem_wait to GLIBC_2.1.
3296 * oldsemaphore.c: New file.
3297 * semaphore.c: Add default_symbol_versions for the changed functions.
3298 (__new_sem_init): Rename from sem_init.
3299 (__new_sem_post): Rename from sem_post.
3300 (__new_sem_wait): Rename from sem_wait.
3301 (__new_sem_trywait): Rename from sem_trywait.
3302 (__new_sem_getvalue): Rename from sem_getvalue.
3303 (__new_sem_destroy): Rename from sem_destroy.
3305 1999-06-23 Robey Pointer <robey@netscape.com>
3307 * internals.h: Added p_nextlock entry to separate queueing for a
3308 lock from queueing for a CV (sometimes a thread queues on a lock
3309 to serialize removing itself from a CV queue).
3310 * pthread.c: Added p_nextlock to initializers.
3311 * spinlock.c: Changed to use p_nextlock instead of p_nextwaiting.
3313 1999-07-09 Ulrich Drepper <drepper@cygnus.com>
3315 * manager.c (pthread_handle_create): Free mmap region after stack
3316 if clone failed. Patch by Kaz Kylheku <kaz@ashi.FootPrints.net>.
3318 1999-05-23 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3320 * man/pthread_cond_init.man: Correct example.
3321 Reported by Tomas Berndtsson <tomas@nocrew.org>.
3323 * linuxthreads.texi (Condition Variables): Likewise.
3325 1999-05-18 Jakub Jelinek <jj@ultra.linux.cz>
3327 * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): Use
3328 casx not cas, also successful casx returns the old value in rd
3329 and not the new value.
3331 1999-05-16 Xavier Leroy <Xavier.Leroy@inria.fr>
3333 * manager.c: If pthread_create() is given a NULL attribute
3334 and the thread manager runs with a realtime policy, set the
3335 scheduling policy of the newly created thread back to SCHED_OTHER.
3336 * manager.c: If the PTHREAD_INHERIT_SCHED attribute is given,
3337 initialize the schedpolicy field of new_thread->p_start_args
3338 to that of the calling thread.
3340 1999-04-29 Ulrich Drepper <drepper@cygnus.com>
3342 * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): cas
3343 instruction does not allow memory element to use offset.
3345 1999-04-28 Ulrich Drepper <drepper@cygnus.com>
3347 * manager.c (pthread_allocate_stack): Optimize initialization of new
3350 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_define_initialized):
3351 Don't use initializer since it is all zeroes.
3352 (__libc_once_define): Likewise.
3354 1999-04-16 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3356 * sysdeps/arm/Implies: Removed since cmpxchg/no-cmpxchg
3357 doesn't exist anymore.
3358 * sysdeps/i386/Implies: Likewise.
3359 * sysdeps/m68k/Implies: Likewise.
3360 * sysdeps/mips/Implies: Likewise.
3361 * sysdeps/powerpc/Implies: Likewise.
3362 * sysdeps/sparc/sparc32/Implies: Likewise.
3363 * sysdeps/sparc/sparc64/Implies: Likewise.
3365 1999-04-15 Ulrich Drepper <drepper@cygnus.com>
3367 * sysdeps/alpha/bits/semaphore.h: Removed.
3368 * sysdeps/powerpc/bits/semaphore.h: Removed.
3369 * sysdeps/pthread/cmpxchg/bits/semaphore.h: Removed.
3370 * sysdeps/pthread/no-cmpxchg/bits/semaphore.h: Removed.
3371 * Makefile (headers): Remove bits/semaphore.h.
3373 * semaphore.h: Define _pthread_descr if necessary.
3374 Don't include limits.h. Define SEM_VALUE_MAX directly.
3376 (sem_t): Protect element names with leading __.
3377 Add declarations for sem_close, sem_open, and sem_unlink.
3378 * semaphore.c: Adjust all functions for new element names.
3379 Define sem_close, sem_open, and sem_unlink.
3380 * Versions (libthread): Add sem_close, sem_open, and sem_unlink for
3382 * sysdeps/pthread/bits/pthreadtypes.h: Define _pthread_descr only if
3385 1999-03-16 H.J. Lu <hjl@gnu.org>
3387 * specific.c (pthread_key_delete): Check th->p_terminated to see
3388 if the thread is running.
3390 * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set):
3391 Added to GLIBC_2.0 for libc.so.
3393 1999-02-12 H.J. Lu <hjl@gnu.org>
3395 * Versions (__libc_current_sigrtmin, __libc_current_sigrtmax,
3396 __libc_allocate_rtsig): Added to GLIBC_2.1.
3398 * internals.h (DEFAULT_SIG_RESTART): Removed.
3399 (DEFAULT_SIG_CANCEL): Removed.
3401 * pthread.c (init_rtsigs, __libc_current_sigrtmin,
3402 __libc_current_sigrtmax, __libc_allocate_rtsig): New functions.
3403 (__pthread_sig_restart, __pthread_sig_cancel,
3404 __pthread_sig_debug): Initialized.
3405 (pthread_initialize): Call init_rtsigs () to initialize
3408 1999-02-03 H.J. Lu <hjl@gnu.org>
3410 * manager.c (__pthread_manager): Do block __pthread_sig_debug.
3411 Don't restart the thread which sent REQ_DEBUG.
3412 (pthread_start_thread): Check if __pthread_sig_debug > 0
3415 * pthread.c (__pthread_initialize_manager): Suspend ourself
3416 after sending __pthread_sig_debug to gdb instead of
3417 __pthread_sig_cancel.
3419 1999-01-24 H.J. Lu <hjl@gnu.org>
3421 * manager.c (__pthread_manager): Delete __pthread_sig_debug
3422 from mask if __pthread_sig_debug > 0.
3423 (pthread_handle_create): Increment __pthread_handles_num.
3425 * manager.c (pthread_handle_create): Don't pass CLONE_PTRACE to clone.
3426 * pthread.c (__pthread_initialize_manager): Likewise.
3428 * pthread.c (pthread_initialize): Use __libc_allocate_rtsig (1)
3429 instead of __libc_allocate_rtsig (2).
3430 (__pthread_initialize_manager): Send __pthread_sig_debug to gdb
3431 instead of __pthread_sig_cancel.
3432 (pthread_handle_sigdebug): Fix comments.
3434 1999-01-21 Ulrich Drepper <drepper@cygnus.com>
3436 * manager.c (pthread_allocate_stack): Set
3437 __pthread_nonstandard_stacks if user-specified stack is used.
3439 1999-01-16 Ulrich Drepper <drepper@cygnus.com>
3441 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _LFS_ASYNCHRONOUS_IO,
3442 _LFS_LARGEFILE, _LFS64_LARGEFILE, and _LFS64_STDIO from Unix98.
3444 1999-01-07 Xavier Leroy <Xavier.Leroy@inria.fr>