1 2002-09-24 Roland McGrath <roland@redhat.com>
3 * sysdeps/x86_64/tls.h: New file.
5 2002-09-23 Roland McGrath <roland@redhat.com>
7 * Examples/ex13.c (dump_mut): int -> size_t for counter.
9 2002-09-18 Bruno Haible <bruno@clisp.org>
11 * Examples/ex10.c (thread): Fail if pthread_mutex_timedlock() returns
12 an unexpected error code.
14 * internals.h (__pthread_message): Add const to first parameter type.
15 * pthread.c (__pthread_message): Likewise.
17 * sysdeps/unix/sysv/linux/configure: Moved to ../sysdeps/pthread.
19 2002-09-17 Roland McGrath <roland@redhat.com>
21 * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT, TLS_DO_SET_THREAD_AREA):
22 Set the descriptor limit to the full 4GB, so %gs:OFFSET works for any
23 offset (positive or negative) relative to the thread struct.
24 * sysdeps/i386/useldt.h (DO_MODIFY_LDT, DO_SET_THREAD_AREA): Likewise.
26 2002-09-12 Jakub Jelinek <jakub@redhat.com>
28 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Move...
29 * sysdeps/unix/sysv/linux/sparc/Makefile: ...here.
30 Replace /usr/lib/crt[in].o with crt[in].o too.
32 2002-09-11 Steven Munroe <sjmunroe@us.ibm.com>
34 * sysdeps/powerpc/powerpc64/pt-machine.h: New file.
36 2002-09-04 Bruno Haible <bruno@clisp.org>
38 * pthread.c: Include <sys/time.h>.
39 (is_smp_system): Move to sysdeps/unix/sysv/linux/smp.h.
40 * sysdeps/unix/sysv/linux/smp.h: New file, extracted from pthread.c.
41 * Makefile (distribute): Add smp.h to the list.
43 2002-09-04 Bruno Haible <bruno@clisp.org>
45 * sysdeps/alpha/pt-machine.h: Choose different include file location
46 on non-Linux platforms.
48 * wrapsyscall.c (PROMOTE_INTEGRAL_TYPE): New macro.
49 (open, open64): Change va_arg argument type to the integral type to
50 which mode_t promotes.
52 * sysdeps/pthread/tst-timer.c (main): Don't assume anything about
53 the structure of 'struct sigevent'.
55 * errno.c (__errno_location, __h_errno_location, __res_state):
56 Use prototype function definitions.
58 2002-07-29 Steven Munroe <sjmunroe@us.ibm.com>
60 * shlib-versions: Set libpthread version to 2.3 for powerpc64.
61 * sysdeps/powerpc/pt-machine.h: moved to...
62 * sysdeps/powerpc/powerpc32/pt-machine.h: ...here
63 * sysdeps/powerpc/powerpc64/pt-machine.h: New file.
65 2002-09-02 Roland McGrath <roland@redhat.com>
67 * sysdeps/powerpc/Makefile (CFLAGS-pt-initfini.s): New variable.
69 2002-09-01 Roland McGrath <roland@redhat.com>
71 * sysdeps/pthread/bits/libc-tsd.h (enum __libc_tsd_key_t): Add new keys
72 CTYPE_B, CTYPE_TOLOWER, CTYPE_TOUPPER.
74 * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_address): New macro.
75 (__libc_internal_tsd_address): Declare it.
76 * Versions (libc, ld, libpthread: GLIBC_PRIVATE): Add
77 __libc_internal_tsd_address.
78 * specific.c (libc_internal_tsd_address): New function.
79 (__libc_internal_tsd_address): New variable.
80 * no-tsd.c (__libc_internal_tsd_address): New variable.
82 2002-08-31 Ulrich Drepper <drepper@redhat.com>
84 * Makefile: Don't use rule for crt%.o, spell it out as rules for
87 2002-08-30 Roland McGrath <roland@redhat.com>
89 * Makefile (extra-objs, omit-deps): Add crtn.
90 ($(objpfx)libpthread.so): Depend on $(objpfx)crtn.o.
91 ($(objpfx)libpthread.so: +postinit): Append $(objpfx)crtn.o.
92 ($(objpfx)crtn.S): New target.
93 ($(objpfx)crt%.o): Pattern rule replaces crti.o target.
94 (generated): Add crtn.S.
96 * sysdeps/unix/sysv/linux/x86_64/Makefile ($(objpfx)specs): Massage
99 2002-08-30 Jakub Jelinek <jakub@redhat.com>
101 * pthread.c (__pthread_initialize_minimal): Call __uselocale even
104 2002-08-30 Roland McGrath <roland@redhat.com>
106 * tst-static-locale.c: New file.
107 * Makefile (tests, tests-static): Add it.
109 2002-04-24 Steven Munroe <sjmunroe@us.ibm.com>
111 * spinlock.c (__pthread_lock): Fix spurious wakeup
112 handling. Don't clear lowest bit of list pointer as sign the thread
113 is still on the wait list. Don't restart after spurious wakeup
114 with spinning to get the lock.
115 (__pthread_unlock): Take set lowest bit into account when handling
116 pointer to list elements.
117 Patch by Steve Munroe <sjmunroe@us.ibm.com>.
119 2002-08-28 Roland McGrath <roland@redhat.com>
121 * sysdeps/pthread/timer_routines.c (thread_func): Fix type in cast.
123 2002-08-28 Jakub Jelinek <jakub@redhat.com>
125 * sysdeps/unix/sysv/linux/hppa/aio_cancel.c: New file.
126 * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
127 * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
129 2002-08-28 Ulrich Drepper <drepper@redhat.com>
131 * sysdeps/pthread/timer_routines.c (thread_func): Change return
132 type to void and add casts in use to avoid warnings with all gcc
135 2002-08-08 Jakub Jelinek <jakub@redhat.com>
137 * sysdeps/unix/sysv/linux/bits/local_lim.h (PTHREAD_THREADS_MAX):
139 * manager.c (__pthread_handles): Remove.
140 * pthandles.c: New file.
141 * pthread.c (__pthread_initialize_minimal): Initialize
142 __pthread_handles[0] and __pthread_handles[1].
143 * Makefile (libpthread-routines): Add pthandles (must be last).
145 2002-08-26 Brian Youmans <3diff@gnu.org>
147 * Examples/ex10.c: Corrected version number in Lesser GPL copying
148 permission notice from 2 to 2.1.
149 * Examples/ex11.c: Likewise.
150 * Examples/ex13.c: Likewise.
151 * Examples/ex8.c: Likewise.
152 * Examples/ex9.c: Likewise.
153 * barrier.c: Likewise.
154 * events.c: Likewise.
155 * lockfile.c: Likewise.
156 * no-tsd.c: Likewise.
157 * pt-machine.c: Likewise.
158 * ptclock_gettime.c: Likewise.
159 * ptclock_settime.c: Likewise.
160 * rwlock.c: Likewise.
161 * sysdeps/alpha/pspinlock.c: Likewise.
162 * sysdeps/alpha/pt-machine.h: Likewise.
163 * sysdeps/arm/pspinlock.c: Likewise.
164 * sysdeps/arm/pt-machine.h: Likewise.
165 * sysdeps/cris/pspinlock.c: Likewise.
166 * sysdeps/cris/pt-machine.h: Likewise.
167 * sysdeps/hppa/pspinlock.c: Likewise.
168 * sysdeps/hppa/pt-machine.h: Likewise.
169 * sysdeps/i386/i686/pt-machine.h: Likewise.
170 * sysdeps/i386/pspinlock.c: Likewise.
171 * sysdeps/i386/pt-machine.h: Likewise.
172 * sysdeps/i386/useldt.h: Likewise.
173 * sysdeps/ia64/pspinlock.c: Likewise.
174 * sysdeps/ia64/pt-machine.h: Likewise.
175 * sysdeps/m68k/pspinlock.c: Likewise.
176 * sysdeps/m68k/pt-machine.h: Likewise.
177 * sysdeps/mips/pspinlock.c: Likewise.
178 * sysdeps/mips/pt-machine.h: Likewise.
179 * sysdeps/powerpc/pspinlock.c: Likewise.
180 * sysdeps/powerpc/pt-machine.h: Likewise.
181 * sysdeps/pthread/bits/initspin.h: Likewise.
182 * sysdeps/pthread/bits/libc-lock.h: Likewise.
183 * sysdeps/pthread/bits/libc-tsd.h: Likewise.
184 * sysdeps/pthread/getcpuclockid.c: Likewise.
185 * sysdeps/pthread/posix-timer.h: Likewise.
186 * sysdeps/pthread/timer_create.c: Likewise.
187 * sysdeps/pthread/timer_delete.c: Likewise.
188 * sysdeps/pthread/timer_getoverr.c: Likewise.
189 * sysdeps/pthread/timer_gettime.c: Likewise.
190 * sysdeps/pthread/timer_routines.c: Likewise.
191 * sysdeps/pthread/timer_settime.c: Likewise.
192 * sysdeps/pthread/tst-timer.c: Likewise.
193 * sysdeps/s390/pspinlock.c: Likewise.
194 * sysdeps/s390/s390-32/pt-machine.h: Likewise.
195 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
196 * sysdeps/sh/pspinlock.c: Likewise.
197 * sysdeps/sh/pt-machine.h: Likewise.
198 * sysdeps/sparc/sparc32/pspinlock.c: Likewise.
199 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
200 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: Likewise.
201 * sysdeps/sparc/sparc64/pspinlock.c: Likewise.
202 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
203 * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
204 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
205 * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
206 * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
207 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
208 * tststack.c: Likewise.
209 * unload.c: Likewise.
211 * wrapsyscall.c: Likewise.
213 * sysdeps/pthread/pt-initfini.c: Changed copying
214 permission notice to Lesser GPL from Library GPL, including the
215 references in the special exception.
216 * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: Likewise.
217 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Likewise.
218 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c:
220 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c:
222 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Likewise.
224 2002-08-26 Ulrich Drepper <drepper@redhat.com>
226 * Examples/ex10.c (thread): tv_nsec == 1000000000 is already
227 overflow [PR libc/4244].
229 2002-08-25 Ulrich Drepper <drepper@redhat.com>
231 * sysdeps/pthread/timer_routines.c (thread_func): Make the
232 compiler happy by adding a return statement which will never be
235 * tst-context.c (main): Cast to long before casting to pointer.
237 * Examples/ex17.c (main): Use correct format string.
239 * Examples/ex9.c (thread): Remove incorrect return statement.
241 2002-08-23 Ulrich Drepper <drepper@redhat.com>
243 * pthread.c (__linuxthreads_version): New global constant.
245 2002-08-23 Andreas Jaeger <aj@suse.de>
247 * sysdeps/x86_64/pt-machine.h: Use %fs instead of %gs
248 as thread specific register.
249 (testandset): Fix inline asm.
250 (THREAD_GETMEM): Fix inline asm.
252 2002-08-22 Roland McGrath <roland@redhat.com>
254 * sysdeps/i386/useldt.h (INIT_THREAD_SELF): Remove [HAVE_TLS_SUPPORT]
256 (INIT_THREAD_SELF): Pass second arg to DO_SET_THREAD_AREA.
257 (DO_SET_THREAD_AREA): Take second arg, pass to DO_SET_THREAD_AREA_REUSE
258 macro. That chooses whether to reuse %gs value or let kernel set it.
259 [USE_TLS] (DO_SET_THREAD_AREA_REUSE): New macro, always 1.
260 [!USE_TLS] (DO_SET_THREAD_AREA_REUSE): New macro, true if arg is
263 2002-08-21 Ulrich Drepper <drepper@redhat.com>
265 * sysdeps/i386/tls.h (TLS_SETUP_GS_SEGMENT): Add new parameter
266 also to the third definition of this macro.
268 2002-06-17 Andreas Jaeger <aj@suse.de>
270 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
273 2002-08-20 Ulrich Drepper <drepper@redhat.com>
275 * sysdeps/i386/useldt.h: Go back to using 16-bit instructions when
276 loading/reading segment registers. Some old hardware doesn't
277 handle the 32-bit instructions as expected.
278 * sysdeps/i386/tls.h: Likewise.
280 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Second parameter is
281 renamed to secondcall and use is negated.
282 (TLS_SETUP_GS_SEGMENT): Likewise.
283 (TLS_INIT_TP): Likewise.
284 * sysdeps/sh/tls.h (TLS_INIT_TP): Second parameter is renamed to
287 * sysdeps/i386/tls.h: Use 32-bit operations when handling segment
288 registers. No need to mask upper 16 bits in this case.
289 * sysdeps/i386/useldt.h: Likewise.
290 (DO_SET_THREAD_AREA): We have to load %gs again even if the value
291 is the same since the GDT content changed.
293 * sysdeps/i386/tls.h (TLS_INIT_TP): Add new parameter and pass it on
294 to TLS_SETUP_GS_SEGMENT.
295 (TLS_SETUP_GS_SEGMENT): Add new parameter and pass it on to
296 TLS_DO_SET_THREAD_AREA.
297 (TLS_DO_SET_THREAD_AREA): If new parameter is zero determine
298 entry number from %gs value.
299 * sysdeps/sh/tls.h (TLS_INIT_TP): Add new parameter and simply
302 * manager.c (pthread_handle_create): Pass NULL to _dl_allocate_tls.
303 Pass true to _dl_deallocate_tls.
304 (pthread_free): Likewise.
305 * pthread.c (__pthread_initialize_manager): Likewise.
307 2002-08-19 Ulrich Drepper <drepper@redhat.com>
309 * sysdeps/i386/useldt.h (DO_SET_THREAD_AREA): Use correct shift when
310 computing index from %gs value.
312 2002-08-16 Roland McGrath <roland@redhat.com>
314 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Calculate segment
315 register value from entry number properly.
317 * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): Rewrite asm to use %ebx
318 optimally conditional on [__PIC__].
319 (TLS_DO_SET_THREAD_AREA): New macro, implement inline syscall
320 without touching errno, and use latest modify_ldt-like interface.
321 (TLS_SETUP_GS_SEGMENT): Use that instead of INLINE_SYSCALL.
322 * sysdeps/i386/useldt.h (DO_MODIFY_LDT): Set %gs in this macro.
323 (DO_SET_THREAD_AREA): New macro, uses current syscall interface with
324 existing %gs value as the segment to set.
325 (INIT_THREAD_SELF): Rewritten using those. Use set_thread_area only
326 under [HAVE_TLS_SUPPORT] so we can rely on the initialization done
327 by the first thread's early TLS setup.
329 2002-08-15 Roland McGrath <roland@redhat.com>
331 * sysdeps/i386/tls.h (TLS_INIT_TP): Use statement expression and
332 return a value as callers now expect.
334 2002-08-11 Roland McGrath <roland@redhat.com>
336 * pthread.c (__pthread_initialize_manager): Initialize
337 p_header.data.tcb field of manager thread's descriptor.
338 (__pthread_initialize_minimal): Don't initialize p_header.data.self
339 field, already done by TLS_INIT_TP.
341 * manager.c (pthread_handle_create): Move p_header field initializers
344 2002-08-08 Ulrich Drepper <drepper@redhat.com>
346 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Removed.
348 2002-08-07 Ulrich Drepper <drepper@redhat.com>
350 * pthread.c (__linuxthreads_initial_report_events): New variable.
351 (__pthread_initialize_manager): Use it to initialize p_report_events
353 [TLS]: Store pointer to descriptor of manager in __pthread_handles.
355 2002-08-07 Roland McGrath <roland@redhat.com>
357 * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): Add an extra argument with
358 an "m" constraint to the asm so the compiler knows LDT_ENTRY was used.
360 2002-08-02 Roland McGrath <roland@redhat.com>
362 * sysdeps/pthread/bits/libc-tsd.h (enum __libc_tsd_key_t):
363 Add _LIBC_TSD_KEY_LOCALE.
364 * manager.c (pthread_start_thread) [!(USE_TLS && HAVE___THREAD)]:
365 Call __uselocale to initialize our per-thread locale pointer to
367 * pthread.c (__pthread_initialize_minimal): Likewise.
369 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Add missing \s.
371 2002-08-02 Ulrich Drepper <drepper@redhat.com>
373 * pthread.c: Declare _errno, _h_errno, and _res unless we use TLS
376 * cancel.c (__pthread_perform_cleanup) [USE_TLS && HAVE___THREAD]:
377 Don't use p_libc_specific element in thread descriptor.
379 2002-07-30 Roland McGrath <roland@redhat.com>
381 * sysdeps/pthread/bits/libc-tsd.h: Include <tls.h>.
382 [USE_TLS && HAVE___THREAD]: Just include the sysdeps/generic file,
383 which does the right thing when __thread support is available.
384 * descr.h (struct _pthread_descr_struct) [USE_TLS && HAVE___THREAD]:
385 Omit `p_libc_specific', `p_errnop', `p_errno', `p_h_errnop',
386 `p_h_errno', `p_resp', and `p_res' members.
387 * pthread.c (__pthread_initialize_minimal) [USE_TLS && HAVE___THREAD]:
388 Don't initialize `p_errnop' and `p_h_errnop' members.
389 (__pthread_reset_main_thread): Likewise.
390 (__pthread_initialize_manager): Likewise.
391 * manager.c (__pthread_manager, pthread_handle_create): Likewise.
392 * pthread.c (pthread_initialize) [USE_TLS && HAVE___THREAD]:
393 Don't initialize `p_resp' member.
394 (__pthread_reset_main_thread): Likewise.
395 * manager.c (pthread_handle_create): Likewise.
396 * specific.c (libc_internal_tsd_set, libc_internal_tsd_get):
397 Conditionalize these on [!(USE_TLS && HAVE___THREAD)].
398 * no-tsd.c: Conditionalize contents on [!(USE_TLS && HAVE___THREAD)].
399 * errno.c [USE_TLS && HAVE___THREAD]
400 (__h_errno_location, __res_state): Don't define these at all.
402 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens around arguments!
403 (INSTALL_NEW_DTV, GET_DTV): Likewise.
404 * sysdeps/sh/tls.h (INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV): Likewise.
406 * weaks.c: Don't include <errno.h> here.
408 2002-08-01 Roland McGrath <roland@redhat.com>
410 * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): New macro, broken out of
412 (TLS_DO_SET_THREAD_AREA): New macro, uses thread_set_area syscall.
413 (TLS_SETUP_GS_SEGMENT): New macro, try one or the other or both.
414 (TLS_INIT_TP): Use that.
416 2002-08-02 Jakub Jelinek <jakub@redhat.com>
418 * sysdeps/i386/useldt.h (DO_MODIFY_LDT): Move from INIT_THREAD_SELF.
419 (INIT_THREAD_SELF): Use sys_thread_area syscall instead if available.
420 (FREE_THREAD): Avoid modify_ldt if using GDT.
421 * sysdeps/i386/pspinlock.c (__have_no_set_thread_area): New variable.
423 2002-07-25 Jakub Jelinek <jakub@redhat.com>
425 * sysdeps/i386/tls.h: Use __ASSEMBLER__ test macro not ASSEMBLER.
426 * sysdeps/i386/pt-machine.h: Likewise.
427 * sysdeps/i386/useldt.h: Likewise.
429 2002-07-22 Ulrich Drepper <drepper@redhat.com>
431 * pthread.c (__pthread_initialize_minimal): If !SHARED and TLS
432 call __libc_setup_tls first.
433 * Makefile: Actually create tst-signal.out file when running the test.
434 (tests): Add tststatic.
435 * Examples/tststatic.c: New file.
437 2002-07-19 Ulrich Drepper <drepper@redhat.com>
439 * errno.c (__errno_location): Don't define unless !USE_TLS
441 * sysdeps/i386/pt-machine.c: Protect C code with #ifndef ASSEMBLER.
442 * sysdeps/i386/tls.h: Likewise.
443 * sysdeps/i386/useldt.h: Likewise.
444 * sysdeps/i386/i686/pt-machine.h: Likewise.
446 2002-07-02 H.J. Lu <hjl@gnu.org>
448 * sysdeps/mips/pspinlock.c: Don't include <sgidefs.h>. Always
450 * sysdeps/mips/pt-machine.h: Likewise.
452 2002-07-14 Ulrich Drepper <drepper@redhat.com>
454 * manager.c (pthread_handle_create): Initialize self-reference in
457 2002-07-01 Jakub Jelinek <jakub@redhat.com>
459 * Examples/ex9.c (main): Remove unused th variable.
461 2002-07-10 Ulrich Drepper <drepper@redhat.com>
463 * wrapsyscall.c: Add __nanosleep alias.
464 * Versions (GLIBC_2.2.6): Add __nanosleep.
465 * bug-sleep.c: New file.
466 * Makefile (tests): Add bug-sleep.
468 2002-06-19 Steven Munroe <sjmunroe@vnet.ibm.com>
470 * Examples/ex9.c (main): Use list of children and join them.
471 (thread): Do not call exit.
473 2002-06-20 Ulrich Drepper <drepper@redhat.com>
475 * spinlock.c (wait_node_alloc): We cannot use compare-and-exchange.
476 Unconditionally use the code using spinlock. Use __pthread_release
478 (wait_node_free): Likewise.
479 (__pthread_acquire, __pthread_release): Unconditionally define.
481 2002-06-07 Jakub Jelinek <jakub@redhat.com>
483 * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Fix typo.
485 2002-05-24 Ulrich Drepper <drepper@redhat.com>
487 * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Use __sync_synchronize.
489 2002-05-21 Ulrich Drepper <drepper@redhat.com>
491 * sysdeps/pthread/pthread.h (pthread_create): Rename first
493 (pthread_cancel): Likewise.
494 * internals.h (__pthread_create_2_1): Likewise.
495 * sysdeps/unix/sysv/linux/bits/sigthread.h (pthread_kill): Likewise.
497 2002-05-20 Ulrich Drepper <drepper@redhat.com>
499 * sysdeps/alpha/pt-machine.c (THREAD_SELF): Remove clobber.
500 Patch by Glen Nakamura <gen@flex.com>.
502 2002-05-03 Ulrich Drepper <drepper@redhat.com>
504 * signals.c: Move sighandler functions to...
505 * sighandler.c: ...here. New file.
506 * signals.c: Move signal handler related type definitions to...
507 * internals.h: ...here. Add prototypes for signal handlers.
508 * Makefile (libpthread-routines): Add sighandler.
509 (CFLAGS-sighandler.c): Add $(exceptions).
511 2002-04-30 Jakub Jelinek <jakub@redhat.com>
513 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
515 2002-04-08 Ulrich Drepper <drepper@redhat.com>
517 * sysdeps/pthread/timer_getoverr.c: Return real overrun.
518 * sysdeps/pthread/posix-timer.h (struct timer_node): Add overrun_count.
519 * sysdeps/pthread/timer_routines.c (thread_func): Schedule next timeout
520 based on previous one and not on current time. Count overruns.
521 Patch by Eric F. Sorton <eric@cctcorp.com>.
523 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add DELAYTIMER_MAX.
525 2002-04-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
527 * sysdeps/sh/pt-machine.h: Define _PT_MACHINE_H
528 if it isn't defined yet.
529 (FLOATING_STACKS, ARCH_STACK_MAX_SIZE): Defined.
530 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
532 * sysdeps/sh/tls.h: New file.
534 2002-04-08 Jakub Jelinek <jakub@redhat.com>
536 * manager.c (__pthread_manager_event): Use self instead of arg
537 for INIT_THREAD_SELF.
538 * sysdeps/i386/useldt.h (INIT_THREAD_SELF): Use sizeof (struct
539 _pthread_descr_struct) instead of sizeof (*descr).
541 2002-04-05 Ulrich Drepper <drepper@redhat.com>
543 * sysdeps/ia64/pt-machine.h: Protect against multiple inclusion.
544 * sysdeps/alpha/pt-machine.h: Likewise.
545 * sysdeps/arm/pt-machine.h: Likewise.
546 * sysdeps/cris/pt-machine.h: Likewise.
547 * sysdeps/hppa/pt-machine.h: Likewise.
548 * sysdeps/m68k/pt-machine.h: Likewise.
549 * sysdeps/mips/pt-machine.h: Likewise.
550 * sysdeps/powerpc/pt-machine.h: Likewise.
551 * sysdeps/s390/s390-32/pt-machine.h: Likewise.
552 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
553 * sysdeps/sh/pt-machine.h: Likewise.
554 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
555 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
556 * sysdeps/x86_64/pt-machine.h: Likewise.
558 2002-04-05 Jakub Jelinek <jakub@redhat.com>
560 * man/pthread_mutexattr_init.man (pthread_mutexattr_settype): Document
561 instead of pthread_mutexattr_setkind_np.
562 (pthread_mutexattr_gettype): Similarly.
563 * man/pthread_mutexattr_setkind_np.man: New.
564 * man/Makefile (SOURCES): Add pthread_mutexattr_setkind_np.man.
566 2002-04-02 Ulrich Drepper <drepper@redhat.com>
568 * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Define.
570 2002-03-22 Jakub Jelinek <jakub@redhat.com>
572 * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Remove.
574 2002-03-22 Ulrich Drepper <drepper@redhat.com>
576 * internals.h (MEMORY_BARRIER): Define as asm with memory as clobber.
578 2002-03-17 Andreas Jaeger <aj@suse.de>
580 * sysdeps/i386/pt-machine.h: Add testandset and __compare_and_swap
582 * sysdeps/alpha/pt-machine.h: Likewise.
583 * sysdeps/arm/pt-machine.h: Likewise.
584 * sysdeps/cris/pt-machine.h: Likewise.
585 * sysdeps/hppa/pt-machine.h: Likewise.
586 * sysdeps/i386/i686/pt-machine.h: Likewise.
587 * sysdeps/ia64/pt-machine.h: Likewise.
588 * sysdeps/m68k/pt-machine.h: Likewise.
589 * sysdeps/mips/pt-machine.h: Likewise.
590 * sysdeps/powerpc/pt-machine.h: Likewise.
591 * sysdeps/s390/s390-32/pt-machine.h: Likewise.
592 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
593 * sysdeps/sh/pt-machine.h: Likewise.
594 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
595 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
596 * sysdeps/x86_64/pt-machine.h: Likewise.
598 * internals.h: Move testandset and __compare_and_swap prototypes
601 2002-03-03 Andreas Jaeger <aj@suse.de>
603 * errno.c: Include resolv.h to avoid warning.
605 2002-02-27 Ulrich Drepper <drepper@redhat.com>
607 * pthread.c [USE_TLS] (thread_self_stack): Correct check for upper
610 2002-02-23 Ulrich Drepper <drepper@redhat.com>
612 * attr.c (pthread_getattr_np): Don't take thread descriptor size
613 into account if USE_TLS.
614 * manager.c (pthread_handle_create): Free TLS data structures if call
615 failed. Pass correct stack to clone if USE_TLS.
616 * sysdeps/i386/pt-machine.h: Handle multiple inclusion.
617 * sysdeps/i386/i686/pt-machine.h: Likewise.
618 * sysdeps/i386/tls.h: Unconditionally include <pt-machine.h>.
620 * descr.h (struct _pthread_descr_struct): Update p_header for TLS.
621 Add p_stackaddr element #if USE_TLS.
622 * internals.c: Include <tls.h>.
623 * manager.c: Integrate creating and handling of thread descriptor
625 * pthread.c: Likewise.
626 * sysdeps/i386/tls.h (tcbhead_t): Add self pointer.
627 Include <linuxthreads/descr.h> only if TLS is really used.
628 (GET_DTV): New macro.
629 (TLS_INIT_TP): Initialize self pointer.
631 2002-02-17 Andreas Schwab <schwab@suse.de>
633 * signals.c (sigwait): Check for old sighandler being SIG_ERR,
636 2002-02-12 Ulrich Drepper <drepper@redhat.com>
638 * sysdeps/i386/tls.c (INSTALL_NEW_DTV): Define.
639 (INSTALL_DTV): Adjust for being passed pointer to element with length.
641 2002-02-08 Ulrich Drepper <drepper@redhat.com>
643 * sysdeps/i386/tls.h (TLS_INIT_TP): Also initialize %gs.
645 2002-02-08 Richard Henderson <rth@redhat.com>
647 * sysdeps/alpha/elf/pt-initfini.c: Use \n\ for multiline string.
649 2002-02-08 Ulrich Drepper <drepper@redhat.com>
651 * sysdeps/i386/tls.h: TLS cannot be supported with FLOATING_STACKS
654 2002-02-07 H.J. Lu <hjl@gnu.org>
656 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Silence the
658 (__pthread_spin_lock): Remove ".set noreorder".
659 * sysdeps/mips/pt-machine.h (__compare_and_swap): Liekwise.
661 2002-02-05 H.J. Lu <hjl@gnu.org>
663 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Not use
665 * sysdeps/mips/pt-machine.h (testandset): Likewise.
666 (__compare_and_swap): Likewise.
668 2002-02-07 Ulrich Drepper <drepper@redhat.com>
670 * internals.h: Move declarations/definitions of
671 __pthread_initial_thread_bos, __pthread_initial_thread,
672 __pthread_manager_thread_bos, __pthread_manager_thread_tos,
673 __pthread_manager_thread, __pthread_nonstandard_stacks, STACK_SIZE,
674 CURRENT_STACK_FRAME, __pthread_find_self, and thread_self...
676 * sysdeps/i386/tls.h: Add TLS definitions also for !FLOATING_STACKS.
677 Define THREAD_GETMEM accordingly.
679 2002-02-06 Ulrich Drepper <drepper@redhat.com>
681 * sysdeps/i386/tls.h: Include <stddef.h> for size_t.
683 * sysdeps/i386/tls.h: Define THREAD_DTV.
685 2002-02-04 Ulrich Drepper <drepper@redhat.com>
687 * internals.h: Move thread descriptor definition...
688 * descr.h.: ...here. New file.
689 * sysdeps/i386/tls.h: New file.
691 2002-02-01 H.J. Lu <hjl@gnu.org>
693 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Use a
694 different register in the delayed slot. Use branch likely.
696 * sysdeps/mips/pt-machine.h (testandset): Call _test_and_set.
697 (__compare_and_swap): Return 0 only when failed to compare. Use
700 2002-02-01 Jakub Jelinek <jakub@redhat.com>
702 * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set,
703 __pthread_kill_other_threads_np): Move to GLIBC_PRIVATE.
704 * sysdeps/i386/i586/Versions: Move all symbols to GLIBC_PRIVATE.
705 * sysdeps/i386/i686/Versions: Move all symbols to GLIBC_PRIVATE.
706 * sysdeps/sparc/sparc32/sparcv9/Versions: New file.
707 * sysdeps/sparc/sparc64/Versions: New file.
708 * sysdeps/ia64/Versions: Move all symbols to GLIBC_PRIVATE.
710 2002-01-31 Ulrich Drepper <drepper@redhat.com>
712 * pthread.c: _dl_cpuclock_offset is not any longer a global variable
713 in SHARED code, use GL(dl_cpuclock_offset).
715 2002-01-28 Andreas Jaeger <aj@suse.de>
717 * sysdeps/mips/pspinlock.c (__pthread_spin_init): Clear *LOCK to
718 0. Patch by Machida Hiroyuki <machida@sm.sony.co.jp>.
720 2002-01-16 Martin Schwidefsky <schwidefsky@de.ibm.com>
722 * sysdeps/s390/s390-32/pt-machine.h (MEMORY_BARRIER): Define.
723 (CURRENT_STACK_FRAME): Remove duplicate definition.
724 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
726 2002-01-14 Martin Schwidefsky <schwidefsky@de.ibm.com>
728 * Makefile (CFLAGS-tst-cancel.c): Add -fno-inline-functions to prevent
731 2002-01-12 Andreas Schwab <schwab@suse.de>
733 * Makefile (test-srcs): Add tst-signal.
734 (tests): Run tst-signal.
735 (distribute): Add tst-signal.sh.
736 * tst-signal.c, tst-signal.sh: New files.
738 2002-01-14 Andreas Jaeger <aj@suse.de>
740 * sysdeps/x86_64/pt-machine.h (INIT_THREAD_SELF): Avoid warning.
742 2002-01-11 Andreas Schwab <schwab@suse.de>
744 * signals.c (sighandler): Initialize all elements to SIG_ERR.
745 (__sigaction): Don't use value from sighandler if it is SIG_ERR.
747 2002-01-06 Richard Henderson <rth@redhat.com>
749 * sysdeps/alpha/elf/pt-initfini.c: New file.
751 2001-12-29 Andreas Jaeger <aj@suse.de>
753 * Examples/ex9.c: Add noreturn attribute for thread.
754 * Examples/ex10.c: Likewise.
755 * Examples/ex13.c (thread_start): Likewise.
756 * Examples/ex15.c (worker): Likewise.
758 * Examples/ex18.c: Include unistd.h for prototype of sleep.
760 2001-12-14 Ulrich Drepper <drepper@redhat.com>
762 * man/pthread_atfork.man: Adjust description of mutex handling
763 after fork for current implementation.
764 * linuxthreads.texi: Likewise [PR libc/2519].
766 2001-12-13 Andreas Schwab <schwab@suse.de>
768 * specific.c (pthread_key_delete): Don't contact the thread
769 manager if no threads have been created yet.
771 2001-12-12 NIIBE Yutaka <gniibe@m17n.org>
773 * sysdeps/sh/pt-machine.h (INIT_THREAD_SELF): Added __volatile__
774 qualifier to be safe.
776 2001-11-30 Andreas Schwab <schwab@suse.de>
778 * pthread.c (pthread_handle_sigcancel) [THREAD_SELF]: Double check
779 that self is the manager thread, and initialize the thread
781 (thread_self_stack) [THREAD_SELF]: New function to find self via
783 * manager.c (pthread_handle_create): Don't block cancel signal any
786 2001-11-29 Andreas Jaeger <aj@suse.de>
788 * sysdeps/x86_64/pt-machine.h: Use %gs as thread specific register.
790 (INIT_THREAD_SELF): New.
791 (THREAD_GETMEM): New.
793 (THREAD_SETMEM): New.
794 (THREAD_SETMEM_NC): New.
795 (FLOATING_STACKS): Define.
796 (ARCH_STACK_MAX_SIZE): Define.
798 2001-11-28 Kaz Kylheku <kaz@ashi.footprints.net>
800 Bugfix to pthread_key_delete. It was iterating over the thread
801 manager's linked list of threads, behind the thread manager's
802 back causing a race. The fix is to have the manager iterate over
803 the threads instead, using a new request type for doing so.
804 * internals.h (struct pthread_request): New manager request type
806 * manager.c (pthread_for_each_thread): New function.
807 (__pthread_manager): Handle new REQ_FOR_EACH_THREAD request.
808 * specific.c (struct pthread_key_delete_helper_args): New type.
809 (pthread_key_delete_helper): New static function.
810 (pthread_key_delete): Use the new thread manager
811 REQ_FOR_EACH_THREAD function to iterate over the threads and set
812 the delete key slot to a null value in each thread.
813 * Examples/ex18.c: New test.
814 * Makefile (tests): Add ex18.
816 2001-11-22 Wolfram Gloger <wg@malloc.de>
818 * pthread.c (pthread_onexit_process): Don't call free
819 after threads have been asynchronously terminated.
821 * manager.c (pthread_handle_exit): Surround cancellation
822 of threads with __flockfilelist()/__funlockfilelist().
824 2001-11-26 Andreas Schwab <schwab@suse.de>
826 * manager.c (pthread_handle_create): Start the child thread with
827 the cancel signal blocked, so that it does not handle it before
828 the thread register is set up. Save errno from failed clone call.
830 2001-11-15 Ulrich Drepper <drepper@redhat.com>
832 * sysdeps/i386/i686/Implies: Removed.
833 * sysdeps/i386/i686/Versions: New file.
835 2001-10-31 Andreas Jaeger <aj@suse.de>
837 * sysdeps/x86_64/Makefile: Remove, we do not need it anymore.
839 2001-10-05 Kevin Buettner <kevinb@cygnus.com>
841 * pthread.c (__linuxthread_pthread_sizeof_descr): Change name
842 to __linuxthreads_pthread_sizeof_descr to match name used by
843 symbol_list_arr[LINUXTHREADS_PTHREAD_SIZEOF_DESCR] in
844 linuxthreads_db/td_symbol_list.c.
846 2001-09-22 Andreas Jaeger <aj@suse.de>
848 * linuxthreads/tst-context.c: Avoid compile warning.
850 2001-09-20 Andreas Jaeger <aj@suse.de>
852 * shlib-versions: Add x86-64.
854 2001-09-19 Andreas Jaeger <aj@suse.de>
856 * sysdeps/x86_64/Makefile: New file.
857 * sysdeps/x86_64/pspinlock.c: New file.
858 * sysdeps/x86_64/pt-machine.h: New file.
860 2001-09-12 Jakub Jelinek <jakub@redhat.com>
862 * sysdeps/pthread/timer_delete.c (timer_delete): Thread may be NULL
864 * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
866 2001-09-11 Ulrich Drepper <drepper@redhat.com>
867 Wolfram Gloger <wg@malloc.de>
869 * join.c: Protect all communications from and to manager with
871 * manager.c: Likewise.
872 * pthread.c: Likewise.
873 * smeaphore.c: Likewise.
875 2001-08-29 Ulrich Drepper <drepper@redhat.com>
877 * spinlock.c (__pthread_lock): Top max_count value with
878 MAX_ADAPTIVE_SPIN_COUNT.
879 * internals.h (MAX_ADAPTIVE_SPIN_COUNT): Define if not already done.
881 * sysdeps/i386/i686/pt-machine.h (BUSY_WAIT_NOP): New macro to
884 2001-08-27 Jakub Jelinek <jakub@redhat.com>
886 * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_t): Only define to
887 non-opaque type if __USE_UNIX98.
889 2001-08-26 Jakub Jelinek <jakub@redhat.com>
891 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_t): Define
892 non-opaque lock types also if _IO_MTSAFE_IO is defined.
894 2001-08-23 Roland McGrath <roland@frob.com>
896 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start): Take
897 new first argument, skip the cleanup handler if it's zero.
898 (_LIBC_LOCK_RECURSIVE_INITIALIZER): New macro.
899 (__libc_lock_define_initialized_recursive): Use it.
900 * sysdeps/pthread/bits/stdio-lock.h: File removed.
901 The sysdeps/generic file from the main tree now suffices.
903 2001-08-22 Roland McGrath <roland@frob.com>
905 * sysdeps/pthread/bits/stdio-lock.h: Include <bits/libc-lock.h>
906 instead of <pthread.h>.
907 (_IO_lock_t): Define this typedef using __libc_lock_define_recursive.
908 (_IO_lock_initializer): Add braces.
909 (_IO_lock_lock): Use __libc_lock_lock_recursive.
910 (_IO_lock_unlock): Use __libc_lock_unlock_recursive.
912 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_recursive_t): New type.
913 (__libc_lock_define_initialized_recursive): Use it.
914 (__libc_lock_init_recursive): Likewise.
915 (__libc_lock_fini_recursive): Likewise.
916 (__libc_lock_lock_recursive): Likewise.
917 (__libc_lock_trylock_recursive): Likewise.
918 (__libc_lock_unlock_recursive): Likewise.
919 (__libc_lock_define_recursive): New macro.
921 2001-08-14 Jakub Jelinek <jakub@redhat.com>
923 * lockfile.c (__pthread_provide_lockfile): New variable.
924 * pthread.c (__pthread_require_lockfile): New variable.
925 * cancel.c (__pthread_require_lockfile): New variable.
927 2001-07-31 Ulrich Drepper <drepper@redhat.com>
929 * tst-context.c (threadfct): Initialize context before calling
932 * Examples/ex17.c: Make sure test thread is around long enough.
934 2001-07-26 kaz Kojima <kkojima@rr.iij4u.or.jp>
936 * sysdeps/sh/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF): Defined.
938 2001-07-24 Ulrich Drepper <drepper@redhat.com>
940 * tst-context.c (main): Print explanation before bailing out
941 because context handling is not supported.
943 2001-07-23 Ulrich Drepper <drepper@redhat.com>
945 * Makefile (tests): Add tst-context.
946 * tst-context.c: New file.
948 * sysdeps/pthread/bits/stdio-lock.h: Define
949 _IO_cleanup_region_start_noarg.
951 2001-07-23 Jakub Jelinek <jakub@redhat.com>
953 * sysdeps/alpha/pt-machine.h (FLOATING_STACKS): Define.
954 (ARCH_STACK_MAX_SIZE): Define.
955 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
956 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
958 2001-07-19 Jakub Jelinek <jakub@redhat.com>
960 * sysdeps/i386/useldt.h: Fix typo in ARCH_STACK_MAX_SIZE comment.
962 * sysdeps/ia64/pt-machine.h (FLOATING_STACKS): Define.
963 (ARCH_STACK_MAX_SIZE): Define.
964 * manager.c (pthread_allocate_stack): Handle FLOATING_STACKS with
965 NEED_SEPARATE_REGISTER_STACK.
967 2001-07-16 Andreas Schwab <schwab@suse.de>
969 * Makefile (before-compile): Don't add $(objpfx)crti.o.
970 (omit-deps): Add crti.
971 ($(objpfx)libpthread.so): Depend on $(objpfx)crti.o, but make sure
972 it is filtered out of the link command.
974 2001-07-16 Ulrich Drepper <drepper@redhat.com>
976 * pthread.c (pthread_initialize): For FLOATING_STACKS don't bother
977 to find the right value for __pthread_initial_thread_bos, it's not
978 used. If not FLOATING_STACKS first run
979 __pthread_init_max_stacksize.
981 2001-06-16 H.J. Lu <hjl@gnu.org>
983 * internals.h: Include <stackinfo.h>.
985 * attr.c: Don't include <stackinfo.h> here.
986 * cancel.c: Likewise.
987 * manager.c: Likewise.
988 * pthread.c: Likewise.
989 * ptlongjmp.c: Likewise.
991 2001-03-23 Matthew Wilcox <willy@ldl.fc.hp.com>
993 * attr.c: Make _STACK_GROWS_UP work.
994 * internals.h: Likewise.
995 * manager.c: Likewise.
996 * pthread.c: Likewise.
998 2001-06-15 H.J. Lu <hjl@gnu.org>
1000 * pthread.c (__pthread_reset_main_thread): Fix a typo.
1002 2001-02-02 John S. Marvin <jsm@udlkern.fc.hp.com>
1004 * semaphore.h: Use struct _pthread_fastlock as an element of
1005 sem_t instead of an identical struct.
1006 * rwlock.c: Remove casts.
1007 * semaphore.c: Likewise.
1009 2001-04-30 Alan Modra <amodra@one.net.au>
1011 * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: New.
1013 2001-05-25 Bruce Mitchener <bruce@cubik.org>
1015 * linuxthreads.texi: Spelling corrections.
1017 2001-05-25 Ulrich Drepper <drepper@redhat.com>
1019 * oldsemaphore.c (__old_sem_wait): Clear p_nextwaiting before
1020 returning successfully.
1021 Patch by Gene Cooperman <gene@ccs.neu.edu>.
1023 2001-05-24 Ulrich Drepper <drepper@redhat.com>
1025 * spinlock.c (__pthread_lock) [HAS_COMPARE_AND_SWAP]: Before doing any
1026 serious work try once whether the lock is uncontested.
1027 Remove duplicate reading of __status before loop.
1028 Change suggested by Hans Boehm <hans_boehm@hp.com>.
1030 * spinlock.h (__pthread_trylock): Remove need for oldstatus variable.
1031 (__pthread_alt_trylock): Likewise.
1033 2001-05-01 Kaz Kylheku <kaz@ashi.footprints.net>
1035 Memory barrier overhaul following line by line inspection.
1036 * mutex.c (pthread_once): Missing memory barriers added.
1037 * pthread.c (__pthread_wait_for_restart_signal,
1038 __pthread_timedsuspend_new, __pthread_restart_new): Added
1039 memory barriers ``just in case'' and for documentary value.
1040 * spinlock.c (__pthread_release): New inline function for releasing
1041 spinlock, to complement __pthread_acquire. Includes memory
1042 barrier prior to assignment to spinlock, and __asm __volatile
1043 dance to prevent reordering or optimization of the spinlock access.
1044 * spinlock.c (__pthread_unlock, __pthread_alt_lock,
1045 __pthread_alt_timedlock, __pthread_alt_unlock,
1046 __pthread_compare_and_swap): Updated to use new __pthread_release
1047 instead of updating spinlock directly.
1048 * spinlock.c (__pthread_lock, __pthread_unlock, wait_node_alloc,
1049 wait_node_free, wait_node_dequeue, __pthread_alt_lock,
1050 __pthread_alt_timedlock, __pthread_alt_unlock, __pthread_acquire):
1051 Memory barrier overhaul. Lots of missing memory barriers added,
1052 a couple needless ones removed.
1053 * spinlock.c (__pthread_compare_and_swap): testandset optimization
1054 removed, just calls __pthread_acquire, which has the new read
1055 barrier in it before its testandset.
1057 2001-05-20 Roland McGrath <roland@frob.com>
1059 * Makeconfig: New file, variables used to be in main libc Makeconfig.
1061 2001-05-09 Geoff Keating <geoffk@redhat.com>
1063 * sysdeps/powerpc/pt-machine.h
1064 (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): Define.
1065 (__compare_and_swap): Remove memory barriers.
1066 (__compare_and_swap_with_release_semantics): New function.
1068 2001-04-24 Andreas Jaeger <aj@suse.de>
1070 * wrapsyscall.c: send* and recv* return ssize_t.
1072 * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Unlock the
1073 mutex instead of double locking it.
1074 Reported by Pierre Artaud <partaud@sodatec.com>.
1076 2001-04-23 Ulrich Drepper <drepper@redhat.com>
1078 * sysdeps/pthread/getcpuclockid.c: Make function generic, test
1079 using #ifdef whether the clock is available.
1080 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: Removed.
1082 * sysdeps/ia64/Versions: New file.
1084 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init): We don't
1085 have to call __gmon_start__ in the libpthread DSO.
1086 * sysdeps/pthread/pt-initfini.c (_init): Likewise.
1088 * Makefile (libpthread-routines): Add ptclock_gettime and
1090 * internals.h: Don't use cpuclock-init.h definitions, use
1091 hp-timing.h definitions.
1092 * pthread.c: Likewise.
1093 * manager.c: Likewise.
1094 * ptclock_gettime.c: New file.
1095 * ptclock_settime.c: New file.
1096 * internals.h: Fix parameter type for __pthread_clock_gettime and
1097 __pthread_clock_settime.
1099 * sysdeps/i386/i586/ptclock_gettime.c: Removed.
1100 * sysdeps/i386/i586/ptclock_settime.c: Removed.
1101 * sysdeps/i386/i586/Makefile: Removed.
1103 2001-04-22 Ulrich Drepper <drepper@redhat.com>
1105 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_ASYNCH_IO.
1106 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1108 2001-04-21 Andreas Jaeger <aj@suse.de>
1110 * sysdeps/pthread/timer_routines.c (thread_func): Add noreturn
1111 attribute, remove statements that will never be executed.
1112 (thread_func): Remove mutex_unlock call since it's never executed.
1113 (thread_func): Fix comment as suggested by Jakub Jelinek.
1115 * manager.c (__pthread_manager): Add noreturn
1117 (pthread_start_thread): Likewise, remove return statement.
1118 (pthread_start_thread_event): Likewise.
1119 Add noreturn attribute for pthread_handle_exit.
1120 * weaks.c: Add noreturn attribute for pthread_exit.
1122 * internals.h: Add __pthread_clock_gettime and
1123 __pthread_clock_settime prototypes.
1125 2001-04-21 Ulrich Drepper <drepper@redhat.com>
1127 * internals.h: Include <cpuclock-init.h>.
1128 (struct _pthread_descr_struct): Add p_cpuclock_offset field if
1129 CPUCLOCK_VARDEF is defined.
1130 * pthread.c (__pthread_initialize_minimal): Initialize
1131 p_cpuclock_offset field for main thread if CPUCLOCK_INIT is defined.
1132 * manager.c (pthread_start_thread): Set p_cpuclock_offset field
1133 for new thread to current CPU clock value.
1135 * sysdeps/i386/useldt.h: Extend all the macros to handle 8-byte values.
1137 * sysdeps/i386/i586/Makefile: New file.
1138 * sysdeps/i386/i586/Versions: New file.
1139 * sysdeps/i386/i586/ptclock_gettime.c: New file.
1140 * sysdeps/i386/i586/ptclock_settime.c: New file.
1141 * sysdeps/i386/i686/Implies: New file.
1143 2001-04-18 Jakub Jelinek <jakub@redhat.com>
1145 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Put specs into
1146 $generated, not $postclean-generated.
1148 2001-04-18 Andreas Jaeger <aj@suse.de>
1150 * Makefile (otherlibs): Added.
1152 2001-04-18 Jakub Jelinek <jakub@redhat.com>
1154 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
1156 2001-04-16 Ulrich Drepper <drepper@redhat.com>
1158 * signals.c (sigwait): NSIG is no signal number. Block all
1159 signals while in signal handler for signals in SET.
1160 Patch by Manfred Spraul <manfred@colorfullife.com>.
1162 2001-04-12 Ulrich Drepper <drepper@redhat.com>
1164 * tst-cancel.c: Disable most tests. Add new test where all
1165 cleanup handlers must run.
1166 * Makefile (tests): Add tst-cancel again.
1168 * cancel.c (__pthread_perform_cleanup): Correct condition for
1169 leaving cleanup loop early.
1171 * sysdeps/i386/Makefile: Make sure gcc uses a frame pointer for
1172 all the files which use CURRENT_STACK_FRAME.
1173 * sysdeps/i386/pt-machine.h (CURRENT_STACK_FRAME): Define using
1174 __builtin_frame_address.
1175 * sysdeps/i386/i686/pt-machine.h: Likewise.
1177 2001-04-11 Ulrich Drepper <drepper@redhat.com>
1179 * Makefile (tests): Comment out tst-cancel for now.
1181 * tst-cancel.c (main): Cleanup 4 is supposed to run. Create
1182 temporary file in object directory.
1183 * Makefile: Don't allow inlining when compiling tst-cancel.c.
1184 Pass $(objpfx) to tst-cancel.
1186 2001-04-11 David S. Miller <davem@redhat.com>
1188 * sysdeps/sparc/sparc32/pt-machine.h (stack_pointer): Advance
1189 up closer to user local variables so that new cleanup heuristics work.
1190 * sysdeps/sparc/sparc64/pt-machine.h (stack_pointer): Likewise.
1192 2001-04-11 Ulrich Drepper <drepper@redhat.com>
1194 * cancel.c (_pthread_cleanup_push): Catch invalid __prev buffer
1196 (_pthread_cleanup_push_defer): Likewise.
1198 * tst-cancel.c (main): Fix loop printing cleanup output.
1200 2001-04-10 kaz Kojima <kkojima@rr.iij4u.or.jp>
1202 * sysdeps/sh/pspinlock.c (__pthread_spin_lock): Fix a reverse
1204 (__pthread_spin_trylock): Likewise.
1205 * sysdeps/sh/pt-machine.h (testandset): Likewise.
1207 2001-04-10 Ulrich Drepper <drepper@redhat.com>
1209 * join.c (pthread_exit): Move code to new function __pthread_do_exit
1210 which takes an extra parameter with the current frame pointer.
1211 Call new function with CURRENT_STACK_FRAME.
1212 (__pthread_do_exit): New function. Call __pthread_perform_cleanup
1213 with the new parameter.
1214 (pthread_join): Call __pthread_do_exit instead of pthread_exit.
1215 * cancel.c (__pthread_perform_cleanup): Takes extra parameter. Use
1216 this parameter as the initial value the cleanup handler records are
1217 compared against. No active cleanup handler record must have an
1218 address lower than the previous one and the initial record must be
1219 above (below on PA) the frame address passed in.
1220 (pthread_setcancelstate): Call __pthread_do_exit instead of
1222 (pthread_setcanceltype): Likewise.
1223 (pthread_testcancel): Likewise.
1224 (_pthread_cleanup_pop_restore): Likewise.
1225 * condvar.c (pthread_cond_wait): Likewise.
1226 (pthread_cond_timedwait_relative): Likewise.
1227 * manager.c (pthread_start_thread): Likewise.
1228 * oldsemaphore.c (__old_sem_wait): Likewise.
1229 * pthread.c (pthread_handle_sigcancel): Likewise.
1230 * semaphore.c (__new_sem_wait): Likewise.
1231 (sem_timedwait): Likewise.
1232 * ptlongjmp.c (pthread_cleanup_upto): Also use current stack frame
1233 to limit the cleanup handlers which get run.
1234 * internals.h: Add prototype for __pthread_do_exit. Adjust prototype
1235 for __pthread_perform_cleanup.
1237 * Makefile (tests): Add tst-cancel.
1238 * tst-cancel.c: New file.
1240 2001-04-08 Hans-Peter Nilsson <hp@axis.com>
1242 * sysdeps/cris/pt-machine.h: New file.
1243 * sysdeps/cris/pspinlock.c: New file.
1245 2001-04-09 Hans-Peter Nilsson <hp@axis.com>
1247 * shlib-versions: Add case for Linux on CRIS.
1249 2001-03-26 Ulrich Drepper <drepper@redhat.com>
1251 * attr.c (pthread_getattr_np): Correct computation of stack size
1252 for machiens with register stack.
1254 * Examples/ex17.c (main): Correct detection of failed mmap call.
1256 2001-03-21 Jakub Jelinek <jakub@redhat.com>
1258 * pthread.c (__pthread_initialize_manager): Fix a typo.
1260 2001-03-21 Jakub Jelinek <jakub@redhat.com>
1262 * attr.c (__pthread_attr_setstack): Fix alignment check.
1263 (pthread_getattr_np): __stackaddr is top of stack, not bottom.
1264 * Makefile (tests): Add ex17 test.
1265 * Examples/ex17.c: New test.
1267 2001-03-20 Ulrich Drepper <drepper@redhat.com>
1269 * Makefile: Define -D_RPC_THREAD_SAFE_ for cancel.c.
1270 * cancel.c (__pthread_perform_cleanup): Call __rpc_thread_destroy.
1271 * sysdeps/pthread/bits/libc-tsd.h: Define _LIBC_TSD_KEY_VARS.
1273 2001-03-18 Ulrich Drepper <drepper@redhat.com>
1275 * Makefile: When generating DSO link with libc_nonshared.a.
1277 2001-02-26 Jakub Jelinek <jakub@redhat.com>
1279 * signals.c (pthread_sighandler): Use CALL_SIGHANDLER.
1281 2001-02-23 Jakub Jelinek <jakub@redhat.com>
1283 * internals.h (__pthread_init_max_stacksize): New prototype.
1284 * attr.c (__pthread_attr_setstacksize): Call
1285 __pthread_init_max_stacksize if not yet initialized.
1286 * pthread.c (__pthread_init_max_stacksize): New function.
1287 (__pthread_initialize_manager): Call it.
1288 Patch by <dtc@cmucl.cons.org>.
1290 2001-03-16 Ulrich Drepper <drepper@redhat.com>
1292 * attr.c (pthread_getattr_np): Fix __stacksize computation for IA-64.
1294 2001-03-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
1296 * shlib-versions: Add rule for Linux on 64 bit S/390.
1297 * sysdeps/s390/s390-64/pt-machine.h: New file.
1298 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
1300 2001-03-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
1302 * sysdeps/s390/pt-machine.h: Move to...
1303 * sysdeps/s390/s390-32/pt-machine.h: ...here.
1304 Add defines for FLOATING_STACK and ARCH_STACK_MAX_SIZE.
1306 2001-03-15 Ulrich Drepper <drepper@redhat.com>
1308 * Versions [libpthread] (GLIBC_2.2.3): Add pthread_getattr_np.
1309 * attr.c: Implement pthread_getattr_np.
1310 * sysdeps/pthread/pthread.h: Add prototype for pthread_getattr_np.
1311 * internals.h (struct _pthread_descr_struct): Add p_inheritsched.
1312 * manager.c (pthread_handle_create): Initialize p_inheritsched.
1314 2001-03-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
1316 * sysdeps/unix/sysv/linux/s390/pt-initfini.c: Use 0x07 padding for
1319 2001-02-20 Hans Boehm <hans_boehm@hp.com>
1321 * manager.c (manager_mask): Removed static vesion. Now always local
1322 to __pthread_manager().
1323 (manager_mask_all): Removed completely.
1324 (__pthread_manager): Remove manager_mask_all initialization.
1325 (pthread_handle_create): Remove code to set and reset signal mask
1326 around __clone2() calls.
1328 2001-02-17 Jakub Jelinek <jakub@redhat.com>
1330 * spinlock.c (__pthread_lock): Force lock->__status to be read from
1331 memory on every spin.
1333 2001-02-10 Andreas Jaeger <aj@suse.de>
1335 * Makefile (extra-objs): New.
1337 2001-02-09 Jakub Jelinek <jakub@redhat.com>
1339 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Add
1340 __pthread_initialize_minimal prototype.
1342 2001-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
1344 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
1346 2001-02-06 Martin Schwidefsky <schwidefsky@de.ibm.com>
1348 * sysdeps/unix/sysv/linux/s390/pt-initfini.c: New file.
1350 2001-02-06 Ulrich Drepper <drepper@redhat.com>
1352 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: First attempt to fix the
1353 broken code. Patch by Jes Sorensen.
1355 2001-02-06 Andreas Jaeger <aj@suse.de>
1357 * sysdeps/pthread/pthread.h: Move __pthread_initialize from here
1359 * internals.h: ...here.
1361 2001-02-05 Jes Sorensen <jes@linuxcare.com>
1363 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
1365 2001-02-02 Ulrich Drepper <drepper@redhat.com>
1367 * Versions: Remove __pthread_initialize_minimal.
1369 2001-02-01 Ulrich Drepper <drepper@redhat.com>
1371 * Makefile: Add rules to build crti.o and make it being used in
1372 building libpthread.so.
1373 * sysdeps/i386/Makefile: New file.
1374 * sysdeps/pthread/pt-initfini.c: New file.
1376 * pthread.c: Cleanups.
1378 2001-01-28 Andreas Jaeger <aj@suse.de>
1380 * oldsemaphore.c (__old_sem_init): Adjust for last change.
1381 * sysdeps/pthread/bits/libc-lock.h: Likewise.
1382 * spinlock.c: Likewise.
1384 2001-01-28 Ulrich Drepper <drepper@redhat.com>
1386 * sysdeps/pthread/bits/initspin.h: Make all names namespace clean.
1387 * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
1388 * manager.c: Adjust for namespace cleanup in bits/initspin.h.
1389 * pthread.c: Likewise.
1390 * spinlock.h: Likewise.
1391 * sysdeps/pthread/pthread.h: Likewise.
1393 2001-01-26 Ulrich Drepper <drepper@redhat.com>
1395 * sysdeps/pthread/bits/pthreadtypes.h: Define pthread_attr_t also
1396 as struct __pthread_attr_s.
1398 * semaphore.h (sem_t): Cleanup namespace, rename status and
1401 2001-01-13 Jakub Jelinek <jakub@redhat.com>
1403 * pthread.c (pthread_onexit_process): Clear
1404 __pthread_manager_thread_bos after freeing it.
1405 * Makefile (tests): Add ex16.
1406 * Examples/ex16.c: New file.
1408 2001-01-11 Jakub Jelinek <jakub@redhat.com>
1410 * Makefile (CFLAGS-pthread.c): Pass -DHAVE_Z_NODELETE if ld supports
1412 * pthread.c (pthread_exit_process): Rename to...
1413 (pthread_onexit_process): ...this.
1414 (pthread_atexit_process, pthread_atexit_retcode): New.
1415 (pthread_initialize): Call __cxa_atexit instead of __cxa_on_exit
1416 and only if HAVE_Z_NODELETE is not defined.
1417 (__pthread_initialize_manager): Register pthread_atexit_retcode
1420 2001-01-11 Ulrich Drepper <drepper@redhat.com>
1422 * pthread.c (pthread_initialize): Use __cxs_on_exit not __cxa_atexit.
1424 2001-01-11 Jakub Jelinek <jakub@redhat.com>
1426 * Makefile (tests): Add ex15.
1427 * Examples/ex15.c: New test.
1429 2001-01-08 Ulrich Drepper <drepper@redhat.com>
1431 * pthread.c (pthread_exit_process): Free memory allocated for
1434 2000-12-31 Ulrich Drepper <drepper@redhat.com>
1436 * manager.c (pthread_alloca_stack): Remove MAP_FIXED from mmap calls.
1437 (pthread_free): Always unmap the stack. It's safe now that we don't
1438 use MAP_FIXED to allocate stacks.
1440 2000-12-31 Ulrich Drepper <drepper@redhat.com>
1442 * sysdeps/powerpc/pspinlock.c: Don't include pt-machine.h here.
1444 * manager.c (pthread_allocate_stack): Prepare for removal of MAP_FIXED.
1446 2000-11-15 Wolfram Gloger <wg@malloc.de>
1448 * manager.c (pthread_free): [!FLOATING_STACKS]: Only remap the
1449 stack to PROT_NONE, don't unmap it, avoiding collisions with malloc.
1451 2000-12-27 Andreas Jaeger <aj@suse.de>
1453 * Examples/ex13.c: Make local functions static.
1454 * ecmutex.c: Likewise.
1455 * joinrace.c: Likewise.
1456 * Examples/ex14.c: Likewise.
1458 * Examples/ex2.c: Make local functions static; reformat.
1459 * Examples/ex1.c: Likewise.
1460 * Examples/ex4.c: Likewise.
1461 * Examples/ex5.c: Likewise.
1462 * Examples/ex7.c: Likewise.
1464 * oldsemaphore.c: Add prototypes to shut up GCC.
1465 * pt-machine.c: Likewise.
1467 * weaks.c: Add prototype for pthread_exit.
1469 * internals.h: Add some prototypes, format prototypes and add
1471 Move __libc_waitpid prototype to include/sys/wait.h.
1473 * rwlock.c: Include <bits/libc-lock.h> for prototypes.
1474 * mutex.c: Likewise.
1475 * specific.c: Likewise.
1476 * ptfork.c: Likewise.
1478 * lockfile.c: Include internals.h to get prototypes.
1479 * events.c: Likewise.
1480 * sysdeps/alpha/pspinlock.c: Likewise.
1481 * sysdeps/arm/pspinlock.c: Likewise.
1482 * sysdeps/hppa/pspinlock.c: Likewise.
1483 * sysdeps/i386/pspinlock.c: Likewise.
1484 * sysdeps/ia64/pspinlock.c: Likewise.
1485 * sysdeps/m68k/pspinlock.c: Likewise.
1486 * sysdeps/mips/pspinlock.c: Likewise.
1487 * sysdeps/powerpc/pspinlock.c: Likewise.
1488 * sysdeps/s390/pspinlock.c: Likewise.
1489 * sysdeps/sh/pspinlock.c: Likewise.
1490 * sysdeps/sparc/sparc32/pspinlock.c: Likewise.
1491 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: Likewise.
1492 * sysdeps/sparc/sparc64/pspinlock.c: Likewise.
1494 2000-12-27 Ulrich Drepper <drepper@redhat.com>
1496 * attr.c (__pthread_attr_setstack): Fix setting of __stackaddr element.
1497 (__pthread_attr_getstack): Return correct address.
1498 Add warnings for using pthread_attr_getstackaddr and
1499 pthread_attr_setstackaddr.
1501 2000-12-26 Ulrich Drepper <drepper@redhat.com>
1503 * Examples/ex6.c (test_thread): Make static.
1504 * Examples/ex12.c (test_thread): Make static and add noreturn
1507 2000-12-18 Jes Sorensen <jes@linuxcare.com>
1509 * linuxthreads/sysdeps/ia64/pt-machine.h: __compare_and_swap
1510 and compare_and_swap_with_release_semantics returns int not long.
1512 2000-12-17 Andreas Jaeger <aj@suse.de>
1514 * sysdeps/s390/pt-machine.h (testandset): Use long int as return
1516 * sysdeps/arm/pt-machine.h (testandset): Likewise.
1517 * sysdeps/hppa/pt-machine.h (testandset): Likewise.
1518 * sysdeps/m68k/pt-machine.h (testandset): Likewise.
1519 * sysdeps/sh/pt-machine.h (testandset): Likewise.
1520 * sysdeps/sparc/sparc32/pt-machine.h (testandset): Likewise.
1521 * sysdeps/sparc/sparc64/pt-machine.h (testandset): Likewise.
1523 2000-12-17 Ulrich Drepper <drepper@redhat.com>
1525 * sysdeps/i386/pt-machine.h (testandset): Adjust for prototype change.
1526 * sysdeps/i386/i686/pt-machine.h (testandset): Likewise.
1528 2000-12-17 Andreas Jaeger <aj@suse.de>
1530 * internals.h: Add prototypes for testandset and
1531 __compare_and_swap to shut up gcc warnings.
1533 2000-12-06 Wolfram Gloger <wg@malloc.de>
1535 * join.c (pthread_detach): Allow case where the thread has already
1538 2000-12-05 Andreas Jaeger <aj@suse.de>
1540 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Don't set mips2.
1541 * sysdeps/mips/pt-machine.h (testandset): Likewise.
1542 (__compare_and_swap): Likewise.
1543 Patches by Maciej W. Rozycki <macro@ds2.pg.gda.pl>.
1545 2000-11-20 Jakub Jelinek <jakub@redhat.com>
1547 * Examples/ex3.c (main): Cast int to long before casting to void *.
1548 (search): Cast void * to long, not int.
1549 * Examples/ex8.c (main, thread): Similarly.
1550 * Examples/ex11.c (main): Similarly.
1551 * Examples/ex14.c (worker, do_test): Similarly.
1552 * ecmutex.c (worker, do_test): Similarly.
1553 (nlocks): Cast to int.
1555 2000-11-08 Bruce Mitchener <bruce@cubik.org>
1557 * linuxthreads.texi: Add documentation for pthreads attributes
1558 guardsize, stackaddr, stacksize, and stack. Fix typo in previous
1559 patch. Document pthread_[sg]etconcurrency(). Mark
1560 pthread_mutexattr_[sg]ettype() as POSIX rather than GNU.
1562 2000-11-07 Ulrich Drepper <drepper@redhat.com>
1564 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
1566 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1567 Reported by Christopher Yeoh <cyeoh@linuxcare.com.au>.
1569 2000-11-06 Ulrich Drepper <drepper@redhat.com>
1571 * cancel.c (pthread_cancel): Always set p_canceled, even if we are
1572 not doing it right now.
1573 Reported by Kaz Kylheku <kaz@ashi.footprints.net>.
1575 2000-10-30 Ulrich Drepper <drepper@redhat.com>
1577 * Examples/ex4.c (main): Don't use exit() to avoid warning with
1580 2000-10-29 Ulrich Drepper <drepper@redhat.com>
1582 * attr.c (__pthread_attr_setguardsize): Don't round guardsize
1583 here. Reported by Bruce Mitchener <bruce@cubik.org>.
1585 * linuxthreads.texi: Changes terminology to 'type' from 'kind' when
1586 discussing mutexes. (As per the Unix98 name for the API.)
1587 Changes documentation for pthread_mutexattr_setkind_np() and
1588 pthread_mutexattr_getkind_np() over to the Unix98 APIs for the
1589 same: pthread_mutexattr_settype() and pthread_mutexattr_gettype().
1590 Changes references to PTHREAD_MUTEXATTR_FAST_NP to
1591 PTHREAD_MUTEXATTR_ADAPTIVE_NP.
1592 Begins to introduce discussion of the ``timed'' mutex type. This
1593 discussion is currently incomplete.
1594 Patch by Bruce Mitchener <bruce@cubik.org>.
1596 2000-10-26 Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
1597 Yutaka Niibe <gniibe@chroot.org>
1599 * sysdeps/sh/pt-machine.h (testandset): Since the operand of TAS.B
1600 has restrictions, use register.
1602 2000-10-23 Andreas Schwab <schwab@suse.de>
1604 * Examples/ex14.c (TIMEOUT): Override default timeout.
1606 2000-10-16 Ulrich Drepper <drepper@redhat.com>
1608 * specific.c: Protect tsd array modification in thread data
1609 structures by getting the thread lock in pthread_key_delete and
1610 __pthread_destroy_specifics.
1611 Patch by Wolfram Gloger <Wolfram.Gloger@dent.med.uni-muenchen.de>.
1613 2000-10-12 Alan Modra <alan@linuxcare.com.au>
1615 * sysdeps/pthread/bits/initspin.h: New file.
1616 * spinlock.h: Move LOCK_INITIALIZER definition to <bits/initspin.h>.
1617 (__pthread_init_lock): Initialize lock with LT_SPINLOCK_INIT.
1618 (__pthread_alt_init_lock): Likewise.
1619 (__pthread_alt_trylock): Release lock with LT_SPINLOCK_INIT.
1621 2000-10-12 David Huggins-Daines <dhd@linuxcare.com>
1623 * oldsemaphore.c (__old_sem_init): Release lock with
1624 LT_SPINLOCK_INIT, not zero.
1625 * spinlock.c (__pthread_unlock): Likewise.
1626 (__pthread_alt_lock): Likewise.
1627 (__pthread_alt_timedlock): Likewise.
1628 (__pthread_alt_unlock): Likewise.
1629 * sysdeps/pthread/bits/libc-lock.h: Initialize locks with
1630 LT_SPINLOCK_INIT if it is non-zero. Likewise for init-once flags.
1631 * sysdeps/pthread/pthread.h: Include bits/initspin.h. Use
1632 LT_SPINLOCK_INIT do initialize spinlocks not 0.
1634 2000-10-12 David Huggins-Daines <dhd@linuxcare.com>
1636 * shlib-versions: Add version definitions for hppa-linux.
1638 2000-10-12 Alan Modra <alan@linuxcare.com.au>
1640 * sysdeps/hppa/pspinlock.c: New file.
1641 * sysdeps/hppa/pt-machine.h: New file.
1642 * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: New file.
1644 2000-10-05 Jakub Jelinek <jakub@redhat.com>
1646 * mutex.c (__pthread_mutex_destroy): Correct test of
1647 busy mutex for mutexes using alternate fastlocks.
1648 Patch by dtc@cmucl.cons.org.
1650 2000-09-28 Martin Schwidefsksy <schwidefsky@de.ibm.com>
1652 * sysdeps/s390/pt-machine.h: Make %a0 the thread register.
1654 2000-09-28 Ulrich Drepper <drepper@redhat.com>
1656 * mutex.c (__pthread_mutex_unlock): For PTHREAD_MUTEX_RECURSIVE_NP
1657 test for owner first.
1658 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1660 * cancel.c (pthread_cancel): Don't do anything if cancelation is
1663 2000-09-26 Ulrich Drepper <drepper@redhat.com>
1665 * spinlock.h (__pthread_set_own_extricate_if): Optimize a bit.
1666 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1668 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
1669 _POSIX_MONOTONIC_CLOCK.
1671 * spinlock.h (__pthread_set_own_extricate_if): Add back locking
1674 2000-09-20 Andreas Jaeger <aj@suse.de>
1676 * pthread.c [!__ASSUME_REALTIME_SIGNALS]: Make inclusion of
1677 "testrtsig.h" conditional.
1679 2000-09-11 Ulrich Drepper <drepper@redhat.com>
1681 * sysdeps/pthread/pthread.h: Declare pthread_attr_getstack and
1682 pthread_attr_setstack.
1683 * Versions [libpthread] (GLIBC_2.2): Export pthread_attr_getstack and
1684 pthread_attr_setstack.
1685 * attr.c (pthread_attr_getstack, pthread_attr_setstack): New functions.
1687 2000-09-05 Ulrich Drepper <drepper@redhat.com>
1689 * Examples/ex14.c: New file.
1690 * Makefile (tests): Add ex14.
1692 * mutex.c (__pthread_mutex_unlock): Correct test for already unlocked
1693 mutex. Patch by dtc@cmucl.cons.org.
1695 * ecmutex.c: New file.
1696 * Makefile (tests): Add ecmutex.
1698 2000-09-04 H.J. Lu <hjl@gnu.org>
1700 * attr.c (__pthread_attr_setguardsize): Use page_roundup
1701 instead of roundup to round up to the page size.
1703 2000-09-03 Mark Kettenis <kettenis@gnu.org>
1705 * manager.c (pthread_exited): Correctly report event as TD_REAP
1706 instead of TD_DEATH. Fix comments.
1708 2000-09-03 Ulrich Drepper <drepper@redhat.com>
1710 * spinlock.h (testandset): Add cast to avoid warning.
1711 Patch by Franz Sirl <Franz.Sirl-kernel@lauterbach.com>.
1713 2000-09-02 Andreas Jaeger <aj@suse.de>
1715 * sysdeps/pthread/timer_routines.c: Include stdlib.h for abort
1718 2000-09-01 Ulrich Drepper <drepper@redhat.com>
1720 * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
1721 Fix typo in last patch (_mode -> _flags).
1723 * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
1724 Provide definition which respects _IO_USER_LOCK flag.
1726 2000-08-30 Ulrich Drepper <drepper@redhat.com>
1728 * manager.c (pthread_allocate_stack): Clear descriptor only if not
1731 2000-08-25 Ulrich Drepper <drepper@redhat.com>
1733 * Makefile: Add rules to build and run unload.
1734 * unload.c: New file.
1736 * pthread.c (pthread_exit_process): Move thread_self use inside `if'.
1738 * sysdeps/pthread/pthread.h
1739 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Defined.
1740 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: Defined.
1742 2000-08-24 Andreas Jaeger <aj@suse.de>
1744 * Examples/ex13.c: Include <string.h> for strerror prototype and
1745 <stdlib.h> for abort prototype.
1746 (pthr_cond_signal_mutex): Rewrite to silence GCC.
1747 (thread_start): Remove unused variable err.
1748 (main): Silence GCC warnings.
1750 2000-08-22 Andreas Jaeger <aj@suse.de>
1752 * Examples/ex13.c: New test by Kurt Garloff <garloff@suse.de>.
1754 * Makefile (tests): Add ex13.
1756 2000-08-20 Ulrich Drepper <drepper@redhat.com>
1758 * semaphore.h: Add restrict where required by AGd4.
1759 * sysdeps/pthread/pthread.h: Likewise.
1760 * sysdeps/pthread/unix/sysv/linux/bits/sigthread.h: Likewise.
1762 2000-08-15 Ulrich Drepper <drepper@redhat.com>
1764 * Makefile (tests): Add ex12. Add rule to build it.
1765 * Examples/ex12.c: New file.
1767 2000-08-13 Ulrich Drepper <drepper@redhat.com>
1769 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_SEMAPHORES
1770 even though the implementation is not quite complete (but it reports
1771 it). Define _POSIX_MESSAGE_PASSING to -1.
1772 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1774 2000-08-12 Andreas Jaeger <aj@suse.de>
1776 * sysdeps/mips/pt-machine.h (testandset): Add .set mips2 for
1778 (__compare_and_swap): Likewise.
1779 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Likewise.
1781 2000-08-10 Ulrich Drepper <drepper@redhat.com>
1783 * pthread.c (__pthread_initial_thread): Initialize p_errnop and
1784 p_h_errnop correctly and not to NULL.
1786 2000-08-05 Ulrich Drepper <drepper@redhat.com>
1788 * Banner: Bump version number to 0.9.
1790 2000-08-04 Ulrich Drepper <drepper@redhat.com>
1792 * Makefile (tests): Add tststack. Add rule to build the program.
1793 * tststack.c: New file.
1795 * internals.h: Declare __pthread_max_stacksize.
1796 * pthread.c (__pthread_max_stacksize): New variable.
1797 (__pthread_initialize_manager): Determine __pthread_initialize_manager
1799 * manager.c (thread_segment): Return always NULL if FLOATING_STACKS.
1800 (pthread_allocate_stack): Allow kernel to choose stack address if
1801 FLOATING_STACKS. This also handles variable-sized stacks.
1802 Always allocate stack and guardpage together. Use mprotect to
1803 change guardpage access.
1804 * sysdeps/i386/useldt.h: Define FLOATING_STACKS and
1805 ARCH_STACK_MAX_SIZE.
1807 * attr.c (__pthread_attr_setstacksize): Also test value against
1810 * manager.c (__pthread_nonstandard_stacks): Define only if
1811 THREAD_SELF is not defined.
1812 (pthread_allocate_stack): Always initialize gardaddr to a correct
1814 (pthread_handle_create): Unmap thread with one call.
1815 (pthread_free): Remove test for initial thread before removing stack.
1816 Unmap stack with one call.
1818 * pthread.c (__pthread_initial_thread): Initialize p_userstack to
1819 1 to avoid removing the stack.
1821 2000-07-27 Jes Sorensen <jes@linuxcare.com>
1823 * sysdeps/ia64/pspinlock.c (__pthread_spin_lock): Add
1824 load of spin lock to prime the cache before the atomic compare and
1825 exchange operation (cmpxchg4). This avoids the spinning on the
1826 cmpxchg4 instruction and reduces movement of the cache line back
1827 and forth between the processors (explanation by Asis K. Mallick
1828 from Intel). This basically makes the implementation operate the
1829 same as the Linux kernel implementation.
1831 * shlib-versions: Use GLIBC_2_2 for Linux/ia64.
1832 * sysdeps/ia64/pspinlock.c: New file.
1834 2000-08-03 Ulrich Drepper <drepper@redhat.com>
1836 * pthread.c: Move definition of __pthread_set_own_extricate_if...
1837 * spinlock.h: ...here. Remove locking.
1838 * internals.h: Remove __pthread_set_own_extricate_if prototype.
1840 * rwlock.c: Use THREAD_GETMEM And THREAD_SETMEM.
1841 (rwlock_rd_extricate_func): Don't determine self, let
1842 __pthread_lock do it.
1843 (rwlock_wr_extricate_func): Likewise.
1844 (rwlock_have_already): Optimize *pself handling a bit.
1846 * mutex.c: Use __builtin_expect.
1847 * pthread.c: Likewise.
1849 2000-08-02 Andreas Jaeger <aj@suse.de>
1851 * sysdeps/s390/pspinlock.c: New file.
1852 * sysdeps/s390/pt-machine.h: New file.
1853 Patches by Martin Schwidefsky <schwidefsky@de.ibm.com>.
1855 2000-07-12 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
1857 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Implement for
1859 * sysdeps/mips/pt-machine.h (testandset): Likewise.
1861 2000-07-26 Andreas Jaeger <aj@suse.de>
1863 * pthread.c: Initialize p_sem_avail.
1865 2000-07-25 Ulrich Drepper <drepper@redhat.com>
1867 * internals.h (struct __pthread_descr_struct): Add p_sem_avail.
1868 * semaphore.c: Handle spurious wakeups.
1870 * sysdeps/pthread/pthread.h: Add back PTHREAD_MUTX_FAST_NP as an alias
1871 for PTHREAD_MUTEX_ADAPTIVE_NP for source code compatibility.
1873 * pthread.c (__pthread_set_own_extricate): Use THREAD_GETMEM.
1874 (__pthread_wait_for_restart): Likewise.
1876 * condvar.c (pthread_cond_wait): Also check whether thread is
1877 cancelable before aborting loop.
1878 (pthread_cond_timedwait): Likewise.
1880 * signals.c (pthread_sighandler): Remove special code to restrore
1882 (pthread_sighandler_t): Likewise.
1884 2000-07-25 Mark Kettenis <kettenis@gnu.org>
1886 * internals.h (__RES_PTHREAD_INTERNAL): Remove define.
1887 * pthread.c: Include <resolv.h>.
1888 (_res): Undefine. Add extern declaration.
1890 2000-07-24 Ulrich Drepper <drepper@redhat.com>
1892 * pthread.c (__pthread_initial_thread): Update initializer.
1893 (__pthread_manager_thread): Likewise.
1894 (pthread_initialize): Move setrlimit call to...
1895 (__pthread_initialize_manager): ...here.
1896 (__pthread_reset_main_thread): Reset also soft limit on stack size.
1898 * condvar.c: Handle spurious wakeups. [PR libc/1749].
1899 * internals.h (struct _pthread_descr_struct): Add p_condvar_avail.
1901 2000-07-21 Ulrich Drepper <drepper@redhat.com>
1903 * spinlock.h: If IMPLEMENT_TAS_WITH_CAS is defined use
1904 __compare_and_swap to define testandset.
1905 * sysdeps/powerpc/pt-machine.h: Add volatile to asms.
1906 Define IMPLEMENT_TAS_WITH_CAS.
1908 2000-07-20 Ulrich Drepper <drepper@redhat.com>
1910 * Makefile: Pass -z nodelete to linker for libpthread.so
1911 generation if it understand this option.
1913 2000-07-18 Mark Kettenis <kettenis@gnu.org>
1915 * manager.c (pthread_handle_create): Remove initialization of
1916 new_thread->p_res._sock.
1918 2000-07-19 Kaz Kylheku <kaz@ashi.footprints.net>
1920 Bugfixes to the variant of the code for machines with no compare
1923 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Wait
1924 node was not being properly enqueued, due to failing to update
1925 the lock->__status field.
1927 * spinlock.c (__pthread_alt_timedlock): The oldstatus variable was
1928 being set inappropriately, causing the suspend function to be called
1929 with a null self pointer and crash.
1931 2000-07-18 Ulrich Drepper <drepper@redhat.com>
1933 * spinlock.h (__pthread_alt_trylock): Fix code used if no
1934 compare&swap is available.
1936 * spinlock.h (__pthread_trylock): Use __compare_and_swap, not
1939 * pthread.c (pthread_initialize): Don't use sysconf to determine
1940 whether the machine has more than one processor.
1942 * spinlock.c (__pthread_alt_timedlock): Add back one of the
1943 removed thread_self calls.
1945 2000-07-18 Kaz Kylheku <kaz@ashi.footprints.net>
1947 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Changed
1948 __compare_and_swap to compare_and_swap in code which assumes
1949 compare swap is available.
1951 2000-07-18 Kaz Kylheku <kaz@ashi.footprints.net>
1953 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Fixed
1954 bug whereby thr field of waitnode structure would not be correctly
1955 set unless a null self pointer is passed to the functions.
1956 Eliminated redundant calls to thread_self().
1958 2000-07-18 Jakub Jelinek <jakub@redhat.com>
1960 * pthread.c (__pthread_initialize_manager): Lock
1961 __pthread_manager_thread.p_lock before calling clone.
1963 2000-05-05 H.J. Lu <hjl@gnu.org>
1965 * sysdeps/ia64/pt-machine.h (__compare_and_swap): Change it to
1966 have acquire semantics.
1967 (__compare_and_swap_with_release_semantics): New inline
1969 (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): New macro.
1971 2000-01-28 Hans Boehm <hboehm@exch.hpl.hp.com>
1973 * manager.c: Fix the problem with signals at startup.
1974 Change the way that thread stacks are allocated on IA64.
1975 Clean up some of the guard page allocation stuff.
1977 1999-12-19 H.J. Lu <hjl@gnu.org>
1979 * internals.h (page_roundup): New.
1980 * attr.c (__pthread_attr_setguardsize); Use page_roundup
1982 * manager.c (pthread_allocate_stack): Make sure guardaddr is
1983 page aligned with page_roundup if NEED_SEPARATE_REGISTER_STACK
1986 1999-12-17 Hans Boehm <hboehm@exch.hpl.hp.com>
1988 * manager.c (pthread_allocate_stack): Unmap the stack top
1989 if failed to map the stack bottom.
1991 (pthread_free): Fix the guard page.
1993 * pthread.c (pthread_initialize): Set rlimit correctly for
1994 NEED_SEPARATE_REGISTER_STACK.
1996 1999-12-16 H.J. Lu <hjl@gnu.org>
1998 * pthread.c (__pthread_initialize_manager): Pass
1999 __pthread_manager_thread_bos instead of
2000 __pthread_manager_thread_tos to __clone2.
2002 1999-12-16 H.J. Lu <hjl@gnu.org>
2004 * manager.c (pthread_allocate_stack): Correct the calculation
2005 of "new_thread_bottom". Remove MAP_GROWSDOWN from mmap for
2008 1999-12-13 H.J. Lu <hjl@gnu.org>
2010 * sysdeps/ia64/pt-machine.h (__compare_and_swap): Added a stop
2011 bit after setting ar.ccv.
2013 1999-12-12 H.J. Lu <hjl@gnu.org>
2015 * manager.c (pthread_allocate_stack): Make the starting
2016 address of the stack bottom page aligned. FIXME: it may
2017 need changes in other places.
2018 (pthread_handle_create): Likewise.
2020 1999-12-11 Hans Boehm <hboehm@exch.hpl.hp.com>
2022 * manager.c (pthread_allocate_stack): Handle
2023 NEED_SEPARATE_REGISTER_STACK.
2024 (pthread_handle_create): Likewise.
2025 * pthread.c (__pthread_initialize_manager): Likewise.
2027 * sysdeps/ia64/pt-machine.h: Use r13 for thread pointer.
2029 1999-12-02 H.J. Lu <hjl@gnu.org>
2031 * sysdeps/ia64/pt-machine.h: New.
2033 2000-07-13 Ulrich Drepper <drepper@redhat.com>
2035 * wrapsyscall.c: Mark non-__ protected names as weak.
2038 2000-07-12 Bruno Haible <haible@clisp.cons.org>
2040 * Examples/ex8.c: Include <sys/wait.h>, not <wait.h>.
2042 2000-07-12 Ulrich Drepper <drepper@redhat.com>
2044 * spinlock.c: Fix code for TEST_FOR_COMPARE_AND_SWAP being defined.
2045 Add tests also to new alternative spinlock implementation.
2046 * spinlock.h: Likewise.
2047 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2049 2000-07-06 Ulrich Drepper <drepper@redhat.com>
2051 * Version: Export __sigaction.
2052 * signals.c: Define __sigaction alias. Use __libc_sigaction instead
2054 * pthread.c: Use __libc_sigaction instead of __sigaction.
2056 * condvar.c: Implement pthread_condattr_getpshared and
2057 pthread_condattr_setpshared.
2058 * mutex.c: Implement pthread_mutexattr_getpshared and
2059 pthread_mutexattr_setpshared.
2060 * Versions: Export new functions.
2061 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
2063 * rwlock.c (pthread_rwlockattr_init): Use PTHREAD_PROCESS_PRIVATE.
2064 (pthread_rwlockattr_setpshared): Fail if PTHREAD_PROCESS_PRIVATE
2067 2000-07-04 Greg McGary <greg@mcgary.org>
2069 * sysdeps/pthread/bits/libc-lock.h: Remove BP_SYM from
2070 pragmas. Include bp-sym.h only if _LIBC.
2072 2000-07-04 Ulrich Drepper <drepper@redhat.com>
2074 * spinlock.c (__pthread_unlock): Properly place write barrier.
2075 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2077 2000-07-03 Ulrich Drepper <drepper@redhat.com>
2079 * spinlock.c: Replace fast spinlocks by adaptive spinlocks which are
2080 faster on SMP systems. No more emulation of compare&swap for adaptive
2082 * spinlock.h: Likewise.
2083 * sysdeps/pthread/pthread.h: Shuffle PTHREAD_MUTEX_* values around.
2084 Replace fast with adaptive mutex.
2085 * mutex.c: Rewrite for replacement of fast by adaptive mutex.
2086 * condvar.c: Likewise.
2087 * pthread.c: Define and initialize __pthread_smp_kernel variable.
2088 * internals.h: Declare __pthread_smp_kernel.
2089 * sysdeps/pthread/bits/pthreadtypes.h: Update comment of
2090 _pthread_fastlock structure.
2091 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2093 * pthread.c: Remove initialization to zero from global variables.
2095 2000-06-29 Jakub Jelinek <jakub@redhat.com>
2097 * shlib-versions: Make sparc64 GLIBC_2.2+ only.
2099 2000-06-28 Greg McGary <greg@mcgary.org>
2101 * weaks.c: Wrap BP_SYM () around weak extern declarations of
2102 pthread functions that have pointers in their return+arg signatures.
2104 2000-06-27 Greg McGary <greg@mcgary.org>
2106 * sysdeps/pthread/bits/libc-lock.h: Wrap BP_SYM () around weak
2107 extern declarations of pthread functions that have pointers in
2108 their return+arg signatures.
2110 2000-06-26 Ulrich Drepper <drepper@redhat.com>
2112 * Makefile (tests): Add ex11. Add rules to build it.
2113 * Examples/ex11.c: New file.
2114 * rwlock.c: Fix complete braindamaged previous try to implement
2117 * spinlock.c: Pretty print.
2119 2000-06-25 Ulrich Drepper <drepper@redhat.com>
2121 * Makefile (tests): Add ex10. Add rules to build it.
2122 * Versions [GLIBC_2.2] (libpthread): Add pthread_mutex_timedlock,
2123 pthread_rwlock_timedrdlock, and pthread_rwlock_timedwrlock.
2124 * condvar.c (pthread_cond_wait): Allow mutex of kind
2125 PTHREAD_MUTEX_TIMED_NP.
2126 (pthread_cond_timedwait_relative): Likewise.
2127 * mutex.c (__pthread_mutex_init): Default is PTHREAD_MUTEX_TIMED_NP.
2128 (__pthread_mutex_trylock): Use __pthread_alt_trylock for
2129 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
2130 (__pthread_mutex_lock): Use __pthread_alt_lock for
2131 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
2132 (__pthread_mutex_timedlock): New function.
2133 (__pthread_mutex_unlock): Use __pthread_alt_unlock for
2134 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
2135 (__pthread_mutexattr_init): Use PTHREAD_MUTEX_TIMED_NP.
2136 (__pthread_mutexattr_settype): Allow PTHREAD_MUTEX_TIMED_NP.
2137 * spinlock.c: Implement alternate fastlocks.
2138 * spinlock.h: Add prototypes.
2139 * Examples/ex10.c: New file.
2140 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
2141 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2143 * rwlock.c (__pthread_rwlock_rdlock): Optimize loop a bit.
2144 (__pthread_rwlock_timedrdlock): New function.
2145 (__pthread_rwlock_timedwrlock): New function.
2146 Use laternate fastlock function everywhere.
2148 2000-06-21 Andreas Jaeger <aj@suse.de>
2150 * sysdeps/pthread/timer_routines.c: Include <string.h> for memset
2153 * join.c: Include <stdlib.h> for exit prototype.
2155 2000-06-20 Ulrich Drepper <drepper@redhat.com>
2157 * sysdeps/i386/useldt.h: Include <stdlib.h>.
2159 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_BARRIERS.
2160 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2162 * Makefile (libpthread-routines): Add barrier.
2163 (tests): Add ex9. Add rule to build ex9.
2164 * Versions: Export barrier functions.
2165 * barrier.c: New file.
2166 * Examples/ex9.c: New file.
2167 * sysdeps/pthread/pthread.h: Add barrier data types and declarations.
2168 * sysdeps/pthread/bits/pthreadtypes.h: Likewise.
2169 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2171 2000-06-19 H.J. Lu <hjl@gnu.org>
2173 * spinlock.h (HAS_COMPARE_AND_SWAP): Defined if
2174 HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS is defined.
2175 (compare_and_swap_with_release_semantics): New. Default to
2176 compare_and_swap if HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS
2179 * spinlock.c (__pthread_unlock): Call
2180 compare_and_swap_with_release_semantics () instead of
2181 compare_and_swap ().
2183 2000-06-19 Ulrich Drepper <drepper@redhat.com>
2185 * sysdeps/pthread/timer_create.c: Use _set_errno instead of assigning
2187 * sysdeps/pthread/timer_delete.c: Likewise.
2188 * sysdeps/pthread/timer_getoverr.c: Likewise.
2189 * sysdeps/pthread/timer_gettime.c: Likewise.
2190 * sysdeps/pthread/timer_settime.c: Likewise.
2192 2000-06-13 Kaz Kylheku <kaz@ashi.footprints.net>
2194 Timer nodes are now reference counted, and can be marked
2195 as deleted. This allows for the safe release of the global mutex
2196 in the middle without losing the timer being operated on.
2198 * sysdeps/pthread/posix-timer.h (struct timer_node): The inuse
2199 member is now an enum with three values, so that an intermediate
2200 state can be represented (deleted but not free for reuse yet).
2201 New refcount member added.
2202 * sysdeps/pthread/timer_routines.c: Likewise.
2204 * sysdeps/pthread/posix-timer.h (timer_addref, timer_delref,
2205 timer_valid): New inline functions added.
2207 * sysdeps/pthread/timer_gettime.c (timer_gettime): Function
2208 restructured, recursive deadlock bug fixed.
2210 * sysdeps/pthread/timer_gettime.c (timer_gettime): Uses new
2211 timer_addref to ensure that timer won't be deleted while mutex is not
2212 held. Also uses timer_invalid to perform validation of timer handle.
2213 * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
2214 * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Likewise.
2216 2000-06-14 Ulrich Drepper <drepper@redhat.com>
2218 * shlib-versions: Add entry for SH.
2219 Patch by Kaz Kojima <kkojima@rr.iij4u.or.jp>.
2221 2000-06-13 Kaz Kylheku <kaz@ashi.footprints.net>
2223 A few optimizations. Got rid of unnecessary wakeups of timer threads,
2224 tightened up some critical regions and micro-optimized some list
2227 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
2228 Returns int value now to indicate whether timer was queued at head.
2229 * sysdeps/pthread/posix-timer.h: Likewise.
2230 * sysdeps/pthread/timer_settime.c (timer_settime): Takes advantage of
2231 new return value from __timer_thread_queue_timer to avoid waking
2232 up timer thread unnecessarily.
2234 * sysdeps/pthread/posix-timer.h (timer_id2ptr): No longer checks
2235 inuse flag, because this requires mutex to be held. Callers updated
2236 to do the check when they have the mutex.
2237 * sysdeps/pthread/timer_getoverr.c: Add check for inuse here.
2239 * sysdeps/pthread/timer_settime.c (timer_settime): Tighter critical
2240 regions: avoids making system calls while holding timer mutex, and
2241 a few computations were moved outside of the mutex as well.
2242 * sysdeps/pthread/timer_gettime.c (timer_gettime): Likewise.
2244 * sysdeps/pthread/posix-timer.h (list_unlink_ip): Function name changed
2245 to list_unlink_ip, meaning idempotent. Pointer manipulation
2246 changed to get better better code out of gcc.
2247 * sysdeps/pthread/timer_routines.c (list_unlink): Non-idempotent
2248 version of list_unlink added here.
2249 * sysdeps/pthread/timer_delete.c: Use appropriate list unlink
2250 function in all places: idempotent one for timers, non-idempotent
2251 one for thread nodes.
2252 * sysdeps/pthread/timer_settime: Likewise.
2253 * sysdeps/pthread/timer_routines.c: Likewise.
2255 2000-06-13 Ulrich Drepper <drepper@redhat.com>
2257 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_TIMERS): Define.
2258 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2260 * sysdeps/pthread/Makefile: Remove tests definition.
2262 2000-06-12 Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
2263 Yutaka Niibe <gniibe@chroot.org>
2265 * sysdeps/sh/pspinlock.c: New file.
2266 * sysdeps/sh/pt-machine.h: New file.
2268 2000-06-12 Ulrich Drepper <drepper@redhat.com>
2270 * Makefile (tests): Add joinrace.
2272 * Examples/ex6.c: Test return value of pthread_join.
2274 2000-06-11 Geoff Keating <geoffk@cygnus.com>
2276 * sysdeps/powerpc/pspinlock.c (__pthread_spin_lock): Implement.
2277 (__pthread_spin_trylock): Implement.
2278 (__pthread_spin_unlock): Implement.
2279 (__pthread_spin_init): Implement.
2280 (__pthread_spin_destroy): Implement.
2282 2000-06-10 Ulrich Drepper <drepper@redhat.com>
2284 * sysdeps/pthread/timer_routines.c (list_append): Little fix to
2285 really append the entry.
2287 2000-06-10 Andreas Jaeger <aj@suse.de>
2289 * lockfile.c (__fresetlockfiles): Remove unused variable fp.
2291 2000-06-10 Kaz Kylheku <kaz@ashi.footprints.net>
2293 * sysdeps/pthread/timer_create.c: Thread matching now done on
2294 clock type as well as thread attributes.
2295 There are individual global signal-delivering threads for
2296 different clock types.
2297 * sysdeps/pthread/posix-timer.h: Likewise.
2298 * sysdeps/pthread/timer_routines.c: Likewise.
2300 * sysdeps/pthread/timer_routines.c: Thread allocation and
2301 deallocation function now remembers to put thread on active
2302 list and remove from active list.
2303 Thus now the feature of binding multiple timers
2304 to a single thread actually works.
2306 2000-06-10 Ulrich Drepper <drepper@redhat.com>
2308 * pthread.c (__pthread_create_2_1): Optimize a bit.
2310 * internals.h (invalid_handle): Also test for p_terminated != 0.
2311 (nonexisting_handle): New function. Same as old invalid_handle.
2312 * join.c (pthread_join): Use nonexisting_handle instead of
2313 invalid_handle to test for acceptable thread handle.
2314 * manager.c (pthread_handle_free): Likewise.
2315 * joinrace.c: New file.
2316 Reported by Permaine Cheung <pcheung@cygnus.com>.
2318 2000-06-08 Ulrich Drepper <drepper@redhat.com>
2320 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
2321 Correct handling of matching variable.
2323 * sysdeps/pthread/tst-timer.c (main): Rewrite initializers to
2326 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
2327 Be prepared for empty timer list.
2329 * sysdeps/pthread/timer_create.c (timer_create): Correct names of
2330 CPUTIME clock ID. Add support for thread clocks.
2332 * sysdeps/pthread/posix-timer.h (timer_ptr2id): Operands in
2333 subtraction were switched.
2335 * sysdeps/pthread/timer_routines.c (init_module): Use
2336 THREAD_MAXNODES threads.
2338 * sysdeps/pthread/posix-timer.h (struct timer_node): Add creator_pid.
2339 * sysdeps/pthread/timer_create.c: Fill in creator_pid.
2340 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Send signal
2341 with sigqueueinfo is this system call is available.
2343 * sysdeps/pthread/timer_create.c (timer_create): Allow
2344 CLOCK_CPUTIME if _POSIX_CPUTIME is defined.
2346 * sysdeps/pthread/Makefile: New file. Add rules to build timer
2348 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add TIMER_MAX.
2350 2000-06-04 Kaz Kylheku <kaz@ashi.footprints.net>
2352 * sysdeps/pthread/posix-timer.h: New file.
2353 * sysdeps/pthread/timer_create.c: New file.
2354 * sysdeps/pthread/timer_delete.c: New file.
2355 * sysdeps/pthread/timer_getoverr.c: New file.
2356 * sysdeps/pthread/timer_gettime.c: New file.
2357 * sysdeps/pthread/timer_routines.c: New file.
2358 * sysdeps/pthread/timer_settime.c: New file.
2359 * sysdeps/pthread/tst-timer.c: New file.
2361 2000-06-08 Ulrich Drepper <drepper@redhat.com>
2363 * sysdeps/unix/sysv/linux/bits/local_lim.h: Remove OPEN_MAX and
2364 LINK_MAX definitions if necessary.
2366 2000-06-04 Kaz Kylheku <kaz@ashi.footprints.net>
2368 Added missing fork time handling of global libio lock.
2370 * lockfile.c (__fresetlockfiles): Now also resets the list lock,
2371 not just the individual stream locks. Rewritten to use new
2372 iterator interface provided by libio rather than accessing
2375 * lockfile.c (__flockfilelist, _funlockfilelist): New functions
2376 which lock and unlock the stream list using the new interface
2378 * internals.h: Likewise.
2380 * ptfork.c (__fork): Now calls __flockfilelist before fork,
2381 and __funlockfilelist in the parent after the fork.
2382 Child still calls __fresetlockfiles as before.
2384 * linuxthreads.texi: Now explains what happens to streams at
2385 fork time. Also whole new section on forking and thread added.
2386 Definition of pthread_atfork moved out of Miscellaneous Functions
2387 to this new section.
2389 2000-06-04 Jakub Jelinek <jakub@redhat.com>
2391 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c (__pthread_spin_lock):
2392 Add missing register.
2393 * sysdeps/sparc/sparc64/pspinlock.c (__pthread_spin_lock): Likewise.
2395 2000-06-02 Jakub Jelinek <jakub@redhat.com>
2397 * sysdeps/sparc/sparc32/pspinlock.c: Implement spinlocks.
2398 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: New.
2399 * sysdeps/sparc/sparc64/pspinlock.c: Implement spinlocks.
2401 2000-05-31 Andreas Jaeger <aj@suse.de>
2403 * sysdeps/mips/pspinlock.c: Implement spinlocks.
2405 2000-05-28 Ulrich Drepper <drepper@redhat.com>
2407 * spinlock.c (__pthread_lock): Remove ASSERT.
2409 * Makefile (tests): Add ex8.
2410 * Examples/ex8.c: New file.
2412 2000-05-12 Kaz Kylheku <kaz@ashi.footprints.net>
2414 Bugfix: The pthread_atfork mechanism now takes care of its
2415 own internal mutex at fork time.
2417 * ptfork.c (__fork): Revised so that the mutex is held across
2418 the fork operation and while the handlers are called, and so that
2419 the child resets the mutex.
2421 * linuxthreads.texi: Updated pthread_atfork documentation to make
2422 it clear that fork and pthread_atfork can't be reentered from
2423 atfork handlers, that pthread_atfork and fork are mutually atomic,
2424 and that the handlers are inherited by the child process.
2426 2000-05-24 Ulrich Drepper <drepper@redhat.com>
2428 * Makefile (libpthread-routines): Add pspinlock.
2429 * cancel.c: Rename __pthread_spin_unlock back to __pthread_unlock.
2430 Use struct _pthread_fastlock instead of pthread_spinlock_t.
2431 * condvar.c: Likewise.
2432 * internals.h: Likewise.
2434 * manager.c: Likewise.
2435 * mutex.c: Likewise.
2436 * pthread.c: Likewise.
2437 * rwlock.c: Likewise.
2438 * semaphore.c: Likewise.
2439 * signals.c: Likewise.
2440 * spinlock.h: Likewise.
2441 * spinlock.c: Likewise. Remove pthread_spin_lock functions.
2442 * sysdeps/alpha/pspinlock.c: New file.
2443 * sysdeps/arm/pspinlock.c: New file.
2444 * sysdeps/i386/pspinlock.c: New file.
2445 * sysdeps/m68k/pspinlock.c: New file.
2446 * sysdeps/mips/pspinlock.c: New file.
2447 * sysdeps/powerpc/pspinlock.c: New file.
2448 * sysdeps/sparc/sparc32/pspinlock.c: New file.
2449 * sysdeps/sparc/sparc64/pspinlock.c: New file.
2450 * sysdeps/pthread/bits/pthreadtypes.h: Remove pthread_spinlock_t
2451 back to _pthread_fastlock. Define new pthread_spinlock_t.
2453 2000-05-24 Andreas Jaeger <aj@suse.de>
2455 * sysdeps/i386/i686/pt-machine.h: Only use LDT on newer kernels.
2457 2000-05-21 Jakub Jelinek <jakub@redhat.com>
2459 * manager.c (pthread_handle_create): Initialize p_res._sock to -1.
2461 2000-05-13 Jakub Jelinek <jakub@redhat.com>
2463 * internals.h (__RES_PTHREAD_INTERNAL): Define.
2465 2000-05-06 Kaz Kylheku <kaz@ashi.footprints.net>
2467 * mutex.c (pthread_once): IN_PROGRESS state of pthread_once_t
2468 object state is represented with additional bits which distinguish
2469 whether that state was set up in the current process, or
2470 in an ancestor process. If that state was set in an ancestor,
2471 it means that a fork happened while thread was executing the init
2472 function. In that case, the state is reset to NEVER.
2473 * mutex.c (__pthread_once_fork_prepare): New function.
2474 (__pthread_once_fork_child): Likewise
2475 (__pthread_once_fork_parent): Likewise
2476 (__pthread_reset_pthread_once): Removed.
2477 * ptfork.c (__fork): Call new handlers in mutex.c.
2478 * internals.h: Declarations of new mutex.c functions added.
2479 Declaration of removed function deleted.
2480 * linuxthreads.texi: Updated documentation about pthread_once
2481 to clarify what happens under cancellation and forking.
2483 2000-05-06 Kaz Kylheku <kaz@ashi.footprints.net>
2485 * internals.h: New thread manager request type, REQ_KICK.
2486 * join.c (pthread_exit): main thread now calls exit() instead
2487 of _exit() in order to proper process cleanup.
2488 * manager.c (__pthread_manager): Do not terminate manager
2489 after unblocking main thread; wait for main thread's
2490 REQ_PROCESS_EXIT request instead.
2491 Also, added REQ_KICK case to handle new request; this just does
2493 * manager.c (pthread_exited): Do not terminate manager after
2494 unblocking main thread.
2495 * manager.c (__pthread_manager_sighandler): If the main thread
2496 is waiting for all other threads to die, send a REQ_KICK into
2497 the thread manager request pipe to get it to clean out the threads
2498 and unblock the main thread as soon as possible. This fixes
2499 the 2000 millisecond hang on shutdown bug.
2500 * Examples/ex7.c: New file, tests shutdown behavior when all threads
2501 including the main one call pthread_exit(), or implicitly do so.
2502 * Makefile (tests): Add ex7.
2504 2000-05-05 Andreas Jaeger <aj@suse.de>
2506 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
2507 (pthread_getcpuclockid): Correct test for ourselves.
2509 2000-05-05 Ulrich Drepper <drepper@redhat.com>
2511 * internals.h (struct _pthread_descr_struct): Reorganization.
2512 Allocate room for 16 pointers at head of the structure for future
2513 thread-local data handling. Move p_self member in this area.
2514 * manager.c (pthread_handle_create): Adjust use of p_self.
2515 * sysdeps/i386/useldt.h (THREAD_SELF): Likewise.
2516 * pthread.c (__pthread_initial_thread): Adjust initialization.
2517 (__pthread_manager_thread): Likewise.
2519 2000-04-29 Bruno Haible <haible@clisp.cons.org>
2521 * join.c (pthread_exit): Use THREAD_GETMEM_NC instead of THREAD_GETMEM
2522 for eventmask larger than 1 word.
2524 2000-04-27 Ulrich Drepper <drepper@redhat.com>
2526 * Versions [libpthread] (GLIBC_2.2): Add __pthread_initialize_minimal.
2527 * pthread.c (__pthread_initialize_minimal): New function. Perform
2528 minimal initialization.
2529 (pthread_initialize): Remove this code here.
2530 * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h" again. We
2531 are working around the problem in glibc.
2533 2000-04-25 Ulrich Drepper <drepper@redhat.com>
2535 * sysdeps/i386/i686/pt-machine.h: Do not use "../useldt.h" for
2536 now. First gcc must be fixed (more concrete: libgcc).
2538 2000-04-24 Ulrich Drepper <drepper@redhat.com>
2540 * pthread.c: Remove special treatement for interrupt handlers on x86.
2541 * manager.c (pthread_free): Use FREE_THREAD not FREE_THREAD_SELF.
2542 * sysdeps/i386/useldt.h: Use "q" constraint instead of "r" where
2544 * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h".
2546 2000-04-24 Mark Kettenis <kettenis@gnu.org>
2548 * join.c (pthread_exit): Set p_terminated after reporting the
2549 termination event instead of before.
2551 2000-04-20 Jakub Jelinek <jakub@redhat.com>
2553 * sysdeps/pthread/bits/libc-lock.h: Only declare __pthread_rwlock_*
2556 2000-04-18 Andreas Jaeger <aj@suse.de>
2558 * Versions: Use ld instead of ld.so.
2560 2000-04-18 Jakub Jelinek <jakub@redhat.com>
2562 * sysdeps/unix/sysv/linux/sparc/bits/sigcontext.h (struct sigcontext):
2563 Remove the typedef keyword.
2565 2000-04-18 Jakub Jelinek <jakub@redhat.com>
2567 * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Use membar,
2569 (READ_MEMORY_BARRIER): Define.
2570 * spinlock.c (__pthread_spin_unlock): Use READ_MEMORY_BARRIER, not
2572 * internals.h (READ_MEMORY_BARRIER): Define if not defined in sysdep
2575 2000-04-17 Ulrich Drepper <drepper@redhat.com>
2577 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
2578 (pthread_getcpuclockid): Don't compare thread_id with thread_self,
2579 use thread_handle().
2581 2000-04-16 Ulrich Drepper <drepper@redhat.com>
2583 * condvar.c (pthread_cond_timedwait_relative): Don't test for owner
2584 if fast mutex is used. Don't initialize `already_canceled' twice.
2585 Correctly test for return value of timedsuspend.
2587 * pthread.c: Correct long-time braino. We never set SA_SIGINFO and
2588 therefore don't need the _rt versions of the signal handlers.
2590 2000-04-15 Ulrich Drepper <drepper@redhat.com>
2592 * pthread.c (pthread_yield): New function.
2593 * sysdeps/pthread/pthread.h (pthread_yield): Add prototype.
2594 * Versions [libpthread] (GLIBC_2.2): Add pthread_yield.
2595 * internals.h: Declare __pthread_yield.
2597 * pthread.c (pthread_initialize): Avoid a bit more code if
2598 realtime signals are known to exist.
2600 * pthread.c: Is __ASSUME_REALTIME_SIGNALS then avoid generating code
2601 to dynamically detect RT signals and avoid generating compatibility
2602 functions with old kernel.
2603 * restart.h (restart) [__ASSUME_REALTIME_SIGNALS]: Use
2604 __pthread_restart_new directly.
2605 (suspend) [__ASSUME_REALTIME_SIGNALS]: Use
2606 __pthread_wait_for_restart_signal directly.
2607 (timedsuspend) [__ASSUME_REALTIME_SIGNALS]: Use
2608 __pthread_timedsuspend_new directly.
2610 2000-04-15 Ulrich Drepper <drepper@redhat.com>
2612 * condvar.c: Remove all the special code to handle cond_timedwait.
2613 Use timedsuspend instead.
2614 * internals.h: Declare __pthread_timedsuspend_old,
2615 __pthread_timedsuspend_new, and __pthread_timedsuspend.
2616 Remove declaration of __pthread_init_condvar.
2617 * pthread.c: Define __pthread_timedsuspend variable.
2618 (__pthread_timedsuspend_old): New function. Timed suspension
2619 implementation for old Linux kernels.
2620 (__pthread_timedsuspend_new): New function. Timed suspension
2621 implementation for new Linux kernels.
2622 * restart.h (timedsuspend): New function. Call appropriate
2623 suspension function through __pthread_timedsuspend.
2624 * semaphore.c (sem_timedwait): Use timedsuspend, don't duplicate
2626 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2628 * internals.h (WRITE_MEMORY_BARRIER): Define as MEMORY_BARRIER if
2630 * spinlock.c: Use WRITE_MEMORY_BARRIER instead of MEMORY_BARRIER
2632 * sysdeps/alpha/pt-machine.h: Define WRITE_MEMORY_BARRIER.
2633 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2635 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _POSIX_SPAWN.
2636 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2638 2000-04-14 Andreas Jaeger <aj@suse.de>
2640 * weaks.c: Fix typo.
2642 * shlib-versions (mips.*-.*-linux.*): Support only GLIBC 2.0 and
2643 2.2 for linuxthreads.
2645 2000-04-13 Ulrich Drepper <drepper@redhat.com>
2647 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
2648 (pthread_getcpuclockid): Fix typo.
2650 2000-04-12 Ulrich Drepper <drepper@redhat.com>
2652 * Makefile (libpthread-routines): Add getcpuclockid.
2653 * Versions [libpthread] (GLIBC_2.2): Add pthread_getcpuclockid.
2654 * sysdeps/pthread/getcpuclockid.c: New file.
2655 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: New file.
2656 * sysdeps/pthread/pthread.h: Add prototype for pthread_getcpuclockid.
2658 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_SPIN_LOCKS):
2660 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2662 * sysdeps/pthread/pthread.h: Add prototypes for pthread_spin_init,
2663 pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
2664 and pthread_spin_unlock.
2665 * sysdeps/pthread/bits/pthreadtypes.h: Change struct _pthread_fastlock
2666 into pthread_spinlock_t. Change all uses.
2667 * spinlock.c: Implement pthread_spin_lock.
2668 Rename __pthread_unlock to __pthread_spin_unlock and define weak
2669 alias for real name.
2670 Define pthread_spin_trylock, pthread_spin_init, and
2671 pthread_spin_destroy.
2672 Change all uses of _pthread_fastlock to pthread_spinlock_t.
2673 * spinlock.h: Rename __pthread_unlock to __pthread_spin_unlock.
2674 Change all uses of _pthread_fastlock to pthread_spinlock_t.
2675 * Versions [libpthread] (GLIBC_2.2): Add pthread_spin_init,
2676 pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
2677 and pthread_spin_unlock.
2678 * cancel.c: Use __pthread_spin_unlock instead of __pthread_unlock.
2679 Change all uses of _pthread_fastlock to pthread_spinlock_t.
2680 * condvar.c: Likewise.
2681 * internals.h: Likewise.
2683 * manager.c: Likewise.
2684 * mutex.c: Likewise.
2685 * pthread.c: Likewise.
2686 * rwlock.c: Likewise.
2687 * semaphore.c: Likewise.
2688 * signals.c: Likewise.
2690 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add various new POSIX
2692 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
2694 2000-04-11 Ulrich Drepper <drepper@redhat.com>
2696 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add
2697 _POSIX_SHARED_MEMORY_OBJECTS.
2699 2000-04-11 Andreas Jaeger <aj@suse.de>
2701 * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Define.
2702 (__compare_and_swap): Mark as modifying memory.
2704 2000-04-11 Geoff Keating <geoffk@cygnus.com>
2706 * sysdeps/powerpc/pt-machine.h (MEMORY_BARRIER): Don't be
2708 (__compare_and_swap): Replace other 'sync' with MEMORY_BARRIER.
2709 Don't have the 'asm' __volatile__.
2711 2000-04-11 Ulrich Drepper <drepper@redhat.com>
2713 * internals.h: Define MEMORY_BARRIER as empty if not defined already.
2714 * spinlock.c (__pthread_lock): Add memory barriers.
2715 (__pthread_unlock): Likewise.
2716 * sysdeps/alpha/pt-machine.h (MEMORY_BARRIER): Define using mb
2718 (RELEASE): Not needed anymore.
2719 (__compare_and_swap): Mark asm as modifying memory.
2720 * sysdeps/powerpc/pt-machine.h (sync): Remove. Replace with definition
2722 (__compare_and_swap): Use MEMORY_BARRIER instead of sync.
2723 * sysdeps/sparc/sparc32/pt-machine.h (RELEASE): Not needed anymore.
2724 (MEMORY_BARRIER): Define using stbar.
2725 * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Define using
2727 (__compare_and_swap): Use MEMORY_BARRIER to ensure ordering.
2728 Patch by Xavier Leroy <Xavier.Leroy@inria.fr> based on comments by
2729 Mike Burrows <m3b@pa.dec.com>.
2731 2000-04-09 Ulrich Drepper <drepper@redhat.com>
2733 * signals.c (sigaction): Fix return value for the case SIG is one
2734 of the signals the implementation uses.
2735 Patch by Xavier.Leroy@inria.fr.
2737 2000-04-01 Andreas Jaeger <aj@suse.de>
2739 * attr.c: Use shlib-compat macros.
2740 * oldsemaphore.c: Likewise.
2741 * pthread.c: Likewise.
2742 * weaks.c: Likewise.
2744 2000-03-26 Ulrich Drepper <drepper@redhat.com>
2746 * semaphore.c (sem_timedwait): New function.
2747 Patch by Carl Mailloux <carlm@oricom.ca>.
2748 * semaphore.h: Declare sem_timedwait.
2749 * Versions [libpthread] (GLIBC_2.2): Add sem_timedwait.
2751 2000-03-26 Roland McGrath <roland@baalperazim.frob.com>
2753 * sysdeps/pthread/Makefile: File removed.
2755 2000-03-23 Ulrich Drepper <drepper@redhat.com>
2757 * mutex.c (__pthread_reset_pthread_once): Reset once_masterlock.
2758 * internals.h (__pthread_reset_pthread_once): Add prototype.
2759 * ptfork.c (__fork): Call __pthread_reset_pthread_once.
2761 * manager.c (pthread_handle_create): Store ID of new thread before
2764 2000-03-21 Ulrich Drepper <drepper@redhat.com>
2766 * attr.c: Use new macros from shlib-compat.h to define versions.
2767 * oldsemaphore.c: Likewise.
2768 * semaphore.c: Likewise.
2769 * weaks.c: Likewise.
2771 * pthread.c: Update for new SHLIB_COMPAT definition.
2773 * manager.c (__pthread_manager): Unmask debug signal.
2775 * pthread.c (pthread_initialize): Test for address of __dso_handle
2776 being NULL, not value. Use __on_exit, not on_exit.
2777 Patch by Andreas Jaeger <aj@suse.de>.
2779 * pthread.c: Use new macros from shlib-compat.h to define versions.
2781 2000-03-19 Ulrich Drepper <drepper@redhat.com>
2783 * pthread.c (pthread_initialize): Instead of on_exit use
2784 __cxa_atexit if __dso_label is available to allow unloading the
2785 libpthread shared library.
2787 2000-03-16 Ulrich Drepper <drepper@redhat.com>
2789 * condvar.c: Make tests for ownership of mutex less strict.
2791 2000-03-14 Ulrich Drepper <drepper@redhat.com>
2793 * condvar.c (pthread_cond_wait): Check whether mutex is owned by
2794 current thread and return error if not.
2795 (pthread_cond_timedwait_relative_old): Likewise.
2796 (pthread_cond_timedwait_relative_new): Likewise.
2798 * mutex.c (__pthread_once): Handle cancelled init function correctly.
2799 (pthread_once_cancelhandler): New function.
2800 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2802 2000-03-14 Andreas Jaeger <aj@suse.de>
2804 * pthread.c (pthread_handle_sigcancel_rt): GS has been renamed to
2806 (pthread_handle_sigrestart_rt): Likewise.
2807 * signals.c (pthread_sighandler_rt): Likewise.
2809 2000-03-02 Andreas Jaeger <aj@suse.de>
2811 * sysdeps/pthread/bits/libc-lock.h: Fix typo.
2812 Reported by Sean Chen <sean.chen@turbolinux.com>.
2814 2000-02-28 Andreas Jaeger <aj@suse.de>
2816 * rwlock.c: Fix typo.
2818 2000-02-27 Ulrich Drepper <drepper@redhat.com>
2820 * rwlock.c: Define __* variants of the functions and make old names
2822 * Versions [GLIBC_2.2]: Export the __pthread_rwlock_* functions.
2823 * sysdeps/pthread/bits/libc-lock.h: Define __libc_rwlock_* macros.
2825 2000-02-25 Andreas Jaeger <aj@suse.de>
2827 * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
2828 pwrite64, lseek64, open64, and __open64 with version 2.2.
2830 2000-02-22 Ulrich Drepper <drepper@redhat.com>
2832 * semaphore.h (SEM_FAILED): Use 0 not NULL.
2834 2000-02-14 Ulrich Drepper <drepper@redhat.com>
2836 * condvar.c (pthread_cond_timedwait_relative_old): Tight loop with
2837 nanosleep does not work either. Get absolute time inside the
2839 (pthread_cond_timedwait_relative_new): Likewise.
2840 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2842 2000-02-13 Andreas Jaeger <aj@suse.de>
2844 * condvar.c (pthread_cond_timedwait_relative_new): Fix last patch.
2845 (pthread_cond_timedwait_relative_old): Likewise.
2847 2000-02-13 Ulrich Drepper <drepper@redhat.com>
2849 * condvar.c (pthread_cond_timedwait_relative_old): Undo last patch
2850 but keep the code around. A bug in the kernel prevent us from
2852 (pthread_cond_timedwait_relative_new): Likewise.
2853 (PR libc/1597 and libc/1598).
2855 2000-02-01 Kaz Kylheku <kaz@ashi.footprints.net>
2857 * condvar.c (pthread_cond_timedwait_relative_old): Do tight
2858 loop around nanosleep calls instead of around most of the function
2859 (pthread_cond_timedwait_relative_new): Likewise.
2860 body. Got rid of backwards goto and one local.
2862 2000-01-31 Ulrich Drepper <drepper@redhat.com>
2864 * condvar.c (pthread_cond_timedwait_relative_old): Recompute time
2865 before every nanosleep call to account for time spent in the rest
2867 (pthread_cond_timedwait_relative_new): Likewise.
2868 Patch by khendricks@ivey.uwo.ca (PR libc/1564).
2870 2000-01-29 Ulrich Drepper <drepper@redhat.com>
2872 * condvar.c (pthread_cond_timedwait_relative_old): Get remaining time
2873 from nanosleep call so that in case we restart we only wait for the
2875 (pthread_cond_timedwait_relative_new): Likewise.
2876 Patch by khendricks@ivey.uwo.ca (PR libc/1561).
2878 2000-01-18 Ulrich Drepper <drepper@cygnus.com>
2880 * manager.c (pthread_allocate_stack): Compute guard page address
2881 correctly. Patch by HJ Lu.
2883 * sysdeps/pthread/pthread.h: Define
2884 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP.
2886 2000-01-16 Ulrich Drepper <drepper@cygnus.com>
2888 * rwlock.c (pthread_rwlock_unlock): Correct one more problem with
2889 preference handling.
2890 (pthread_rwlockattr_setkind_np): Allow
2891 PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP.
2892 Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
2894 2000-01-12 Ulrich Drepper <drepper@cygnus.com>
2896 * internals.h (pthread_readlock_info): New structure.
2897 (_pthread_descr_struct): Add p_readlock_list, p_readlock_free, and
2898 p_untracked_readlock_count.
2899 * pthread.c (__pthread_initial_thread, pthread_manager_thread):
2900 Add initializers for new fields.
2901 * manager.c (pthread_free): Free read/write lock lists.
2902 * queue.h (queue_is_empty): New function.
2903 * rwlock.c: Implement requirements about when readers should get
2905 * sysdeps/pthread/pthread.h
2906 (PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP): New definition.
2907 * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_rwlock_t):
2908 Define this name as well.
2909 Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
2911 2000-01-05 Ulrich Drepper <drepper@cygnus.com>
2913 * pthread.c (__pthread_initial_thread, pthread_manager_thread):
2914 Adjust initializers for struct _pthread_descr_struct change.
2915 * internals.h (struct _pthread_descr_struct): Move new elements to
2918 2000-01-03 Kaz Kylheku <kaz@ashi.footprints.net>
2920 Redesigned how cancellation unblocks a thread from internal
2921 cancellation points (sem_wait, pthread_join,
2922 pthread_cond_{wait,timedwait}).
2923 Cancellation won't eat a signal in any of these functions
2924 (*required* by POSIX and Single Unix Spec!).
2925 * condvar.c: Spontaneous wakeup on pthread_cond_timedwait won't eat a
2926 simultaneous condition variable signal (not required by POSIX
2927 or Single Unix Spec, but nice).
2928 * spinlock.c: __pthread_lock queues back any received restarts
2929 that don't belong to it instead of assuming ownership of lock
2930 upon any restart; fastlock can no longer be acquired by two threads
2932 * restart.h: Restarts queue even on kernels that don't have
2933 queued real time signals (2.0, early 2.1), thanks to atomic counter,
2934 avoiding a rare race condition in pthread_cond_timedwait.
2936 1999-12-31 Andreas Jaeger <aj@suse.de>
2938 * internals.h: Remove duplicate prototype declarations.
2940 * weaks.c: Remove __THROW from prototypes since the file is not
2941 compiled by a C++ compiler.
2942 * internals.h: Likewise.
2944 1999-12-30 Andreas Jaeger <aj@suse.de>
2946 * sysdeps/pthread/pthread.h: Move internal functions to...
2947 * sysdeps/pthread/bits/libc-lock.h: ...here.
2949 1999-12-29 Andreas Jaeger <aj@suse.de>
2951 * sysdeps/pthread/pthread.h: Fix typos, reformat comments.
2953 1999-12-28 Ulrich Drepper <drepper@cygnus.com>
2955 * sysdeps/alpha/pt-machine.h: Move stack_pointer definition to the
2958 * manager.c (__pthread_start): Add one more cast to prevent
2959 warning on 64bit machines.
2961 1999-12-21 Ulrich Drepper <drepper@cygnus.com>
2963 * manager.c (pthread_handle_create): Set p_pid of new thread
2964 before calling the callback function to report a new thread.
2966 1999-12-20 Andreas Jaeger <aj@suse.de>
2968 * pthread.c (pthread_initialize): Move getrlimit call after
2971 1999-12-18 Ulrich Drepper <drepper@cygnus.com>
2973 * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
2974 pwrite64, lseek64, open64, and __open64.
2975 * wrapsyscall.c: Define pread, __pread64, pread64, pwrite, __pwrite64,
2976 pwrite64, lseek64, open64, and __open64.
2978 * manager.c (pthread_allocate_stack): Correct computation of
2979 new_thread_bottom. Correct handling of stack size and when the
2980 rlimit method to guard for stack growth is used.
2981 * pthread.c (pthread_initialize): Stack limit must be STACK_SIZE
2982 minus one pagesize (not two).
2984 1999-12-03 Andreas Jaeger <aj@suse.de>
2986 * Versions: Add __res_state with version GLIBC_2.2.
2988 * errno.c (__res_state): New function to return thread specific
2991 * pthread.c (pthread_initialize): Initialize p_resp.
2992 (__pthread_reset_main_thread): Also set p_resp.
2994 * manager.c (pthread_handle_create): Initialize p_resp.
2996 * internals.h: Add thread specific resolver state.
2997 Based on patches by Adam D. Bradley <artdodge@cs.bu.edu>.
2999 1999-12-01 Ulrich Drepper <drepper@cygnus.com>
3001 * sysdeps/i386/pt-machine.h: Move stack_pointer definition to the
3003 * sysdeps/i386/i686/pt-machine.h: Likewise.
3004 Patches by Alan Modra <alan@SPRI.Levels.UniSA.Edu.Au>.
3006 1999-11-23 Ulrich Drepper <drepper@cygnus.com>
3008 * manager.c (pthread_start_thread_event): Initialize p_pid already
3011 1999-11-22 Ulrich Drepper <drepper@cygnus.com>
3013 * internals.h: Add prototype for __pthread_manager_event.
3014 * manager.c (__pthread_manager_event): New function.
3015 (pthread_start_thread_event): Correct computation of self.
3016 Use INIT_THREAD_SELF.
3017 * pthread.c (__pthread_manager_thread): Initialize p_lock.
3018 (__pthread_initialize_manager): Respect event flags also for creation
3019 of the manager thread.
3021 1999-11-08 Ulrich Drepper <drepper@cygnus.com>
3023 * pthread.c (__pthread_initialize_manager): Initialize
3024 __pthread_manager_thread.p_tid.
3026 1999-11-02 Ulrich Drepper <drepper@cygnus.com>
3028 * internals.h: Declare __pthread_last_event.
3029 * manager.c: Define __pthread_last_event.
3030 (pthread_handle_create): Set __pthread_last_event.
3031 (pthread_exited): Likewise.
3032 * join.c (pthread_exit): Likewise.
3034 * Makefile (libpthread-routines): Add events.
3035 * events.c: New file.
3036 * internals.h: Protect against multiple inclusion.
3037 Include thread_dbP.h header.
3038 (struct _pthread_descr_struct): Add new fields p_report_events and
3040 Declare event reporting functions.
3041 * join.c (pthread_exit): Signal event if this is wanted.
3042 * manager.c (__pthread_threads_events): New variable.
3043 (pthread_handle_create): Take new parameters with event information.
3044 Signal TD_CREATE event if wanted.
3045 (__pthread_manager): Adjust pthread_handle_create call.
3046 (pthread_start_thread_event): New function. Block until manager is
3047 finished and then call pthread_start_thread.
3048 (pthread_exited): Signal TD_REAP event if wanted.
3050 1999-10-26 Ulrich Drepper <drepper@cygnus.com>
3052 * restart.h (suspend_with_cancellation): Rewrite as a macro.
3054 * condvar.c (pthread_cond_timedwait_relative): Don't mark as inline.
3056 1999-10-25 Andreas Jaeger <aj@suse.de>
3058 * internals.h: Remove K&R compatibility.
3059 * no-tsd.c: Likewise.
3060 * semaphore.h: Likewise.
3061 * signals.c: Likewise.
3062 * sysdeps/pthread/bits/libc-tsd.h: Likewise.
3063 * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
3064 * weaks.c: Likewise.
3066 1999-10-21 Xavier Leroy <Xavier.Leroy@inria.fr>
3068 * pthread.c: For i386, wrap pthread_handle_sigrestart and
3069 pthread_handle_sigcancel with functions that restore %gs from the
3070 signal context. For each signal handling function, two wrappers
3071 are required, one for a non-RT signal and one for a RT signal.
3072 * signal.c: For i386, add code to restore %gs from the signal
3073 context in pthread_sighandler and pthread_sighandler_rt.
3075 1999-10-17 Ulrich Drepper <drepper@cygnus.com>
3077 * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add cast.
3079 1999-10-14 Ulrich Drepper <drepper@cygnus.com>
3081 * pthread.c (__pthread_initial_thread): Pass argument to
3082 PTHREAD_START_ARGS_INITIALIZER.
3083 (__pthread_manager_thread): Likewise.
3085 * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add parameter to
3086 initialize function.
3088 * manager.c (pthread_handle_create): Remove p_startfct initialization.
3090 * internals.h (_pthread_descr_struct): We don't need p_startfct field.
3092 1999-10-12 Ulrich Drepper <drepper@cygnus.com>
3094 * internals.h: Correct return types for __libc_read and __libc_write.
3096 1999-10-09 Andreas Jaeger <aj@suse.de>
3098 * internals.h: Add __new_sem_post to get prototype in
3099 manager.c; include semaphore.h for needed types.
3101 1999-10-08 Ulrich Drepper <drepper@cygnus.com>
3103 * manager.c (__pthread_manager) [REQ_POST]: Use __new_sem_post
3104 directly instead of calling sem_post which should not be necessary
3105 but is faster and might help in some case to work around problems.
3106 Patch by khendricks@ivey.uwo.ca [libc/1382].
3108 1999-10-08 Andreas Schwab <schwab@suse.de>
3110 * sysdeps/pthread/Subdirs: New file.
3113 1999-10-07 Ulrich Drepper <drepper@cygnus.com>
3115 * Implies: New file.
3116 * internals.h (struct _pthread_descr_struct): Add p_startfct.
3117 * manager.c (pthread_handle_create): Initialize p_startfct.
3118 * pthread.c: Define __linuxthread_pthread_sizeof_descr variable.
3120 1999-09-25 Ulrich Drepper <drepper@cygnus.com>
3122 * manager.c (__linuxthreads_pthread_threads_max): New variable.
3123 * specific.c (__linuxthreads_pthread_keys_max): New variable.
3124 (__linuxthreads_pthread_key_2ndlevel_size): New variable.
3126 * condvar.c (pthread_cond_timedwait_relative): Never return with
3127 EINTR. Patch by Andreas Schwab.
3129 1999-09-19 Ulrich Drepper <drepper@cygnus.com>
3131 * signals.c (sigaction): Correct last patch. Don't select
3132 pthread_sighandler_rt based on the signal number but instead of
3133 the SA_SIGINFO flag.
3135 1999-09-23 Ulrich Drepper <drepper@cygnus.com>
3137 * specific.c: Move definitions of struct pthread_key_struct and
3138 destr_function to ...
3139 * internals.h: ...here.
3141 1999-09-18 Ulrich Drepper <drepper@cygnus.com>
3143 * pthread.c (pthread_handle_sigrestart_rt): New function. Use
3144 this instead of pthread_handle_sigrestart if the signal is an RT
3147 * signals.c: Handle passing through of sighandler arguments also
3148 for real-time signals.
3150 1999-09-03 Andreas Schwab <schwab@suse.de>
3152 * ptfork.c (__fork): Renamed from fork and use __libc_fork. Add
3154 (__vfork): New function, alias vfork.
3155 * Versions: Export __fork, vfork, and __vfork in libpthread.
3157 1999-08-23 Andreas Schwab <schwab@suse.de>
3159 * signals.c (pthread_sighandler): Add SIGCONTEXT_EXTRA_ARGS to
3160 call to signal handler.
3162 1999-08-20 Ulrich Drepper <drepper@cygnus.com>
3164 * pthread.c (__pthread_reset_main_thread): Undo last change.
3165 (__pthread_kill_other_threads_np): Reset signal handlers for the
3166 signals we used in the thread implementation here.
3168 1999-08-19 Ulrich Drepper <drepper@cygnus.com>
3170 * pthread.c (__pthread_reset_main_thread): Reset signal handlers
3171 for the signals we used in the thread implementation [PR libc/1234].
3173 * Versions: Export __pthread_kill_other_threads_np from libpthread
3176 * signals.c: Pass sigcontext through wrapper to the user function.
3178 1999-08-01 Ulrich Drepper <drepper@cygnus.com>
3180 * Versions [ld.so] (GLIBC_2.0): Export __libc_internal_tsd_get and
3181 __libc_internal_tsd_set.
3183 1999-07-29 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3185 * manager.c: Remove inclusion of <linux/tasks.h> since it's not
3188 1999-07-16 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3190 * internals.h: Align _pthread_descr_struct to 32 bytes.
3191 Reported by Tim Hockin <thockin@cobaltnet.com>, close PR
3194 1999-07-09 Ulrich Drepper <drepper@cygnus.com>
3196 * oldsemaphore.c (sem_compare_and_swap): Fix use of compare and
3199 1999-07-09 Cristian Gafton <gafton@redhat.com>
3201 * Makefile (libpthread-routines): Add oldsemaphore routine.
3202 * Versions: Add sem_destroy, sem_getvalue, sem_init, sem_post,
3203 sem_trywait, and sem_wait to GLIBC_2.1.
3204 * oldsemaphore.c: New file.
3205 * semaphore.c: Add default_symbol_versions for the changed functions.
3206 (__new_sem_init): Rename from sem_init.
3207 (__new_sem_post): Rename from sem_post.
3208 (__new_sem_wait): Rename from sem_wait.
3209 (__new_sem_trywait): Rename from sem_trywait.
3210 (__new_sem_getvalue): Rename from sem_getvalue.
3211 (__new_sem_destroy): Rename from sem_destroy.
3213 1999-06-23 Robey Pointer <robey@netscape.com>
3215 * internals.h: Added p_nextlock entry to separate queueing for a
3216 lock from queueing for a CV (sometimes a thread queues on a lock
3217 to serialize removing itself from a CV queue).
3218 * pthread.c: Added p_nextlock to initializers.
3219 * spinlock.c: Changed to use p_nextlock instead of p_nextwaiting.
3221 1999-07-09 Ulrich Drepper <drepper@cygnus.com>
3223 * manager.c (pthread_handle_create): Free mmap region after stack
3224 if clone failed. Patch by Kaz Kylheku <kaz@ashi.FootPrints.net>.
3226 1999-05-23 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3228 * man/pthread_cond_init.man: Correct example.
3229 Reported by Tomas Berndtsson <tomas@nocrew.org>.
3231 * linuxthreads.texi (Condition Variables): Likewise.
3233 1999-05-18 Jakub Jelinek <jj@ultra.linux.cz>
3235 * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): Use
3236 casx not cas, also successful casx returns the old value in rd
3237 and not the new value.
3239 1999-05-16 Xavier Leroy <Xavier.Leroy@inria.fr>
3241 * manager.c: If pthread_create() is given a NULL attribute
3242 and the thread manager runs with a realtime policy, set the
3243 scheduling policy of the newly created thread back to SCHED_OTHER.
3244 * manager.c: If the PTHREAD_INHERIT_SCHED attribute is given,
3245 initialize the schedpolicy field of new_thread->p_start_args
3246 to that of the calling thread.
3248 1999-04-29 Ulrich Drepper <drepper@cygnus.com>
3250 * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): cas
3251 instruction does not allow memory element to use offset.
3253 1999-04-28 Ulrich Drepper <drepper@cygnus.com>
3255 * manager.c (pthread_allocate_stack): Optimize initialization of new
3258 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_define_initialized):
3259 Don't use initializer since it is all zeroes.
3260 (__libc_once_define): Likewise.
3262 1999-04-16 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3264 * sysdeps/arm/Implies: Removed since cmpxchg/no-cmpxchg
3265 doesn't exist anymore.
3266 * sysdeps/i386/Implies: Likewise.
3267 * sysdeps/m68k/Implies: Likewise.
3268 * sysdeps/mips/Implies: Likewise.
3269 * sysdeps/powerpc/Implies: Likewise.
3270 * sysdeps/sparc/sparc32/Implies: Likewise.
3271 * sysdeps/sparc/sparc64/Implies: Likewise.
3273 1999-04-15 Ulrich Drepper <drepper@cygnus.com>
3275 * sysdeps/alpha/bits/semaphore.h: Removed.
3276 * sysdeps/powerpc/bits/semaphore.h: Removed.
3277 * sysdeps/pthread/cmpxchg/bits/semaphore.h: Removed.
3278 * sysdeps/pthread/no-cmpxchg/bits/semaphore.h: Removed.
3279 * Makefile (headers): Remove bits/semaphore.h.
3281 * semaphore.h: Define _pthread_descr if necessary.
3282 Don't include limits.h. Define SEM_VALUE_MAX directly.
3284 (sem_t): Protect element names with leading __.
3285 Add declarations for sem_close, sem_open, and sem_unlink.
3286 * semaphore.c: Adjust all functions for new element names.
3287 Define sem_close, sem_open, and sem_unlink.
3288 * Versions (libthread): Add sem_close, sem_open, and sem_unlink for
3290 * sysdeps/pthread/bits/pthreadtypes.h: Define _pthread_descr only if
3293 1999-03-16 H.J. Lu <hjl@gnu.org>
3295 * specific.c (pthread_key_delete): Check th->p_terminated to see
3296 if the thread is running.
3298 * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set):
3299 Added to GLIBC_2.0 for libc.so.
3301 1999-02-12 H.J. Lu <hjl@gnu.org>
3303 * Versions (__libc_current_sigrtmin, __libc_current_sigrtmax,
3304 __libc_allocate_rtsig): Added to GLIBC_2.1.
3306 * internals.h (DEFAULT_SIG_RESTART): Removed.
3307 (DEFAULT_SIG_CANCEL): Removed.
3309 * pthread.c (init_rtsigs, __libc_current_sigrtmin,
3310 __libc_current_sigrtmax, __libc_allocate_rtsig): New functions.
3311 (__pthread_sig_restart, __pthread_sig_cancel,
3312 __pthread_sig_debug): Initialized.
3313 (pthread_initialize): Call init_rtsigs () to initialize
3316 1999-02-03 H.J. Lu <hjl@gnu.org>
3318 * manager.c (__pthread_manager): Do block __pthread_sig_debug.
3319 Don't restart the thread which sent REQ_DEBUG.
3320 (pthread_start_thread): Check if __pthread_sig_debug > 0
3323 * pthread.c (__pthread_initialize_manager): Suspend ourself
3324 after sending __pthread_sig_debug to gdb instead of
3325 __pthread_sig_cancel.
3327 1999-01-24 H.J. Lu <hjl@gnu.org>
3329 * manager.c (__pthread_manager): Delete __pthread_sig_debug
3330 from mask if __pthread_sig_debug > 0.
3331 (pthread_handle_create): Increment __pthread_handles_num.
3333 * manager.c (pthread_handle_create): Don't pass CLONE_PTRACE to clone.
3334 * pthread.c (__pthread_initialize_manager): Likewise.
3336 * pthread.c (pthread_initialize): Use __libc_allocate_rtsig (1)
3337 instead of __libc_allocate_rtsig (2).
3338 (__pthread_initialize_manager): Send __pthread_sig_debug to gdb
3339 instead of __pthread_sig_cancel.
3340 (pthread_handle_sigdebug): Fix comments.
3342 1999-01-21 Ulrich Drepper <drepper@cygnus.com>
3344 * manager.c (pthread_allocate_stack): Set
3345 __pthread_nonstandard_stacks if user-specified stack is used.
3347 1999-01-16 Ulrich Drepper <drepper@cygnus.com>
3349 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _LFS_ASYNCHRONOUS_IO,
3350 _LFS_LARGEFILE, _LFS64_LARGEFILE, and _LFS64_STDIO from Unix98.
3352 1999-01-07 Xavier Leroy <Xavier.Leroy@inria.fr>
3354 * pthread.c: Use a third signal __pthread_sig_debug distinct
3355 from __pthread_sig_cancel to notify gdb when a thread is
3357 * manager.c: Likewise.
3358 * internals.h: Likewise.
3359 * signals.c: The implementation of sigwait(s) assumed that
3360 all signals in s have signal handlers already attached.
3361 This is not required by the standard, so make it work
3362 also if some of the signals have no handlers.
3364 1999-01-05 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
3366 * linuxthreads.texi: Remove pointers from first @node. Move old
3367 @node spec inside comment.
3369 1998-12-31 Ulrich Drepper <drepper@cygnus.com>
3371 * sysdeps/pthread/bits/stdio-lock.h: Define _IO_lock_lock and
3374 1998-12-29 Ulrich Drepper <drepper@cygnus.com>
3376 * semaphore.c (sem_trywait): Don't forget to unlock the semaphore
3377 lock. Patch by Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>.
3379 1998-12-21 Ulrich Drepper <drepper@cygnus.com>
3381 * manager.c: Threads now send __pthread_sig_cancel on termination.
3382 Change clone call and signal masks.
3383 * thread.c (pthread_handle_sigrestart): Remove special code for
3385 (pthread_handle_sigcancel): In manager thread call
3386 __pthread_manager_sighandler.
3387 * sysdeps/i386/pt-machine.h (__compare_and_swap): Add memory clobber.
3388 * sysdeps/i386/i686/pt-machine.h: Likewise.
3389 Patches by Xavier Leroy.
3391 1998-12-14 Ulrich Drepper <drepper@cygnus.com>
3393 * spinlock.c (__pthread_unlock): Don't crash if called for an
3394 untaken mutex. Reported by Ruslan V. Brushkoff <rus@Snif.Te.Net.UA>.
3396 * Examples/ex6.c: Unbuffer stdout and reduce sleep time to reduce
3399 1998-12-13 Ulrich Drepper <drepper@cygnus.com>
3401 * Examples/ex3.c: Wait until all threads are started before
3402 searching for the number to avoid race condition on very fast
3405 1998-12-08 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3407 * sysdeps/pthread/pthread.h: Remove __pthread_setcanceltype
3408 declaration since it's not needed.
3410 * sysdeps/pthread/pthread.h: Move internal functions to ...
3411 * internals.h: ...here.
3413 1998-12-02 H.J. Lu <hjl@gnu.org>
3415 * pthread.c (__pthread_sig_restart): Initiliaze to 0 if
3416 SIGRTMIN is defined.
3417 (__pthread_sig_cancel): Likewise.
3419 1998-12-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3421 * wrapsyscall.c: Include <sys/mman.h> for msync,
3422 <stdlib.h> for system and <termios.h> for tcdrain prototype.
3423 Correct msync declaration.
3425 1998-11-29 Roland McGrath <roland@baalperazim.frob.com>
3427 * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_define, __libc_tsd_get,
3428 __libc_tsd_set): New macros for new interface.
3429 * no-tsd.c: New file, provide uninitialized defns of
3430 __libc_internal_tsd_get and __libc_internal_tsd_set.
3431 * Makefile (routines): Add no-tsd.
3433 1998-10-12 Roland McGrath <roland@baalperazim.frob.com>
3435 * internals.h: Include <bits/libc-tsd.h>, not <bits/libc-lock.h>.
3436 * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
3437 __libc_internal_tsd_set): Move decls to ...
3438 * sysdeps/pthread/bits/libc-tsd.h: New file for __libc_internal_tsd_*
3441 * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
3442 __libc_internal_tsd_set): Make these pointers to functions, not
3443 functions; remove #pragma weak decls for them.
3444 * specific.c (__libc_internal_tsd_get, __libc_internal_tsd_set):
3445 Define static functions and initialized pointers to them.
3447 1998-11-18 Ulrich Drepper <drepper@cygnus.com>
3449 * Makefile (CFLAGS-mutex.c): Define as -D__NO_WEAK_PTHREAD_ALIASES.
3450 (CFLAGS-specific.c): Likewise.
3451 (CFLAGS-pthread.c): Likewise.
3452 (CFLAGS-ptfork.c): Likewise.
3453 (CFLAGS-cancel.c): Likewise.
3454 * sysdeps/pthread/bits/libc-lock.h: Don't mark __pthread_* functions
3455 as weak references if __NO_WEAK_PTHREAD_ALIASES is defined.
3457 * mutex.c (pthread_mutex_init): Define as strong symbol.
3458 (pthread_mutex_destroy): Likewise.
3459 (pthread_mutex_trylock): Likewise.
3460 (pthread_mutex_lock): Likewise.
3461 (pthread_mutex_unlock): Likewise.
3462 (pthread_mutexattr_init): Likewise.
3463 (pthread_mutexattr_destroy): Likewise.
3464 (pthread_once): Likewise.
3465 * ptfork.c (pthread_atfork): Likewise.
3466 * specific.c (pthread_key_create): Likewise.
3467 (pthread_setspecific): Likewise.
3468 (pthread_getspecific): Likewise.
3470 1998-11-15 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
3472 * linuxthreads.texi: Fix punctuation after xref.
3474 1998-11-10 H.J. Lu <hjl@gnu.org>
3476 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine NR_OPEN
3477 if it is defined in <linux/limits.h>.
3479 1998-10-29 14:28 Ulrich Drepper <drepper@cygnus.com>
3481 * spinlock.h (__pthread_trylock): Define inline.
3482 (__pthread_lock): Add extra parameter to declaration. Declare
3483 using internal_function.
3484 (__pthread_unlock): Declare using internal_function.
3485 * spinlock.c (__pthread_lock): Add new parameter. Use it instead
3486 of local variable self. Avoid recomputing self. Define using
3488 (__pthread_trylock): Remove.
3489 (__pthread_unlock): Define using internal_function.
3490 * cancel.c: Adjust for __pthread_lock interface change. Use already
3491 computed self value is possible.
3492 * condvar.c: Likewise.
3494 * manager.c: Likewise.
3495 * mutex.c: Likewise.
3496 * pthread.c: Likewise.
3497 * rwlock.c: Likewise.
3498 * semaphore.c: Likewise.
3499 * signals.c: Likewise.
3501 1998-10-27 13:46 Ulrich Drepper <drepper@cygnus.com>
3503 * sysdeps/pthread/pthread.h (struct _pthread_cleanup_buffer): Prepend
3504 __ to field names of the struct.
3505 * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_fastlock):
3507 (pthread_attr_t): Likewise.
3508 (pthread_cond_t): Likewise.
3509 (pthread_condattr_t): Likewise.
3510 (pthread_mutex_t): Likewise.
3511 (pthread_mutexattr_t): Likewise.
3512 (pthread_rwlock_t): Likewise.
3513 (pthread_rwlockattr_t): Likewise.
3514 * attr.c: Adjust for pthread.h and pthreadtypes.h change.
3515 * cancel.c: Likewise.
3516 * condvar.c: Likewise.
3517 * manager.c: Likewise.
3518 * mutex.c: Likewise.
3519 * pthread.c: Likewise.
3520 * ptlongjmp.c: Likewise.
3521 * rwlock.c: Likewise.
3522 * spinlock.c: Likewise.
3524 1998-10-09 Ulrich Drepper <drepper@cygnus.com>
3526 * sysdeps/i386/pt-machine.h (get_eflags, set_eflags): Mark these
3529 * sysdeps/i386/i686/pt-machine.h: Remove unused inline
3532 * Makefile (libpthread-routines): Add pt-machine.
3533 * pt-machine.c: New file.
3534 * sysdeps/alpha/pt-machine.h: Define PT_EI as extern inline is not
3535 yet defined. Use PT_EI in extern inline definitions.
3536 * sysdeps/arm/pt-machine.h: Likewise.
3537 * sysdeps/i386/pt-machine.h: Likewise.
3538 * sysdeps/i386/i686/pt-machine.h: Likewise.
3539 * sysdeps/m68k/pt-machine.h: Likewise.
3540 * sysdeps/mips/pt-machine.h: Likewise.
3541 * sysdeps/powerpc/pt-machine.h: Likewise.
3542 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
3543 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
3545 1998-10-02 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3547 * semaphore.h: Include <sys/types.h> so that _pthread_descr
3550 1998-09-15 David S. Miller <davem@pierdol.cobaltmicro.com>
3552 * sysdeps/sparc/sparc32/pt-machine.h (INIT_THREAD_SELF): Add nr
3554 * sysdeps/sparc/sparc64/pt-machine.h (INIT_THREAD_SELF): Likewise.
3556 1998-09-12 14:24 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
3558 * sysdeps/unix/sysv/linux/bits/sigthread.h: Add multiple inclusion
3561 1998-09-02 11:08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3563 * signals.c (sigaction): Check that sig is less than NSIG to avoid
3564 array index overflow.
3566 1998-09-06 10:56 Ulrich Drepper <drepper@cygnus.com>
3568 * sysdeps/pthread/semaphore.h: New file.
3570 1998-09-06 09:08 Ulrich Drepper <drepper@cygnus.com>
3572 * sysdeps/pthread/bits/libc-lock.h (enum __libc_tsd_key_t): Add
3573 _LIBC_TSD_KEY_DL_ERROR.
3575 1998-08-31 Ulrich Drepper <drepper@cygnus.com>
3577 * sysdeps/i386/i686/pt-machine.h (testandset): Add memory clobber.
3578 * sysdeps/i386/pt-machine.h: Likewise.
3579 Suggested by Roland McGrath.
3581 1998-08-28 13:58 Ulrich Drepper <drepper@cygnus.com>
3583 * internals.h: Also define THREAD_GETMEM_NC and THREAD_SETMEM_NC to
3584 access thread data with non-constant offsets.
3585 * specific.c: Use THREAD_GETMEM_NC and THREAD_SETMEM_NC where
3588 * sysdeps/i386/useldt.h: Fix typo. Add THREAD_GETMEM_NC and
3589 THREAD_SETMEM_NC definitions.
3591 * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM_NC and
3593 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
3595 1998-08-26 15:46 Ulrich Drepper <drepper@cygnus.com>
3597 * internals.h: Define THREAD_GETMEM and THREAD_SETMEM to default if
3598 not already defined.
3599 (struct _pthread_descr_struct): Add p_self and p_nr field.
3600 * manager.c (__pthread_handles): Define second element to point
3602 (__pthread_handles_num): Initialize to 2.
3603 (__pthread_manager): Use INIT_THREAD_SELF with two arguments.
3604 (pthread_start_thread): Likewise.
3605 (pthread_handle_create): Start search for free slot at entry 2.
3606 Initialize new fields p_self and p_nr.
3607 Call __clone with CLONE_PTRACE if available.
3608 (pthread_free): Call FREE_THREAD_SELF if available.
3609 * pthread.c (__pthread_initial_thread): Initialize new fields.
3610 (__pthread_manager_thread): Likewise.
3611 (__pthread_initialize_manager): Call __clone with CLONE_PTRACE.
3613 * cancel.c: Use THREAD_GETMEM and THREAD_SETMEM to access the
3614 elements of the thread descriptor.
3615 * condvar.c: Likewise.
3616 * errno.c: Likewise.
3618 * manager.c: Likewise.
3619 * pthread.c: Likewise.
3620 * ptlongjmp.c: Likewise.
3621 * semaphore.c: Likewise.
3622 * signals.c: Likewise.
3623 * specific.c: Likewise.
3624 * spinlock.c: Likewise.
3626 * sysdeps/alpha/pt-machine.h (INIT_THREAD_SELF): Add extra parameter.
3628 * sysdeps/i386/useldt.h: New file.
3629 * sysdeps/i386/i686/pt-machine.h: Show how to use this file.
3631 * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM and
3632 THREAD_SETMEM using __thread_self.
3633 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
3635 1998-08-24 Geoff Keating <geoffk@ozemail.com.au>
3637 * spinlock.c (__pthread_lock): Reset p_nextwaiting to NULL if it
3638 turned out that we didn't need to queue after all.
3640 1998-08-22 Geoff Keating <geoffk@ozemail.com.au>
3642 * sysdeps/powerpc/pt-machine.h: Remove testandset, it's not used
3643 and wastes space; correct types.
3645 1998-08-08 11:18 H.J. Lu <hjl@gnu.org>
3647 * signals.c (sigaction): Handle NULL argument.
3649 1998-08-04 Ulrich Drepper <drepper@cygnus.com>
3651 * sysdeps/unix/sysv/linux/bits/sigthread.h: Use __sigset_t instead
3654 1998-08-02 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3656 * Makefile (linuxthreads-version): Extract correct number from
3659 1998-07-29 Xavier Leroy <Xavier.Leroy@inria.fr>
3661 * Banner: Bump version number to 0.8
3662 * FAQ.html: Many updates, in particular w.r.t. debugging.
3663 * manager.c: Support for non-default stacksize for
3664 LinuxThreads-allocated stacks;
3665 don't use guard pages for stacks with default size, rely on
3666 rlimit(RLIMIT_STACK) instead (it's cheaper).
3668 * cancel.c: Use __pthread_sig_cancel and __pthread_sig_restart
3669 everywhere instead of PTHREAD_SIG_CANCEL and PTHREAD_SIG_RESTART.
3670 * condvar.c: Likewise.
3671 * internals.h: Likewise.
3672 * restart.h: Likewise.
3673 * signals.c: Likewise.
3674 * pthread.c: Likewise; set rlimit(RLIMIT_STACK) as we need it.
3676 1998-07-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3678 * weaks.c: Define pthread_mutexattr_[sg]ettype instead of
3679 __pthread_mutexattr_[sg]ettype. Add more weak aliases.
3680 * Versions: Put __pthread_mutexattr_settype under version
3681 GLIBC_2.0. Don't export __pthread_mutexattr_setkind_np and
3682 __pthread_mutexattr_gettype.
3684 1998-07-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3686 * sysdeps/pthread/bits/libc-lock.h: Make
3687 __pthread_mutexattr_settype weak. Don't make
3688 __pthread_mutexattr_setkind_np weak.
3690 1998-07-16 10:52 Ulrich Drepper <drepper@cygnus.com>
3692 * manager.c (pthread_handle_create): Check whether sched_setscheduler
3693 call can succeed here.
3695 * mutex.c: Define __pthread_mutexattr_settype and make
3696 __pthread_mutexattr_setkind_np an alias.
3697 Likewise for __pthread_mutexattr_gettype.
3699 1998-07-15 11:00 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
3701 * attr.c (pthread_attr_setschedpolicy): Don't check whether caller
3704 1998-07-14 19:38 Ulrich Drepper <drepper@cygnus.com>
3706 * sysdeps/pthread/bits/libc-lock.h: Define __libc_cleanup_end.
3708 1998-07-11 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3710 * Examples/ex6.c: Include <unistd.h> for usleep.
3712 1998-06-13 11:04 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3714 * Examples/ex4.c (main): Use exit, not pthread_exit.
3716 1998-07-09 13:39 Ulrich Drepper <drepper@cygnus.com>
3718 * Versions: Add __pthread_mutexattr_gettype and
3719 __pthread_mutexattr_settype.
3720 * lockfile.c: Use __pthread_mutexattr_settype instead of
3721 __pthread_mutexattr_setkind_np.
3722 * mutex.c: Define __pthread_mutexattr_gettype and
3723 __pthread_mutexattr_settype.
3725 * sysdeps/pthread/pthread.h: Declare __pthread_mutexattr_gettype and
3726 __pthread_mutexattr_settype.
3727 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_init_recursive):
3728 Use __pthread_mutexattr_settype.
3730 1998-07-08 22:26 Ulrich Drepper <drepper@cygnus.com>
3732 * Versions: Add pthread_mutexattr_gettype, pthread_mutexattr_settype.
3733 * mutex.c: Define weak alias pthread_mutexattr_gettype and
3734 pthread_mutexattr_settype.
3735 * sysdeps/pthread/pthread.h: Declare these functions.
3736 Move pthread_sigmask and pthread_kill declaration in separate header.
3737 * sysdeps/unix/sysv/linux/bits/sigthread.h: New file.
3739 1998-07-07 15:20 Ulrich Drepper <drepper@cygnus.com>
3741 * Makefile: Add rules to compile and run tests.
3742 * Examples/ex1.c: Little changes to fix warnings.
3743 * Examples/ex2.c: Likewise.
3744 * Examples/ex3.c: Likewise.
3745 * Examples/ex4.c: Likewise.
3746 * Examples/ex5.c: Likewise.
3747 * Examples/ex6.c: New file.
3749 1998-07-05 11:54 Ulrich Drepper <drepper@cygnus.com>
3751 * Versions: Add pthread_attr_init to GLIBC_2.1 version in libc.
3753 1998-07-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3755 * attr.c: Include <string.h>.
3757 1998-06-30 11:47 Ulrich Drepper <drepper@cygnus.com>
3759 * attr.c: Include errno.h. Use memcpy to copy sched_param.
3760 * internals.h: Include limits.h.
3761 * manager.c: Use memcpy to copy sched_param.
3762 * ptfork.c: Include errno.h.
3763 * pthread.c: Likewise.
3764 * semaphore.c: Likewise.
3765 * specific.c: Likewise.
3766 * spinlock.h: Likewise.
3767 * sysdeps/pthread/pthread.h: Include only allowed headers. Move
3768 type definition to ...
3769 * sysdeps/pthread/bits/pthreadtypes.h: ...here. New file.
3771 1998-06-29 12:34 Ulrich Drepper <drepper@cygnus.com>
3773 * sysdeps/pthread/pthread.h: Use __PMT not __P for function pointers.
3775 * sysdeps/pthread/pthread.h: Define various PTHREAD_* symbols also
3776 as macros as demanded in POSIX.1, Annex C.
3778 1998-06-29 12:29 Ulrich Drepper <drepper@cygnus.com>
3780 * internals.h (struct pthread_request): For free use pthread_t
3781 instead of pthread_descr.
3782 * join.c (pthread_join): Pass thread_id, not th to manager.
3783 (pthread_detach): Likewise.
3784 * manager.c (__pthread_manager): Except thread ID in FREE_REQ case.
3785 (pthread_exited): Remove detached queue code.
3786 (pthread_handle_free): Expect thread ID parameter and use it to
3787 validate the thread decsriptor. Don't use detached queue.
3788 Patches by Xavier Leroy.
3790 1998-06-27 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3792 * libpthread.map: Export accept, longjmp, sigaction, siglongjmp,
3793 _IO_flockfile, _IO_ftrylockfile, _IO_funlockfile,
3794 __pthread_atfork, __pthread_key_create, __pthread_once.
3795 * internals.h: Doc fix.
3796 * pthread.c (__pthread_initialize): Define again.
3798 1998-06-26 Ulrich Drepper <drepper@cygnus.com>
3800 * manager.c (pthread_exited): If thread is not detached put it on
3802 (pthread_handle_free): If thread is not on list with living threads
3803 search on list with detached threads.
3805 * sysdeps/pthread/pthread.h (PTHREAD_RWLOCK_INITIALIZER): Correct
3806 for new definition of pthread_rwlock_t.
3808 * spinlock.c: Correct test whether to compile
3809 __pthread_compare_and_swap or not.
3811 1998-06-25 19:27 Ulrich Drepper <drepper@cygnus.com>
3813 * attr.c: Finish user stack support. Change locking code to be safe
3814 in situations with different priorities.
3815 * cancel.c: Likewise.
3816 * condvar.c: Likewise.
3817 * internals.h: Likewise.
3819 * manager.c: Likewise.
3820 * mutex.c: Likewise.
3821 * pthread.c: Likewise.
3822 * ptlongjmp.c: Likewise.
3823 * queue.h: Likewise.
3824 * rwlock.c: Likewise.
3825 * semaphore.c: Likewise.
3826 * semaphore.h: Likewise.
3827 * signals.c: Likewise.
3828 * spinlock.c: Likewise.
3829 * spinlock.h: Likewise.
3830 * sysdeps/pthread/pthread.h: Likewise.
3831 Patches by Xavier Leroy.
3833 * sysdeps/i386/i686/pt-machine.h: New file.
3835 1998-06-25 Ulrich Drepper <drepper@cygnus.com>
3837 * sysdeps/pthread/pthread.h: Make [sg]et_stacksize and
3838 [sg]et_stackaddr prototypes always available.
3840 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
3841 _POSIX_THREAD_ATTR_STACKSIZE and _POSIX_THREAD_ATTR_STACKADDR.
3843 1998-06-24 Ulrich Drepper <drepper@cygnus.com>
3845 * manager.c (pthread_free): Undo patch from 980430.
3846 Reported by David Wragg <dpw@doc.ic.ac.uk>.
3848 1998-06-09 15:07 Ulrich Drepper <drepper@cygnus.com>
3850 * manager.c: Define __pthread_manager_adjust_prio and use it to
3851 increase priority when needed.
3852 * internals.h: Add prototype for __pthread_manager_adjust_prio.
3853 * mutex.c: Optimize mutexes to wake up only one thread.
3854 * pthread.c: Move PID of manager for global variable in structure
3856 Patches by Xavier Leroy.
3858 1998-06-07 13:47 Ulrich Drepper <drepper@cygnus.com>
3860 * sysdeps/pthread/bits/libc-lock.h: Optimize cleanup handlers a bit.
3862 1998-06-03 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3864 * attr.c: Correct typo.
3866 1998-05-01 Ulrich Drepper <drepper@cygnus.com>
3868 * manager.c (pthread_free): Unmap guard before the stack.
3869 Patch by Matthias Urlichs.
3871 1998-04-30 Ulrich Drepper <drepper@cygnus.com>
3873 * manager.c (pthread_free): Detect already free child.
3874 Patch by Xavier Leroy, reported by Matthias Urlichs.
3876 1998-04-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3878 * Makefile (linuxthreads-version): Renamed back from
3881 1998-04-21 Ulrich Drepper <drepper@cygnus.com>
3883 * ptlongjmp.c: Add prototypes for __libc_siglongjmp and
3886 1998-04-20 14:55 Ulrich Drepper <drepper@cygnus.com>
3888 * Makefile (libpthread-routines): Add ptlongjmp and spinlock.
3889 * internals.h: Add definitions for new spinlock implementation.
3890 * ptlongjmp.c: New file.
3891 * spinlock.c: New file.
3892 * spinlock.h (acquire): Don't reschedule using __sched_yield, use
3893 new function __pthread_acquire to prevent deadlocks with thread
3894 with different priorities.
3895 Patches by Xavier Leroy <Xavier.Leroy@inria.fr>.
3897 1998-03-16 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3899 * manager.c (__pthread_manager): Reduce first argument to select
3900 to include just the needed file descriptor.
3902 1998-03-17 00:06 Ulrich Drepper <drepper@cygnus.com>
3904 * manager.c: Fix last patch which caused core dumps.
3906 * pthread.c: Correctly handle missing SIGRTMIN.
3908 1998-03-15 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3910 * libpthread.map: Add __libc_internal_tsd_get and
3911 __libc_internal_tsd_set. Add missing cancelable functions. Export
3912 libc internal versions of the cancelable functions.
3914 1998-03-13 16:51 Ulrich Drepper <drepper@cygnus.com>
3916 * weaks.c: Define pthread_attr_init as GLIBC_2.0 and GLIBC_2.1.
3918 1998-03-13 00:46 Ulrich Drepper <drepper@cygnus.com>
3920 * attr.c: Implement pthread_attr_[gs]etguardsize,
3921 pthread_attr_[gs]setstackaddr, pthread_attr_[gs]etstacksize.
3922 Change pthread_attr_init to have two interfaces.
3923 * internals.h (struct _pthread_descr_struct): Add new fields for
3925 * libpthread.map: Add names in GLIBC_2.1 section.
3926 * manager.c (pthread_handle_create): Implement guardsize and
3928 (pthread_free): Likewise.
3929 * pthread.c (pthread_create): Add new interface for changed
3931 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
3932 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add definition of
3935 1998-03-11 00:42 Wolfram Gloger <wmglo@dent.med.uni-muenchen.de>
3937 * manager.c: Enable resetting of the thread scheduling policy
3938 to SCHED_OTHER when the parent thread has a different one.
3940 1998-02-01 13:51 Ulrich Drepper <drepper@cygnus.com>
3942 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
3943 _POSIX_ASYNCHRONOUS_IO.
3945 * sysdeps/pthread/pthread.h: Define bits for Unix98 variants of
3947 * mutex.c: Implement new mutex types.
3949 * internals.h: Include <signal.h>.
3951 * libpthread.map: Add __erno_location and __h_errno_location.
3953 * errno.c: Return pointer to variable actually in use. This might
3954 not be the one in the thread structure.
3955 * internals.h (struct _pthread_descr_struct): Add new fields p_errnop
3957 * manager.c (__pthread_manager): Set p_errnop and p_h_errnop member
3958 of manager thread structure.
3959 (pthread_handle_create): Set p_errnop and p_h_errnop members for new
3961 * pthread.c: Adapt initializer for thread structures.
3962 (__pthread_initial_thread): Set p_errnop and p_h_errnop member.
3963 (__pthread_reset_main_thread): Reset p_errnop and p_h_errnop of
3964 current thread to global variables.
3966 1998-01-31 17:27 Ulrich Drepper <drepper@cygnus.com>
3968 * rwlock.c: New file.
3969 * Makefile (libpthread-routines): Add rwlock.
3970 * sysdeps/pthread/pthread.h: Define data structures and declare
3972 * libpthread.map: Add new functions.
3974 1997-12-18 13:50 Philip Blundell <pb@nexus.co.uk>
3976 * sysdeps/arm/pt-machine.h: New file; add ARM support.
3977 * sysdeps/arm/Implies: likewise.
3978 * README: Document it.
3980 1997-12-13 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3982 * signals.c: Remove unneeded initializer for sigwaited, saving a
3985 1997-04-11 01:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3987 * semaphore.c (sem_init): Set sem_spinlock only if available.
3989 1997-12-04 01:48 Ulrich Drepper <drepper@cygnus.com>
3991 * mutex.c: Implement PTHREAD_MUTEX_CHECKERROR.
3992 * sysdeps/pthread/pthread.h: Define PTHREAD_MUTEX_CHECKERROR.
3994 * Makefile: Update from LinuxThreads 0.7.
3995 * internals.h. Likewise.
3996 * manager.c: Likewise.
3997 * mutex.c: Likewise.
3998 * pthread.c: Likewise.
3999 * signals.c: Likewise.
4000 * specific.c: Likewise.
4001 * Examples/ex3.c: Likewise.
4003 1997-11-20 18:13 Ulrich Drepper <drepper@cygnus.com>
4005 * pthread.c (__pthread_reset_main_thread): Close pipe only if still
4008 1997-10-29 05:38 Ulrich Drepper <drepper@cygnus.com>
4010 * wrapsyscall.c: Add socket functions which are also cancelation
4013 1997-10-19 21:40 Wolfram Gloger <wg@wolfram.dent.med.uni-muenchen.de>
4015 * specific.c (__libc_internal_tsd_set, __libc_internal_tsd_get):
4016 New functions for fast thread specific data within libc.
4018 * internals.h: Add new array p_libc_specific to struct
4019 _pthread_descr_struct.
4021 * sysdeps/pthread/bits/libc-lock.h: Declare new functions.
4023 1997-10-13 05:39 Ulrich Drepper <drepper@cygnus.com>
4025 * semaphore.h: Add __BEGIN_DECLS/__END_DECLS.
4026 Reported by Ralf Corsepius <corsepiu@faw.uni-ulm.de>.
4028 1997-08-29 03:05 Ulrich Drepper <drepper@cygnus.com>
4030 * internals.h (struct _pthread_descr_struct): Add definitions for
4031 two-level specific key handling.
4032 * manager.c (pthread_handle_create): Initialize specific memory array.
4033 * specific.c: Implement two-level key handling.
4034 * weaks.c: Don't provide dummy key handling.
4035 * sysdeps/pthread/bits/libc-lock.h: Typedef __libc_lock_t (no #define).
4036 Add definition of __libc_key_t.
4037 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define PTHREAD_KEYS_MAX
4039 Add definition of _POSIX_THREAD_DESTRUCTOR_ITERATIONS and
4040 PTHREAD_DESTRUCTOR_ITERATIONS.
4042 * manager.c (pthread_handle_create): Compare mmap result with
4045 * ptfork.c: Rename to __pthread_atfork and make old name a weak alias.
4046 * sysdeps/pthread/bits/pthread.h: Add prototype for __pthread_atfork.
4048 1997-08-22 19:04 Richard Henderson <rth@cygnus.com>
4050 sysdeps/sparc -> sysdeps/sparc/sparc32
4051 sysdeps/sparc64 -> sysdeps/sparc/sparc64
4053 * internals.h: Change definition of THREAD_SELF to be an expression,
4054 not a statement that did a return.
4055 * sysdeps/alpha/pt-machine.h (THREAD_SELF): Update accordingly.
4056 * sysdeps/sparc/sparc32/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
4057 Follow Solaris and use a "system reserved" register (%g6) to hold
4058 the thread descriptor.
4059 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
4061 1997-08-03 00:09 Ulrich Drepper <drepper@cygnus.com>
4063 * mutex.c: Correct pthread_once. Patch by Xavier Leroy.
4064 * sysdeps/pthread/pthread.h: Add prototype for __pthread_once.
4065 * sysdeps/pthread/bits/pthread.h: Add macros for __libc_once.
4067 * semaphore.c: Include spinlock.h only when needed.
4069 * specific.c (__pthread_setsepcific, __pthread_getspecific): Reject
4070 keys for entries not in use.
4072 * weaks.c: Implement key handling functions for real.
4074 1997-06-29 01:04 Richard Henderson <richard@gnu.ai.mit.edu>
4076 Initial sparc64-linux support:
4077 * sysdeps/sparc64/Implies: New file.
4078 * sysdeps/sparc64/pt-machine.h: Likewise.
4080 1997-06-29 00:48 Ulrich Drepper <drepper@cygnus.com>
4082 * semaphore.c: Include spinlock.h at correct place.
4085 1997-06-13 10:06 Richard Henderson <rth@tamu.edu>
4087 The Great Bit File Move:
4088 * sysdeps/alpha/semaphorebits.h: -> .../bits/semaphore.h.
4089 * sysdeps/powerpc/semaphorebits.h: Likewise.
4090 * sysdeps/pthread/cmpxchg/semaphorebits.h: Likewise.
4091 * sysdeps/pthread/no-cmpxchg/semaphorebits.h: Likewise.
4092 * sysdeps/pthread/libc-lock.h: -> bits/
4093 * sysdeps/pthread/stdio-lock.h: Likewise.
4094 * sysdeps/unix/sysv/linux/local_lim.h: Likewise.
4095 * sysdeps/unix/sysv/linux/posix_opt.h: Likewise.
4096 * semaphore.h: Likewise.
4097 * sysdeps/pthread/pthread.h: Likewise.
4099 * lockfile.c: <foo.h> -> <bits/foo.h>.
4100 * semaphore.h: Likewise.
4102 * Makefile: (headers): foo.h -> bits/foo.h.
4103 * sysdeps/pthread/Makefile: Likewise.
4105 1997-04-11 01:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
4107 * semaphore.c (sem_init): Set sem_spinlock only if available.
4109 * sysdeps/m68k/pt-machine.h (testandset, __compare_and_swap): Fix
4112 1997-04-09 03:00 Ulrich Drepper <drepper@cygnus.com>
4114 Update from LinuxThreads 0.6.
4116 * attr.c (pthread_attr_getdetachstate): Use __sched_get_priority_max
4117 and __sched_get_priority_min instead of names without `__'.
4119 * manager.c: Rewrite large parts to implement opaque pthread_t.
4121 * cancel.c: Adapt for opaque pthread_t type.
4122 * condvar.c: Likewise.
4123 * errno.c: Likewise.
4125 * mutex.c: Likewise.
4126 * pthread.c: Likewise.
4127 * signals.c: Likewise.
4128 * specific.c: Likewise.
4129 * restart.h: Likewise.
4130 * queue.h: Likewise.
4131 * Examples/ex3.c: Likewise.
4132 * Examples/ex4.c: Likewise.
4133 * sysdeps/pthread/pthread.h: Likewise.
4135 * pthread.c: Accumulate time for all threads in thread manager.
4137 * semaphore.c: Implement fallback implementation for architectures
4138 sometimes missing compare-exchange operations.
4140 * cancel.c (pthread_cancel): Validate handle argument.
4141 * join.c (pthread_join): Likewise.
4142 (pthread_detach): Likewise.
4143 * signals.c (pthread_kill): Likewise.
4145 * spinlock.h (acquire): Use __sched_yield not sched_yield.
4147 * queue.h (enqueue): Enqueue thread according to priority.
4149 * internals.c (struct pthread_start_args): New struct for passing
4150 args to cloning function.
4151 (struct _pthread): Rename to _pthread_descr_struct and adapt for
4154 * Examples/Makefile (clean): Pass -f option to rm.
4156 * sysdeps/i386/pt-machine.h: Add check for compare-exchange instruction
4157 and define TEST_FOR_COMPARE_AND_SWAP.
4158 * sysdeps/i386/i486/pt-machine.h: Removed.
4160 * sysdeps/unix/sysv/linux/local_lim.h (PTHREAD_THREADS_MAX): Increase
4163 1997-04-04 16:38 Ulrich Drepper <drepper@cygnus.com>
4165 * restart.h (suspend): Clear p_signal before suspending.
4166 (suspend_with_cancellation): Likewise.
4167 Patch by Xavier Leroy <Xavier.Leroy@inria.fr>.
4169 * weaks.c: Make __pthread_key_create return 1.
4170 * sysdeps/pthread/libc-lock.h: Define __libc_key_create,
4171 __libc_getspecific, __libc_setspecific, and __libc_key_t.
4172 * sysdeps/pthread/stdio-lock.h: Don't care for implementation not
4175 1997-03-19 15:13 Miguel de Icaza <miguel@nuclecu.unam.mx>
4177 * sysdeps/sparc/pt-machine (RELEASE): Fix.
4179 1997-03-01 07:55 Geoff Keating <geoffk@ozemail.com.au>
4181 * sysdeps/powerpc/Implies: Added.
4182 * sysdeps/powerpc/pt-machine.h: Added.
4183 * sysdeps/powerpc/semaphorebits.h: Added.
4185 1997-01-22 01:22 Ulrich Drepper <drepper@cygnus.com>
4187 * pthread.c (__pthread_initial_thread): Correct
4189 (__pthread_manager_thread): Likewise.
4190 Reported by Andreas Jaeger.
4192 1997-01-18 22:15 Richard Henderson <rth@tamu.edu>
4194 Since sigset_t no longer fits in a register, we can't pass in the
4195 thread's initial mask so easily. Take this opportunity to simplify
4196 the clone implementation by only accepting a single void* argument.
4198 * manager.c (__pthread_manager): Put thread vitals in the thread
4199 struct instead of as arguments through clone.
4200 (pthread_start_thread): Look for them there.
4201 * internals.h (struct _pthread): Add p_initial_fn,
4202 p_initial_fn_arg, p_initial_mask. Fix __pthread_manager proto.
4203 * pthread.c (pthread_initialize_manager): Revise clone invocation.