1 2002-09-01 Roland McGrath <roland@redhat.com>
3 * sysdeps/pthread/bits/libc-tsd.h (enum __libc_tsd_key_t): Add new keys
4 CTYPE_B, CTYPE_TOLOWER, CTYPE_TOUPPER.
6 * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_address): New macro.
7 (__libc_internal_tsd_address): Declare it.
8 * Versions (libc, ld, libpthread: GLIBC_PRIVATE): Add
9 __libc_internal_tsd_address.
10 * specific.c (libc_internal_tsd_address): New function.
11 (__libc_internal_tsd_address): New variable.
12 * no-tsd.c (__libc_internal_tsd_address): New variable.
14 2002-08-31 Ulrich Drepper <drepper@redhat.com>
16 * Makefile: Don't use rule for crt%.o, spell it out as rules for
19 2002-08-30 Roland McGrath <roland@redhat.com>
21 * Makefile (extra-objs, omit-deps): Add crtn.
22 ($(objpfx)libpthread.so): Depend on $(objpfx)crtn.o.
23 ($(objpfx)libpthread.so: +postinit): Append $(objpfx)crtn.o.
24 ($(objpfx)crtn.S): New target.
25 ($(objpfx)crt%.o): Pattern rule replaces crti.o target.
26 (generated): Add crtn.S.
28 * sysdeps/unix/sysv/linux/x86_64/Makefile ($(objpfx)specs): Massage
31 2002-08-30 Jakub Jelinek <jakub@redhat.com>
33 * pthread.c (__pthread_initialize_minimal): Call __uselocale even
36 2002-08-30 Roland McGrath <roland@redhat.com>
38 * tst-static-locale.c: New file.
39 * Makefile (tests, tests-static): Add it.
41 2002-04-24 Steven Munroe <sjmunroe@us.ibm.com>
43 * spinlock.c (__pthread_lock): Fix spurious wakeup
44 handling. Don't clear lowest bit of list pointer as sign the thread
45 is still on the wait list. Don't restart after spurious wakeup
46 with spinning to get the lock.
47 (__pthread_unlock): Take set lowest bit into account when handling
48 pointer to list elements.
49 Patch by Steve Munroe <sjmunroe@us.ibm.com>.
51 2002-08-28 Roland McGrath <roland@redhat.com>
53 * sysdeps/pthread/timer_routines.c (thread_func): Fix type in cast.
55 2002-08-28 Jakub Jelinek <jakub@redhat.com>
57 * sysdeps/unix/sysv/linux/hppa/aio_cancel.c: New file.
58 * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
59 * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
61 2002-08-28 Ulrich Drepper <drepper@redhat.com>
63 * sysdeps/pthread/timer_routines.c (thread_func): Change return
64 type to void and add casts in use to avoid warnings with all gcc
67 2002-08-08 Jakub Jelinek <jakub@redhat.com>
69 * sysdeps/unix/sysv/linux/bits/local_lim.h (PTHREAD_THREADS_MAX):
71 * manager.c (__pthread_handles): Remove.
72 * pthandles.c: New file.
73 * pthread.c (__pthread_initialize_minimal): Initialize
74 __pthread_handles[0] and __pthread_handles[1].
75 * Makefile (libpthread-routines): Add pthandles (must be last).
77 2002-08-26 Brian Youmans <3diff@gnu.org>
79 * Examples/ex10.c: Corrected version number in Lesser GPL copying
80 permission notice from 2 to 2.1.
81 * Examples/ex11.c: Likewise.
82 * Examples/ex13.c: Likewise.
83 * Examples/ex8.c: Likewise.
84 * Examples/ex9.c: Likewise.
85 * barrier.c: Likewise.
87 * lockfile.c: Likewise.
89 * pt-machine.c: Likewise.
90 * ptclock_gettime.c: Likewise.
91 * ptclock_settime.c: Likewise.
93 * sysdeps/alpha/pspinlock.c: Likewise.
94 * sysdeps/alpha/pt-machine.h: Likewise.
95 * sysdeps/arm/pspinlock.c: Likewise.
96 * sysdeps/arm/pt-machine.h: Likewise.
97 * sysdeps/cris/pspinlock.c: Likewise.
98 * sysdeps/cris/pt-machine.h: Likewise.
99 * sysdeps/hppa/pspinlock.c: Likewise.
100 * sysdeps/hppa/pt-machine.h: Likewise.
101 * sysdeps/i386/i686/pt-machine.h: Likewise.
102 * sysdeps/i386/pspinlock.c: Likewise.
103 * sysdeps/i386/pt-machine.h: Likewise.
104 * sysdeps/i386/useldt.h: Likewise.
105 * sysdeps/ia64/pspinlock.c: Likewise.
106 * sysdeps/ia64/pt-machine.h: Likewise.
107 * sysdeps/m68k/pspinlock.c: Likewise.
108 * sysdeps/m68k/pt-machine.h: Likewise.
109 * sysdeps/mips/pspinlock.c: Likewise.
110 * sysdeps/mips/pt-machine.h: Likewise.
111 * sysdeps/powerpc/pspinlock.c: Likewise.
112 * sysdeps/powerpc/pt-machine.h: Likewise.
113 * sysdeps/pthread/bits/initspin.h: Likewise.
114 * sysdeps/pthread/bits/libc-lock.h: Likewise.
115 * sysdeps/pthread/bits/libc-tsd.h: Likewise.
116 * sysdeps/pthread/getcpuclockid.c: Likewise.
117 * sysdeps/pthread/posix-timer.h: Likewise.
118 * sysdeps/pthread/timer_create.c: Likewise.
119 * sysdeps/pthread/timer_delete.c: Likewise.
120 * sysdeps/pthread/timer_getoverr.c: Likewise.
121 * sysdeps/pthread/timer_gettime.c: Likewise.
122 * sysdeps/pthread/timer_routines.c: Likewise.
123 * sysdeps/pthread/timer_settime.c: Likewise.
124 * sysdeps/pthread/tst-timer.c: Likewise.
125 * sysdeps/s390/pspinlock.c: Likewise.
126 * sysdeps/s390/s390-32/pt-machine.h: Likewise.
127 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
128 * sysdeps/sh/pspinlock.c: Likewise.
129 * sysdeps/sh/pt-machine.h: Likewise.
130 * sysdeps/sparc/sparc32/pspinlock.c: Likewise.
131 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
132 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: Likewise.
133 * sysdeps/sparc/sparc64/pspinlock.c: Likewise.
134 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
135 * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
136 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
137 * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
138 * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
139 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
140 * tststack.c: Likewise.
141 * unload.c: Likewise.
143 * wrapsyscall.c: Likewise.
145 * sysdeps/pthread/pt-initfini.c: Changed copying
146 permission notice to Lesser GPL from Library GPL, including the
147 references in the special exception.
148 * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: Likewise.
149 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Likewise.
150 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c:
152 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c:
154 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Likewise.
156 2002-08-26 Ulrich Drepper <drepper@redhat.com>
158 * Examples/ex10.c (thread): tv_nsec == 1000000000 is already
159 overflow [PR libc/4244].
161 2002-08-25 Ulrich Drepper <drepper@redhat.com>
163 * sysdeps/pthread/timer_routines.c (thread_func): Make the
164 compiler happy by adding a return statement which will never be
167 * tst-context.c (main): Cast to long before casting to pointer.
169 * Examples/ex17.c (main): Use correct format string.
171 * Examples/ex9.c (thread): Remove incorrect return statement.
173 2002-08-23 Ulrich Drepper <drepper@redhat.com>
175 * pthread.c (__linuxthreads_version): New global constant.
177 2002-08-23 Andreas Jaeger <aj@suse.de>
179 * sysdeps/x86_64/pt-machine.h: Use %fs instead of %gs
180 as thread specific register.
181 (testandset): Fix inline asm.
182 (THREAD_GETMEM): Fix inline asm.
184 2002-08-22 Roland McGrath <roland@redhat.com>
186 * sysdeps/i386/useldt.h (INIT_THREAD_SELF): Remove [HAVE_TLS_SUPPORT]
188 (INIT_THREAD_SELF): Pass second arg to DO_SET_THREAD_AREA.
189 (DO_SET_THREAD_AREA): Take second arg, pass to DO_SET_THREAD_AREA_REUSE
190 macro. That chooses whether to reuse %gs value or let kernel set it.
191 [USE_TLS] (DO_SET_THREAD_AREA_REUSE): New macro, always 1.
192 [!USE_TLS] (DO_SET_THREAD_AREA_REUSE): New macro, true if arg is
195 2002-08-21 Ulrich Drepper <drepper@redhat.com>
197 * sysdeps/i386/tls.h (TLS_SETUP_GS_SEGMENT): Add new parameter
198 also to the third definition of this macro.
200 2002-06-17 Andreas Jaeger <aj@suse.de>
202 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
205 2002-08-20 Ulrich Drepper <drepper@redhat.com>
207 * sysdeps/i386/useldt.h: Go back to using 16-bit instructions when
208 loading/reading segment registers. Some old hardware doesn't
209 handle the 32-bit instructions as expected.
210 * sysdeps/i386/tls.h: Likewise.
212 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Second parameter is
213 renamed to secondcall and use is negated.
214 (TLS_SETUP_GS_SEGMENT): Likewise.
215 (TLS_INIT_TP): Likewise.
216 * sysdeps/sh/tls.h (TLS_INIT_TP): Second parameter is renamed to
219 * sysdeps/i386/tls.h: Use 32-bit operations when handling segment
220 registers. No need to mask upper 16 bits in this case.
221 * sysdeps/i386/useldt.h: Likewise.
222 (DO_SET_THREAD_AREA): We have to load %gs again even if the value
223 is the same since the GDT content changed.
225 * sysdeps/i386/tls.h (TLS_INIT_TP): Add new parameter and pass it on
226 to TLS_SETUP_GS_SEGMENT.
227 (TLS_SETUP_GS_SEGMENT): Add new parameter and pass it on to
228 TLS_DO_SET_THREAD_AREA.
229 (TLS_DO_SET_THREAD_AREA): If new parameter is zero determine
230 entry number from %gs value.
231 * sysdeps/sh/tls.h (TLS_INIT_TP): Add new parameter and simply
234 * manager.c (pthread_handle_create): Pass NULL to _dl_allocate_tls.
235 Pass true to _dl_deallocate_tls.
236 (pthread_free): Likewise.
237 * pthread.c (__pthread_initialize_manager): Likewise.
239 2002-08-19 Ulrich Drepper <drepper@redhat.com>
241 * sysdeps/i386/useldt.h (DO_SET_THREAD_AREA): Use correct shift when
242 computing index from %gs value.
244 2002-08-16 Roland McGrath <roland@redhat.com>
246 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Calculate segment
247 register value from entry number properly.
249 * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): Rewrite asm to use %ebx
250 optimally conditional on [__PIC__].
251 (TLS_DO_SET_THREAD_AREA): New macro, implement inline syscall
252 without touching errno, and use latest modify_ldt-like interface.
253 (TLS_SETUP_GS_SEGMENT): Use that instead of INLINE_SYSCALL.
254 * sysdeps/i386/useldt.h (DO_MODIFY_LDT): Set %gs in this macro.
255 (DO_SET_THREAD_AREA): New macro, uses current syscall interface with
256 existing %gs value as the segment to set.
257 (INIT_THREAD_SELF): Rewritten using those. Use set_thread_area only
258 under [HAVE_TLS_SUPPORT] so we can rely on the initialization done
259 by the first thread's early TLS setup.
261 2002-08-15 Roland McGrath <roland@redhat.com>
263 * sysdeps/i386/tls.h (TLS_INIT_TP): Use statement expression and
264 return a value as callers now expect.
266 2002-08-11 Roland McGrath <roland@redhat.com>
268 * pthread.c (__pthread_initialize_manager): Initialize
269 p_header.data.tcb field of manager thread's descriptor.
270 (__pthread_initialize_minimal): Don't initialize p_header.data.self
271 field, already done by TLS_INIT_TP.
273 * manager.c (pthread_handle_create): Move p_header field initializers
276 2002-08-08 Ulrich Drepper <drepper@redhat.com>
278 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Removed.
280 2002-08-07 Ulrich Drepper <drepper@redhat.com>
282 * pthread.c (__linuxthreads_initial_report_events): New variable.
283 (__pthread_initialize_manager): Use it to initialize p_report_events
285 [TLS]: Store pointer to descriptor of manager in __pthread_handles.
287 2002-08-07 Roland McGrath <roland@redhat.com>
289 * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): Add an extra argument with
290 an "m" constraint to the asm so the compiler knows LDT_ENTRY was used.
292 2002-08-02 Roland McGrath <roland@redhat.com>
294 * sysdeps/pthread/bits/libc-tsd.h (enum __libc_tsd_key_t):
295 Add _LIBC_TSD_KEY_LOCALE.
296 * manager.c (pthread_start_thread) [!(USE_TLS && HAVE___THREAD)]:
297 Call __uselocale to initialize our per-thread locale pointer to
299 * pthread.c (__pthread_initialize_minimal): Likewise.
301 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Add missing \s.
303 2002-08-02 Ulrich Drepper <drepper@redhat.com>
305 * pthread.c: Declare _errno, _h_errno, and _res unless we use TLS
308 * cancel.c (__pthread_perform_cleanup) [USE_TLS && HAVE___THREAD]:
309 Don't use p_libc_specific element in thread descriptor.
311 2002-07-30 Roland McGrath <roland@redhat.com>
313 * sysdeps/pthread/bits/libc-tsd.h: Include <tls.h>.
314 [USE_TLS && HAVE___THREAD]: Just include the sysdeps/generic file,
315 which does the right thing when __thread support is available.
316 * descr.h (struct _pthread_descr_struct) [USE_TLS && HAVE___THREAD]:
317 Omit `p_libc_specific', `p_errnop', `p_errno', `p_h_errnop',
318 `p_h_errno', `p_resp', and `p_res' members.
319 * pthread.c (__pthread_initialize_minimal) [USE_TLS && HAVE___THREAD]:
320 Don't initialize `p_errnop' and `p_h_errnop' members.
321 (__pthread_reset_main_thread): Likewise.
322 (__pthread_initialize_manager): Likewise.
323 * manager.c (__pthread_manager, pthread_handle_create): Likewise.
324 * pthread.c (pthread_initialize) [USE_TLS && HAVE___THREAD]:
325 Don't initialize `p_resp' member.
326 (__pthread_reset_main_thread): Likewise.
327 * manager.c (pthread_handle_create): Likewise.
328 * specific.c (libc_internal_tsd_set, libc_internal_tsd_get):
329 Conditionalize these on [!(USE_TLS && HAVE___THREAD)].
330 * no-tsd.c: Conditionalize contents on [!(USE_TLS && HAVE___THREAD)].
331 * errno.c [USE_TLS && HAVE___THREAD]
332 (__h_errno_location, __res_state): Don't define these at all.
334 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens around arguments!
335 (INSTALL_NEW_DTV, GET_DTV): Likewise.
336 * sysdeps/sh/tls.h (INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV): Likewise.
338 * weaks.c: Don't include <errno.h> here.
340 2002-08-01 Roland McGrath <roland@redhat.com>
342 * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): New macro, broken out of
344 (TLS_DO_SET_THREAD_AREA): New macro, uses thread_set_area syscall.
345 (TLS_SETUP_GS_SEGMENT): New macro, try one or the other or both.
346 (TLS_INIT_TP): Use that.
348 2002-08-02 Jakub Jelinek <jakub@redhat.com>
350 * sysdeps/i386/useldt.h (DO_MODIFY_LDT): Move from INIT_THREAD_SELF.
351 (INIT_THREAD_SELF): Use sys_thread_area syscall instead if available.
352 (FREE_THREAD): Avoid modify_ldt if using GDT.
353 * sysdeps/i386/pspinlock.c (__have_no_set_thread_area): New variable.
355 2002-07-25 Jakub Jelinek <jakub@redhat.com>
357 * sysdeps/i386/tls.h: Use __ASSEMBLER__ test macro not ASSEMBLER.
358 * sysdeps/i386/pt-machine.h: Likewise.
359 * sysdeps/i386/useldt.h: Likewise.
361 2002-07-22 Ulrich Drepper <drepper@redhat.com>
363 * pthread.c (__pthread_initialize_minimal): If !SHARED and TLS
364 call __libc_setup_tls first.
365 * Makefile: Actually create tst-signal.out file when running the test.
366 (tests): Add tststatic.
367 * Examples/tststatic.c: New file.
369 2002-07-19 Ulrich Drepper <drepper@redhat.com>
371 * errno.c (__errno_location): Don't define unless !USE_TLS
373 * sysdeps/i386/pt-machine.c: Protect C code with #ifndef ASSEMBLER.
374 * sysdeps/i386/tls.h: Likewise.
375 * sysdeps/i386/useldt.h: Likewise.
376 * sysdeps/i386/i686/pt-machine.h: Likewise.
378 2002-07-02 H.J. Lu <hjl@gnu.org>
380 * sysdeps/mips/pspinlock.c: Don't include <sgidefs.h>. Always
382 * sysdeps/mips/pt-machine.h: Likewise.
384 2002-07-14 Ulrich Drepper <drepper@redhat.com>
386 * manager.c (pthread_handle_create): Initialize self-reference in
389 2002-07-01 Jakub Jelinek <jakub@redhat.com>
391 * Examples/ex9.c (main): Remove unused th variable.
393 2002-07-10 Ulrich Drepper <drepper@redhat.com>
395 * wrapsyscall.c: Add __nanosleep alias.
396 * Versions (GLIBC_2.2.6): Add __nanosleep.
397 * bug-sleep.c: New file.
398 * Makefile (tests): Add bug-sleep.
400 2002-06-19 Steven Munroe <sjmunroe@vnet.ibm.com>
402 * Examples/ex9.c (main): Use list of children and join them.
403 (thread): Do not call exit.
405 2002-06-20 Ulrich Drepper <drepper@redhat.com>
407 * spinlock.c (wait_node_alloc): We cannot use compare-and-exchange.
408 Unconditionally use the code using spinlock. Use __pthread_release
410 (wait_node_free): Likewise.
411 (__pthread_acquire, __pthread_release): Unconditionally define.
413 2002-06-07 Jakub Jelinek <jakub@redhat.com>
415 * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Fix typo.
417 2002-05-24 Ulrich Drepper <drepper@redhat.com>
419 * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Use __sync_synchronize.
421 2002-05-21 Ulrich Drepper <drepper@redhat.com>
423 * sysdeps/pthread/pthread.h (pthread_create): Rename first
425 (pthread_cancel): Likewise.
426 * internals.h (__pthread_create_2_1): Likewise.
427 * sysdeps/unix/sysv/linux/bits/sigthread.h (pthread_kill): Likewise.
429 2002-05-20 Ulrich Drepper <drepper@redhat.com>
431 * sysdeps/alpha/pt-machine.c (THREAD_SELF): Remove clobber.
432 Patch by Glen Nakamura <gen@flex.com>.
434 2002-05-03 Ulrich Drepper <drepper@redhat.com>
436 * signals.c: Move sighandler functions to...
437 * sighandler.c: ...here. New file.
438 * signals.c: Move signal handler related type definitions to...
439 * internals.h: ...here. Add prototypes for signal handlers.
440 * Makefile (libpthread-routines): Add sighandler.
441 (CFLAGS-sighandler.c): Add $(exceptions).
443 2002-04-30 Jakub Jelinek <jakub@redhat.com>
445 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
447 2002-04-08 Ulrich Drepper <drepper@redhat.com>
449 * sysdeps/pthread/timer_getoverr.c: Return real overrun.
450 * sysdeps/pthread/posix-timer.h (struct timer_node): Add overrun_count.
451 * sysdeps/pthread/timer_routines.c (thread_func): Schedule next timeout
452 based on previous one and not on current time. Count overruns.
453 Patch by Eric F. Sorton <eric@cctcorp.com>.
455 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add DELAYTIMER_MAX.
457 2002-04-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
459 * sysdeps/sh/pt-machine.h: Define _PT_MACHINE_H
460 if it isn't defined yet.
461 (FLOATING_STACKS, ARCH_STACK_MAX_SIZE): Defined.
462 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
464 * sysdeps/sh/tls.h: New file.
466 2002-04-08 Jakub Jelinek <jakub@redhat.com>
468 * manager.c (__pthread_manager_event): Use self instead of arg
469 for INIT_THREAD_SELF.
470 * sysdeps/i386/useldt.h (INIT_THREAD_SELF): Use sizeof (struct
471 _pthread_descr_struct) instead of sizeof (*descr).
473 2002-04-05 Ulrich Drepper <drepper@redhat.com>
475 * sysdeps/ia64/pt-machine.h: Protect against multiple inclusion.
476 * sysdeps/alpha/pt-machine.h: Likewise.
477 * sysdeps/arm/pt-machine.h: Likewise.
478 * sysdeps/cris/pt-machine.h: Likewise.
479 * sysdeps/hppa/pt-machine.h: Likewise.
480 * sysdeps/m68k/pt-machine.h: Likewise.
481 * sysdeps/mips/pt-machine.h: Likewise.
482 * sysdeps/powerpc/pt-machine.h: Likewise.
483 * sysdeps/s390/s390-32/pt-machine.h: Likewise.
484 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
485 * sysdeps/sh/pt-machine.h: Likewise.
486 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
487 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
488 * sysdeps/x86_64/pt-machine.h: Likewise.
490 2002-04-05 Jakub Jelinek <jakub@redhat.com>
492 * man/pthread_mutexattr_init.man (pthread_mutexattr_settype): Document
493 instead of pthread_mutexattr_setkind_np.
494 (pthread_mutexattr_gettype): Similarly.
495 * man/pthread_mutexattr_setkind_np.man: New.
496 * man/Makefile (SOURCES): Add pthread_mutexattr_setkind_np.man.
498 2002-04-02 Ulrich Drepper <drepper@redhat.com>
500 * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Define.
502 2002-03-22 Jakub Jelinek <jakub@redhat.com>
504 * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Remove.
506 2002-03-22 Ulrich Drepper <drepper@redhat.com>
508 * internals.h (MEMORY_BARRIER): Define as asm with memory as clobber.
510 2002-03-17 Andreas Jaeger <aj@suse.de>
512 * sysdeps/i386/pt-machine.h: Add testandset and __compare_and_swap
514 * sysdeps/alpha/pt-machine.h: Likewise.
515 * sysdeps/arm/pt-machine.h: Likewise.
516 * sysdeps/cris/pt-machine.h: Likewise.
517 * sysdeps/hppa/pt-machine.h: Likewise.
518 * sysdeps/i386/i686/pt-machine.h: Likewise.
519 * sysdeps/ia64/pt-machine.h: Likewise.
520 * sysdeps/m68k/pt-machine.h: Likewise.
521 * sysdeps/mips/pt-machine.h: Likewise.
522 * sysdeps/powerpc/pt-machine.h: Likewise.
523 * sysdeps/s390/s390-32/pt-machine.h: Likewise.
524 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
525 * sysdeps/sh/pt-machine.h: Likewise.
526 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
527 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
528 * sysdeps/x86_64/pt-machine.h: Likewise.
530 * internals.h: Move testandset and __compare_and_swap prototypes
533 2002-03-03 Andreas Jaeger <aj@suse.de>
535 * errno.c: Include resolv.h to avoid warning.
537 2002-02-27 Ulrich Drepper <drepper@redhat.com>
539 * pthread.c [USE_TLS] (thread_self_stack): Correct check for upper
542 2002-02-23 Ulrich Drepper <drepper@redhat.com>
544 * attr.c (pthread_getattr_np): Don't take thread descriptor size
545 into account if USE_TLS.
546 * manager.c (pthread_handle_create): Free TLS data structures if call
547 failed. Pass correct stack to clone if USE_TLS.
548 * sysdeps/i386/pt-machine.h: Handle multiple inclusion.
549 * sysdeps/i386/i686/pt-machine.h: Likewise.
550 * sysdeps/i386/tls.h: Unconditionally include <pt-machine.h>.
552 * descr.h (struct _pthread_descr_struct): Update p_header for TLS.
553 Add p_stackaddr element #if USE_TLS.
554 * internals.c: Include <tls.h>.
555 * manager.c: Integrate creating and handling of thread descriptor
557 * pthread.c: Likewise.
558 * sysdeps/i386/tls.h (tcbhead_t): Add self pointer.
559 Include <linuxthreads/descr.h> only if TLS is really used.
560 (GET_DTV): New macro.
561 (TLS_INIT_TP): Initialize self pointer.
563 2002-02-17 Andreas Schwab <schwab@suse.de>
565 * signals.c (sigwait): Check for old sighandler being SIG_ERR,
568 2002-02-12 Ulrich Drepper <drepper@redhat.com>
570 * sysdeps/i386/tls.c (INSTALL_NEW_DTV): Define.
571 (INSTALL_DTV): Adjust for being passed pointer to element with length.
573 2002-02-08 Ulrich Drepper <drepper@redhat.com>
575 * sysdeps/i386/tls.h (TLS_INIT_TP): Also initialize %gs.
577 2002-02-08 Richard Henderson <rth@redhat.com>
579 * sysdeps/alpha/elf/pt-initfini.c: Use \n\ for multiline string.
581 2002-02-08 Ulrich Drepper <drepper@redhat.com>
583 * sysdeps/i386/tls.h: TLS cannot be supported with FLOATING_STACKS
586 2002-02-07 H.J. Lu <hjl@gnu.org>
588 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Silence the
590 (__pthread_spin_lock): Remove ".set noreorder".
591 * sysdeps/mips/pt-machine.h (__compare_and_swap): Liekwise.
593 2002-02-05 H.J. Lu <hjl@gnu.org>
595 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Not use
597 * sysdeps/mips/pt-machine.h (testandset): Likewise.
598 (__compare_and_swap): Likewise.
600 2002-02-07 Ulrich Drepper <drepper@redhat.com>
602 * internals.h: Move declarations/definitions of
603 __pthread_initial_thread_bos, __pthread_initial_thread,
604 __pthread_manager_thread_bos, __pthread_manager_thread_tos,
605 __pthread_manager_thread, __pthread_nonstandard_stacks, STACK_SIZE,
606 CURRENT_STACK_FRAME, __pthread_find_self, and thread_self...
608 * sysdeps/i386/tls.h: Add TLS definitions also for !FLOATING_STACKS.
609 Define THREAD_GETMEM accordingly.
611 2002-02-06 Ulrich Drepper <drepper@redhat.com>
613 * sysdeps/i386/tls.h: Include <stddef.h> for size_t.
615 * sysdeps/i386/tls.h: Define THREAD_DTV.
617 2002-02-04 Ulrich Drepper <drepper@redhat.com>
619 * internals.h: Move thread descriptor definition...
620 * descr.h.: ...here. New file.
621 * sysdeps/i386/tls.h: New file.
623 2002-02-01 H.J. Lu <hjl@gnu.org>
625 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Use a
626 different register in the delayed slot. Use branch likely.
628 * sysdeps/mips/pt-machine.h (testandset): Call _test_and_set.
629 (__compare_and_swap): Return 0 only when failed to compare. Use
632 2002-02-01 Jakub Jelinek <jakub@redhat.com>
634 * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set,
635 __pthread_kill_other_threads_np): Move to GLIBC_PRIVATE.
636 * sysdeps/i386/i586/Versions: Move all symbols to GLIBC_PRIVATE.
637 * sysdeps/i386/i686/Versions: Move all symbols to GLIBC_PRIVATE.
638 * sysdeps/sparc/sparc32/sparcv9/Versions: New file.
639 * sysdeps/sparc/sparc64/Versions: New file.
640 * sysdeps/ia64/Versions: Move all symbols to GLIBC_PRIVATE.
642 2002-01-31 Ulrich Drepper <drepper@redhat.com>
644 * pthread.c: _dl_cpuclock_offset is not any longer a global variable
645 in SHARED code, use GL(dl_cpuclock_offset).
647 2002-01-28 Andreas Jaeger <aj@suse.de>
649 * sysdeps/mips/pspinlock.c (__pthread_spin_init): Clear *LOCK to
650 0. Patch by Machida Hiroyuki <machida@sm.sony.co.jp>.
652 2002-01-16 Martin Schwidefsky <schwidefsky@de.ibm.com>
654 * sysdeps/s390/s390-32/pt-machine.h (MEMORY_BARRIER): Define.
655 (CURRENT_STACK_FRAME): Remove duplicate definition.
656 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
658 2002-01-14 Martin Schwidefsky <schwidefsky@de.ibm.com>
660 * Makefile (CFLAGS-tst-cancel.c): Add -fno-inline-functions to prevent
663 2002-01-12 Andreas Schwab <schwab@suse.de>
665 * Makefile (test-srcs): Add tst-signal.
666 (tests): Run tst-signal.
667 (distribute): Add tst-signal.sh.
668 * tst-signal.c, tst-signal.sh: New files.
670 2002-01-14 Andreas Jaeger <aj@suse.de>
672 * sysdeps/x86_64/pt-machine.h (INIT_THREAD_SELF): Avoid warning.
674 2002-01-11 Andreas Schwab <schwab@suse.de>
676 * signals.c (sighandler): Initialize all elements to SIG_ERR.
677 (__sigaction): Don't use value from sighandler if it is SIG_ERR.
679 2002-01-06 Richard Henderson <rth@redhat.com>
681 * sysdeps/alpha/elf/pt-initfini.c: New file.
683 2001-12-29 Andreas Jaeger <aj@suse.de>
685 * Examples/ex9.c: Add noreturn attribute for thread.
686 * Examples/ex10.c: Likewise.
687 * Examples/ex13.c (thread_start): Likewise.
688 * Examples/ex15.c (worker): Likewise.
690 * Examples/ex18.c: Include unistd.h for prototype of sleep.
692 2001-12-14 Ulrich Drepper <drepper@redhat.com>
694 * man/pthread_atfork.man: Adjust description of mutex handling
695 after fork for current implementation.
696 * linuxthreads.texi: Likewise [PR libc/2519].
698 2001-12-13 Andreas Schwab <schwab@suse.de>
700 * specific.c (pthread_key_delete): Don't contact the thread
701 manager if no threads have been created yet.
703 2001-12-12 NIIBE Yutaka <gniibe@m17n.org>
705 * sysdeps/sh/pt-machine.h (INIT_THREAD_SELF): Added __volatile__
706 qualifier to be safe.
708 2001-11-30 Andreas Schwab <schwab@suse.de>
710 * pthread.c (pthread_handle_sigcancel) [THREAD_SELF]: Double check
711 that self is the manager thread, and initialize the thread
713 (thread_self_stack) [THREAD_SELF]: New function to find self via
715 * manager.c (pthread_handle_create): Don't block cancel signal any
718 2001-11-29 Andreas Jaeger <aj@suse.de>
720 * sysdeps/x86_64/pt-machine.h: Use %gs as thread specific register.
722 (INIT_THREAD_SELF): New.
723 (THREAD_GETMEM): New.
725 (THREAD_SETMEM): New.
726 (THREAD_SETMEM_NC): New.
727 (FLOATING_STACKS): Define.
728 (ARCH_STACK_MAX_SIZE): Define.
730 2001-11-28 Kaz Kylheku <kaz@ashi.footprints.net>
732 Bugfix to pthread_key_delete. It was iterating over the thread
733 manager's linked list of threads, behind the thread manager's
734 back causing a race. The fix is to have the manager iterate over
735 the threads instead, using a new request type for doing so.
736 * internals.h (struct pthread_request): New manager request type
738 * manager.c (pthread_for_each_thread): New function.
739 (__pthread_manager): Handle new REQ_FOR_EACH_THREAD request.
740 * specific.c (struct pthread_key_delete_helper_args): New type.
741 (pthread_key_delete_helper): New static function.
742 (pthread_key_delete): Use the new thread manager
743 REQ_FOR_EACH_THREAD function to iterate over the threads and set
744 the delete key slot to a null value in each thread.
745 * Examples/ex18.c: New test.
746 * Makefile (tests): Add ex18.
748 2001-11-22 Wolfram Gloger <wg@malloc.de>
750 * pthread.c (pthread_onexit_process): Don't call free
751 after threads have been asynchronously terminated.
753 * manager.c (pthread_handle_exit): Surround cancellation
754 of threads with __flockfilelist()/__funlockfilelist().
756 2001-11-26 Andreas Schwab <schwab@suse.de>
758 * manager.c (pthread_handle_create): Start the child thread with
759 the cancel signal blocked, so that it does not handle it before
760 the thread register is set up. Save errno from failed clone call.
762 2001-11-15 Ulrich Drepper <drepper@redhat.com>
764 * sysdeps/i386/i686/Implies: Removed.
765 * sysdeps/i386/i686/Versions: New file.
767 2001-10-31 Andreas Jaeger <aj@suse.de>
769 * sysdeps/x86_64/Makefile: Remove, we do not need it anymore.
771 2001-10-05 Kevin Buettner <kevinb@cygnus.com>
773 * pthread.c (__linuxthread_pthread_sizeof_descr): Change name
774 to __linuxthreads_pthread_sizeof_descr to match name used by
775 symbol_list_arr[LINUXTHREADS_PTHREAD_SIZEOF_DESCR] in
776 linuxthreads_db/td_symbol_list.c.
778 2001-09-22 Andreas Jaeger <aj@suse.de>
780 * linuxthreads/tst-context.c: Avoid compile warning.
782 2001-09-20 Andreas Jaeger <aj@suse.de>
784 * shlib-versions: Add x86-64.
786 2001-09-19 Andreas Jaeger <aj@suse.de>
788 * sysdeps/x86_64/Makefile: New file.
789 * sysdeps/x86_64/pspinlock.c: New file.
790 * sysdeps/x86_64/pt-machine.h: New file.
792 2001-09-12 Jakub Jelinek <jakub@redhat.com>
794 * sysdeps/pthread/timer_delete.c (timer_delete): Thread may be NULL
796 * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
798 2001-09-11 Ulrich Drepper <drepper@redhat.com>
799 Wolfram Gloger <wg@malloc.de>
801 * join.c: Protect all communications from and to manager with
803 * manager.c: Likewise.
804 * pthread.c: Likewise.
805 * smeaphore.c: Likewise.
807 2001-08-29 Ulrich Drepper <drepper@redhat.com>
809 * spinlock.c (__pthread_lock): Top max_count value with
810 MAX_ADAPTIVE_SPIN_COUNT.
811 * internals.h (MAX_ADAPTIVE_SPIN_COUNT): Define if not already done.
813 * sysdeps/i386/i686/pt-machine.h (BUSY_WAIT_NOP): New macro to
816 2001-08-27 Jakub Jelinek <jakub@redhat.com>
818 * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_t): Only define to
819 non-opaque type if __USE_UNIX98.
821 2001-08-26 Jakub Jelinek <jakub@redhat.com>
823 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_t): Define
824 non-opaque lock types also if _IO_MTSAFE_IO is defined.
826 2001-08-23 Roland McGrath <roland@frob.com>
828 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start): Take
829 new first argument, skip the cleanup handler if it's zero.
830 (_LIBC_LOCK_RECURSIVE_INITIALIZER): New macro.
831 (__libc_lock_define_initialized_recursive): Use it.
832 * sysdeps/pthread/bits/stdio-lock.h: File removed.
833 The sysdeps/generic file from the main tree now suffices.
835 2001-08-22 Roland McGrath <roland@frob.com>
837 * sysdeps/pthread/bits/stdio-lock.h: Include <bits/libc-lock.h>
838 instead of <pthread.h>.
839 (_IO_lock_t): Define this typedef using __libc_lock_define_recursive.
840 (_IO_lock_initializer): Add braces.
841 (_IO_lock_lock): Use __libc_lock_lock_recursive.
842 (_IO_lock_unlock): Use __libc_lock_unlock_recursive.
844 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_recursive_t): New type.
845 (__libc_lock_define_initialized_recursive): Use it.
846 (__libc_lock_init_recursive): Likewise.
847 (__libc_lock_fini_recursive): Likewise.
848 (__libc_lock_lock_recursive): Likewise.
849 (__libc_lock_trylock_recursive): Likewise.
850 (__libc_lock_unlock_recursive): Likewise.
851 (__libc_lock_define_recursive): New macro.
853 2001-08-14 Jakub Jelinek <jakub@redhat.com>
855 * lockfile.c (__pthread_provide_lockfile): New variable.
856 * pthread.c (__pthread_require_lockfile): New variable.
857 * cancel.c (__pthread_require_lockfile): New variable.
859 2001-07-31 Ulrich Drepper <drepper@redhat.com>
861 * tst-context.c (threadfct): Initialize context before calling
864 * Examples/ex17.c: Make sure test thread is around long enough.
866 2001-07-26 kaz Kojima <kkojima@rr.iij4u.or.jp>
868 * sysdeps/sh/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF): Defined.
870 2001-07-24 Ulrich Drepper <drepper@redhat.com>
872 * tst-context.c (main): Print explanation before bailing out
873 because context handling is not supported.
875 2001-07-23 Ulrich Drepper <drepper@redhat.com>
877 * Makefile (tests): Add tst-context.
878 * tst-context.c: New file.
880 * sysdeps/pthread/bits/stdio-lock.h: Define
881 _IO_cleanup_region_start_noarg.
883 2001-07-23 Jakub Jelinek <jakub@redhat.com>
885 * sysdeps/alpha/pt-machine.h (FLOATING_STACKS): Define.
886 (ARCH_STACK_MAX_SIZE): Define.
887 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
888 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
890 2001-07-19 Jakub Jelinek <jakub@redhat.com>
892 * sysdeps/i386/useldt.h: Fix typo in ARCH_STACK_MAX_SIZE comment.
894 * sysdeps/ia64/pt-machine.h (FLOATING_STACKS): Define.
895 (ARCH_STACK_MAX_SIZE): Define.
896 * manager.c (pthread_allocate_stack): Handle FLOATING_STACKS with
897 NEED_SEPARATE_REGISTER_STACK.
899 2001-07-16 Andreas Schwab <schwab@suse.de>
901 * Makefile (before-compile): Don't add $(objpfx)crti.o.
902 (omit-deps): Add crti.
903 ($(objpfx)libpthread.so): Depend on $(objpfx)crti.o, but make sure
904 it is filtered out of the link command.
906 2001-07-16 Ulrich Drepper <drepper@redhat.com>
908 * pthread.c (pthread_initialize): For FLOATING_STACKS don't bother
909 to find the right value for __pthread_initial_thread_bos, it's not
910 used. If not FLOATING_STACKS first run
911 __pthread_init_max_stacksize.
913 2001-06-16 H.J. Lu <hjl@gnu.org>
915 * internals.h: Include <stackinfo.h>.
917 * attr.c: Don't include <stackinfo.h> here.
918 * cancel.c: Likewise.
919 * manager.c: Likewise.
920 * pthread.c: Likewise.
921 * ptlongjmp.c: Likewise.
923 2001-03-23 Matthew Wilcox <willy@ldl.fc.hp.com>
925 * attr.c: Make _STACK_GROWS_UP work.
926 * internals.h: Likewise.
927 * manager.c: Likewise.
928 * pthread.c: Likewise.
930 2001-06-15 H.J. Lu <hjl@gnu.org>
932 * pthread.c (__pthread_reset_main_thread): Fix a typo.
934 2001-02-02 John S. Marvin <jsm@udlkern.fc.hp.com>
936 * semaphore.h: Use struct _pthread_fastlock as an element of
937 sem_t instead of an identical struct.
938 * rwlock.c: Remove casts.
939 * semaphore.c: Likewise.
941 2001-04-30 Alan Modra <amodra@one.net.au>
943 * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: New.
945 2001-05-25 Bruce Mitchener <bruce@cubik.org>
947 * linuxthreads.texi: Spelling corrections.
949 2001-05-25 Ulrich Drepper <drepper@redhat.com>
951 * oldsemaphore.c (__old_sem_wait): Clear p_nextwaiting before
952 returning successfully.
953 Patch by Gene Cooperman <gene@ccs.neu.edu>.
955 2001-05-24 Ulrich Drepper <drepper@redhat.com>
957 * spinlock.c (__pthread_lock) [HAS_COMPARE_AND_SWAP]: Before doing any
958 serious work try once whether the lock is uncontested.
959 Remove duplicate reading of __status before loop.
960 Change suggested by Hans Boehm <hans_boehm@hp.com>.
962 * spinlock.h (__pthread_trylock): Remove need for oldstatus variable.
963 (__pthread_alt_trylock): Likewise.
965 2001-05-01 Kaz Kylheku <kaz@ashi.footprints.net>
967 Memory barrier overhaul following line by line inspection.
968 * mutex.c (pthread_once): Missing memory barriers added.
969 * pthread.c (__pthread_wait_for_restart_signal,
970 __pthread_timedsuspend_new, __pthread_restart_new): Added
971 memory barriers ``just in case'' and for documentary value.
972 * spinlock.c (__pthread_release): New inline function for releasing
973 spinlock, to complement __pthread_acquire. Includes memory
974 barrier prior to assignment to spinlock, and __asm __volatile
975 dance to prevent reordering or optimization of the spinlock access.
976 * spinlock.c (__pthread_unlock, __pthread_alt_lock,
977 __pthread_alt_timedlock, __pthread_alt_unlock,
978 __pthread_compare_and_swap): Updated to use new __pthread_release
979 instead of updating spinlock directly.
980 * spinlock.c (__pthread_lock, __pthread_unlock, wait_node_alloc,
981 wait_node_free, wait_node_dequeue, __pthread_alt_lock,
982 __pthread_alt_timedlock, __pthread_alt_unlock, __pthread_acquire):
983 Memory barrier overhaul. Lots of missing memory barriers added,
984 a couple needless ones removed.
985 * spinlock.c (__pthread_compare_and_swap): testandset optimization
986 removed, just calls __pthread_acquire, which has the new read
987 barrier in it before its testandset.
989 2001-05-20 Roland McGrath <roland@frob.com>
991 * Makeconfig: New file, variables used to be in main libc Makeconfig.
993 2001-05-09 Geoff Keating <geoffk@redhat.com>
995 * sysdeps/powerpc/pt-machine.h
996 (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): Define.
997 (__compare_and_swap): Remove memory barriers.
998 (__compare_and_swap_with_release_semantics): New function.
1000 2001-04-24 Andreas Jaeger <aj@suse.de>
1002 * wrapsyscall.c: send* and recv* return ssize_t.
1004 * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Unlock the
1005 mutex instead of double locking it.
1006 Reported by Pierre Artaud <partaud@sodatec.com>.
1008 2001-04-23 Ulrich Drepper <drepper@redhat.com>
1010 * sysdeps/pthread/getcpuclockid.c: Make function generic, test
1011 using #ifdef whether the clock is available.
1012 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: Removed.
1014 * sysdeps/ia64/Versions: New file.
1016 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init): We don't
1017 have to call __gmon_start__ in the libpthread DSO.
1018 * sysdeps/pthread/pt-initfini.c (_init): Likewise.
1020 * Makefile (libpthread-routines): Add ptclock_gettime and
1022 * internals.h: Don't use cpuclock-init.h definitions, use
1023 hp-timing.h definitions.
1024 * pthread.c: Likewise.
1025 * manager.c: Likewise.
1026 * ptclock_gettime.c: New file.
1027 * ptclock_settime.c: New file.
1028 * internals.h: Fix parameter type for __pthread_clock_gettime and
1029 __pthread_clock_settime.
1031 * sysdeps/i386/i586/ptclock_gettime.c: Removed.
1032 * sysdeps/i386/i586/ptclock_settime.c: Removed.
1033 * sysdeps/i386/i586/Makefile: Removed.
1035 2001-04-22 Ulrich Drepper <drepper@redhat.com>
1037 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_ASYNCH_IO.
1038 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1040 2001-04-21 Andreas Jaeger <aj@suse.de>
1042 * sysdeps/pthread/timer_routines.c (thread_func): Add noreturn
1043 attribute, remove statements that will never be executed.
1044 (thread_func): Remove mutex_unlock call since it's never executed.
1045 (thread_func): Fix comment as suggested by Jakub Jelinek.
1047 * manager.c (__pthread_manager): Add noreturn
1049 (pthread_start_thread): Likewise, remove return statement.
1050 (pthread_start_thread_event): Likewise.
1051 Add noreturn attribute for pthread_handle_exit.
1052 * weaks.c: Add noreturn attribute for pthread_exit.
1054 * internals.h: Add __pthread_clock_gettime and
1055 __pthread_clock_settime prototypes.
1057 2001-04-21 Ulrich Drepper <drepper@redhat.com>
1059 * internals.h: Include <cpuclock-init.h>.
1060 (struct _pthread_descr_struct): Add p_cpuclock_offset field if
1061 CPUCLOCK_VARDEF is defined.
1062 * pthread.c (__pthread_initialize_minimal): Initialize
1063 p_cpuclock_offset field for main thread if CPUCLOCK_INIT is defined.
1064 * manager.c (pthread_start_thread): Set p_cpuclock_offset field
1065 for new thread to current CPU clock value.
1067 * sysdeps/i386/useldt.h: Extend all the macros to handle 8-byte values.
1069 * sysdeps/i386/i586/Makefile: New file.
1070 * sysdeps/i386/i586/Versions: New file.
1071 * sysdeps/i386/i586/ptclock_gettime.c: New file.
1072 * sysdeps/i386/i586/ptclock_settime.c: New file.
1073 * sysdeps/i386/i686/Implies: New file.
1075 2001-04-18 Jakub Jelinek <jakub@redhat.com>
1077 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Put specs into
1078 $generated, not $postclean-generated.
1080 2001-04-18 Andreas Jaeger <aj@suse.de>
1082 * Makefile (otherlibs): Added.
1084 2001-04-18 Jakub Jelinek <jakub@redhat.com>
1086 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
1088 2001-04-16 Ulrich Drepper <drepper@redhat.com>
1090 * signals.c (sigwait): NSIG is no signal number. Block all
1091 signals while in signal handler for signals in SET.
1092 Patch by Manfred Spraul <manfred@colorfullife.com>.
1094 2001-04-12 Ulrich Drepper <drepper@redhat.com>
1096 * tst-cancel.c: Disable most tests. Add new test where all
1097 cleanup handlers must run.
1098 * Makefile (tests): Add tst-cancel again.
1100 * cancel.c (__pthread_perform_cleanup): Correct condition for
1101 leaving cleanup loop early.
1103 * sysdeps/i386/Makefile: Make sure gcc uses a frame pointer for
1104 all the files which use CURRENT_STACK_FRAME.
1105 * sysdeps/i386/pt-machine.h (CURRENT_STACK_FRAME): Define using
1106 __builtin_frame_address.
1107 * sysdeps/i386/i686/pt-machine.h: Likewise.
1109 2001-04-11 Ulrich Drepper <drepper@redhat.com>
1111 * Makefile (tests): Comment out tst-cancel for now.
1113 * tst-cancel.c (main): Cleanup 4 is supposed to run. Create
1114 temporary file in object directory.
1115 * Makefile: Don't allow inlining when compiling tst-cancel.c.
1116 Pass $(objpfx) to tst-cancel.
1118 2001-04-11 David S. Miller <davem@redhat.com>
1120 * sysdeps/sparc/sparc32/pt-machine.h (stack_pointer): Advance
1121 up closer to user local variables so that new cleanup heuristics work.
1122 * sysdeps/sparc/sparc64/pt-machine.h (stack_pointer): Likewise.
1124 2001-04-11 Ulrich Drepper <drepper@redhat.com>
1126 * cancel.c (_pthread_cleanup_push): Catch invalid __prev buffer
1128 (_pthread_cleanup_push_defer): Likewise.
1130 * tst-cancel.c (main): Fix loop printing cleanup output.
1132 2001-04-10 kaz Kojima <kkojima@rr.iij4u.or.jp>
1134 * sysdeps/sh/pspinlock.c (__pthread_spin_lock): Fix a reverse
1136 (__pthread_spin_trylock): Likewise.
1137 * sysdeps/sh/pt-machine.h (testandset): Likewise.
1139 2001-04-10 Ulrich Drepper <drepper@redhat.com>
1141 * join.c (pthread_exit): Move code to new function __pthread_do_exit
1142 which takes an extra parameter with the current frame pointer.
1143 Call new function with CURRENT_STACK_FRAME.
1144 (__pthread_do_exit): New function. Call __pthread_perform_cleanup
1145 with the new parameter.
1146 (pthread_join): Call __pthread_do_exit instead of pthread_exit.
1147 * cancel.c (__pthread_perform_cleanup): Takes extra parameter. Use
1148 this parameter as the initial value the cleanup handler records are
1149 compared against. No active cleanup handler record must have an
1150 address lower than the previous one and the initial record must be
1151 above (below on PA) the frame address passed in.
1152 (pthread_setcancelstate): Call __pthread_do_exit instead of
1154 (pthread_setcanceltype): Likewise.
1155 (pthread_testcancel): Likewise.
1156 (_pthread_cleanup_pop_restore): Likewise.
1157 * condvar.c (pthread_cond_wait): Likewise.
1158 (pthread_cond_timedwait_relative): Likewise.
1159 * manager.c (pthread_start_thread): Likewise.
1160 * oldsemaphore.c (__old_sem_wait): Likewise.
1161 * pthread.c (pthread_handle_sigcancel): Likewise.
1162 * semaphore.c (__new_sem_wait): Likewise.
1163 (sem_timedwait): Likewise.
1164 * ptlongjmp.c (pthread_cleanup_upto): Also use current stack frame
1165 to limit the cleanup handlers which get run.
1166 * internals.h: Add prototype for __pthread_do_exit. Adjust prototype
1167 for __pthread_perform_cleanup.
1169 * Makefile (tests): Add tst-cancel.
1170 * tst-cancel.c: New file.
1172 2001-04-08 Hans-Peter Nilsson <hp@axis.com>
1174 * sysdeps/cris/pt-machine.h: New file.
1175 * sysdeps/cris/pspinlock.c: New file.
1177 2001-04-09 Hans-Peter Nilsson <hp@axis.com>
1179 * shlib-versions: Add case for Linux on CRIS.
1181 2001-03-26 Ulrich Drepper <drepper@redhat.com>
1183 * attr.c (pthread_getattr_np): Correct computation of stack size
1184 for machiens with register stack.
1186 * Examples/ex17.c (main): Correct detection of failed mmap call.
1188 2001-03-21 Jakub Jelinek <jakub@redhat.com>
1190 * pthread.c (__pthread_initialize_manager): Fix a typo.
1192 2001-03-21 Jakub Jelinek <jakub@redhat.com>
1194 * attr.c (__pthread_attr_setstack): Fix alignment check.
1195 (pthread_getattr_np): __stackaddr is top of stack, not bottom.
1196 * Makefile (tests): Add ex17 test.
1197 * Examples/ex17.c: New test.
1199 2001-03-20 Ulrich Drepper <drepper@redhat.com>
1201 * Makefile: Define -D_RPC_THREAD_SAFE_ for cancel.c.
1202 * cancel.c (__pthread_perform_cleanup): Call __rpc_thread_destroy.
1203 * sysdeps/pthread/bits/libc-tsd.h: Define _LIBC_TSD_KEY_VARS.
1205 2001-03-18 Ulrich Drepper <drepper@redhat.com>
1207 * Makefile: When generating DSO link with libc_nonshared.a.
1209 2001-02-26 Jakub Jelinek <jakub@redhat.com>
1211 * signals.c (pthread_sighandler): Use CALL_SIGHANDLER.
1213 2001-02-23 Jakub Jelinek <jakub@redhat.com>
1215 * internals.h (__pthread_init_max_stacksize): New prototype.
1216 * attr.c (__pthread_attr_setstacksize): Call
1217 __pthread_init_max_stacksize if not yet initialized.
1218 * pthread.c (__pthread_init_max_stacksize): New function.
1219 (__pthread_initialize_manager): Call it.
1220 Patch by <dtc@cmucl.cons.org>.
1222 2001-03-16 Ulrich Drepper <drepper@redhat.com>
1224 * attr.c (pthread_getattr_np): Fix __stacksize computation for IA-64.
1226 2001-03-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
1228 * shlib-versions: Add rule for Linux on 64 bit S/390.
1229 * sysdeps/s390/s390-64/pt-machine.h: New file.
1230 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
1232 2001-03-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
1234 * sysdeps/s390/pt-machine.h: Move to...
1235 * sysdeps/s390/s390-32/pt-machine.h: ...here.
1236 Add defines for FLOATING_STACK and ARCH_STACK_MAX_SIZE.
1238 2001-03-15 Ulrich Drepper <drepper@redhat.com>
1240 * Versions [libpthread] (GLIBC_2.2.3): Add pthread_getattr_np.
1241 * attr.c: Implement pthread_getattr_np.
1242 * sysdeps/pthread/pthread.h: Add prototype for pthread_getattr_np.
1243 * internals.h (struct _pthread_descr_struct): Add p_inheritsched.
1244 * manager.c (pthread_handle_create): Initialize p_inheritsched.
1246 2001-03-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
1248 * sysdeps/unix/sysv/linux/s390/pt-initfini.c: Use 0x07 padding for
1251 2001-02-20 Hans Boehm <hans_boehm@hp.com>
1253 * manager.c (manager_mask): Removed static vesion. Now always local
1254 to __pthread_manager().
1255 (manager_mask_all): Removed completely.
1256 (__pthread_manager): Remove manager_mask_all initialization.
1257 (pthread_handle_create): Remove code to set and reset signal mask
1258 around __clone2() calls.
1260 2001-02-17 Jakub Jelinek <jakub@redhat.com>
1262 * spinlock.c (__pthread_lock): Force lock->__status to be read from
1263 memory on every spin.
1265 2001-02-10 Andreas Jaeger <aj@suse.de>
1267 * Makefile (extra-objs): New.
1269 2001-02-09 Jakub Jelinek <jakub@redhat.com>
1271 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Add
1272 __pthread_initialize_minimal prototype.
1274 2001-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
1276 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
1278 2001-02-06 Martin Schwidefsky <schwidefsky@de.ibm.com>
1280 * sysdeps/unix/sysv/linux/s390/pt-initfini.c: New file.
1282 2001-02-06 Ulrich Drepper <drepper@redhat.com>
1284 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: First attempt to fix the
1285 broken code. Patch by Jes Sorensen.
1287 2001-02-06 Andreas Jaeger <aj@suse.de>
1289 * sysdeps/pthread/pthread.h: Move __pthread_initialize from here
1291 * internals.h: ...here.
1293 2001-02-05 Jes Sorensen <jes@linuxcare.com>
1295 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
1297 2001-02-02 Ulrich Drepper <drepper@redhat.com>
1299 * Versions: Remove __pthread_initialize_minimal.
1301 2001-02-01 Ulrich Drepper <drepper@redhat.com>
1303 * Makefile: Add rules to build crti.o and make it being used in
1304 building libpthread.so.
1305 * sysdeps/i386/Makefile: New file.
1306 * sysdeps/pthread/pt-initfini.c: New file.
1308 * pthread.c: Cleanups.
1310 2001-01-28 Andreas Jaeger <aj@suse.de>
1312 * oldsemaphore.c (__old_sem_init): Adjust for last change.
1313 * sysdeps/pthread/bits/libc-lock.h: Likewise.
1314 * spinlock.c: Likewise.
1316 2001-01-28 Ulrich Drepper <drepper@redhat.com>
1318 * sysdeps/pthread/bits/initspin.h: Make all names namespace clean.
1319 * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
1320 * manager.c: Adjust for namespace cleanup in bits/initspin.h.
1321 * pthread.c: Likewise.
1322 * spinlock.h: Likewise.
1323 * sysdeps/pthread/pthread.h: Likewise.
1325 2001-01-26 Ulrich Drepper <drepper@redhat.com>
1327 * sysdeps/pthread/bits/pthreadtypes.h: Define pthread_attr_t also
1328 as struct __pthread_attr_s.
1330 * semaphore.h (sem_t): Cleanup namespace, rename status and
1333 2001-01-13 Jakub Jelinek <jakub@redhat.com>
1335 * pthread.c (pthread_onexit_process): Clear
1336 __pthread_manager_thread_bos after freeing it.
1337 * Makefile (tests): Add ex16.
1338 * Examples/ex16.c: New file.
1340 2001-01-11 Jakub Jelinek <jakub@redhat.com>
1342 * Makefile (CFLAGS-pthread.c): Pass -DHAVE_Z_NODELETE if ld supports
1344 * pthread.c (pthread_exit_process): Rename to...
1345 (pthread_onexit_process): ...this.
1346 (pthread_atexit_process, pthread_atexit_retcode): New.
1347 (pthread_initialize): Call __cxa_atexit instead of __cxa_on_exit
1348 and only if HAVE_Z_NODELETE is not defined.
1349 (__pthread_initialize_manager): Register pthread_atexit_retcode
1352 2001-01-11 Ulrich Drepper <drepper@redhat.com>
1354 * pthread.c (pthread_initialize): Use __cxs_on_exit not __cxa_atexit.
1356 2001-01-11 Jakub Jelinek <jakub@redhat.com>
1358 * Makefile (tests): Add ex15.
1359 * Examples/ex15.c: New test.
1361 2001-01-08 Ulrich Drepper <drepper@redhat.com>
1363 * pthread.c (pthread_exit_process): Free memory allocated for
1366 2000-12-31 Ulrich Drepper <drepper@redhat.com>
1368 * manager.c (pthread_alloca_stack): Remove MAP_FIXED from mmap calls.
1369 (pthread_free): Always unmap the stack. It's safe now that we don't
1370 use MAP_FIXED to allocate stacks.
1372 2000-12-31 Ulrich Drepper <drepper@redhat.com>
1374 * sysdeps/powerpc/pspinlock.c: Don't include pt-machine.h here.
1376 * manager.c (pthread_allocate_stack): Prepare for removal of MAP_FIXED.
1378 2000-11-15 Wolfram Gloger <wg@malloc.de>
1380 * manager.c (pthread_free): [!FLOATING_STACKS]: Only remap the
1381 stack to PROT_NONE, don't unmap it, avoiding collisions with malloc.
1383 2000-12-27 Andreas Jaeger <aj@suse.de>
1385 * Examples/ex13.c: Make local functions static.
1386 * ecmutex.c: Likewise.
1387 * joinrace.c: Likewise.
1388 * Examples/ex14.c: Likewise.
1390 * Examples/ex2.c: Make local functions static; reformat.
1391 * Examples/ex1.c: Likewise.
1392 * Examples/ex4.c: Likewise.
1393 * Examples/ex5.c: Likewise.
1394 * Examples/ex7.c: Likewise.
1396 * oldsemaphore.c: Add prototypes to shut up GCC.
1397 * pt-machine.c: Likewise.
1399 * weaks.c: Add prototype for pthread_exit.
1401 * internals.h: Add some prototypes, format prototypes and add
1403 Move __libc_waitpid prototype to include/sys/wait.h.
1405 * rwlock.c: Include <bits/libc-lock.h> for prototypes.
1406 * mutex.c: Likewise.
1407 * specific.c: Likewise.
1408 * ptfork.c: Likewise.
1410 * lockfile.c: Include internals.h to get prototypes.
1411 * events.c: Likewise.
1412 * sysdeps/alpha/pspinlock.c: Likewise.
1413 * sysdeps/arm/pspinlock.c: Likewise.
1414 * sysdeps/hppa/pspinlock.c: Likewise.
1415 * sysdeps/i386/pspinlock.c: Likewise.
1416 * sysdeps/ia64/pspinlock.c: Likewise.
1417 * sysdeps/m68k/pspinlock.c: Likewise.
1418 * sysdeps/mips/pspinlock.c: Likewise.
1419 * sysdeps/powerpc/pspinlock.c: Likewise.
1420 * sysdeps/s390/pspinlock.c: Likewise.
1421 * sysdeps/sh/pspinlock.c: Likewise.
1422 * sysdeps/sparc/sparc32/pspinlock.c: Likewise.
1423 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: Likewise.
1424 * sysdeps/sparc/sparc64/pspinlock.c: Likewise.
1426 2000-12-27 Ulrich Drepper <drepper@redhat.com>
1428 * attr.c (__pthread_attr_setstack): Fix setting of __stackaddr element.
1429 (__pthread_attr_getstack): Return correct address.
1430 Add warnings for using pthread_attr_getstackaddr and
1431 pthread_attr_setstackaddr.
1433 2000-12-26 Ulrich Drepper <drepper@redhat.com>
1435 * Examples/ex6.c (test_thread): Make static.
1436 * Examples/ex12.c (test_thread): Make static and add noreturn
1439 2000-12-18 Jes Sorensen <jes@linuxcare.com>
1441 * linuxthreads/sysdeps/ia64/pt-machine.h: __compare_and_swap
1442 and compare_and_swap_with_release_semantics returns int not long.
1444 2000-12-17 Andreas Jaeger <aj@suse.de>
1446 * sysdeps/s390/pt-machine.h (testandset): Use long int as return
1448 * sysdeps/arm/pt-machine.h (testandset): Likewise.
1449 * sysdeps/hppa/pt-machine.h (testandset): Likewise.
1450 * sysdeps/m68k/pt-machine.h (testandset): Likewise.
1451 * sysdeps/sh/pt-machine.h (testandset): Likewise.
1452 * sysdeps/sparc/sparc32/pt-machine.h (testandset): Likewise.
1453 * sysdeps/sparc/sparc64/pt-machine.h (testandset): Likewise.
1455 2000-12-17 Ulrich Drepper <drepper@redhat.com>
1457 * sysdeps/i386/pt-machine.h (testandset): Adjust for prototype change.
1458 * sysdeps/i386/i686/pt-machine.h (testandset): Likewise.
1460 2000-12-17 Andreas Jaeger <aj@suse.de>
1462 * internals.h: Add prototypes for testandset and
1463 __compare_and_swap to shut up gcc warnings.
1465 2000-12-06 Wolfram Gloger <wg@malloc.de>
1467 * join.c (pthread_detach): Allow case where the thread has already
1470 2000-12-05 Andreas Jaeger <aj@suse.de>
1472 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Don't set mips2.
1473 * sysdeps/mips/pt-machine.h (testandset): Likewise.
1474 (__compare_and_swap): Likewise.
1475 Patches by Maciej W. Rozycki <macro@ds2.pg.gda.pl>.
1477 2000-11-20 Jakub Jelinek <jakub@redhat.com>
1479 * Examples/ex3.c (main): Cast int to long before casting to void *.
1480 (search): Cast void * to long, not int.
1481 * Examples/ex8.c (main, thread): Similarly.
1482 * Examples/ex11.c (main): Similarly.
1483 * Examples/ex14.c (worker, do_test): Similarly.
1484 * ecmutex.c (worker, do_test): Similarly.
1485 (nlocks): Cast to int.
1487 2000-11-08 Bruce Mitchener <bruce@cubik.org>
1489 * linuxthreads.texi: Add documentation for pthreads attributes
1490 guardsize, stackaddr, stacksize, and stack. Fix typo in previous
1491 patch. Document pthread_[sg]etconcurrency(). Mark
1492 pthread_mutexattr_[sg]ettype() as POSIX rather than GNU.
1494 2000-11-07 Ulrich Drepper <drepper@redhat.com>
1496 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
1498 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1499 Reported by Christopher Yeoh <cyeoh@linuxcare.com.au>.
1501 2000-11-06 Ulrich Drepper <drepper@redhat.com>
1503 * cancel.c (pthread_cancel): Always set p_canceled, even if we are
1504 not doing it right now.
1505 Reported by Kaz Kylheku <kaz@ashi.footprints.net>.
1507 2000-10-30 Ulrich Drepper <drepper@redhat.com>
1509 * Examples/ex4.c (main): Don't use exit() to avoid warning with
1512 2000-10-29 Ulrich Drepper <drepper@redhat.com>
1514 * attr.c (__pthread_attr_setguardsize): Don't round guardsize
1515 here. Reported by Bruce Mitchener <bruce@cubik.org>.
1517 * linuxthreads.texi: Changes terminology to 'type' from 'kind' when
1518 discussing mutexes. (As per the Unix98 name for the API.)
1519 Changes documentation for pthread_mutexattr_setkind_np() and
1520 pthread_mutexattr_getkind_np() over to the Unix98 APIs for the
1521 same: pthread_mutexattr_settype() and pthread_mutexattr_gettype().
1522 Changes references to PTHREAD_MUTEXATTR_FAST_NP to
1523 PTHREAD_MUTEXATTR_ADAPTIVE_NP.
1524 Begins to introduce discussion of the ``timed'' mutex type. This
1525 discussion is currently incomplete.
1526 Patch by Bruce Mitchener <bruce@cubik.org>.
1528 2000-10-26 Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
1529 Yutaka Niibe <gniibe@chroot.org>
1531 * sysdeps/sh/pt-machine.h (testandset): Since the operand of TAS.B
1532 has restrictions, use register.
1534 2000-10-23 Andreas Schwab <schwab@suse.de>
1536 * Examples/ex14.c (TIMEOUT): Override default timeout.
1538 2000-10-16 Ulrich Drepper <drepper@redhat.com>
1540 * specific.c: Protect tsd array modification in thread data
1541 structures by getting the thread lock in pthread_key_delete and
1542 __pthread_destroy_specifics.
1543 Patch by Wolfram Gloger <Wolfram.Gloger@dent.med.uni-muenchen.de>.
1545 2000-10-12 Alan Modra <alan@linuxcare.com.au>
1547 * sysdeps/pthread/bits/initspin.h: New file.
1548 * spinlock.h: Move LOCK_INITIALIZER definition to <bits/initspin.h>.
1549 (__pthread_init_lock): Initialize lock with LT_SPINLOCK_INIT.
1550 (__pthread_alt_init_lock): Likewise.
1551 (__pthread_alt_trylock): Release lock with LT_SPINLOCK_INIT.
1553 2000-10-12 David Huggins-Daines <dhd@linuxcare.com>
1555 * oldsemaphore.c (__old_sem_init): Release lock with
1556 LT_SPINLOCK_INIT, not zero.
1557 * spinlock.c (__pthread_unlock): Likewise.
1558 (__pthread_alt_lock): Likewise.
1559 (__pthread_alt_timedlock): Likewise.
1560 (__pthread_alt_unlock): Likewise.
1561 * sysdeps/pthread/bits/libc-lock.h: Initialize locks with
1562 LT_SPINLOCK_INIT if it is non-zero. Likewise for init-once flags.
1563 * sysdeps/pthread/pthread.h: Include bits/initspin.h. Use
1564 LT_SPINLOCK_INIT do initialize spinlocks not 0.
1566 2000-10-12 David Huggins-Daines <dhd@linuxcare.com>
1568 * shlib-versions: Add version definitions for hppa-linux.
1570 2000-10-12 Alan Modra <alan@linuxcare.com.au>
1572 * sysdeps/hppa/pspinlock.c: New file.
1573 * sysdeps/hppa/pt-machine.h: New file.
1574 * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: New file.
1576 2000-10-05 Jakub Jelinek <jakub@redhat.com>
1578 * mutex.c (__pthread_mutex_destroy): Correct test of
1579 busy mutex for mutexes using alternate fastlocks.
1580 Patch by dtc@cmucl.cons.org.
1582 2000-09-28 Martin Schwidefsksy <schwidefsky@de.ibm.com>
1584 * sysdeps/s390/pt-machine.h: Make %a0 the thread register.
1586 2000-09-28 Ulrich Drepper <drepper@redhat.com>
1588 * mutex.c (__pthread_mutex_unlock): For PTHREAD_MUTEX_RECURSIVE_NP
1589 test for owner first.
1590 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1592 * cancel.c (pthread_cancel): Don't do anything if cancelation is
1595 2000-09-26 Ulrich Drepper <drepper@redhat.com>
1597 * spinlock.h (__pthread_set_own_extricate_if): Optimize a bit.
1598 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1600 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
1601 _POSIX_MONOTONIC_CLOCK.
1603 * spinlock.h (__pthread_set_own_extricate_if): Add back locking
1606 2000-09-20 Andreas Jaeger <aj@suse.de>
1608 * pthread.c [!__ASSUME_REALTIME_SIGNALS]: Make inclusion of
1609 "testrtsig.h" conditional.
1611 2000-09-11 Ulrich Drepper <drepper@redhat.com>
1613 * sysdeps/pthread/pthread.h: Declare pthread_attr_getstack and
1614 pthread_attr_setstack.
1615 * Versions [libpthread] (GLIBC_2.2): Export pthread_attr_getstack and
1616 pthread_attr_setstack.
1617 * attr.c (pthread_attr_getstack, pthread_attr_setstack): New functions.
1619 2000-09-05 Ulrich Drepper <drepper@redhat.com>
1621 * Examples/ex14.c: New file.
1622 * Makefile (tests): Add ex14.
1624 * mutex.c (__pthread_mutex_unlock): Correct test for already unlocked
1625 mutex. Patch by dtc@cmucl.cons.org.
1627 * ecmutex.c: New file.
1628 * Makefile (tests): Add ecmutex.
1630 2000-09-04 H.J. Lu <hjl@gnu.org>
1632 * attr.c (__pthread_attr_setguardsize): Use page_roundup
1633 instead of roundup to round up to the page size.
1635 2000-09-03 Mark Kettenis <kettenis@gnu.org>
1637 * manager.c (pthread_exited): Correctly report event as TD_REAP
1638 instead of TD_DEATH. Fix comments.
1640 2000-09-03 Ulrich Drepper <drepper@redhat.com>
1642 * spinlock.h (testandset): Add cast to avoid warning.
1643 Patch by Franz Sirl <Franz.Sirl-kernel@lauterbach.com>.
1645 2000-09-02 Andreas Jaeger <aj@suse.de>
1647 * sysdeps/pthread/timer_routines.c: Include stdlib.h for abort
1650 2000-09-01 Ulrich Drepper <drepper@redhat.com>
1652 * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
1653 Fix typo in last patch (_mode -> _flags).
1655 * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
1656 Provide definition which respects _IO_USER_LOCK flag.
1658 2000-08-30 Ulrich Drepper <drepper@redhat.com>
1660 * manager.c (pthread_allocate_stack): Clear descriptor only if not
1663 2000-08-25 Ulrich Drepper <drepper@redhat.com>
1665 * Makefile: Add rules to build and run unload.
1666 * unload.c: New file.
1668 * pthread.c (pthread_exit_process): Move thread_self use inside `if'.
1670 * sysdeps/pthread/pthread.h
1671 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Defined.
1672 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: Defined.
1674 2000-08-24 Andreas Jaeger <aj@suse.de>
1676 * Examples/ex13.c: Include <string.h> for strerror prototype and
1677 <stdlib.h> for abort prototype.
1678 (pthr_cond_signal_mutex): Rewrite to silence GCC.
1679 (thread_start): Remove unused variable err.
1680 (main): Silence GCC warnings.
1682 2000-08-22 Andreas Jaeger <aj@suse.de>
1684 * Examples/ex13.c: New test by Kurt Garloff <garloff@suse.de>.
1686 * Makefile (tests): Add ex13.
1688 2000-08-20 Ulrich Drepper <drepper@redhat.com>
1690 * semaphore.h: Add restrict where required by AGd4.
1691 * sysdeps/pthread/pthread.h: Likewise.
1692 * sysdeps/pthread/unix/sysv/linux/bits/sigthread.h: Likewise.
1694 2000-08-15 Ulrich Drepper <drepper@redhat.com>
1696 * Makefile (tests): Add ex12. Add rule to build it.
1697 * Examples/ex12.c: New file.
1699 2000-08-13 Ulrich Drepper <drepper@redhat.com>
1701 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_SEMAPHORES
1702 even though the implementation is not quite complete (but it reports
1703 it). Define _POSIX_MESSAGE_PASSING to -1.
1704 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1706 2000-08-12 Andreas Jaeger <aj@suse.de>
1708 * sysdeps/mips/pt-machine.h (testandset): Add .set mips2 for
1710 (__compare_and_swap): Likewise.
1711 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Likewise.
1713 2000-08-10 Ulrich Drepper <drepper@redhat.com>
1715 * pthread.c (__pthread_initial_thread): Initialize p_errnop and
1716 p_h_errnop correctly and not to NULL.
1718 2000-08-05 Ulrich Drepper <drepper@redhat.com>
1720 * Banner: Bump version number to 0.9.
1722 2000-08-04 Ulrich Drepper <drepper@redhat.com>
1724 * Makefile (tests): Add tststack. Add rule to build the program.
1725 * tststack.c: New file.
1727 * internals.h: Declare __pthread_max_stacksize.
1728 * pthread.c (__pthread_max_stacksize): New variable.
1729 (__pthread_initialize_manager): Determine __pthread_initialize_manager
1731 * manager.c (thread_segment): Return always NULL if FLOATING_STACKS.
1732 (pthread_allocate_stack): Allow kernel to choose stack address if
1733 FLOATING_STACKS. This also handles variable-sized stacks.
1734 Always allocate stack and guardpage together. Use mprotect to
1735 change guardpage access.
1736 * sysdeps/i386/useldt.h: Define FLOATING_STACKS and
1737 ARCH_STACK_MAX_SIZE.
1739 * attr.c (__pthread_attr_setstacksize): Also test value against
1742 * manager.c (__pthread_nonstandard_stacks): Define only if
1743 THREAD_SELF is not defined.
1744 (pthread_allocate_stack): Always initialize gardaddr to a correct
1746 (pthread_handle_create): Unmap thread with one call.
1747 (pthread_free): Remove test for initial thread before removing stack.
1748 Unmap stack with one call.
1750 * pthread.c (__pthread_initial_thread): Initialize p_userstack to
1751 1 to avoid removing the stack.
1753 2000-07-27 Jes Sorensen <jes@linuxcare.com>
1755 * sysdeps/ia64/pspinlock.c (__pthread_spin_lock): Add
1756 load of spin lock to prime the cache before the atomic compare and
1757 exchange operation (cmpxchg4). This avoids the spinning on the
1758 cmpxchg4 instruction and reduces movement of the cache line back
1759 and forth between the processors (explanation by Asis K. Mallick
1760 from Intel). This basically makes the implementation operate the
1761 same as the Linux kernel implementation.
1763 * shlib-versions: Use GLIBC_2_2 for Linux/ia64.
1764 * sysdeps/ia64/pspinlock.c: New file.
1766 2000-08-03 Ulrich Drepper <drepper@redhat.com>
1768 * pthread.c: Move definition of __pthread_set_own_extricate_if...
1769 * spinlock.h: ...here. Remove locking.
1770 * internals.h: Remove __pthread_set_own_extricate_if prototype.
1772 * rwlock.c: Use THREAD_GETMEM And THREAD_SETMEM.
1773 (rwlock_rd_extricate_func): Don't determine self, let
1774 __pthread_lock do it.
1775 (rwlock_wr_extricate_func): Likewise.
1776 (rwlock_have_already): Optimize *pself handling a bit.
1778 * mutex.c: Use __builtin_expect.
1779 * pthread.c: Likewise.
1781 2000-08-02 Andreas Jaeger <aj@suse.de>
1783 * sysdeps/s390/pspinlock.c: New file.
1784 * sysdeps/s390/pt-machine.h: New file.
1785 Patches by Martin Schwidefsky <schwidefsky@de.ibm.com>.
1787 2000-07-12 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
1789 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Implement for
1791 * sysdeps/mips/pt-machine.h (testandset): Likewise.
1793 2000-07-26 Andreas Jaeger <aj@suse.de>
1795 * pthread.c: Initialize p_sem_avail.
1797 2000-07-25 Ulrich Drepper <drepper@redhat.com>
1799 * internals.h (struct __pthread_descr_struct): Add p_sem_avail.
1800 * semaphore.c: Handle spurious wakeups.
1802 * sysdeps/pthread/pthread.h: Add back PTHREAD_MUTX_FAST_NP as an alias
1803 for PTHREAD_MUTEX_ADAPTIVE_NP for source code compatibility.
1805 * pthread.c (__pthread_set_own_extricate): Use THREAD_GETMEM.
1806 (__pthread_wait_for_restart): Likewise.
1808 * condvar.c (pthread_cond_wait): Also check whether thread is
1809 cancelable before aborting loop.
1810 (pthread_cond_timedwait): Likewise.
1812 * signals.c (pthread_sighandler): Remove special code to restrore
1814 (pthread_sighandler_t): Likewise.
1816 2000-07-25 Mark Kettenis <kettenis@gnu.org>
1818 * internals.h (__RES_PTHREAD_INTERNAL): Remove define.
1819 * pthread.c: Include <resolv.h>.
1820 (_res): Undefine. Add extern declaration.
1822 2000-07-24 Ulrich Drepper <drepper@redhat.com>
1824 * pthread.c (__pthread_initial_thread): Update initializer.
1825 (__pthread_manager_thread): Likewise.
1826 (pthread_initialize): Move setrlimit call to...
1827 (__pthread_initialize_manager): ...here.
1828 (__pthread_reset_main_thread): Reset also soft limit on stack size.
1830 * condvar.c: Handle spurious wakeups. [PR libc/1749].
1831 * internals.h (struct _pthread_descr_struct): Add p_condvar_avail.
1833 2000-07-21 Ulrich Drepper <drepper@redhat.com>
1835 * spinlock.h: If IMPLEMENT_TAS_WITH_CAS is defined use
1836 __compare_and_swap to define testandset.
1837 * sysdeps/powerpc/pt-machine.h: Add volatile to asms.
1838 Define IMPLEMENT_TAS_WITH_CAS.
1840 2000-07-20 Ulrich Drepper <drepper@redhat.com>
1842 * Makefile: Pass -z nodelete to linker for libpthread.so
1843 generation if it understand this option.
1845 2000-07-18 Mark Kettenis <kettenis@gnu.org>
1847 * manager.c (pthread_handle_create): Remove initialization of
1848 new_thread->p_res._sock.
1850 2000-07-19 Kaz Kylheku <kaz@ashi.footprints.net>
1852 Bugfixes to the variant of the code for machines with no compare
1855 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Wait
1856 node was not being properly enqueued, due to failing to update
1857 the lock->__status field.
1859 * spinlock.c (__pthread_alt_timedlock): The oldstatus variable was
1860 being set inappropriately, causing the suspend function to be called
1861 with a null self pointer and crash.
1863 2000-07-18 Ulrich Drepper <drepper@redhat.com>
1865 * spinlock.h (__pthread_alt_trylock): Fix code used if no
1866 compare&swap is available.
1868 * spinlock.h (__pthread_trylock): Use __compare_and_swap, not
1871 * pthread.c (pthread_initialize): Don't use sysconf to determine
1872 whether the machine has more than one processor.
1874 * spinlock.c (__pthread_alt_timedlock): Add back one of the
1875 removed thread_self calls.
1877 2000-07-18 Kaz Kylheku <kaz@ashi.footprints.net>
1879 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Changed
1880 __compare_and_swap to compare_and_swap in code which assumes
1881 compare swap is available.
1883 2000-07-18 Kaz Kylheku <kaz@ashi.footprints.net>
1885 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Fixed
1886 bug whereby thr field of waitnode structure would not be correctly
1887 set unless a null self pointer is passed to the functions.
1888 Eliminated redundant calls to thread_self().
1890 2000-07-18 Jakub Jelinek <jakub@redhat.com>
1892 * pthread.c (__pthread_initialize_manager): Lock
1893 __pthread_manager_thread.p_lock before calling clone.
1895 2000-05-05 H.J. Lu <hjl@gnu.org>
1897 * sysdeps/ia64/pt-machine.h (__compare_and_swap): Change it to
1898 have acquire semantics.
1899 (__compare_and_swap_with_release_semantics): New inline
1901 (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): New macro.
1903 2000-01-28 Hans Boehm <hboehm@exch.hpl.hp.com>
1905 * manager.c: Fix the problem with signals at startup.
1906 Change the way that thread stacks are allocated on IA64.
1907 Clean up some of the guard page allocation stuff.
1909 1999-12-19 H.J. Lu <hjl@gnu.org>
1911 * internals.h (page_roundup): New.
1912 * attr.c (__pthread_attr_setguardsize); Use page_roundup
1914 * manager.c (pthread_allocate_stack): Make sure guardaddr is
1915 page aligned with page_roundup if NEED_SEPARATE_REGISTER_STACK
1918 1999-12-17 Hans Boehm <hboehm@exch.hpl.hp.com>
1920 * manager.c (pthread_allocate_stack): Unmap the stack top
1921 if failed to map the stack bottom.
1923 (pthread_free): Fix the guard page.
1925 * pthread.c (pthread_initialize): Set rlimit correctly for
1926 NEED_SEPARATE_REGISTER_STACK.
1928 1999-12-16 H.J. Lu <hjl@gnu.org>
1930 * pthread.c (__pthread_initialize_manager): Pass
1931 __pthread_manager_thread_bos instead of
1932 __pthread_manager_thread_tos to __clone2.
1934 1999-12-16 H.J. Lu <hjl@gnu.org>
1936 * manager.c (pthread_allocate_stack): Correct the calculation
1937 of "new_thread_bottom". Remove MAP_GROWSDOWN from mmap for
1940 1999-12-13 H.J. Lu <hjl@gnu.org>
1942 * sysdeps/ia64/pt-machine.h (__compare_and_swap): Added a stop
1943 bit after setting ar.ccv.
1945 1999-12-12 H.J. Lu <hjl@gnu.org>
1947 * manager.c (pthread_allocate_stack): Make the starting
1948 address of the stack bottom page aligned. FIXME: it may
1949 need changes in other places.
1950 (pthread_handle_create): Likewise.
1952 1999-12-11 Hans Boehm <hboehm@exch.hpl.hp.com>
1954 * manager.c (pthread_allocate_stack): Handle
1955 NEED_SEPARATE_REGISTER_STACK.
1956 (pthread_handle_create): Likewise.
1957 * pthread.c (__pthread_initialize_manager): Likewise.
1959 * sysdeps/ia64/pt-machine.h: Use r13 for thread pointer.
1961 1999-12-02 H.J. Lu <hjl@gnu.org>
1963 * sysdeps/ia64/pt-machine.h: New.
1965 2000-07-13 Ulrich Drepper <drepper@redhat.com>
1967 * wrapsyscall.c: Mark non-__ protected names as weak.
1970 2000-07-12 Bruno Haible <haible@clisp.cons.org>
1972 * Examples/ex8.c: Include <sys/wait.h>, not <wait.h>.
1974 2000-07-12 Ulrich Drepper <drepper@redhat.com>
1976 * spinlock.c: Fix code for TEST_FOR_COMPARE_AND_SWAP being defined.
1977 Add tests also to new alternative spinlock implementation.
1978 * spinlock.h: Likewise.
1979 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1981 2000-07-06 Ulrich Drepper <drepper@redhat.com>
1983 * Version: Export __sigaction.
1984 * signals.c: Define __sigaction alias. Use __libc_sigaction instead
1986 * pthread.c: Use __libc_sigaction instead of __sigaction.
1988 * condvar.c: Implement pthread_condattr_getpshared and
1989 pthread_condattr_setpshared.
1990 * mutex.c: Implement pthread_mutexattr_getpshared and
1991 pthread_mutexattr_setpshared.
1992 * Versions: Export new functions.
1993 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
1995 * rwlock.c (pthread_rwlockattr_init): Use PTHREAD_PROCESS_PRIVATE.
1996 (pthread_rwlockattr_setpshared): Fail if PTHREAD_PROCESS_PRIVATE
1999 2000-07-04 Greg McGary <greg@mcgary.org>
2001 * sysdeps/pthread/bits/libc-lock.h: Remove BP_SYM from
2002 pragmas. Include bp-sym.h only if _LIBC.
2004 2000-07-04 Ulrich Drepper <drepper@redhat.com>
2006 * spinlock.c (__pthread_unlock): Properly place write barrier.
2007 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2009 2000-07-03 Ulrich Drepper <drepper@redhat.com>
2011 * spinlock.c: Replace fast spinlocks by adaptive spinlocks which are
2012 faster on SMP systems. No more emulation of compare&swap for adaptive
2014 * spinlock.h: Likewise.
2015 * sysdeps/pthread/pthread.h: Shuffle PTHREAD_MUTEX_* values around.
2016 Replace fast with adaptive mutex.
2017 * mutex.c: Rewrite for replacement of fast by adaptive mutex.
2018 * condvar.c: Likewise.
2019 * pthread.c: Define and initialize __pthread_smp_kernel variable.
2020 * internals.h: Declare __pthread_smp_kernel.
2021 * sysdeps/pthread/bits/pthreadtypes.h: Update comment of
2022 _pthread_fastlock structure.
2023 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2025 * pthread.c: Remove initialization to zero from global variables.
2027 2000-06-29 Jakub Jelinek <jakub@redhat.com>
2029 * shlib-versions: Make sparc64 GLIBC_2.2+ only.
2031 2000-06-28 Greg McGary <greg@mcgary.org>
2033 * weaks.c: Wrap BP_SYM () around weak extern declarations of
2034 pthread functions that have pointers in their return+arg signatures.
2036 2000-06-27 Greg McGary <greg@mcgary.org>
2038 * sysdeps/pthread/bits/libc-lock.h: Wrap BP_SYM () around weak
2039 extern declarations of pthread functions that have pointers in
2040 their return+arg signatures.
2042 2000-06-26 Ulrich Drepper <drepper@redhat.com>
2044 * Makefile (tests): Add ex11. Add rules to build it.
2045 * Examples/ex11.c: New file.
2046 * rwlock.c: Fix complete braindamaged previous try to implement
2049 * spinlock.c: Pretty print.
2051 2000-06-25 Ulrich Drepper <drepper@redhat.com>
2053 * Makefile (tests): Add ex10. Add rules to build it.
2054 * Versions [GLIBC_2.2] (libpthread): Add pthread_mutex_timedlock,
2055 pthread_rwlock_timedrdlock, and pthread_rwlock_timedwrlock.
2056 * condvar.c (pthread_cond_wait): Allow mutex of kind
2057 PTHREAD_MUTEX_TIMED_NP.
2058 (pthread_cond_timedwait_relative): Likewise.
2059 * mutex.c (__pthread_mutex_init): Default is PTHREAD_MUTEX_TIMED_NP.
2060 (__pthread_mutex_trylock): Use __pthread_alt_trylock for
2061 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
2062 (__pthread_mutex_lock): Use __pthread_alt_lock for
2063 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
2064 (__pthread_mutex_timedlock): New function.
2065 (__pthread_mutex_unlock): Use __pthread_alt_unlock for
2066 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
2067 (__pthread_mutexattr_init): Use PTHREAD_MUTEX_TIMED_NP.
2068 (__pthread_mutexattr_settype): Allow PTHREAD_MUTEX_TIMED_NP.
2069 * spinlock.c: Implement alternate fastlocks.
2070 * spinlock.h: Add prototypes.
2071 * Examples/ex10.c: New file.
2072 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
2073 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2075 * rwlock.c (__pthread_rwlock_rdlock): Optimize loop a bit.
2076 (__pthread_rwlock_timedrdlock): New function.
2077 (__pthread_rwlock_timedwrlock): New function.
2078 Use laternate fastlock function everywhere.
2080 2000-06-21 Andreas Jaeger <aj@suse.de>
2082 * sysdeps/pthread/timer_routines.c: Include <string.h> for memset
2085 * join.c: Include <stdlib.h> for exit prototype.
2087 2000-06-20 Ulrich Drepper <drepper@redhat.com>
2089 * sysdeps/i386/useldt.h: Include <stdlib.h>.
2091 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_BARRIERS.
2092 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2094 * Makefile (libpthread-routines): Add barrier.
2095 (tests): Add ex9. Add rule to build ex9.
2096 * Versions: Export barrier functions.
2097 * barrier.c: New file.
2098 * Examples/ex9.c: New file.
2099 * sysdeps/pthread/pthread.h: Add barrier data types and declarations.
2100 * sysdeps/pthread/bits/pthreadtypes.h: Likewise.
2101 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2103 2000-06-19 H.J. Lu <hjl@gnu.org>
2105 * spinlock.h (HAS_COMPARE_AND_SWAP): Defined if
2106 HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS is defined.
2107 (compare_and_swap_with_release_semantics): New. Default to
2108 compare_and_swap if HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS
2111 * spinlock.c (__pthread_unlock): Call
2112 compare_and_swap_with_release_semantics () instead of
2113 compare_and_swap ().
2115 2000-06-19 Ulrich Drepper <drepper@redhat.com>
2117 * sysdeps/pthread/timer_create.c: Use _set_errno instead of assigning
2119 * sysdeps/pthread/timer_delete.c: Likewise.
2120 * sysdeps/pthread/timer_getoverr.c: Likewise.
2121 * sysdeps/pthread/timer_gettime.c: Likewise.
2122 * sysdeps/pthread/timer_settime.c: Likewise.
2124 2000-06-13 Kaz Kylheku <kaz@ashi.footprints.net>
2126 Timer nodes are now reference counted, and can be marked
2127 as deleted. This allows for the safe release of the global mutex
2128 in the middle without losing the timer being operated on.
2130 * sysdeps/pthread/posix-timer.h (struct timer_node): The inuse
2131 member is now an enum with three values, so that an intermediate
2132 state can be represented (deleted but not free for reuse yet).
2133 New refcount member added.
2134 * sysdeps/pthread/timer_routines.c: Likewise.
2136 * sysdeps/pthread/posix-timer.h (timer_addref, timer_delref,
2137 timer_valid): New inline functions added.
2139 * sysdeps/pthread/timer_gettime.c (timer_gettime): Function
2140 restructured, recursive deadlock bug fixed.
2142 * sysdeps/pthread/timer_gettime.c (timer_gettime): Uses new
2143 timer_addref to ensure that timer won't be deleted while mutex is not
2144 held. Also uses timer_invalid to perform validation of timer handle.
2145 * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
2146 * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Likewise.
2148 2000-06-14 Ulrich Drepper <drepper@redhat.com>
2150 * shlib-versions: Add entry for SH.
2151 Patch by Kaz Kojima <kkojima@rr.iij4u.or.jp>.
2153 2000-06-13 Kaz Kylheku <kaz@ashi.footprints.net>
2155 A few optimizations. Got rid of unnecessary wakeups of timer threads,
2156 tightened up some critical regions and micro-optimized some list
2159 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
2160 Returns int value now to indicate whether timer was queued at head.
2161 * sysdeps/pthread/posix-timer.h: Likewise.
2162 * sysdeps/pthread/timer_settime.c (timer_settime): Takes advantage of
2163 new return value from __timer_thread_queue_timer to avoid waking
2164 up timer thread unnecessarily.
2166 * sysdeps/pthread/posix-timer.h (timer_id2ptr): No longer checks
2167 inuse flag, because this requires mutex to be held. Callers updated
2168 to do the check when they have the mutex.
2169 * sysdeps/pthread/timer_getoverr.c: Add check for inuse here.
2171 * sysdeps/pthread/timer_settime.c (timer_settime): Tighter critical
2172 regions: avoids making system calls while holding timer mutex, and
2173 a few computations were moved outside of the mutex as well.
2174 * sysdeps/pthread/timer_gettime.c (timer_gettime): Likewise.
2176 * sysdeps/pthread/posix-timer.h (list_unlink_ip): Function name changed
2177 to list_unlink_ip, meaning idempotent. Pointer manipulation
2178 changed to get better better code out of gcc.
2179 * sysdeps/pthread/timer_routines.c (list_unlink): Non-idempotent
2180 version of list_unlink added here.
2181 * sysdeps/pthread/timer_delete.c: Use appropriate list unlink
2182 function in all places: idempotent one for timers, non-idempotent
2183 one for thread nodes.
2184 * sysdeps/pthread/timer_settime: Likewise.
2185 * sysdeps/pthread/timer_routines.c: Likewise.
2187 2000-06-13 Ulrich Drepper <drepper@redhat.com>
2189 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_TIMERS): Define.
2190 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2192 * sysdeps/pthread/Makefile: Remove tests definition.
2194 2000-06-12 Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
2195 Yutaka Niibe <gniibe@chroot.org>
2197 * sysdeps/sh/pspinlock.c: New file.
2198 * sysdeps/sh/pt-machine.h: New file.
2200 2000-06-12 Ulrich Drepper <drepper@redhat.com>
2202 * Makefile (tests): Add joinrace.
2204 * Examples/ex6.c: Test return value of pthread_join.
2206 2000-06-11 Geoff Keating <geoffk@cygnus.com>
2208 * sysdeps/powerpc/pspinlock.c (__pthread_spin_lock): Implement.
2209 (__pthread_spin_trylock): Implement.
2210 (__pthread_spin_unlock): Implement.
2211 (__pthread_spin_init): Implement.
2212 (__pthread_spin_destroy): Implement.
2214 2000-06-10 Ulrich Drepper <drepper@redhat.com>
2216 * sysdeps/pthread/timer_routines.c (list_append): Little fix to
2217 really append the entry.
2219 2000-06-10 Andreas Jaeger <aj@suse.de>
2221 * lockfile.c (__fresetlockfiles): Remove unused variable fp.
2223 2000-06-10 Kaz Kylheku <kaz@ashi.footprints.net>
2225 * sysdeps/pthread/timer_create.c: Thread matching now done on
2226 clock type as well as thread attributes.
2227 There are individual global signal-delivering threads for
2228 different clock types.
2229 * sysdeps/pthread/posix-timer.h: Likewise.
2230 * sysdeps/pthread/timer_routines.c: Likewise.
2232 * sysdeps/pthread/timer_routines.c: Thread allocation and
2233 deallocation function now remembers to put thread on active
2234 list and remove from active list.
2235 Thus now the feature of binding multiple timers
2236 to a single thread actually works.
2238 2000-06-10 Ulrich Drepper <drepper@redhat.com>
2240 * pthread.c (__pthread_create_2_1): Optimize a bit.
2242 * internals.h (invalid_handle): Also test for p_terminated != 0.
2243 (nonexisting_handle): New function. Same as old invalid_handle.
2244 * join.c (pthread_join): Use nonexisting_handle instead of
2245 invalid_handle to test for acceptable thread handle.
2246 * manager.c (pthread_handle_free): Likewise.
2247 * joinrace.c: New file.
2248 Reported by Permaine Cheung <pcheung@cygnus.com>.
2250 2000-06-08 Ulrich Drepper <drepper@redhat.com>
2252 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
2253 Correct handling of matching variable.
2255 * sysdeps/pthread/tst-timer.c (main): Rewrite initializers to
2258 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
2259 Be prepared for empty timer list.
2261 * sysdeps/pthread/timer_create.c (timer_create): Correct names of
2262 CPUTIME clock ID. Add support for thread clocks.
2264 * sysdeps/pthread/posix-timer.h (timer_ptr2id): Operands in
2265 subtraction were switched.
2267 * sysdeps/pthread/timer_routines.c (init_module): Use
2268 THREAD_MAXNODES threads.
2270 * sysdeps/pthread/posix-timer.h (struct timer_node): Add creator_pid.
2271 * sysdeps/pthread/timer_create.c: Fill in creator_pid.
2272 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Send signal
2273 with sigqueueinfo is this system call is available.
2275 * sysdeps/pthread/timer_create.c (timer_create): Allow
2276 CLOCK_CPUTIME if _POSIX_CPUTIME is defined.
2278 * sysdeps/pthread/Makefile: New file. Add rules to build timer
2280 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add TIMER_MAX.
2282 2000-06-04 Kaz Kylheku <kaz@ashi.footprints.net>
2284 * sysdeps/pthread/posix-timer.h: New file.
2285 * sysdeps/pthread/timer_create.c: New file.
2286 * sysdeps/pthread/timer_delete.c: New file.
2287 * sysdeps/pthread/timer_getoverr.c: New file.
2288 * sysdeps/pthread/timer_gettime.c: New file.
2289 * sysdeps/pthread/timer_routines.c: New file.
2290 * sysdeps/pthread/timer_settime.c: New file.
2291 * sysdeps/pthread/tst-timer.c: New file.
2293 2000-06-08 Ulrich Drepper <drepper@redhat.com>
2295 * sysdeps/unix/sysv/linux/bits/local_lim.h: Remove OPEN_MAX and
2296 LINK_MAX definitions if necessary.
2298 2000-06-04 Kaz Kylheku <kaz@ashi.footprints.net>
2300 Added missing fork time handling of global libio lock.
2302 * lockfile.c (__fresetlockfiles): Now also resets the list lock,
2303 not just the individual stream locks. Rewritten to use new
2304 iterator interface provided by libio rather than accessing
2307 * lockfile.c (__flockfilelist, _funlockfilelist): New functions
2308 which lock and unlock the stream list using the new interface
2310 * internals.h: Likewise.
2312 * ptfork.c (__fork): Now calls __flockfilelist before fork,
2313 and __funlockfilelist in the parent after the fork.
2314 Child still calls __fresetlockfiles as before.
2316 * linuxthreads.texi: Now explains what happens to streams at
2317 fork time. Also whole new section on forking and thread added.
2318 Definition of pthread_atfork moved out of Miscellaneous Functions
2319 to this new section.
2321 2000-06-04 Jakub Jelinek <jakub@redhat.com>
2323 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c (__pthread_spin_lock):
2324 Add missing register.
2325 * sysdeps/sparc/sparc64/pspinlock.c (__pthread_spin_lock): Likewise.
2327 2000-06-02 Jakub Jelinek <jakub@redhat.com>
2329 * sysdeps/sparc/sparc32/pspinlock.c: Implement spinlocks.
2330 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: New.
2331 * sysdeps/sparc/sparc64/pspinlock.c: Implement spinlocks.
2333 2000-05-31 Andreas Jaeger <aj@suse.de>
2335 * sysdeps/mips/pspinlock.c: Implement spinlocks.
2337 2000-05-28 Ulrich Drepper <drepper@redhat.com>
2339 * spinlock.c (__pthread_lock): Remove ASSERT.
2341 * Makefile (tests): Add ex8.
2342 * Examples/ex8.c: New file.
2344 2000-05-12 Kaz Kylheku <kaz@ashi.footprints.net>
2346 Bugfix: The pthread_atfork mechanism now takes care of its
2347 own internal mutex at fork time.
2349 * ptfork.c (__fork): Revised so that the mutex is held across
2350 the fork operation and while the handlers are called, and so that
2351 the child resets the mutex.
2353 * linuxthreads.texi: Updated pthread_atfork documentation to make
2354 it clear that fork and pthread_atfork can't be reentered from
2355 atfork handlers, that pthread_atfork and fork are mutually atomic,
2356 and that the handlers are inherited by the child process.
2358 2000-05-24 Ulrich Drepper <drepper@redhat.com>
2360 * Makefile (libpthread-routines): Add pspinlock.
2361 * cancel.c: Rename __pthread_spin_unlock back to __pthread_unlock.
2362 Use struct _pthread_fastlock instead of pthread_spinlock_t.
2363 * condvar.c: Likewise.
2364 * internals.h: Likewise.
2366 * manager.c: Likewise.
2367 * mutex.c: Likewise.
2368 * pthread.c: Likewise.
2369 * rwlock.c: Likewise.
2370 * semaphore.c: Likewise.
2371 * signals.c: Likewise.
2372 * spinlock.h: Likewise.
2373 * spinlock.c: Likewise. Remove pthread_spin_lock functions.
2374 * sysdeps/alpha/pspinlock.c: New file.
2375 * sysdeps/arm/pspinlock.c: New file.
2376 * sysdeps/i386/pspinlock.c: New file.
2377 * sysdeps/m68k/pspinlock.c: New file.
2378 * sysdeps/mips/pspinlock.c: New file.
2379 * sysdeps/powerpc/pspinlock.c: New file.
2380 * sysdeps/sparc/sparc32/pspinlock.c: New file.
2381 * sysdeps/sparc/sparc64/pspinlock.c: New file.
2382 * sysdeps/pthread/bits/pthreadtypes.h: Remove pthread_spinlock_t
2383 back to _pthread_fastlock. Define new pthread_spinlock_t.
2385 2000-05-24 Andreas Jaeger <aj@suse.de>
2387 * sysdeps/i386/i686/pt-machine.h: Only use LDT on newer kernels.
2389 2000-05-21 Jakub Jelinek <jakub@redhat.com>
2391 * manager.c (pthread_handle_create): Initialize p_res._sock to -1.
2393 2000-05-13 Jakub Jelinek <jakub@redhat.com>
2395 * internals.h (__RES_PTHREAD_INTERNAL): Define.
2397 2000-05-06 Kaz Kylheku <kaz@ashi.footprints.net>
2399 * mutex.c (pthread_once): IN_PROGRESS state of pthread_once_t
2400 object state is represented with additional bits which distinguish
2401 whether that state was set up in the current process, or
2402 in an ancestor process. If that state was set in an ancestor,
2403 it means that a fork happened while thread was executing the init
2404 function. In that case, the state is reset to NEVER.
2405 * mutex.c (__pthread_once_fork_prepare): New function.
2406 (__pthread_once_fork_child): Likewise
2407 (__pthread_once_fork_parent): Likewise
2408 (__pthread_reset_pthread_once): Removed.
2409 * ptfork.c (__fork): Call new handlers in mutex.c.
2410 * internals.h: Declarations of new mutex.c functions added.
2411 Declaration of removed function deleted.
2412 * linuxthreads.texi: Updated documentation about pthread_once
2413 to clarify what happens under cancellation and forking.
2415 2000-05-06 Kaz Kylheku <kaz@ashi.footprints.net>
2417 * internals.h: New thread manager request type, REQ_KICK.
2418 * join.c (pthread_exit): main thread now calls exit() instead
2419 of _exit() in order to proper process cleanup.
2420 * manager.c (__pthread_manager): Do not terminate manager
2421 after unblocking main thread; wait for main thread's
2422 REQ_PROCESS_EXIT request instead.
2423 Also, added REQ_KICK case to handle new request; this just does
2425 * manager.c (pthread_exited): Do not terminate manager after
2426 unblocking main thread.
2427 * manager.c (__pthread_manager_sighandler): If the main thread
2428 is waiting for all other threads to die, send a REQ_KICK into
2429 the thread manager request pipe to get it to clean out the threads
2430 and unblock the main thread as soon as possible. This fixes
2431 the 2000 millisecond hang on shutdown bug.
2432 * Examples/ex7.c: New file, tests shutdown behavior when all threads
2433 including the main one call pthread_exit(), or implicitly do so.
2434 * Makefile (tests): Add ex7.
2436 2000-05-05 Andreas Jaeger <aj@suse.de>
2438 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
2439 (pthread_getcpuclockid): Correct test for ourselves.
2441 2000-05-05 Ulrich Drepper <drepper@redhat.com>
2443 * internals.h (struct _pthread_descr_struct): Reorganization.
2444 Allocate room for 16 pointers at head of the structure for future
2445 thread-local data handling. Move p_self member in this area.
2446 * manager.c (pthread_handle_create): Adjust use of p_self.
2447 * sysdeps/i386/useldt.h (THREAD_SELF): Likewise.
2448 * pthread.c (__pthread_initial_thread): Adjust initialization.
2449 (__pthread_manager_thread): Likewise.
2451 2000-04-29 Bruno Haible <haible@clisp.cons.org>
2453 * join.c (pthread_exit): Use THREAD_GETMEM_NC instead of THREAD_GETMEM
2454 for eventmask larger than 1 word.
2456 2000-04-27 Ulrich Drepper <drepper@redhat.com>
2458 * Versions [libpthread] (GLIBC_2.2): Add __pthread_initialize_minimal.
2459 * pthread.c (__pthread_initialize_minimal): New function. Perform
2460 minimal initialization.
2461 (pthread_initialize): Remove this code here.
2462 * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h" again. We
2463 are working around the problem in glibc.
2465 2000-04-25 Ulrich Drepper <drepper@redhat.com>
2467 * sysdeps/i386/i686/pt-machine.h: Do not use "../useldt.h" for
2468 now. First gcc must be fixed (more concrete: libgcc).
2470 2000-04-24 Ulrich Drepper <drepper@redhat.com>
2472 * pthread.c: Remove special treatement for interrupt handlers on x86.
2473 * manager.c (pthread_free): Use FREE_THREAD not FREE_THREAD_SELF.
2474 * sysdeps/i386/useldt.h: Use "q" constraint instead of "r" where
2476 * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h".
2478 2000-04-24 Mark Kettenis <kettenis@gnu.org>
2480 * join.c (pthread_exit): Set p_terminated after reporting the
2481 termination event instead of before.
2483 2000-04-20 Jakub Jelinek <jakub@redhat.com>
2485 * sysdeps/pthread/bits/libc-lock.h: Only declare __pthread_rwlock_*
2488 2000-04-18 Andreas Jaeger <aj@suse.de>
2490 * Versions: Use ld instead of ld.so.
2492 2000-04-18 Jakub Jelinek <jakub@redhat.com>
2494 * sysdeps/unix/sysv/linux/sparc/bits/sigcontext.h (struct sigcontext):
2495 Remove the typedef keyword.
2497 2000-04-18 Jakub Jelinek <jakub@redhat.com>
2499 * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Use membar,
2501 (READ_MEMORY_BARRIER): Define.
2502 * spinlock.c (__pthread_spin_unlock): Use READ_MEMORY_BARRIER, not
2504 * internals.h (READ_MEMORY_BARRIER): Define if not defined in sysdep
2507 2000-04-17 Ulrich Drepper <drepper@redhat.com>
2509 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
2510 (pthread_getcpuclockid): Don't compare thread_id with thread_self,
2511 use thread_handle().
2513 2000-04-16 Ulrich Drepper <drepper@redhat.com>
2515 * condvar.c (pthread_cond_timedwait_relative): Don't test for owner
2516 if fast mutex is used. Don't initialize `already_canceled' twice.
2517 Correctly test for return value of timedsuspend.
2519 * pthread.c: Correct long-time braino. We never set SA_SIGINFO and
2520 therefore don't need the _rt versions of the signal handlers.
2522 2000-04-15 Ulrich Drepper <drepper@redhat.com>
2524 * pthread.c (pthread_yield): New function.
2525 * sysdeps/pthread/pthread.h (pthread_yield): Add prototype.
2526 * Versions [libpthread] (GLIBC_2.2): Add pthread_yield.
2527 * internals.h: Declare __pthread_yield.
2529 * pthread.c (pthread_initialize): Avoid a bit more code if
2530 realtime signals are known to exist.
2532 * pthread.c: Is __ASSUME_REALTIME_SIGNALS then avoid generating code
2533 to dynamically detect RT signals and avoid generating compatibility
2534 functions with old kernel.
2535 * restart.h (restart) [__ASSUME_REALTIME_SIGNALS]: Use
2536 __pthread_restart_new directly.
2537 (suspend) [__ASSUME_REALTIME_SIGNALS]: Use
2538 __pthread_wait_for_restart_signal directly.
2539 (timedsuspend) [__ASSUME_REALTIME_SIGNALS]: Use
2540 __pthread_timedsuspend_new directly.
2542 2000-04-15 Ulrich Drepper <drepper@redhat.com>
2544 * condvar.c: Remove all the special code to handle cond_timedwait.
2545 Use timedsuspend instead.
2546 * internals.h: Declare __pthread_timedsuspend_old,
2547 __pthread_timedsuspend_new, and __pthread_timedsuspend.
2548 Remove declaration of __pthread_init_condvar.
2549 * pthread.c: Define __pthread_timedsuspend variable.
2550 (__pthread_timedsuspend_old): New function. Timed suspension
2551 implementation for old Linux kernels.
2552 (__pthread_timedsuspend_new): New function. Timed suspension
2553 implementation for new Linux kernels.
2554 * restart.h (timedsuspend): New function. Call appropriate
2555 suspension function through __pthread_timedsuspend.
2556 * semaphore.c (sem_timedwait): Use timedsuspend, don't duplicate
2558 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2560 * internals.h (WRITE_MEMORY_BARRIER): Define as MEMORY_BARRIER if
2562 * spinlock.c: Use WRITE_MEMORY_BARRIER instead of MEMORY_BARRIER
2564 * sysdeps/alpha/pt-machine.h: Define WRITE_MEMORY_BARRIER.
2565 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2567 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _POSIX_SPAWN.
2568 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2570 2000-04-14 Andreas Jaeger <aj@suse.de>
2572 * weaks.c: Fix typo.
2574 * shlib-versions (mips.*-.*-linux.*): Support only GLIBC 2.0 and
2575 2.2 for linuxthreads.
2577 2000-04-13 Ulrich Drepper <drepper@redhat.com>
2579 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
2580 (pthread_getcpuclockid): Fix typo.
2582 2000-04-12 Ulrich Drepper <drepper@redhat.com>
2584 * Makefile (libpthread-routines): Add getcpuclockid.
2585 * Versions [libpthread] (GLIBC_2.2): Add pthread_getcpuclockid.
2586 * sysdeps/pthread/getcpuclockid.c: New file.
2587 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: New file.
2588 * sysdeps/pthread/pthread.h: Add prototype for pthread_getcpuclockid.
2590 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_SPIN_LOCKS):
2592 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2594 * sysdeps/pthread/pthread.h: Add prototypes for pthread_spin_init,
2595 pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
2596 and pthread_spin_unlock.
2597 * sysdeps/pthread/bits/pthreadtypes.h: Change struct _pthread_fastlock
2598 into pthread_spinlock_t. Change all uses.
2599 * spinlock.c: Implement pthread_spin_lock.
2600 Rename __pthread_unlock to __pthread_spin_unlock and define weak
2601 alias for real name.
2602 Define pthread_spin_trylock, pthread_spin_init, and
2603 pthread_spin_destroy.
2604 Change all uses of _pthread_fastlock to pthread_spinlock_t.
2605 * spinlock.h: Rename __pthread_unlock to __pthread_spin_unlock.
2606 Change all uses of _pthread_fastlock to pthread_spinlock_t.
2607 * Versions [libpthread] (GLIBC_2.2): Add pthread_spin_init,
2608 pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
2609 and pthread_spin_unlock.
2610 * cancel.c: Use __pthread_spin_unlock instead of __pthread_unlock.
2611 Change all uses of _pthread_fastlock to pthread_spinlock_t.
2612 * condvar.c: Likewise.
2613 * internals.h: Likewise.
2615 * manager.c: Likewise.
2616 * mutex.c: Likewise.
2617 * pthread.c: Likewise.
2618 * rwlock.c: Likewise.
2619 * semaphore.c: Likewise.
2620 * signals.c: Likewise.
2622 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add various new POSIX
2624 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
2626 2000-04-11 Ulrich Drepper <drepper@redhat.com>
2628 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add
2629 _POSIX_SHARED_MEMORY_OBJECTS.
2631 2000-04-11 Andreas Jaeger <aj@suse.de>
2633 * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Define.
2634 (__compare_and_swap): Mark as modifying memory.
2636 2000-04-11 Geoff Keating <geoffk@cygnus.com>
2638 * sysdeps/powerpc/pt-machine.h (MEMORY_BARRIER): Don't be
2640 (__compare_and_swap): Replace other 'sync' with MEMORY_BARRIER.
2641 Don't have the 'asm' __volatile__.
2643 2000-04-11 Ulrich Drepper <drepper@redhat.com>
2645 * internals.h: Define MEMORY_BARRIER as empty if not defined already.
2646 * spinlock.c (__pthread_lock): Add memory barriers.
2647 (__pthread_unlock): Likewise.
2648 * sysdeps/alpha/pt-machine.h (MEMORY_BARRIER): Define using mb
2650 (RELEASE): Not needed anymore.
2651 (__compare_and_swap): Mark asm as modifying memory.
2652 * sysdeps/powerpc/pt-machine.h (sync): Remove. Replace with definition
2654 (__compare_and_swap): Use MEMORY_BARRIER instead of sync.
2655 * sysdeps/sparc/sparc32/pt-machine.h (RELEASE): Not needed anymore.
2656 (MEMORY_BARRIER): Define using stbar.
2657 * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Define using
2659 (__compare_and_swap): Use MEMORY_BARRIER to ensure ordering.
2660 Patch by Xavier Leroy <Xavier.Leroy@inria.fr> based on comments by
2661 Mike Burrows <m3b@pa.dec.com>.
2663 2000-04-09 Ulrich Drepper <drepper@redhat.com>
2665 * signals.c (sigaction): Fix return value for the case SIG is one
2666 of the signals the implementation uses.
2667 Patch by Xavier.Leroy@inria.fr.
2669 2000-04-01 Andreas Jaeger <aj@suse.de>
2671 * attr.c: Use shlib-compat macros.
2672 * oldsemaphore.c: Likewise.
2673 * pthread.c: Likewise.
2674 * weaks.c: Likewise.
2676 2000-03-26 Ulrich Drepper <drepper@redhat.com>
2678 * semaphore.c (sem_timedwait): New function.
2679 Patch by Carl Mailloux <carlm@oricom.ca>.
2680 * semaphore.h: Declare sem_timedwait.
2681 * Versions [libpthread] (GLIBC_2.2): Add sem_timedwait.
2683 2000-03-26 Roland McGrath <roland@baalperazim.frob.com>
2685 * sysdeps/pthread/Makefile: File removed.
2687 2000-03-23 Ulrich Drepper <drepper@redhat.com>
2689 * mutex.c (__pthread_reset_pthread_once): Reset once_masterlock.
2690 * internals.h (__pthread_reset_pthread_once): Add prototype.
2691 * ptfork.c (__fork): Call __pthread_reset_pthread_once.
2693 * manager.c (pthread_handle_create): Store ID of new thread before
2696 2000-03-21 Ulrich Drepper <drepper@redhat.com>
2698 * attr.c: Use new macros from shlib-compat.h to define versions.
2699 * oldsemaphore.c: Likewise.
2700 * semaphore.c: Likewise.
2701 * weaks.c: Likewise.
2703 * pthread.c: Update for new SHLIB_COMPAT definition.
2705 * manager.c (__pthread_manager): Unmask debug signal.
2707 * pthread.c (pthread_initialize): Test for address of __dso_handle
2708 being NULL, not value. Use __on_exit, not on_exit.
2709 Patch by Andreas Jaeger <aj@suse.de>.
2711 * pthread.c: Use new macros from shlib-compat.h to define versions.
2713 2000-03-19 Ulrich Drepper <drepper@redhat.com>
2715 * pthread.c (pthread_initialize): Instead of on_exit use
2716 __cxa_atexit if __dso_label is available to allow unloading the
2717 libpthread shared library.
2719 2000-03-16 Ulrich Drepper <drepper@redhat.com>
2721 * condvar.c: Make tests for ownership of mutex less strict.
2723 2000-03-14 Ulrich Drepper <drepper@redhat.com>
2725 * condvar.c (pthread_cond_wait): Check whether mutex is owned by
2726 current thread and return error if not.
2727 (pthread_cond_timedwait_relative_old): Likewise.
2728 (pthread_cond_timedwait_relative_new): Likewise.
2730 * mutex.c (__pthread_once): Handle cancelled init function correctly.
2731 (pthread_once_cancelhandler): New function.
2732 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2734 2000-03-14 Andreas Jaeger <aj@suse.de>
2736 * pthread.c (pthread_handle_sigcancel_rt): GS has been renamed to
2738 (pthread_handle_sigrestart_rt): Likewise.
2739 * signals.c (pthread_sighandler_rt): Likewise.
2741 2000-03-02 Andreas Jaeger <aj@suse.de>
2743 * sysdeps/pthread/bits/libc-lock.h: Fix typo.
2744 Reported by Sean Chen <sean.chen@turbolinux.com>.
2746 2000-02-28 Andreas Jaeger <aj@suse.de>
2748 * rwlock.c: Fix typo.
2750 2000-02-27 Ulrich Drepper <drepper@redhat.com>
2752 * rwlock.c: Define __* variants of the functions and make old names
2754 * Versions [GLIBC_2.2]: Export the __pthread_rwlock_* functions.
2755 * sysdeps/pthread/bits/libc-lock.h: Define __libc_rwlock_* macros.
2757 2000-02-25 Andreas Jaeger <aj@suse.de>
2759 * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
2760 pwrite64, lseek64, open64, and __open64 with version 2.2.
2762 2000-02-22 Ulrich Drepper <drepper@redhat.com>
2764 * semaphore.h (SEM_FAILED): Use 0 not NULL.
2766 2000-02-14 Ulrich Drepper <drepper@redhat.com>
2768 * condvar.c (pthread_cond_timedwait_relative_old): Tight loop with
2769 nanosleep does not work either. Get absolute time inside the
2771 (pthread_cond_timedwait_relative_new): Likewise.
2772 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2774 2000-02-13 Andreas Jaeger <aj@suse.de>
2776 * condvar.c (pthread_cond_timedwait_relative_new): Fix last patch.
2777 (pthread_cond_timedwait_relative_old): Likewise.
2779 2000-02-13 Ulrich Drepper <drepper@redhat.com>
2781 * condvar.c (pthread_cond_timedwait_relative_old): Undo last patch
2782 but keep the code around. A bug in the kernel prevent us from
2784 (pthread_cond_timedwait_relative_new): Likewise.
2785 (PR libc/1597 and libc/1598).
2787 2000-02-01 Kaz Kylheku <kaz@ashi.footprints.net>
2789 * condvar.c (pthread_cond_timedwait_relative_old): Do tight
2790 loop around nanosleep calls instead of around most of the function
2791 (pthread_cond_timedwait_relative_new): Likewise.
2792 body. Got rid of backwards goto and one local.
2794 2000-01-31 Ulrich Drepper <drepper@redhat.com>
2796 * condvar.c (pthread_cond_timedwait_relative_old): Recompute time
2797 before every nanosleep call to account for time spent in the rest
2799 (pthread_cond_timedwait_relative_new): Likewise.
2800 Patch by khendricks@ivey.uwo.ca (PR libc/1564).
2802 2000-01-29 Ulrich Drepper <drepper@redhat.com>
2804 * condvar.c (pthread_cond_timedwait_relative_old): Get remaining time
2805 from nanosleep call so that in case we restart we only wait for the
2807 (pthread_cond_timedwait_relative_new): Likewise.
2808 Patch by khendricks@ivey.uwo.ca (PR libc/1561).
2810 2000-01-18 Ulrich Drepper <drepper@cygnus.com>
2812 * manager.c (pthread_allocate_stack): Compute guard page address
2813 correctly. Patch by HJ Lu.
2815 * sysdeps/pthread/pthread.h: Define
2816 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP.
2818 2000-01-16 Ulrich Drepper <drepper@cygnus.com>
2820 * rwlock.c (pthread_rwlock_unlock): Correct one more problem with
2821 preference handling.
2822 (pthread_rwlockattr_setkind_np): Allow
2823 PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP.
2824 Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
2826 2000-01-12 Ulrich Drepper <drepper@cygnus.com>
2828 * internals.h (pthread_readlock_info): New structure.
2829 (_pthread_descr_struct): Add p_readlock_list, p_readlock_free, and
2830 p_untracked_readlock_count.
2831 * pthread.c (__pthread_initial_thread, pthread_manager_thread):
2832 Add initializers for new fields.
2833 * manager.c (pthread_free): Free read/write lock lists.
2834 * queue.h (queue_is_empty): New function.
2835 * rwlock.c: Implement requirements about when readers should get
2837 * sysdeps/pthread/pthread.h
2838 (PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP): New definition.
2839 * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_rwlock_t):
2840 Define this name as well.
2841 Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
2843 2000-01-05 Ulrich Drepper <drepper@cygnus.com>
2845 * pthread.c (__pthread_initial_thread, pthread_manager_thread):
2846 Adjust initializers for struct _pthread_descr_struct change.
2847 * internals.h (struct _pthread_descr_struct): Move new elements to
2850 2000-01-03 Kaz Kylheku <kaz@ashi.footprints.net>
2852 Redesigned how cancellation unblocks a thread from internal
2853 cancellation points (sem_wait, pthread_join,
2854 pthread_cond_{wait,timedwait}).
2855 Cancellation won't eat a signal in any of these functions
2856 (*required* by POSIX and Single Unix Spec!).
2857 * condvar.c: Spontaneous wakeup on pthread_cond_timedwait won't eat a
2858 simultaneous condition variable signal (not required by POSIX
2859 or Single Unix Spec, but nice).
2860 * spinlock.c: __pthread_lock queues back any received restarts
2861 that don't belong to it instead of assuming ownership of lock
2862 upon any restart; fastlock can no longer be acquired by two threads
2864 * restart.h: Restarts queue even on kernels that don't have
2865 queued real time signals (2.0, early 2.1), thanks to atomic counter,
2866 avoiding a rare race condition in pthread_cond_timedwait.
2868 1999-12-31 Andreas Jaeger <aj@suse.de>
2870 * internals.h: Remove duplicate prototype declarations.
2872 * weaks.c: Remove __THROW from prototypes since the file is not
2873 compiled by a C++ compiler.
2874 * internals.h: Likewise.
2876 1999-12-30 Andreas Jaeger <aj@suse.de>
2878 * sysdeps/pthread/pthread.h: Move internal functions to...
2879 * sysdeps/pthread/bits/libc-lock.h: ...here.
2881 1999-12-29 Andreas Jaeger <aj@suse.de>
2883 * sysdeps/pthread/pthread.h: Fix typos, reformat comments.
2885 1999-12-28 Ulrich Drepper <drepper@cygnus.com>
2887 * sysdeps/alpha/pt-machine.h: Move stack_pointer definition to the
2890 * manager.c (__pthread_start): Add one more cast to prevent
2891 warning on 64bit machines.
2893 1999-12-21 Ulrich Drepper <drepper@cygnus.com>
2895 * manager.c (pthread_handle_create): Set p_pid of new thread
2896 before calling the callback function to report a new thread.
2898 1999-12-20 Andreas Jaeger <aj@suse.de>
2900 * pthread.c (pthread_initialize): Move getrlimit call after
2903 1999-12-18 Ulrich Drepper <drepper@cygnus.com>
2905 * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
2906 pwrite64, lseek64, open64, and __open64.
2907 * wrapsyscall.c: Define pread, __pread64, pread64, pwrite, __pwrite64,
2908 pwrite64, lseek64, open64, and __open64.
2910 * manager.c (pthread_allocate_stack): Correct computation of
2911 new_thread_bottom. Correct handling of stack size and when the
2912 rlimit method to guard for stack growth is used.
2913 * pthread.c (pthread_initialize): Stack limit must be STACK_SIZE
2914 minus one pagesize (not two).
2916 1999-12-03 Andreas Jaeger <aj@suse.de>
2918 * Versions: Add __res_state with version GLIBC_2.2.
2920 * errno.c (__res_state): New function to return thread specific
2923 * pthread.c (pthread_initialize): Initialize p_resp.
2924 (__pthread_reset_main_thread): Also set p_resp.
2926 * manager.c (pthread_handle_create): Initialize p_resp.
2928 * internals.h: Add thread specific resolver state.
2929 Based on patches by Adam D. Bradley <artdodge@cs.bu.edu>.
2931 1999-12-01 Ulrich Drepper <drepper@cygnus.com>
2933 * sysdeps/i386/pt-machine.h: Move stack_pointer definition to the
2935 * sysdeps/i386/i686/pt-machine.h: Likewise.
2936 Patches by Alan Modra <alan@SPRI.Levels.UniSA.Edu.Au>.
2938 1999-11-23 Ulrich Drepper <drepper@cygnus.com>
2940 * manager.c (pthread_start_thread_event): Initialize p_pid already
2943 1999-11-22 Ulrich Drepper <drepper@cygnus.com>
2945 * internals.h: Add prototype for __pthread_manager_event.
2946 * manager.c (__pthread_manager_event): New function.
2947 (pthread_start_thread_event): Correct computation of self.
2948 Use INIT_THREAD_SELF.
2949 * pthread.c (__pthread_manager_thread): Initialize p_lock.
2950 (__pthread_initialize_manager): Respect event flags also for creation
2951 of the manager thread.
2953 1999-11-08 Ulrich Drepper <drepper@cygnus.com>
2955 * pthread.c (__pthread_initialize_manager): Initialize
2956 __pthread_manager_thread.p_tid.
2958 1999-11-02 Ulrich Drepper <drepper@cygnus.com>
2960 * internals.h: Declare __pthread_last_event.
2961 * manager.c: Define __pthread_last_event.
2962 (pthread_handle_create): Set __pthread_last_event.
2963 (pthread_exited): Likewise.
2964 * join.c (pthread_exit): Likewise.
2966 * Makefile (libpthread-routines): Add events.
2967 * events.c: New file.
2968 * internals.h: Protect against multiple inclusion.
2969 Include thread_dbP.h header.
2970 (struct _pthread_descr_struct): Add new fields p_report_events and
2972 Declare event reporting functions.
2973 * join.c (pthread_exit): Signal event if this is wanted.
2974 * manager.c (__pthread_threads_events): New variable.
2975 (pthread_handle_create): Take new parameters with event information.
2976 Signal TD_CREATE event if wanted.
2977 (__pthread_manager): Adjust pthread_handle_create call.
2978 (pthread_start_thread_event): New function. Block until manager is
2979 finished and then call pthread_start_thread.
2980 (pthread_exited): Signal TD_REAP event if wanted.
2982 1999-10-26 Ulrich Drepper <drepper@cygnus.com>
2984 * restart.h (suspend_with_cancellation): Rewrite as a macro.
2986 * condvar.c (pthread_cond_timedwait_relative): Don't mark as inline.
2988 1999-10-25 Andreas Jaeger <aj@suse.de>
2990 * internals.h: Remove K&R compatibility.
2991 * no-tsd.c: Likewise.
2992 * semaphore.h: Likewise.
2993 * signals.c: Likewise.
2994 * sysdeps/pthread/bits/libc-tsd.h: Likewise.
2995 * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
2996 * weaks.c: Likewise.
2998 1999-10-21 Xavier Leroy <Xavier.Leroy@inria.fr>
3000 * pthread.c: For i386, wrap pthread_handle_sigrestart and
3001 pthread_handle_sigcancel with functions that restore %gs from the
3002 signal context. For each signal handling function, two wrappers
3003 are required, one for a non-RT signal and one for a RT signal.
3004 * signal.c: For i386, add code to restore %gs from the signal
3005 context in pthread_sighandler and pthread_sighandler_rt.
3007 1999-10-17 Ulrich Drepper <drepper@cygnus.com>
3009 * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add cast.
3011 1999-10-14 Ulrich Drepper <drepper@cygnus.com>
3013 * pthread.c (__pthread_initial_thread): Pass argument to
3014 PTHREAD_START_ARGS_INITIALIZER.
3015 (__pthread_manager_thread): Likewise.
3017 * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add parameter to
3018 initialize function.
3020 * manager.c (pthread_handle_create): Remove p_startfct initialization.
3022 * internals.h (_pthread_descr_struct): We don't need p_startfct field.
3024 1999-10-12 Ulrich Drepper <drepper@cygnus.com>
3026 * internals.h: Correct return types for __libc_read and __libc_write.
3028 1999-10-09 Andreas Jaeger <aj@suse.de>
3030 * internals.h: Add __new_sem_post to get prototype in
3031 manager.c; include semaphore.h for needed types.
3033 1999-10-08 Ulrich Drepper <drepper@cygnus.com>
3035 * manager.c (__pthread_manager) [REQ_POST]: Use __new_sem_post
3036 directly instead of calling sem_post which should not be necessary
3037 but is faster and might help in some case to work around problems.
3038 Patch by khendricks@ivey.uwo.ca [libc/1382].
3040 1999-10-08 Andreas Schwab <schwab@suse.de>
3042 * sysdeps/pthread/Subdirs: New file.
3045 1999-10-07 Ulrich Drepper <drepper@cygnus.com>
3047 * Implies: New file.
3048 * internals.h (struct _pthread_descr_struct): Add p_startfct.
3049 * manager.c (pthread_handle_create): Initialize p_startfct.
3050 * pthread.c: Define __linuxthread_pthread_sizeof_descr variable.
3052 1999-09-25 Ulrich Drepper <drepper@cygnus.com>
3054 * manager.c (__linuxthreads_pthread_threads_max): New variable.
3055 * specific.c (__linuxthreads_pthread_keys_max): New variable.
3056 (__linuxthreads_pthread_key_2ndlevel_size): New variable.
3058 * condvar.c (pthread_cond_timedwait_relative): Never return with
3059 EINTR. Patch by Andreas Schwab.
3061 1999-09-19 Ulrich Drepper <drepper@cygnus.com>
3063 * signals.c (sigaction): Correct last patch. Don't select
3064 pthread_sighandler_rt based on the signal number but instead of
3065 the SA_SIGINFO flag.
3067 1999-09-23 Ulrich Drepper <drepper@cygnus.com>
3069 * specific.c: Move definitions of struct pthread_key_struct and
3070 destr_function to ...
3071 * internals.h: ...here.
3073 1999-09-18 Ulrich Drepper <drepper@cygnus.com>
3075 * pthread.c (pthread_handle_sigrestart_rt): New function. Use
3076 this instead of pthread_handle_sigrestart if the signal is an RT
3079 * signals.c: Handle passing through of sighandler arguments also
3080 for real-time signals.
3082 1999-09-03 Andreas Schwab <schwab@suse.de>
3084 * ptfork.c (__fork): Renamed from fork and use __libc_fork. Add
3086 (__vfork): New function, alias vfork.
3087 * Versions: Export __fork, vfork, and __vfork in libpthread.
3089 1999-08-23 Andreas Schwab <schwab@suse.de>
3091 * signals.c (pthread_sighandler): Add SIGCONTEXT_EXTRA_ARGS to
3092 call to signal handler.
3094 1999-08-20 Ulrich Drepper <drepper@cygnus.com>
3096 * pthread.c (__pthread_reset_main_thread): Undo last change.
3097 (__pthread_kill_other_threads_np): Reset signal handlers for the
3098 signals we used in the thread implementation here.
3100 1999-08-19 Ulrich Drepper <drepper@cygnus.com>
3102 * pthread.c (__pthread_reset_main_thread): Reset signal handlers
3103 for the signals we used in the thread implementation [PR libc/1234].
3105 * Versions: Export __pthread_kill_other_threads_np from libpthread
3108 * signals.c: Pass sigcontext through wrapper to the user function.
3110 1999-08-01 Ulrich Drepper <drepper@cygnus.com>
3112 * Versions [ld.so] (GLIBC_2.0): Export __libc_internal_tsd_get and
3113 __libc_internal_tsd_set.
3115 1999-07-29 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3117 * manager.c: Remove inclusion of <linux/tasks.h> since it's not
3120 1999-07-16 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3122 * internals.h: Align _pthread_descr_struct to 32 bytes.
3123 Reported by Tim Hockin <thockin@cobaltnet.com>, close PR
3126 1999-07-09 Ulrich Drepper <drepper@cygnus.com>
3128 * oldsemaphore.c (sem_compare_and_swap): Fix use of compare and
3131 1999-07-09 Cristian Gafton <gafton@redhat.com>
3133 * Makefile (libpthread-routines): Add oldsemaphore routine.
3134 * Versions: Add sem_destroy, sem_getvalue, sem_init, sem_post,
3135 sem_trywait, and sem_wait to GLIBC_2.1.
3136 * oldsemaphore.c: New file.
3137 * semaphore.c: Add default_symbol_versions for the changed functions.
3138 (__new_sem_init): Rename from sem_init.
3139 (__new_sem_post): Rename from sem_post.
3140 (__new_sem_wait): Rename from sem_wait.
3141 (__new_sem_trywait): Rename from sem_trywait.
3142 (__new_sem_getvalue): Rename from sem_getvalue.
3143 (__new_sem_destroy): Rename from sem_destroy.
3145 1999-06-23 Robey Pointer <robey@netscape.com>
3147 * internals.h: Added p_nextlock entry to separate queueing for a
3148 lock from queueing for a CV (sometimes a thread queues on a lock
3149 to serialize removing itself from a CV queue).
3150 * pthread.c: Added p_nextlock to initializers.
3151 * spinlock.c: Changed to use p_nextlock instead of p_nextwaiting.
3153 1999-07-09 Ulrich Drepper <drepper@cygnus.com>
3155 * manager.c (pthread_handle_create): Free mmap region after stack
3156 if clone failed. Patch by Kaz Kylheku <kaz@ashi.FootPrints.net>.
3158 1999-05-23 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3160 * man/pthread_cond_init.man: Correct example.
3161 Reported by Tomas Berndtsson <tomas@nocrew.org>.
3163 * linuxthreads.texi (Condition Variables): Likewise.
3165 1999-05-18 Jakub Jelinek <jj@ultra.linux.cz>
3167 * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): Use
3168 casx not cas, also successful casx returns the old value in rd
3169 and not the new value.
3171 1999-05-16 Xavier Leroy <Xavier.Leroy@inria.fr>
3173 * manager.c: If pthread_create() is given a NULL attribute
3174 and the thread manager runs with a realtime policy, set the
3175 scheduling policy of the newly created thread back to SCHED_OTHER.
3176 * manager.c: If the PTHREAD_INHERIT_SCHED attribute is given,
3177 initialize the schedpolicy field of new_thread->p_start_args
3178 to that of the calling thread.
3180 1999-04-29 Ulrich Drepper <drepper@cygnus.com>
3182 * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): cas
3183 instruction does not allow memory element to use offset.
3185 1999-04-28 Ulrich Drepper <drepper@cygnus.com>
3187 * manager.c (pthread_allocate_stack): Optimize initialization of new
3190 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_define_initialized):
3191 Don't use initializer since it is all zeroes.
3192 (__libc_once_define): Likewise.
3194 1999-04-16 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3196 * sysdeps/arm/Implies: Removed since cmpxchg/no-cmpxchg
3197 doesn't exist anymore.
3198 * sysdeps/i386/Implies: Likewise.
3199 * sysdeps/m68k/Implies: Likewise.
3200 * sysdeps/mips/Implies: Likewise.
3201 * sysdeps/powerpc/Implies: Likewise.
3202 * sysdeps/sparc/sparc32/Implies: Likewise.
3203 * sysdeps/sparc/sparc64/Implies: Likewise.
3205 1999-04-15 Ulrich Drepper <drepper@cygnus.com>
3207 * sysdeps/alpha/bits/semaphore.h: Removed.
3208 * sysdeps/powerpc/bits/semaphore.h: Removed.
3209 * sysdeps/pthread/cmpxchg/bits/semaphore.h: Removed.
3210 * sysdeps/pthread/no-cmpxchg/bits/semaphore.h: Removed.
3211 * Makefile (headers): Remove bits/semaphore.h.
3213 * semaphore.h: Define _pthread_descr if necessary.
3214 Don't include limits.h. Define SEM_VALUE_MAX directly.
3216 (sem_t): Protect element names with leading __.
3217 Add declarations for sem_close, sem_open, and sem_unlink.
3218 * semaphore.c: Adjust all functions for new element names.
3219 Define sem_close, sem_open, and sem_unlink.
3220 * Versions (libthread): Add sem_close, sem_open, and sem_unlink for
3222 * sysdeps/pthread/bits/pthreadtypes.h: Define _pthread_descr only if
3225 1999-03-16 H.J. Lu <hjl@gnu.org>
3227 * specific.c (pthread_key_delete): Check th->p_terminated to see
3228 if the thread is running.
3230 * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set):
3231 Added to GLIBC_2.0 for libc.so.
3233 1999-02-12 H.J. Lu <hjl@gnu.org>
3235 * Versions (__libc_current_sigrtmin, __libc_current_sigrtmax,
3236 __libc_allocate_rtsig): Added to GLIBC_2.1.
3238 * internals.h (DEFAULT_SIG_RESTART): Removed.
3239 (DEFAULT_SIG_CANCEL): Removed.
3241 * pthread.c (init_rtsigs, __libc_current_sigrtmin,
3242 __libc_current_sigrtmax, __libc_allocate_rtsig): New functions.
3243 (__pthread_sig_restart, __pthread_sig_cancel,
3244 __pthread_sig_debug): Initialized.
3245 (pthread_initialize): Call init_rtsigs () to initialize
3248 1999-02-03 H.J. Lu <hjl@gnu.org>
3250 * manager.c (__pthread_manager): Do block __pthread_sig_debug.
3251 Don't restart the thread which sent REQ_DEBUG.
3252 (pthread_start_thread): Check if __pthread_sig_debug > 0
3255 * pthread.c (__pthread_initialize_manager): Suspend ourself
3256 after sending __pthread_sig_debug to gdb instead of
3257 __pthread_sig_cancel.
3259 1999-01-24 H.J. Lu <hjl@gnu.org>
3261 * manager.c (__pthread_manager): Delete __pthread_sig_debug
3262 from mask if __pthread_sig_debug > 0.
3263 (pthread_handle_create): Increment __pthread_handles_num.
3265 * manager.c (pthread_handle_create): Don't pass CLONE_PTRACE to clone.
3266 * pthread.c (__pthread_initialize_manager): Likewise.
3268 * pthread.c (pthread_initialize): Use __libc_allocate_rtsig (1)
3269 instead of __libc_allocate_rtsig (2).
3270 (__pthread_initialize_manager): Send __pthread_sig_debug to gdb
3271 instead of __pthread_sig_cancel.
3272 (pthread_handle_sigdebug): Fix comments.
3274 1999-01-21 Ulrich Drepper <drepper@cygnus.com>
3276 * manager.c (pthread_allocate_stack): Set
3277 __pthread_nonstandard_stacks if user-specified stack is used.
3279 1999-01-16 Ulrich Drepper <drepper@cygnus.com>
3281 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _LFS_ASYNCHRONOUS_IO,
3282 _LFS_LARGEFILE, _LFS64_LARGEFILE, and _LFS64_STDIO from Unix98.
3284 1999-01-07 Xavier Leroy <Xavier.Leroy@inria.fr>
3286 * pthread.c: Use a third signal __pthread_sig_debug distinct
3287 from __pthread_sig_cancel to notify gdb when a thread is
3289 * manager.c: Likewise.
3290 * internals.h: Likewise.
3291 * signals.c: The implementation of sigwait(s) assumed that
3292 all signals in s have signal handlers already attached.
3293 This is not required by the standard, so make it work
3294 also if some of the signals have no handlers.
3296 1999-01-05 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
3298 * linuxthreads.texi: Remove pointers from first @node. Move old
3299 @node spec inside comment.
3301 1998-12-31 Ulrich Drepper <drepper@cygnus.com>
3303 * sysdeps/pthread/bits/stdio-lock.h: Define _IO_lock_lock and
3306 1998-12-29 Ulrich Drepper <drepper@cygnus.com>
3308 * semaphore.c (sem_trywait): Don't forget to unlock the semaphore
3309 lock. Patch by Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>.
3311 1998-12-21 Ulrich Drepper <drepper@cygnus.com>
3313 * manager.c: Threads now send __pthread_sig_cancel on termination.
3314 Change clone call and signal masks.
3315 * thread.c (pthread_handle_sigrestart): Remove special code for
3317 (pthread_handle_sigcancel): In manager thread call
3318 __pthread_manager_sighandler.
3319 * sysdeps/i386/pt-machine.h (__compare_and_swap): Add memory clobber.
3320 * sysdeps/i386/i686/pt-machine.h: Likewise.
3321 Patches by Xavier Leroy.
3323 1998-12-14 Ulrich Drepper <drepper@cygnus.com>
3325 * spinlock.c (__pthread_unlock): Don't crash if called for an
3326 untaken mutex. Reported by Ruslan V. Brushkoff <rus@Snif.Te.Net.UA>.
3328 * Examples/ex6.c: Unbuffer stdout and reduce sleep time to reduce
3331 1998-12-13 Ulrich Drepper <drepper@cygnus.com>
3333 * Examples/ex3.c: Wait until all threads are started before
3334 searching for the number to avoid race condition on very fast
3337 1998-12-08 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3339 * sysdeps/pthread/pthread.h: Remove __pthread_setcanceltype
3340 declaration since it's not needed.
3342 * sysdeps/pthread/pthread.h: Move internal functions to ...
3343 * internals.h: ...here.
3345 1998-12-02 H.J. Lu <hjl@gnu.org>
3347 * pthread.c (__pthread_sig_restart): Initiliaze to 0 if
3348 SIGRTMIN is defined.
3349 (__pthread_sig_cancel): Likewise.
3351 1998-12-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3353 * wrapsyscall.c: Include <sys/mman.h> for msync,
3354 <stdlib.h> for system and <termios.h> for tcdrain prototype.
3355 Correct msync declaration.
3357 1998-11-29 Roland McGrath <roland@baalperazim.frob.com>
3359 * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_define, __libc_tsd_get,
3360 __libc_tsd_set): New macros for new interface.
3361 * no-tsd.c: New file, provide uninitialized defns of
3362 __libc_internal_tsd_get and __libc_internal_tsd_set.
3363 * Makefile (routines): Add no-tsd.
3365 1998-10-12 Roland McGrath <roland@baalperazim.frob.com>
3367 * internals.h: Include <bits/libc-tsd.h>, not <bits/libc-lock.h>.
3368 * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
3369 __libc_internal_tsd_set): Move decls to ...
3370 * sysdeps/pthread/bits/libc-tsd.h: New file for __libc_internal_tsd_*
3373 * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
3374 __libc_internal_tsd_set): Make these pointers to functions, not
3375 functions; remove #pragma weak decls for them.
3376 * specific.c (__libc_internal_tsd_get, __libc_internal_tsd_set):
3377 Define static functions and initialized pointers to them.
3379 1998-11-18 Ulrich Drepper <drepper@cygnus.com>
3381 * Makefile (CFLAGS-mutex.c): Define as -D__NO_WEAK_PTHREAD_ALIASES.
3382 (CFLAGS-specific.c): Likewise.
3383 (CFLAGS-pthread.c): Likewise.
3384 (CFLAGS-ptfork.c): Likewise.
3385 (CFLAGS-cancel.c): Likewise.
3386 * sysdeps/pthread/bits/libc-lock.h: Don't mark __pthread_* functions
3387 as weak references if __NO_WEAK_PTHREAD_ALIASES is defined.
3389 * mutex.c (pthread_mutex_init): Define as strong symbol.
3390 (pthread_mutex_destroy): Likewise.
3391 (pthread_mutex_trylock): Likewise.
3392 (pthread_mutex_lock): Likewise.
3393 (pthread_mutex_unlock): Likewise.
3394 (pthread_mutexattr_init): Likewise.
3395 (pthread_mutexattr_destroy): Likewise.
3396 (pthread_once): Likewise.
3397 * ptfork.c (pthread_atfork): Likewise.
3398 * specific.c (pthread_key_create): Likewise.
3399 (pthread_setspecific): Likewise.
3400 (pthread_getspecific): Likewise.
3402 1998-11-15 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
3404 * linuxthreads.texi: Fix punctuation after xref.
3406 1998-11-10 H.J. Lu <hjl@gnu.org>
3408 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine NR_OPEN
3409 if it is defined in <linux/limits.h>.
3411 1998-10-29 14:28 Ulrich Drepper <drepper@cygnus.com>
3413 * spinlock.h (__pthread_trylock): Define inline.
3414 (__pthread_lock): Add extra parameter to declaration. Declare
3415 using internal_function.
3416 (__pthread_unlock): Declare using internal_function.
3417 * spinlock.c (__pthread_lock): Add new parameter. Use it instead
3418 of local variable self. Avoid recomputing self. Define using
3420 (__pthread_trylock): Remove.
3421 (__pthread_unlock): Define using internal_function.
3422 * cancel.c: Adjust for __pthread_lock interface change. Use already
3423 computed self value is possible.
3424 * condvar.c: Likewise.
3426 * manager.c: Likewise.
3427 * mutex.c: Likewise.
3428 * pthread.c: Likewise.
3429 * rwlock.c: Likewise.
3430 * semaphore.c: Likewise.
3431 * signals.c: Likewise.
3433 1998-10-27 13:46 Ulrich Drepper <drepper@cygnus.com>
3435 * sysdeps/pthread/pthread.h (struct _pthread_cleanup_buffer): Prepend
3436 __ to field names of the struct.
3437 * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_fastlock):
3439 (pthread_attr_t): Likewise.
3440 (pthread_cond_t): Likewise.
3441 (pthread_condattr_t): Likewise.
3442 (pthread_mutex_t): Likewise.
3443 (pthread_mutexattr_t): Likewise.
3444 (pthread_rwlock_t): Likewise.
3445 (pthread_rwlockattr_t): Likewise.
3446 * attr.c: Adjust for pthread.h and pthreadtypes.h change.
3447 * cancel.c: Likewise.
3448 * condvar.c: Likewise.
3449 * manager.c: Likewise.
3450 * mutex.c: Likewise.
3451 * pthread.c: Likewise.
3452 * ptlongjmp.c: Likewise.
3453 * rwlock.c: Likewise.
3454 * spinlock.c: Likewise.
3456 1998-10-09 Ulrich Drepper <drepper@cygnus.com>
3458 * sysdeps/i386/pt-machine.h (get_eflags, set_eflags): Mark these
3461 * sysdeps/i386/i686/pt-machine.h: Remove unused inline
3464 * Makefile (libpthread-routines): Add pt-machine.
3465 * pt-machine.c: New file.
3466 * sysdeps/alpha/pt-machine.h: Define PT_EI as extern inline is not
3467 yet defined. Use PT_EI in extern inline definitions.
3468 * sysdeps/arm/pt-machine.h: Likewise.
3469 * sysdeps/i386/pt-machine.h: Likewise.
3470 * sysdeps/i386/i686/pt-machine.h: Likewise.
3471 * sysdeps/m68k/pt-machine.h: Likewise.
3472 * sysdeps/mips/pt-machine.h: Likewise.
3473 * sysdeps/powerpc/pt-machine.h: Likewise.
3474 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
3475 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
3477 1998-10-02 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3479 * semaphore.h: Include <sys/types.h> so that _pthread_descr
3482 1998-09-15 David S. Miller <davem@pierdol.cobaltmicro.com>
3484 * sysdeps/sparc/sparc32/pt-machine.h (INIT_THREAD_SELF): Add nr
3486 * sysdeps/sparc/sparc64/pt-machine.h (INIT_THREAD_SELF): Likewise.
3488 1998-09-12 14:24 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
3490 * sysdeps/unix/sysv/linux/bits/sigthread.h: Add multiple inclusion
3493 1998-09-02 11:08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3495 * signals.c (sigaction): Check that sig is less than NSIG to avoid
3496 array index overflow.
3498 1998-09-06 10:56 Ulrich Drepper <drepper@cygnus.com>
3500 * sysdeps/pthread/semaphore.h: New file.
3502 1998-09-06 09:08 Ulrich Drepper <drepper@cygnus.com>
3504 * sysdeps/pthread/bits/libc-lock.h (enum __libc_tsd_key_t): Add
3505 _LIBC_TSD_KEY_DL_ERROR.
3507 1998-08-31 Ulrich Drepper <drepper@cygnus.com>
3509 * sysdeps/i386/i686/pt-machine.h (testandset): Add memory clobber.
3510 * sysdeps/i386/pt-machine.h: Likewise.
3511 Suggested by Roland McGrath.
3513 1998-08-28 13:58 Ulrich Drepper <drepper@cygnus.com>
3515 * internals.h: Also define THREAD_GETMEM_NC and THREAD_SETMEM_NC to
3516 access thread data with non-constant offsets.
3517 * specific.c: Use THREAD_GETMEM_NC and THREAD_SETMEM_NC where
3520 * sysdeps/i386/useldt.h: Fix typo. Add THREAD_GETMEM_NC and
3521 THREAD_SETMEM_NC definitions.
3523 * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM_NC and
3525 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
3527 1998-08-26 15:46 Ulrich Drepper <drepper@cygnus.com>
3529 * internals.h: Define THREAD_GETMEM and THREAD_SETMEM to default if
3530 not already defined.
3531 (struct _pthread_descr_struct): Add p_self and p_nr field.
3532 * manager.c (__pthread_handles): Define second element to point
3534 (__pthread_handles_num): Initialize to 2.
3535 (__pthread_manager): Use INIT_THREAD_SELF with two arguments.
3536 (pthread_start_thread): Likewise.
3537 (pthread_handle_create): Start search for free slot at entry 2.
3538 Initialize new fields p_self and p_nr.
3539 Call __clone with CLONE_PTRACE if available.
3540 (pthread_free): Call FREE_THREAD_SELF if available.
3541 * pthread.c (__pthread_initial_thread): Initialize new fields.
3542 (__pthread_manager_thread): Likewise.
3543 (__pthread_initialize_manager): Call __clone with CLONE_PTRACE.
3545 * cancel.c: Use THREAD_GETMEM and THREAD_SETMEM to access the
3546 elements of the thread descriptor.
3547 * condvar.c: Likewise.
3548 * errno.c: Likewise.
3550 * manager.c: Likewise.
3551 * pthread.c: Likewise.
3552 * ptlongjmp.c: Likewise.
3553 * semaphore.c: Likewise.
3554 * signals.c: Likewise.
3555 * specific.c: Likewise.
3556 * spinlock.c: Likewise.
3558 * sysdeps/alpha/pt-machine.h (INIT_THREAD_SELF): Add extra parameter.
3560 * sysdeps/i386/useldt.h: New file.
3561 * sysdeps/i386/i686/pt-machine.h: Show how to use this file.
3563 * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM and
3564 THREAD_SETMEM using __thread_self.
3565 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
3567 1998-08-24 Geoff Keating <geoffk@ozemail.com.au>
3569 * spinlock.c (__pthread_lock): Reset p_nextwaiting to NULL if it
3570 turned out that we didn't need to queue after all.
3572 1998-08-22 Geoff Keating <geoffk@ozemail.com.au>
3574 * sysdeps/powerpc/pt-machine.h: Remove testandset, it's not used
3575 and wastes space; correct types.
3577 1998-08-08 11:18 H.J. Lu <hjl@gnu.org>
3579 * signals.c (sigaction): Handle NULL argument.
3581 1998-08-04 Ulrich Drepper <drepper@cygnus.com>
3583 * sysdeps/unix/sysv/linux/bits/sigthread.h: Use __sigset_t instead
3586 1998-08-02 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3588 * Makefile (linuxthreads-version): Extract correct number from
3591 1998-07-29 Xavier Leroy <Xavier.Leroy@inria.fr>
3593 * Banner: Bump version number to 0.8
3594 * FAQ.html: Many updates, in particular w.r.t. debugging.
3595 * manager.c: Support for non-default stacksize for
3596 LinuxThreads-allocated stacks;
3597 don't use guard pages for stacks with default size, rely on
3598 rlimit(RLIMIT_STACK) instead (it's cheaper).
3600 * cancel.c: Use __pthread_sig_cancel and __pthread_sig_restart
3601 everywhere instead of PTHREAD_SIG_CANCEL and PTHREAD_SIG_RESTART.
3602 * condvar.c: Likewise.
3603 * internals.h: Likewise.
3604 * restart.h: Likewise.
3605 * signals.c: Likewise.
3606 * pthread.c: Likewise; set rlimit(RLIMIT_STACK) as we need it.
3608 1998-07-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3610 * weaks.c: Define pthread_mutexattr_[sg]ettype instead of
3611 __pthread_mutexattr_[sg]ettype. Add more weak aliases.
3612 * Versions: Put __pthread_mutexattr_settype under version
3613 GLIBC_2.0. Don't export __pthread_mutexattr_setkind_np and
3614 __pthread_mutexattr_gettype.
3616 1998-07-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3618 * sysdeps/pthread/bits/libc-lock.h: Make
3619 __pthread_mutexattr_settype weak. Don't make
3620 __pthread_mutexattr_setkind_np weak.
3622 1998-07-16 10:52 Ulrich Drepper <drepper@cygnus.com>
3624 * manager.c (pthread_handle_create): Check whether sched_setscheduler
3625 call can succeed here.
3627 * mutex.c: Define __pthread_mutexattr_settype and make
3628 __pthread_mutexattr_setkind_np an alias.
3629 Likewise for __pthread_mutexattr_gettype.
3631 1998-07-15 11:00 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
3633 * attr.c (pthread_attr_setschedpolicy): Don't check whether caller
3636 1998-07-14 19:38 Ulrich Drepper <drepper@cygnus.com>
3638 * sysdeps/pthread/bits/libc-lock.h: Define __libc_cleanup_end.
3640 1998-07-11 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3642 * Examples/ex6.c: Include <unistd.h> for usleep.
3644 1998-06-13 11:04 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3646 * Examples/ex4.c (main): Use exit, not pthread_exit.
3648 1998-07-09 13:39 Ulrich Drepper <drepper@cygnus.com>
3650 * Versions: Add __pthread_mutexattr_gettype and
3651 __pthread_mutexattr_settype.
3652 * lockfile.c: Use __pthread_mutexattr_settype instead of
3653 __pthread_mutexattr_setkind_np.
3654 * mutex.c: Define __pthread_mutexattr_gettype and
3655 __pthread_mutexattr_settype.
3657 * sysdeps/pthread/pthread.h: Declare __pthread_mutexattr_gettype and
3658 __pthread_mutexattr_settype.
3659 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_init_recursive):
3660 Use __pthread_mutexattr_settype.
3662 1998-07-08 22:26 Ulrich Drepper <drepper@cygnus.com>
3664 * Versions: Add pthread_mutexattr_gettype, pthread_mutexattr_settype.
3665 * mutex.c: Define weak alias pthread_mutexattr_gettype and
3666 pthread_mutexattr_settype.
3667 * sysdeps/pthread/pthread.h: Declare these functions.
3668 Move pthread_sigmask and pthread_kill declaration in separate header.
3669 * sysdeps/unix/sysv/linux/bits/sigthread.h: New file.
3671 1998-07-07 15:20 Ulrich Drepper <drepper@cygnus.com>
3673 * Makefile: Add rules to compile and run tests.
3674 * Examples/ex1.c: Little changes to fix warnings.
3675 * Examples/ex2.c: Likewise.
3676 * Examples/ex3.c: Likewise.
3677 * Examples/ex4.c: Likewise.
3678 * Examples/ex5.c: Likewise.
3679 * Examples/ex6.c: New file.
3681 1998-07-05 11:54 Ulrich Drepper <drepper@cygnus.com>
3683 * Versions: Add pthread_attr_init to GLIBC_2.1 version in libc.
3685 1998-07-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3687 * attr.c: Include <string.h>.
3689 1998-06-30 11:47 Ulrich Drepper <drepper@cygnus.com>
3691 * attr.c: Include errno.h. Use memcpy to copy sched_param.
3692 * internals.h: Include limits.h.
3693 * manager.c: Use memcpy to copy sched_param.
3694 * ptfork.c: Include errno.h.
3695 * pthread.c: Likewise.
3696 * semaphore.c: Likewise.
3697 * specific.c: Likewise.
3698 * spinlock.h: Likewise.
3699 * sysdeps/pthread/pthread.h: Include only allowed headers. Move
3700 type definition to ...
3701 * sysdeps/pthread/bits/pthreadtypes.h: ...here. New file.
3703 1998-06-29 12:34 Ulrich Drepper <drepper@cygnus.com>
3705 * sysdeps/pthread/pthread.h: Use __PMT not __P for function pointers.
3707 * sysdeps/pthread/pthread.h: Define various PTHREAD_* symbols also
3708 as macros as demanded in POSIX.1, Annex C.
3710 1998-06-29 12:29 Ulrich Drepper <drepper@cygnus.com>
3712 * internals.h (struct pthread_request): For free use pthread_t
3713 instead of pthread_descr.
3714 * join.c (pthread_join): Pass thread_id, not th to manager.
3715 (pthread_detach): Likewise.
3716 * manager.c (__pthread_manager): Except thread ID in FREE_REQ case.
3717 (pthread_exited): Remove detached queue code.
3718 (pthread_handle_free): Expect thread ID parameter and use it to
3719 validate the thread decsriptor. Don't use detached queue.
3720 Patches by Xavier Leroy.
3722 1998-06-27 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3724 * libpthread.map: Export accept, longjmp, sigaction, siglongjmp,
3725 _IO_flockfile, _IO_ftrylockfile, _IO_funlockfile,
3726 __pthread_atfork, __pthread_key_create, __pthread_once.
3727 * internals.h: Doc fix.
3728 * pthread.c (__pthread_initialize): Define again.
3730 1998-06-26 Ulrich Drepper <drepper@cygnus.com>
3732 * manager.c (pthread_exited): If thread is not detached put it on
3734 (pthread_handle_free): If thread is not on list with living threads
3735 search on list with detached threads.
3737 * sysdeps/pthread/pthread.h (PTHREAD_RWLOCK_INITIALIZER): Correct
3738 for new definition of pthread_rwlock_t.
3740 * spinlock.c: Correct test whether to compile
3741 __pthread_compare_and_swap or not.
3743 1998-06-25 19:27 Ulrich Drepper <drepper@cygnus.com>
3745 * attr.c: Finish user stack support. Change locking code to be safe
3746 in situations with different priorities.
3747 * cancel.c: Likewise.
3748 * condvar.c: Likewise.
3749 * internals.h: Likewise.
3751 * manager.c: Likewise.
3752 * mutex.c: Likewise.
3753 * pthread.c: Likewise.
3754 * ptlongjmp.c: Likewise.
3755 * queue.h: Likewise.
3756 * rwlock.c: Likewise.
3757 * semaphore.c: Likewise.
3758 * semaphore.h: Likewise.
3759 * signals.c: Likewise.
3760 * spinlock.c: Likewise.
3761 * spinlock.h: Likewise.
3762 * sysdeps/pthread/pthread.h: Likewise.
3763 Patches by Xavier Leroy.
3765 * sysdeps/i386/i686/pt-machine.h: New file.
3767 1998-06-25 Ulrich Drepper <drepper@cygnus.com>
3769 * sysdeps/pthread/pthread.h: Make [sg]et_stacksize and
3770 [sg]et_stackaddr prototypes always available.
3772 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
3773 _POSIX_THREAD_ATTR_STACKSIZE and _POSIX_THREAD_ATTR_STACKADDR.
3775 1998-06-24 Ulrich Drepper <drepper@cygnus.com>
3777 * manager.c (pthread_free): Undo patch from 980430.
3778 Reported by David Wragg <dpw@doc.ic.ac.uk>.
3780 1998-06-09 15:07 Ulrich Drepper <drepper@cygnus.com>
3782 * manager.c: Define __pthread_manager_adjust_prio and use it to
3783 increase priority when needed.
3784 * internals.h: Add prototype for __pthread_manager_adjust_prio.
3785 * mutex.c: Optimize mutexes to wake up only one thread.
3786 * pthread.c: Move PID of manager for global variable in structure
3788 Patches by Xavier Leroy.
3790 1998-06-07 13:47 Ulrich Drepper <drepper@cygnus.com>
3792 * sysdeps/pthread/bits/libc-lock.h: Optimize cleanup handlers a bit.
3794 1998-06-03 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3796 * attr.c: Correct typo.
3798 1998-05-01 Ulrich Drepper <drepper@cygnus.com>
3800 * manager.c (pthread_free): Unmap guard before the stack.
3801 Patch by Matthias Urlichs.
3803 1998-04-30 Ulrich Drepper <drepper@cygnus.com>
3805 * manager.c (pthread_free): Detect already free child.
3806 Patch by Xavier Leroy, reported by Matthias Urlichs.
3808 1998-04-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3810 * Makefile (linuxthreads-version): Renamed back from
3813 1998-04-21 Ulrich Drepper <drepper@cygnus.com>
3815 * ptlongjmp.c: Add prototypes for __libc_siglongjmp and
3818 1998-04-20 14:55 Ulrich Drepper <drepper@cygnus.com>
3820 * Makefile (libpthread-routines): Add ptlongjmp and spinlock.
3821 * internals.h: Add definitions for new spinlock implementation.
3822 * ptlongjmp.c: New file.
3823 * spinlock.c: New file.
3824 * spinlock.h (acquire): Don't reschedule using __sched_yield, use
3825 new function __pthread_acquire to prevent deadlocks with thread
3826 with different priorities.
3827 Patches by Xavier Leroy <Xavier.Leroy@inria.fr>.
3829 1998-03-16 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3831 * manager.c (__pthread_manager): Reduce first argument to select
3832 to include just the needed file descriptor.
3834 1998-03-17 00:06 Ulrich Drepper <drepper@cygnus.com>
3836 * manager.c: Fix last patch which caused core dumps.
3838 * pthread.c: Correctly handle missing SIGRTMIN.
3840 1998-03-15 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3842 * libpthread.map: Add __libc_internal_tsd_get and
3843 __libc_internal_tsd_set. Add missing cancelable functions. Export
3844 libc internal versions of the cancelable functions.
3846 1998-03-13 16:51 Ulrich Drepper <drepper@cygnus.com>
3848 * weaks.c: Define pthread_attr_init as GLIBC_2.0 and GLIBC_2.1.
3850 1998-03-13 00:46 Ulrich Drepper <drepper@cygnus.com>
3852 * attr.c: Implement pthread_attr_[gs]etguardsize,
3853 pthread_attr_[gs]setstackaddr, pthread_attr_[gs]etstacksize.
3854 Change pthread_attr_init to have two interfaces.
3855 * internals.h (struct _pthread_descr_struct): Add new fields for
3857 * libpthread.map: Add names in GLIBC_2.1 section.
3858 * manager.c (pthread_handle_create): Implement guardsize and
3860 (pthread_free): Likewise.
3861 * pthread.c (pthread_create): Add new interface for changed
3863 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
3864 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add definition of
3867 1998-03-11 00:42 Wolfram Gloger <wmglo@dent.med.uni-muenchen.de>
3869 * manager.c: Enable resetting of the thread scheduling policy
3870 to SCHED_OTHER when the parent thread has a different one.
3872 1998-02-01 13:51 Ulrich Drepper <drepper@cygnus.com>
3874 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
3875 _POSIX_ASYNCHRONOUS_IO.
3877 * sysdeps/pthread/pthread.h: Define bits for Unix98 variants of
3879 * mutex.c: Implement new mutex types.
3881 * internals.h: Include <signal.h>.
3883 * libpthread.map: Add __erno_location and __h_errno_location.
3885 * errno.c: Return pointer to variable actually in use. This might
3886 not be the one in the thread structure.
3887 * internals.h (struct _pthread_descr_struct): Add new fields p_errnop
3889 * manager.c (__pthread_manager): Set p_errnop and p_h_errnop member
3890 of manager thread structure.
3891 (pthread_handle_create): Set p_errnop and p_h_errnop members for new
3893 * pthread.c: Adapt initializer for thread structures.
3894 (__pthread_initial_thread): Set p_errnop and p_h_errnop member.
3895 (__pthread_reset_main_thread): Reset p_errnop and p_h_errnop of
3896 current thread to global variables.
3898 1998-01-31 17:27 Ulrich Drepper <drepper@cygnus.com>
3900 * rwlock.c: New file.
3901 * Makefile (libpthread-routines): Add rwlock.
3902 * sysdeps/pthread/pthread.h: Define data structures and declare
3904 * libpthread.map: Add new functions.
3906 1997-12-18 13:50 Philip Blundell <pb@nexus.co.uk>
3908 * sysdeps/arm/pt-machine.h: New file; add ARM support.
3909 * sysdeps/arm/Implies: likewise.
3910 * README: Document it.
3912 1997-12-13 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3914 * signals.c: Remove unneeded initializer for sigwaited, saving a
3917 1997-04-11 01:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3919 * semaphore.c (sem_init): Set sem_spinlock only if available.
3921 1997-12-04 01:48 Ulrich Drepper <drepper@cygnus.com>
3923 * mutex.c: Implement PTHREAD_MUTEX_CHECKERROR.
3924 * sysdeps/pthread/pthread.h: Define PTHREAD_MUTEX_CHECKERROR.
3926 * Makefile: Update from LinuxThreads 0.7.
3927 * internals.h. Likewise.
3928 * manager.c: Likewise.
3929 * mutex.c: Likewise.
3930 * pthread.c: Likewise.
3931 * signals.c: Likewise.
3932 * specific.c: Likewise.
3933 * Examples/ex3.c: Likewise.
3935 1997-11-20 18:13 Ulrich Drepper <drepper@cygnus.com>
3937 * pthread.c (__pthread_reset_main_thread): Close pipe only if still
3940 1997-10-29 05:38 Ulrich Drepper <drepper@cygnus.com>
3942 * wrapsyscall.c: Add socket functions which are also cancelation
3945 1997-10-19 21:40 Wolfram Gloger <wg@wolfram.dent.med.uni-muenchen.de>
3947 * specific.c (__libc_internal_tsd_set, __libc_internal_tsd_get):
3948 New functions for fast thread specific data within libc.
3950 * internals.h: Add new array p_libc_specific to struct
3951 _pthread_descr_struct.
3953 * sysdeps/pthread/bits/libc-lock.h: Declare new functions.
3955 1997-10-13 05:39 Ulrich Drepper <drepper@cygnus.com>
3957 * semaphore.h: Add __BEGIN_DECLS/__END_DECLS.
3958 Reported by Ralf Corsepius <corsepiu@faw.uni-ulm.de>.
3960 1997-08-29 03:05 Ulrich Drepper <drepper@cygnus.com>
3962 * internals.h (struct _pthread_descr_struct): Add definitions for
3963 two-level specific key handling.
3964 * manager.c (pthread_handle_create): Initialize specific memory array.
3965 * specific.c: Implement two-level key handling.
3966 * weaks.c: Don't provide dummy key handling.
3967 * sysdeps/pthread/bits/libc-lock.h: Typedef __libc_lock_t (no #define).
3968 Add definition of __libc_key_t.
3969 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define PTHREAD_KEYS_MAX
3971 Add definition of _POSIX_THREAD_DESTRUCTOR_ITERATIONS and
3972 PTHREAD_DESTRUCTOR_ITERATIONS.
3974 * manager.c (pthread_handle_create): Compare mmap result with
3977 * ptfork.c: Rename to __pthread_atfork and make old name a weak alias.
3978 * sysdeps/pthread/bits/pthread.h: Add prototype for __pthread_atfork.
3980 1997-08-22 19:04 Richard Henderson <rth@cygnus.com>
3982 sysdeps/sparc -> sysdeps/sparc/sparc32
3983 sysdeps/sparc64 -> sysdeps/sparc/sparc64
3985 * internals.h: Change definition of THREAD_SELF to be an expression,
3986 not a statement that did a return.
3987 * sysdeps/alpha/pt-machine.h (THREAD_SELF): Update accordingly.
3988 * sysdeps/sparc/sparc32/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
3989 Follow Solaris and use a "system reserved" register (%g6) to hold
3990 the thread descriptor.
3991 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
3993 1997-08-03 00:09 Ulrich Drepper <drepper@cygnus.com>
3995 * mutex.c: Correct pthread_once. Patch by Xavier Leroy.
3996 * sysdeps/pthread/pthread.h: Add prototype for __pthread_once.
3997 * sysdeps/pthread/bits/pthread.h: Add macros for __libc_once.
3999 * semaphore.c: Include spinlock.h only when needed.
4001 * specific.c (__pthread_setsepcific, __pthread_getspecific): Reject
4002 keys for entries not in use.
4004 * weaks.c: Implement key handling functions for real.
4006 1997-06-29 01:04 Richard Henderson <richard@gnu.ai.mit.edu>
4008 Initial sparc64-linux support:
4009 * sysdeps/sparc64/Implies: New file.
4010 * sysdeps/sparc64/pt-machine.h: Likewise.
4012 1997-06-29 00:48 Ulrich Drepper <drepper@cygnus.com>
4014 * semaphore.c: Include spinlock.h at correct place.
4017 1997-06-13 10:06 Richard Henderson <rth@tamu.edu>
4019 The Great Bit File Move:
4020 * sysdeps/alpha/semaphorebits.h: -> .../bits/semaphore.h.
4021 * sysdeps/powerpc/semaphorebits.h: Likewise.
4022 * sysdeps/pthread/cmpxchg/semaphorebits.h: Likewise.
4023 * sysdeps/pthread/no-cmpxchg/semaphorebits.h: Likewise.
4024 * sysdeps/pthread/libc-lock.h: -> bits/
4025 * sysdeps/pthread/stdio-lock.h: Likewise.
4026 * sysdeps/unix/sysv/linux/local_lim.h: Likewise.
4027 * sysdeps/unix/sysv/linux/posix_opt.h: Likewise.
4028 * semaphore.h: Likewise.
4029 * sysdeps/pthread/pthread.h: Likewise.
4031 * lockfile.c: <foo.h> -> <bits/foo.h>.
4032 * semaphore.h: Likewise.
4034 * Makefile: (headers): foo.h -> bits/foo.h.
4035 * sysdeps/pthread/Makefile: Likewise.
4037 1997-04-11 01:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
4039 * semaphore.c (sem_init): Set sem_spinlock only if available.
4041 * sysdeps/m68k/pt-machine.h (testandset, __compare_and_swap): Fix
4044 1997-04-09 03:00 Ulrich Drepper <drepper@cygnus.com>
4046 Update from LinuxThreads 0.6.
4048 * attr.c (pthread_attr_getdetachstate): Use __sched_get_priority_max
4049 and __sched_get_priority_min instead of names without `__'.
4051 * manager.c: Rewrite large parts to implement opaque pthread_t.
4053 * cancel.c: Adapt for opaque pthread_t type.
4054 * condvar.c: Likewise.
4055 * errno.c: Likewise.
4057 * mutex.c: Likewise.
4058 * pthread.c: Likewise.
4059 * signals.c: Likewise.
4060 * specific.c: Likewise.
4061 * restart.h: Likewise.
4062 * queue.h: Likewise.
4063 * Examples/ex3.c: Likewise.
4064 * Examples/ex4.c: Likewise.
4065 * sysdeps/pthread/pthread.h: Likewise.
4067 * pthread.c: Accumulate time for all threads in thread manager.
4069 * semaphore.c: Implement fallback implementation for architectures
4070 sometimes missing compare-exchange operations.
4072 * cancel.c (pthread_cancel): Validate handle argument.
4073 * join.c (pthread_join): Likewise.
4074 (pthread_detach): Likewise.
4075 * signals.c (pthread_kill): Likewise.
4077 * spinlock.h (acquire): Use __sched_yield not sched_yield.
4079 * queue.h (enqueue): Enqueue thread according to priority.
4081 * internals.c (struct pthread_start_args): New struct for passing
4082 args to cloning function.
4083 (struct _pthread): Rename to _pthread_descr_struct and adapt for
4086 * Examples/Makefile (clean): Pass -f option to rm.
4088 * sysdeps/i386/pt-machine.h: Add check for compare-exchange instruction
4089 and define TEST_FOR_COMPARE_AND_SWAP.
4090 * sysdeps/i386/i486/pt-machine.h: Removed.
4092 * sysdeps/unix/sysv/linux/local_lim.h (PTHREAD_THREADS_MAX): Increase
4095 1997-04-04 16:38 Ulrich Drepper <drepper@cygnus.com>
4097 * restart.h (suspend): Clear p_signal before suspending.
4098 (suspend_with_cancellation): Likewise.
4099 Patch by Xavier Leroy <Xavier.Leroy@inria.fr>.
4101 * weaks.c: Make __pthread_key_create return 1.
4102 * sysdeps/pthread/libc-lock.h: Define __libc_key_create,
4103 __libc_getspecific, __libc_setspecific, and __libc_key_t.
4104 * sysdeps/pthread/stdio-lock.h: Don't care for implementation not
4107 1997-03-19 15:13 Miguel de Icaza <miguel@nuclecu.unam.mx>
4109 * sysdeps/sparc/pt-machine (RELEASE): Fix.
4111 1997-03-01 07:55 Geoff Keating <geoffk@ozemail.com.au>
4113 * sysdeps/powerpc/Implies: Added.
4114 * sysdeps/powerpc/pt-machine.h: Added.
4115 * sysdeps/powerpc/semaphorebits.h: Added.
4117 1997-01-22 01:22 Ulrich Drepper <drepper@cygnus.com>
4119 * pthread.c (__pthread_initial_thread): Correct
4121 (__pthread_manager_thread): Likewise.
4122 Reported by Andreas Jaeger.
4124 1997-01-18 22:15 Richard Henderson <rth@tamu.edu>
4126 Since sigset_t no longer fits in a register, we can't pass in the
4127 thread's initial mask so easily. Take this opportunity to simplify
4128 the clone implementation by only accepting a single void* argument.
4130 * manager.c (__pthread_manager): Put thread vitals in the thread
4131 struct instead of as arguments through clone.
4132 (pthread_start_thread): Look for them there.
4133 * internals.h (struct _pthread): Add p_initial_fn,
4134 p_initial_fn_arg, p_initial_mask. Fix __pthread_manager proto.
4135 * pthread.c (pthread_initialize_manager): Revise clone invocation.